Notice: Undefined index: do in C:\xampp\htdocs\index.php on line 470
Notice: Undefined index: do in C:\xampp\htdocs\index.php on line 508
SQL
<?phpsession_start();error_reporting(E_ALL);require 'functions.php';$functions = new functions();include 'templates/header.tpl';if(!isset($_POST['username']) && !isset($_SESSION['username'])){ include 'templates/login.tpl'; include 'templates/footer.tpl'; die; }else if(isset($_POST['username'])){ $PlayerInfo = $functions->GetPlayerInfo($_POST['username']); if($PlayerInfo == true && $PlayerInfo['Key'] == $_POST['password']) { $_SESSION['username'] = $_POST['username']; if(!isset($PlayerInfo['Email'])) { $PlayerInfo['Email'] = ''; $functions->UpdatePlayerInfo($PlayerInfo,$_SESSION['username']); } if(!isset($PlayerInfo['Pin'])) { $PlayerInfo['Pin'] = '0'; $functions->UpdatePlayerInfo($PlayerInfo,$_SESSION['username']); } } else { echo startcontent(); echo title("Loginversuch"); echo '<p align=center><b>Benutzername oder Passwort falsch</b></p><meta http-equiv="refresh" content="3; URL=">'; echo endcontent(); include 'templates/navlogin.tpl'; include 'templates/footer.tpl'; die; }}$PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']);if(!isset($_GET['page']) || $_GET['page'] == 'overview'){ echo startcontent(); echo title("Persoenliche Informationen") . '<table><colgroup width=200 span=2></colgroup><tr><td>'; if($PlayerInfo['Char'] != 0) echo '<img src="http://dreamlife-rp.de/skins/Skin_'.$PlayerInfo['Char'].'.png">'; else echo '<img src="images/skins/Skin_'.$PlayerInfo['Model'].'.png">'; if($PlayerInfo['Adjustable']) $status = "Offline"; else $status = "Online"; echo '</td><td align=center><h2>'.$_SESSION['username'].'</h2><br><b>Status:</b> '.$status.'</td></td></tr></table><hr><table><colgroup><col width=100><col width=400><col width=200><col width=400></colgroup><tr>'; if($PlayerInfo['Level'] == -999) echo dataout("Level",$PlayerInfo['AdminLevel'].' (Gebannt)'); else echo dataout("Level",$PlayerInfo['Level']); if($PlayerInfo['AdminLevel'] > 0 && $PlayerInfo['Level'] != -999) echo dataout("Admin","Ja (".$PlayerInfo['AdminLevel'].")"); else echo dataout("Admin","Nein"); echo '</tr><tr>'; if($PlayerInfo['DonateRank'] > 0) echo dataout("Premium","Ja (".$PlayerInfo['DonateRank'].")"); else echo dataout("Premium","Nein"); if($PlayerInfo['Sex'] == 1) echo dataout("Geschlecht","Männlich"); else echo dataout("Geschlecht","Weiblich"); echo '</tr><tr>'; echo dataout("Alter",$PlayerInfo['Age']." Jahre"); echo dataout("Verbrachte Zeit",$PlayerInfo['ConnectedTime']." Stunden")."</tr><tr>"; echo dataout("Respekt",$PlayerInfo['Respect']." Punkte")."<tr><td></td></tr><tr>"; echo dataout("Geldboerse","$".$PlayerInfo['Money']).dataout("Bank","$".$PlayerInfo['Bank'])."</tr><tr><td></td></tr><tr>"; echo dataout("Pin",$PlayerInfo['Pin'] ); echo dataout("Haus Nummer",$PlayerInfo['Haus'] ); echo '</tr></table>'; echo '<br \>'; echo '<br \>'; echo '<div id="">'; echo "<br \>"; echo "<br \>"; echo "<br \>"; echo '</div>'; echo endcontent(); }else if($_GET['page'] == 'settings'){ echo startcontent(); echo title("Settings"); if($PlayerInfo['Adjustable'] != 0) { $_SESSION['form'] = 'newpw'; echo '<form action="index.php?page=changepass" method="post">'; echo 'Altes Passwort: <input type="password" name="oldpw"><br>'; echo 'Neues Passwort: <input type="password" name="newpw"><br>'; echo 'Wiederholen: <input type="password" name="rechange"><br>'; echo '<input type="submit" value="Ändern">'; echo '</form>'; } else { echo ' Du musst Offline sein um dein Passwort zu ändern '; } echo endcontent();}else if($_GET['page'] == 'skill'){ echo startcontent(); echo title("Skills"). '<table>'; echo dataout("Dedektiv",$PlayerInfo['DetSkill']." Punkte").dataout("Sex",$PlayerInfo['SexSkill']." Punkte")."</tr><tr>"; echo dataout("Boxer",$PlayerInfo['BoxSkill']." Punkte").dataout("Anwalt",$PlayerInfo['LawSkill']." Punkte")."</tr><tr>"; echo dataout("Mechaniker",$PlayerInfo['MechSkill']." Punkte").dataout(" Autodiebstahl",$PlayerInfo['JackSkill']." Punkte")."</tr><tr>"; echo dataout("Autohaendler",$PlayerInfo['CarSkill']." Punkte").dataout("Reporter",$PlayerInfo['NewsSkill']." Punkte")."</tr><tr>"; echo dataout("Drogenhaendler",$PlayerInfo['DrugsSkill']." Punkte").dataout("Kochen",$PlayerInfo['CookSkill']." Punkte")."</tr><tr>"; echo dataout("Fischen",$PlayerInfo['FishSkill']." Punkte"); echo '</tr></table>'.endcontent();}else if($_GET['page'] == 'server'){ echo startcontent(); echo title("Serverinfos"); @require_once('SampQueryAPI.php'); $host = '91.203.212.19'; $port = 7777; $query = new SampQueryAPI($host,$port); if($query->IsOnline()) { $sInfo = $query->getInfo(); $Target = $query->getDetailedPlayers(); echo '<table>'; echo dataout("Hostname ",$sInfo['hostname'])."</tr><tr>"; echo dataout("Gamemode ",$sInfo['gamemode'])."</tr><tr>"; echo dataout('Spieler online ', $sInfo['players'] .' / '. $sInfo['maxplayers'])."</tr><tr>"; echo '</table>'; if($sInfo['players'] != '0') { echo "<table width=\"350px\">"; echo "<tr><th>PlayerID</th>"; echo "<th>Nickname</th>"; echo "<th>Score</th>"; echo "<th>Ping</th>"; if(@is_array($Target)) { foreach($Target as $players) { echo "<tr><td>"; echo $players['playerid']; echo "</td><td>"; echo $players['nickname']; echo "</td><td>"; echo $players['score']; echo "</td><td>"; echo $players['ping']; echo "</td><td>"; } echo "</table>"; } } else { echo ' Keiner Online '; } } else { echo ' Server offline '; }
echo endcontent();}else if($_GET['page'] == 'changepass'){ echo startcontent(); echo title("Settings"); if(isset($_SESSION['username']) && isset($_SESSION['form']) && $_SESSION['form'] == 'newpw') { if($_POST['oldpw'] == $PlayerInfo['Key']) { if($_POST['newpw'] == $_POST['rechange']) { $PlayerInfo['Key'] = $_POST['newpw']; if(!$functions->UpdatePlayerInfo($PlayerInfo , $_SESSION['username'])) { echo 'Ein unbekannter Fehler trat auf...<br />'; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=overview">'; unset($_SESSION['form']); }else{ echo 'Du hast dein Passwort geändert<br />'; echo 'Bitte logge dich gleich erneut ein ...<br />'; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=logout">'; echo''; unset($_SESSION['form']); } } else { echo'Die neuen Passwörter stimmen niht überein'; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=settings">'; unset($_SESSION['form']); } } else { echo'Das alte Passwort ist falsch'; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=settings">'; unset($_SESSION['form']); } } echo endcontent();}else if($_GET['page'] == 'logout'){ echo startcontent(); echo title("Logout"); echo '<p align=center>Du wurdest erfolgreich abgemeldet</p>'; echo '<meta http-equiv="refresh" content="1; URL=">'; session_unset(); $_SESSION=array(); echo endcontent();}else if($_GET['page'] == 'car'){ echo startcontent(); echo title("Cars"); echo '<center>'; if($functions->getfirstPlayerCars($_SESSION['username']) != ' Du hast kein Auto ') { echo '<img src="images/cars/'.$functions->getfirstPlayerCars($_SESSION['username']).'.jpg">'; echo '<br \>'; echo '<br \>'; echo $functions->GetVehicleName($functions->getfirstPlayerCars($_SESSION['username'])); echo '<br \>'; echo '<br \>'; }else { echo $functions->getfirstPlayerCars($_SESSION['username']); } if($functions->getsecPlayerCars($_SESSION['username']) != ' Du hast kein zweites Auto ') { echo '<img src="images/cars/'.$functions->getsecPlayerCars($_SESSION['username']).'.jpg">'; echo '<br \>'; echo '<br \>'; echo $functions->GetVehicleName($functions->getsecPlayerCars($_SESSION['username'])); echo '<br \>'; echo '<br \>'; }else { echo $functions->getsecPlayerCars($_SESSION['username']); } if($functions->getthirdPlayerCars($_SESSION['username']) != ' Du hast kein drittes Auto ') { echo '<img src="images/cars/'.$functions->getthirdPlayerCars($_SESSION['username']).'.jpg">'; echo '<br \>'; echo '<br \>'; echo $functions->GetVehicleName($functions->getthirdPlayerCars($_SESSION['username'])); echo '<br \>'; echo '<br \>'; }else { echo $functions->getthirdPlayerCars($_SESSION['username']); } echo '</center>'; echo endcontent();}else if($_GET['page'] == 'lizenzen'){ echo startcontent(); echo title("Lizenzen"); $PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']); if($PlayerInfo['CarLic'] == '1') { echo ' <br \>'; echo ' Führerschein : '; echo ' <img src="http://help.solidworks.com/2011/German/SolidWorks/sldworks/AllArt/art_common/PM_OK.gif">'; echo ' <br \>'; }else{ echo ' <br \>'; echo ' Führerschein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; } if($PlayerInfo['MotoLic'] == '1') { echo ' <br \>'; echo ' Motorradschein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; }else{ echo ' <br \>'; echo ' Motorradschein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; } if($PlayerInfo['LKWLic'] == '1') { echo ' <br \>'; echo ' LKW-Schein : '; echo ' <img src="http://help.solidworks.com/2011/German/SolidWorks/sldworks/AllArt/art_common/PM_OK.gif">'; echo ' <br \>'; }else{ echo ' <br \>'; echo ' LKW-Schein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; } if($PlayerInfo['FlyLic'] == '1') { echo ' <br \>'; echo ' Flugschein : '; echo ' <img src="http://help.solidworks.com/2011/German/SolidWorks/sldworks/AllArt/art_common/PM_OK.gif">'; echo ' <br \>'; }else{ echo ' <br \>'; echo ' Flugschein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; } if($PlayerInfo['BoatLic'] == '1') { echo ' <br \>'; echo ' Segelschein : '; echo ' <img src="http://help.solidworks.com/2011/German/SolidWorks/sldworks/AllArt/art_common/PM_OK.gif">'; echo ' <br \>'; }else{ echo ' <br \>'; echo ' Segelschein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; } if($PlayerInfo['GunLic'] == '1') { echo ' <br \>'; echo ' Waffenschein : '; echo ' <img src="http://help.solidworks.com/2011/German/SolidWorks/sldworks/AllArt/art_common/PM_OK.gif">'; echo ' <br \>'; }else{ echo ' <br \>'; echo ' Waffenschein : '; echo ' <img src="http://www.mospat.be/image/symbol/NotOk.png">'; echo ' <br \>'; } echo endcontent();}else if($_GET['page'] == 'setmail'){ echo startcontent(); echo title("SetMail"); if($PlayerInfo['Adjustable'] != '0') { $PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']); if(empty($PlayerInfo['Email']) or $PlayerInfo['Email'] == '0') { $_SESSION['form'] = 'set_mail'; echo '<form action="index.php?page=mail_set" method="post">'; echo 'EMail : <input type="text" name="email"><br>'; echo '<input type="submit" value="Ändern">'; echo '</form>'; }else if(!empty($PlayerInfo['Email'])) { echo ' Du hast schon eine Email angegeben '; } }else{ echo ' Du musst offline sein '; } echo endcontent();}else if($_GET['page'] == 'mail_set'){ echo startcontent(); echo title("SetMail"); if(isset($_SESSION['username']) && isset($_SESSION['form']) && $_SESSION['form'] == 'set_mail') { $PlayerInfo['Email'] = $_POST['email']; if(!$functions->UpdatePlayerInfo($PlayerInfo , $_SESSION['username'])) { echo ' Es ist ein Fehler aufgetreten '; unset($_SESSION['form']); }else { echo ' Email erfolgreich eingetragen '; unset($_SESSION['form']); } }else{ echo ' Error #3 - Bitte setzt deine Mail nochmal '; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=setmail">'; } echo endcontent();}else if($_GET['page'] == 'pin'){ echo startcontent(); echo title("Pin"); $PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']); if($PlayerInfo['Adjustable'] != '0') { if(isset($PlayerInfo['Pin']) && !isset($PlayerInfo['Email'])) { echo ' Du musst eine Mail angeben . Du wirst weitergeleitet '; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=setmail">'; } else if($PlayerInfo['Pin'] == '0' && !empty($PlayerInfo['Email'])) { $pin = rand(10000,88889); echo ' Dein PIN lautet : '. $pin.' <br> Merke ihn dir gut :)'; $PlayerInfo['Pin'] = $pin; $functions->UpdatePlayerInfo($PlayerInfo,$_SESSION['username']); }else if($PlayerInfo['Pin'] != '0') { echo ' Du hast schon einen Pin bekommen '; echo ' <br \>'; echo ' <br \>'; $PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']); echo '<a href="http://5.48.10.109/index.php?page=recovery&do=pin"> Pin vergessen ? Klick hier </a>'; }else if(empty($PlayerInfo['Email']) or $PlayerInfo['Email'] == '0') { echo ' Du musst eine Mail angeben . Du wirst weitergeleitet '; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=setmail">'; } else { echo ' Failed '; } } else { echo ' Du musst offline sein '; }
echo endcontent();}else if($_GET['page'] == 'recovery' && $_GET['do'] == 'pin'){ echo startcontent(); echo title("Pin Recovery"); $PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']); if(!empty($PlayerInfo['Email'])) { $pin = rand(10000,88889); $PlayerInfo['Pin'] = $pin; $functions->UpdatePlayerInfo($PlayerInfo,$_SESSION['username']); $empfaenger = $PlayerInfo['Email']; $absendername = "Pin Recovery - Dreamlife-roleplay.de.gg"; $absendermail = "twinker@twinker.eu"; $betreff = "Pin Recovery - Dreamlife-roleplay.de.gg"; $extra = "From: $absendername <$absendermail>\n"; $extra .= "Content-Type: text/html; charset=utf-8\n"; $extra .= "Content-Transfer-Encoding: 8bit\n"; $text = 'Hallo '.$_SESSION['username'].',<br> Du hast grade auf 5.48.10.109 einen neuen Pin angefordert . <br> Hier ist der neue Pin <i> '.$PlayerInfo['Pin'].' </i>.<br> Merke ihn dir jetzt aber mal :)<br><br> Mit freundlichen Grüßen <br> dreamlife-roleplay.de.gg/ Team'; if(mail($empfaenger, $betreff, $text, $extra)) { echo " EMail gesendet an ".$PlayerInfo['Email']." "; } else { echo " Fehler mit Sendmail-Bin # Melde dich bitte beim Team "; } } else if(empty($PlayerInfo['Email'])) { echo ' Error #2 - Bitte setzt deine Mail '; echo '<meta http-equiv="refresh" content="3; URL=index.php?page=setmail">'; } echo endcontent();}else if($_GET['page'] == 'management' && $_GET['do'] == 'showMember'){ echo startcontent(); echo title("Zeige Member der Fraktionen"); if($PlayerInfo['Leader'] > '0') { require "config.php"; $handle = opendir($GameDir); while($user = readdir($handle)) { if($user != "." && $user != ".." && !is_dir("$handle/$user")) { $path_parts = pathinfo($user); $ini = $path_parts['extension']; if($ini == "ini") { $user = str_replace('.ini', '', $user); if($PlayerInfo['Leader'] > '0') { $test = $functions->GetPlayerInfo($user); if($test['Member'] == $PlayerInfo['Leader']) { echo $user .' <a href="index.php?page=management&do=kickMember&user='. $user .'">[Kicken]</a><br>'; } } } } } } else { echo " Du hast keine Rechte diese Seite zu sehen "; } closedir($handle); echo endcontent();}else if($_GET['page'] == 'management' && $_GET['do'] == 'kickMember'){ echo startcontent(); echo title("Kick - Leader"); if($PlayerInfo['Leader'] > '0') { $kickuser = $_GET['user']; if(!empty($_GET['user'])) { $kickinfo = $functions->GetPlayerInfo($kickuser); if($kickinfo['Adjustable'] != '0') { if($kickinfo['Member'] == $PlayerInfo['Leader']) { $kickinfo['Member'] = '0'; $kickinfo['Leader'] = '0'; if($functions->UpdatePlayerInfo($kickinfo,$kickuser)) { echo " User gekickt"; } else { echo " Failed #5 - Melde dich beim Team "; } } else { echo " Du hast keine Rechte Leute aus anderen Fraks zu kicken "; } } else { echo " Der User ist online er muss aber offline sein damit du ihn kicken kannst "; } } else { echo " Du must schon einen Namen angeben "; } } else { echo " Du hast keine Rechte "; } echo endcontent();}else if($_GET['page'] == 'management'){ echo startcontent(); echo title("Leadermanagement"); echo '<a href="index.php?page=management&do=showMember">Show Member of Fraktion </a>'; echo endcontent();}include 'templates/navigation.tpl';include 'templates/footer.tpl';