Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* This simple User Control Panel (UCP) for Godfather was developed by Grex.
- It is free for everyone!, only german language for this simple Script
- Developed by Grex (Gregor G.)
- http://sa-rl.de
- grexaut@gmail.com
- */
- session_start();
- 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'] == $functions->cryptpw($_POST['password']))
- {
- $_SESSION['username'] = $_POST['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="images/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","Maennlich");
- 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><hr></td></tr><tr>";
- echo dataout("Geldboerse","$".$PlayerInfo['Money']).dataout("Bank","$".$PlayerInfo['Bank'])."</tr><tr><td><hr></td></tr><tr>";
- 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'] == 'house')
- {
- echo startcontent();
- echo '<table><colgroup><col width=100><col width=400><col width=200><col width=400></colgroup><tr>';
- echo title("Hausinformationen");
- if($PlayerInfo['House'] != 255)
- {
- $PlayerHouseInfo = $functions->GetPlayerHouseInfo($_SESSION['username']);
- if($PlayerHouseInfo['Owner'] == $_SESSION['username'])
- {
- }
- else echo 'Nur der Besitzer des Hauses kann diese Informationen einsehen';
- }
- else echo 'Du besitzt kein Haus';
- echo '</tr></table>'.endcontent();
- }
- else if($_GET['page'] == 'company')
- {
- echo startcontent();
- echo '<table><colgroup><col width=100><col width=400><col width=200><col width=400></colgroup><tr>';
- echo title("Firmeninformation");
- if($PlayerInfo['Bizz'] != 255)
- {
- if($PlayerInfo['Bizz'] > 0 && $PlayerInfo['Bizz'] < 100) $PlayerBizzInfo = $functions->GetPlayerBizzInfo($_SESSION['username']);
- else $PlayerBizzInfo = $functions->GetPlayerSBizzInfo($_SESSION['username']);
- }
- else echo 'Du besitzt keine Firma';
- echo '</tr></table>'.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();
- }
- include 'templates/navigation.tpl';
- include 'templates/footer.tpl';
- function title($title)
- {
- return '<h2 class="title">'.$title.'</h2><hr><div class="entry">';
- }
- function startcontent()
- {
- return '<div id="content"><div class="post">';
- }
- function endcontent()
- {
- return '</div></div></div>';
- }
- function dataout($description,$data)
- {
- return '<th align=right>'.$description.':</th><td align=left>'.$data.'</td>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement