diff options
| author | Horus3 | 2015-10-26 19:23:30 +0100 |
|---|---|---|
| committer | Horus3 | 2015-10-26 19:23:30 +0100 |
| commit | 067a3863fe3d801ae6384dd5a904b9ad408dd3cc (patch) | |
| tree | 175e4cb50f727d18c8d2dc1e19379fa4fa0ad502 /functions.php | |
| parent | 5ee0ffcdce5a931eda3c8a21336b0b396aac1624 (diff) | |
| download | jungegemeinde-067a3863fe3d801ae6384dd5a904b9ad408dd3cc.tar.gz | |
Add login via email.
Diffstat (limited to 'functions.php')
| -rw-r--r-- | functions.php | 81 |
1 files changed, 80 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 25c22b8..599bfb7 100644 --- a/functions.php +++ b/functions.php @@ -49,7 +49,8 @@ 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="POST" action="<?php echo DOMAIN; ?>?page=action&task=login&goto=<?php echo $goto; ?>"--> +<form class="form-horizontal" method="POST" action="<?php echo DOMAIN; ?>?page=action&task=genHash&goto=<?php echo $goto; ?>"> <fieldset> <!-- Form Name --> @@ -75,6 +76,7 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { ?> </legend> +<?php /* <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="name">Username*</label> @@ -107,6 +109,24 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { <div class="row"> <a href="<?php echo DOMAIN; ?>?page=recover" title="Recover your password">[Passwort vergessen?]</a> </div> + */ ?> + +<div class="form-group"> + <label class="col-md-4 control-label" for="name">E-Mail</label> + <div class="col-md-4"> + <input id="name" name="name" placeholder="Deine E-Mail Adresse" class="form-control input-md" required="" type="text"> + </div> +</div> + +<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> + </div> +</div> + + + <?php } @@ -1103,3 +1123,62 @@ function rrmdir($dir) { rmdir($dir); } } + +function print_verify_by_email($option = false){ +if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { + $goto = htmlentities($_GET["goto"]); + +} else { + $goto = "index"; +} + + global $user; + if ( $user->isLoggedIn() ){ + 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> + +<!-- 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> + +<div class="form-group"> + <label class="col-md-4 control-label" for="name">Hash</label> + <div class="col-md-4"> + <input id="name" name="name" placeholder="Deine E-Mail Adresse" class="form-control input-md" required="" type="text"> + </div> +</div> + +<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> + </div> +</div> + + + +<?php +} |
