diff options
| author | oweissbarth | 2014-03-12 20:45:33 +0100 |
|---|---|---|
| committer | oweissbarth | 2014-03-12 20:46:00 +0100 |
| commit | 478a6dbc03c1ed65f5a187a6752bc130d3b82ac3 (patch) | |
| tree | 920b030f421d02644c45f34306573a4afb32f936 /www | |
| parent | 1bac7aec0ab18c69aae7d01216458dd83a26c864 (diff) | |
| download | files.iamfabulous.de-478a6dbc03c1ed65f5a187a6752bc130d3b82ac3.tar.gz | |
Added invite-form
Diffstat (limited to 'www')
| -rw-r--r-- | www/functions/func_invite.php | 8 | ||||
| -rw-r--r-- | www/invite.php | 24 | ||||
| -rw-r--r-- | www/static/invite.css | 91 |
3 files changed, 116 insertions, 7 deletions
diff --git a/www/functions/func_invite.php b/www/functions/func_invite.php index 3de7e2e..cc1118b 100644 --- a/www/functions/func_invite.php +++ b/www/functions/func_invite.php @@ -62,13 +62,7 @@ function invite($db){ return false; } } else { - echo "Formular"; - echo "Hallo $name - - <form method='post' action='/invite'> - - <p> E-Mail: <input type='text' name='email'></p> - - <input type='hidden' name='username' value='$_SESSION[username]'> - - <input type='submit' name='submit' value='invite'> - - </form>"; + include("invite.php"); return false; } } diff --git a/www/invite.php b/www/invite.php new file mode 100644 index 0000000..8eb721d --- /dev/null +++ b/www/invite.php @@ -0,0 +1,24 @@ +<?php include("static/header.html")?> + + <link rel="stylesheet" type="text/css" href="/static/invite.css"> + + <div class="invite-area"> + <h1 class="invite-area"> Invite </h1> + <div class="invite-area" id="invite-info-bar"> + <?php if(isset($_GET['reason']) && $_GET['reason'] == 'success' ){ + echo '<h1 id="invite-message">An invitation was sent.</h1> + '; + }elseif(isset($_GET['reason']) && $_GET['reason'] == 'database'){ + echo '<h1 id="invite-error">Internal Error. Please contact admin</h1> + '; + }elseif(isset($_GET['reason']) && $_GET['reason'] == 'invites'){ + echo '<h1 id="invite-error">Error: Your invite-limit has been reached.</h1> + '; + }?> + </div> + <form id="invite-form" method='post' action='/invite'> + <input type="email" placeholder="email" name="email" id="email-input" class="invite-input" required> + <input type="submit" name="invite" id="button-input" class="invite-input" value="invite"> + </form> + </div> +<?php include("static/footer.html")?> diff --git a/www/static/invite.css b/www/static/invite.css new file mode 100644 index 0000000..7ea92a3 --- /dev/null +++ b/www/static/invite.css @@ -0,0 +1,91 @@ +/********************************************************* + invite-Form +**********************************************************/ +div.invite-area{ + height: 200px; + width: 400px; + position: relative; + top: 50%; + margin-top: -100px; + margin-left: auto; + margin-right: auto; + border: 1px solid #1F3D4C; + padding: 10px; +} + +h1.invite-area{ + font-size: 32px; + font-weight: normal; + line-height: 32px; + padding:0; + display: block; +} + +#invite-info-bar{ + display: block; + width: 400px; + height:32px; + padding:0; + margin:0; + border: none; + position: static; +} + +h1.invite-area{ + font-size: 32px; + font-weight: normal; + line-height: 32px; + padding:0; + display: inline-block; +} + +#invite-error{ + font-size: 13pt; + background: red; + text-align:right; + float:right; + display: inline-block; + line-height: 26px; + border: 3px solid #1F3D4C; +} + +#invite-message{ + font-size: 13pt; + text-align:right; + float:right; + display: inline-block; + line-height: 26px; + border: 3px solid #1F3D4C; +} + + +form.invite-form{ + +} + +input.invite-input[type=email]{ + border: none; + box-shadow: inset 0px 0px 1px 1px #1F3D4C; + border-radius: 0; + height: 40px; + font-size: 25px; + margin-top: 15px; + width: 395px; + display:block; + padding-left: 5px; +} + +input.invite-input:focus{ + background: #D6E0E5 +} + +#button-input{ + height: 40px; + width: 120px; + display:inline; + border: none; + box-shadow: inset 0px 0px 1px 1px #1F3D4C; + border-radius: 0; + font-size: 25px; + margin-top: 15px; +} |
