diff options
Diffstat (limited to 'functions.php')
| -rw-r--r-- | functions.php | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/functions.php b/functions.php index 09118a4..ff82c56 100644 --- a/functions.php +++ b/functions.php @@ -63,15 +63,20 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { } else if ( $option == "logout" ){ ?> <p style="color:red">Logout erfolgreich!</p> +<!--div class="alert alert-danger" role="alert"><strong>Logout erfolgreich!</strong></div--> <?php } else if ( $option == "password" ) { ?> <p style="color:red">Nutzer/Passwort falsch</p> <?php - } else if ( $option == "missing") { + } else if ( $option == "missing" ) { ?> <p style="color:red">Bitte fülle alle Felder aus!</p> <?php + } else if ( $option == "hash" ) { +?> +<p style="color:red">Deine E-Mail war falsch. Du scheinst kein Mitglied der JG zu sein.</p> +<?php } ?> </legend> @@ -111,6 +116,8 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { </div> */ ?> +<p>Bitte gib deine E-Mail Adresse ein. Es wird dir daraufhin eine Mail mit einem Link zugestellt, der dich einloggt.</p> + <div class="form-group"> <label class="col-md-4 control-label" for="name">E-Mail</label> <div class="col-md-4"> @@ -1124,7 +1131,7 @@ function rrmdir($dir) { } } -function print_verify_by_email($option = false){ +function print_verify_by_email($email, $option = false){ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { $goto = htmlentities($_GET["goto"]); @@ -1137,47 +1144,42 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { redirect("index"); } ?> -<!--form class="form-horizontal" method="POST" action="<?php echo DOMAIN; ?>?page=action&task=login&goto=<?php echo $goto; ?>"--> -<form class="form-horizontal" method="GET" action="<?php echo DOMAIN; ?>?page=action&task=genHash&goto=<?php echo $goto; ?>"> -<fieldset> +<h1>Junge Gemeinde Adlershof</h1><br> + </div> +<div class="row"> +<!--p>Es wurde eine E-Mail an <strong><?php echo $email; ?></strong> versandt. <br> +Bitte folge dem enthaltenen Link oder gebe den Authentifizierungscode in das unten stehende Feld ein:</p--> +<p>Es wurde dir eine E-Mail an <strong><?php echo $email; ?></strong> gesendet. +Bitte folge dem enthaltenen Link oder gebe den Code per Hand ein.</p> +</div> +<br> -<!-- Form Name --> -<legend><h1>Junge Gemeinde Adlershof</h1> -<?php - if ( ! $option ){ -?> -<p>Login required</p> -<?php - } else if ( $option == "logout" ){ -?> -<p style="color:red">Logout erfolgreich!</p> -<?php - } else if ( $option == "password" ) { -?> -<p style="color:red">Nutzer/Passwort falsch</p> -<?php - } else if ( $option == "missing") { -?> -<p style="color:red">Bitte fülle alle Felder aus!</p> -<?php - } -?> -</legend> +<form class="form-horizontal" method="GET" action="<?php echo DOMAIN; ?>?page=action&task=verify&email=<?php echo $email; ?>&goto=<?php echo $goto; ?>"> +<fieldset> +<!-- Text input--> <div class="form-group"> - <label class="col-md-4 control-label" for="name">Hash</label> + <label class="col-md-4 control-label" for="hash">Authentifizierung</label> <div class="col-md-4"> - <input id="name" name="name" placeholder="Deine E-Mail Adresse" class="form-control input-md" required="" type="text"> + <input id="hash" name="hash" placeholder="Der Authentifizierungscode wurde dir per E-Mail geschickt." class="form-control input-md" required="" type="text"> </div> </div> +<!-- Button --> <div class="form-group"> <label class="col-md-4 control-label" for="submit"></label> <div class="col-md-4"> - <button id="submit" name="submit" class="btn btn-info"><span class="glyphicon glyphicon-log-in"></span> Lass mich rein</button> + <button id="submit" name="submit" class="btn btn-info"><span class="glyphicon glyphicon-log-in"></span> Lass mich rein!</button> </div> </div> +<input name="page" value="action" type="hidden"> +<input name="task" value="verify" type="hidden"> +<input name="email" value="<?php echo $email; ?>" type="hidden"> +<input name="goto" value="<?php echo $goto; ?>" type="hidden"> + +</fieldset> +</form> <?php |
