fix pw page
							parent
							
								
									0e0ec17630
								
							
						
					
					
						commit
						79f020b9c2
					
				|  | @ -1,23 +0,0 @@ | |||
| <div style="width: 400px; margin: auto; left: 50%;"> | ||||
|     Hier kannst du einen Invite Link erstellen.<br> | ||||
|     Jeder der solch einen Link bekommt, kann sich im Grid Regestrieren. | ||||
|     Der Link ist einzigartig und funktioniert nur einmalig.<br> | ||||
|     Nach dem aufrufen des Links muss ein Name, Passwort und Standart Avatar ausgewählt werden. | ||||
| </div> | ||||
| 
 | ||||
| <div style="width: 400px; margin: auto; left: 50%;"> | ||||
|     <form action="index.php?page=invite" method="post"> | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <label for="linkOutput">InviteLink:</label> | ||||
|                 <input type="text" class="form-control" id="linkOutput" name="formLink" value="%%link%%"> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <button type="submit" name="generateLink" class="btn btn-primary btn-lg">Link Generieren</button> | ||||
|             </div> | ||||
|         </div> | ||||
|     </form> | ||||
| </div> | ||||
|  | @ -1,43 +0,0 @@ | |||
| 
 | ||||
| 
 | ||||
| <center>%%INFOMESSAGE%%</center> | ||||
| 
 | ||||
| <div style="width: 400px; margin: auto; left: 50%;"> | ||||
|     <form action="index.php?page=password" method="post"> | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <label for="oldPassword">Altes Passwort</label> | ||||
|                 <input type="text" class="form-control" id="oldPassword" name="oldPassword""> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <label for="newPassword">Neues Passwort</label> | ||||
|                 <input type="text" class="form-control" id="PasswordNew" name="newPassword""> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|          | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <label for="newPasswordRepeate">Neues Passwort wiederholen</label> | ||||
|                 <input type="text" class="form-control" id="PasswordNewRepeate" name="newPasswordRepeate""> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
| 
 | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <hr> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <div class="row" style="margin-top: 15px;"> | ||||
|             <div class="col"> | ||||
|                 <button type="submit" name="savePassword" class="btn btn-primary btn-lg">Speichern</button> | ||||
|             </div> | ||||
|         </div> | ||||
|          | ||||
|     </form> | ||||
| </div> | ||||
|  | @ -12,7 +12,7 @@ | |||
|             </div> | ||||
|              | ||||
|             <div style="width: 400px; margin: auto; left: 50%;"> | ||||
|                 <form action="index.php?page=invite" method="post"> | ||||
|                 <form action="index.php?page=users" method="post"> | ||||
|                     <div class="row" style="margin-top: 15px;"> | ||||
|                         <div class="col"> | ||||
|                             <label for="linkOutput">InviteLink:</label> | ||||
|  |  | |||
|  | @ -1,21 +1,17 @@ | |||
| <?php | ||||
| 	$HTML->setHTMLTitle("Invite erstellen"); | ||||
| 	$HTML->importSeitenInhalt("pages/HTML/invite.html"); | ||||
| 
 | ||||
|     $statement = $RUNTIME['PDO']->prepare("CREATE TABLE IF NOT EXISTS `InviteCodes` (`InviteCode` VARCHAR(64) NOT NULL, PRIMARY KEY (`InviteCode`))");  | ||||
|     $statement->execute(); | ||||
| 
 | ||||
|     if(isset($_REQUEST['generateLink']) || @$_REQUEST['generateLink'] != "") | ||||
|     if(@$_SESSION['LEVEL'] < 100) | ||||
|     { | ||||
|         $inviteID   =   md5(time().$_SESSION['UUID'].rand(11111, 9999999)); | ||||
|         $link       =   "https://".$_SERVER['SERVER_NAME']."/index.php?page=register&code=".$inviteID; | ||||
| 
 | ||||
|         $statement = $RUNTIME['PDO']->prepare('INSERT INTO `InviteCodes` (`InviteCode`) VALUES (:InviteCode)');  | ||||
|         $statement->execute(['InviteCode' => $inviteID]); | ||||
| 
 | ||||
|         $HTML->ReplaceSeitenInhalt("%%link%%", $link);  | ||||
|         $HTML->setHTMLTitle("Kein Zugriff"); | ||||
|         $HTML->SetSeitenInhalt("Dazu hast du keine Rechte!"); | ||||
|         $HTML->build(); | ||||
|         echo $HTML->ausgabe(); | ||||
|         die(); | ||||
|     } | ||||
| 
 | ||||
| 	$HTML->setHTMLTitle("Benutzer"); | ||||
| 	$HTML->importSeitenInhalt("pages/HTML/users.html"); | ||||
| 
 | ||||
| 
 | ||||
|     $HTML->ReplaceSeitenInhalt("%%link%%", ' ');  | ||||
|      | ||||
|     $HTML->build(); | ||||
|  |  | |||
|  | @ -52,6 +52,18 @@ | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     $PartnerName = ""; | ||||
|     $PartnerUUID = $RUNTIME['OPENSIM']->getPartner($_SESSION['UUID']); | ||||
|     if($PartnerUUID != null)$PartnerName = $RUNTIME['OPENSIM']->getUserName($PartnerUUID); | ||||
| 
 | ||||
|     $HTML->ReplaceSeitenInhalt("%%offlineIMSTATE%%", ' ');  | ||||
|     $HTML->ReplaceSeitenInhalt("%%firstname%%", $_SESSION['FIRSTNAME']);  | ||||
|     $HTML->ReplaceSeitenInhalt("%%lastname%%", $_SESSION['LASTNAME']);  | ||||
|     $HTML->ReplaceSeitenInhalt("%%partner%%", $PartnerName);  | ||||
|     $HTML->ReplaceSeitenInhalt("%%email%%", $RUNTIME['OPENSIM']->getUserMail($_SESSION['UUID']));  | ||||
|     $HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", "");  | ||||
|     $HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' '); | ||||
|     $HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');  | ||||
|     $HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');  | ||||
|      | ||||
|     $HTML->build(); | ||||
|  |  | |||
|  | @ -128,7 +128,7 @@ | |||
|     $HTML->ReplaceSeitenInhalt("%%lastname%%", $_SESSION['LASTNAME']);  | ||||
|     $HTML->ReplaceSeitenInhalt("%%partner%%", $PartnerName);  | ||||
|     $HTML->ReplaceSeitenInhalt("%%email%%", $RUNTIME['OPENSIM']->getUserMail($_SESSION['UUID']));  | ||||
|     $HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", $allUsers);  | ||||
|     $HTML->ReplaceSeitenInhalt("%%listAllResidentsAsJSArray%%", "");  | ||||
|     $HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' '); | ||||
|     $HTML->ReplaceSeitenInhalt("%%INFOMESSAGE%%", ' ');  | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,6 +11,20 @@ | |||
|     $HTML->setHTMLTitle("Benutzer"); | ||||
|     $HTML->importSeitenInhalt("pages/HTML/users.html"); | ||||
| 
 | ||||
|     $statement = $RUNTIME['PDO']->prepare("CREATE TABLE IF NOT EXISTS `InviteCodes` (`InviteCode` VARCHAR(64) NOT NULL, PRIMARY KEY (`InviteCode`))");  | ||||
|     $statement->execute(); | ||||
| 
 | ||||
|     if(isset($_REQUEST['generateLink']) || @$_REQUEST['generateLink'] != "") | ||||
|     { | ||||
|         $inviteID   =   md5(time().$_SESSION['UUID'].rand(11111, 9999999)); | ||||
|         $link       =   "https://".$_SERVER['SERVER_NAME']."/index.php?page=register&code=".$inviteID; | ||||
| 
 | ||||
|         $statement = $RUNTIME['PDO']->prepare('INSERT INTO `InviteCodes` (`InviteCode`) VALUES (:InviteCode)');  | ||||
|         $statement->execute(['InviteCode' => $inviteID]); | ||||
| 
 | ||||
|         $HTML->ReplaceSeitenInhalt("%%link%%", $link);  | ||||
|     } | ||||
| 
 | ||||
|     $table = '<table class="table"><thead><tr><th scope="col">Vorname</th><th scope="col">Nachname</th><th scope="col">Status</th><th scope="col">Aktionen</th></thead><tbody>%%ENTRY%%</tbody></table>'; | ||||
|      | ||||
|     $statement = $RUNTIME['PDO']->prepare("SELECT * FROM UserAccounts ORDER BY Created ASC"); | ||||
|  | @ -24,6 +38,7 @@ | |||
| 
 | ||||
|     $table = str_replace("%%ENTRY%%", "", $table); | ||||
|     $HTML->ReplaceSeitenInhalt("%%REGION-LIST%%", $table); | ||||
|     $HTML->ReplaceSeitenInhalt("%%link%%", ' ');  | ||||
| 
 | ||||
|     $HTML->build(); | ||||
|     echo $HTML->ausgabe(); | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ | |||
| 
 | ||||
|     <div id="wrapper"> | ||||
|         <ul class="sidebar navbar-nav"> | ||||
|             <li class="nav-item active"> | ||||
|             <li class="nav-item"> | ||||
|                 <a class="nav-link" href="index.php"> | ||||
|                     <i class="fas fa-fw fa-tachometer-alt"></i> | ||||
|                     <span>Übrsicht</span> | ||||
|  | @ -76,7 +76,7 @@ | |||
|                 Administration | ||||
|             </div> | ||||
| 
 | ||||
|             <li class="nav-item active"> | ||||
|             <li class="nav-item"> | ||||
|                 <a class="nav-link" href="index.php?page=loginPage"> | ||||
|                     <i class="fas fa-fw fa-key"></i> | ||||
|                     <span>Anmeldung</span> | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ | |||
| 
 | ||||
|     <div id="wrapper"> | ||||
|         <ul class="sidebar navbar-nav"> | ||||
|             <li class="nav-item active"> | ||||
|             <li class="nav-item"> | ||||
|                 <a class="nav-link" href="index.php"> | ||||
|                     <i class="fas fa-fw fa-tachometer-alt"></i> | ||||
|                     <span>Dashboard</span> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Christopher
						Christopher