Advertisement
Guest User

Grex | www.sa-rl.de

a guest
May 13th, 2010
2,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.13 KB | None | 0 0
  1. <?php
  2. /*  This simple User Control Panel (UCP) for Godfather was developed by Grex.
  3.     It is free for everyone!, only german language for this simple Script
  4.    
  5.     Developed by Grex (Gregor G.)
  6.     http://sa-rl.de
  7.     grexaut@gmail.com
  8. */
  9. session_start();
  10. require 'functions.php';
  11. $functions = new functions();
  12. include 'templates/header.tpl';
  13. if(!isset($_POST['username']) && !isset($_SESSION['username']))
  14. {
  15.     include 'templates/login.tpl';
  16.     include 'templates/footer.tpl';
  17.     die;
  18.    
  19. }else if(isset($_POST['username']))
  20. {
  21.     $PlayerInfo = $functions->GetPlayerInfo($_POST['username']);
  22.     if($PlayerInfo == true && $PlayerInfo['Key'] == $functions->cryptpw($_POST['password']))
  23.     {
  24.         $_SESSION['username'] = $_POST['username'];
  25.     }
  26.     else
  27.     {
  28.         echo startcontent();
  29.         echo title("Loginversuch");
  30.         echo '<p align=center><b>Benutzername oder Passwort falsch</b></p><meta http-equiv="refresh" content="3; URL=">';
  31.         echo endcontent();
  32.         include 'templates/navlogin.tpl';
  33.         include 'templates/footer.tpl';
  34.         die;
  35.     }
  36. }
  37. $PlayerInfo = $functions->GetPlayerInfo($_SESSION['username']);
  38. if(!isset($_GET['page']) || $_GET['page'] == 'overview')
  39. {
  40.     echo startcontent();
  41.     echo title("Persoenliche Informationen") . '<table><colgroup width=200 span=2></colgroup><tr><td>';
  42.     if($PlayerInfo['Char'] != 0) echo '<img src="images/skins/Skin_'.$PlayerInfo['Char'].'.png">';
  43.     else echo '<img src="images/skins/Skin_'.$PlayerInfo['Model'].'.png">';
  44.     if($PlayerInfo['Adjustable']) $status = "Offline";
  45.     else $status = "Online";
  46.     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>';
  47.     if($PlayerInfo['Level'] == -999) echo dataout("Level",$PlayerInfo['AdminLevel'].' (Gebannt)');
  48.     else echo dataout("Level",$PlayerInfo['Level']);
  49.     if($PlayerInfo['AdminLevel'] > 0 && $PlayerInfo['Level'] != -999) echo dataout("Admin","Ja (".$PlayerInfo['AdminLevel'].")");
  50.     else echo dataout("Admin","Nein");
  51.     echo '</tr><tr>';
  52.     if($PlayerInfo['DonateRank'] > 0) echo dataout("Premium","Ja (".$PlayerInfo['DonateRank'].")");
  53.     else echo dataout("Premium","Nein");
  54.     if($PlayerInfo['Sex'] == 1) echo dataout("Geschlecht","Maennlich");
  55.     else echo dataout("Geschlecht","Weiblich");
  56.     echo '</tr><tr>';
  57.     echo dataout("Alter",$PlayerInfo['Age']." Jahre");
  58.     echo dataout("Verbrachte Zeit",$PlayerInfo['ConnectedTime']." Stunden")."</tr><tr>";
  59.     echo dataout("Respekt",$PlayerInfo['Respect']." Punkte")."<tr><td><hr></td></tr><tr>";
  60.     echo dataout("Geldboerse","$".$PlayerInfo['Money']).dataout("Bank","$".$PlayerInfo['Bank'])."</tr><tr><td><hr></td></tr><tr>";
  61.     echo dataout("Dedektiv",$PlayerInfo['DetSkill']." Punkte").dataout("Sex",$PlayerInfo['SexSkill']." Punkte")."</tr><tr>";
  62.     echo dataout("Boxer",$PlayerInfo['BoxSkill']." Punkte").dataout("Anwalt",$PlayerInfo['LawSkill']." Punkte")."</tr><tr>";
  63.     echo dataout("Mechaniker",$PlayerInfo['MechSkill']." Punkte").dataout("Autodiebstahl",$PlayerInfo['JackSkill']." Punkte")."</tr><tr>";
  64.     echo dataout("Autohaendler",$PlayerInfo['CarSkill']." Punkte").dataout("Reporter",$PlayerInfo['NewsSkill']." Punkte")."</tr><tr>";
  65.     echo dataout("Drogenhaendler",$PlayerInfo['DrugsSkill']." Punkte").dataout("Kochen",$PlayerInfo['CookSkill']." Punkte")."</tr><tr>";
  66.     echo dataout("Fischen",$PlayerInfo['FishSkill']." Punkte");
  67.     echo '</tr></table>'.endcontent();
  68.    
  69. }
  70. /*else if($_GET['page'] == 'house')
  71. {
  72.     echo startcontent();
  73.     echo '<table><colgroup><col width=100><col width=400><col width=200><col width=400></colgroup><tr>';
  74.     echo title("Hausinformationen");
  75.     if($PlayerInfo['House'] != 255)
  76.     {
  77.         $PlayerHouseInfo = $functions->GetPlayerHouseInfo($_SESSION['username']);
  78.         if($PlayerHouseInfo['Owner'] == $_SESSION['username'])
  79.         {
  80.            
  81.         }
  82.         else echo 'Nur der Besitzer des Hauses kann diese Informationen einsehen';
  83.     }
  84.     else echo 'Du besitzt kein Haus';
  85.     echo '</tr></table>'.endcontent();
  86. }
  87. else if($_GET['page'] == 'company')
  88. {
  89.     echo startcontent();
  90.     echo '<table><colgroup><col width=100><col width=400><col width=200><col width=400></colgroup><tr>';
  91.     echo title("Firmeninformation");
  92.     if($PlayerInfo['Bizz'] != 255)
  93.     {
  94.         if($PlayerInfo['Bizz'] > 0 && $PlayerInfo['Bizz'] < 100) $PlayerBizzInfo = $functions->GetPlayerBizzInfo($_SESSION['username']);
  95.         else $PlayerBizzInfo = $functions->GetPlayerSBizzInfo($_SESSION['username']);
  96.        
  97.     }
  98.     else echo 'Du besitzt keine Firma';
  99.     echo '</tr></table>'.endcontent();
  100. }*/
  101. else if($_GET['page'] == 'logout')
  102. {
  103.     echo startcontent();
  104.     echo title("Logout");
  105.     echo '<p align=center>Du wurdest erfolgreich abgemeldet</p>';
  106.     echo '<meta http-equiv="refresh" content="1; URL=">';
  107.     session_unset();
  108.     $_SESSION=array();
  109.     echo endcontent();
  110. }
  111. include 'templates/navigation.tpl';
  112. include 'templates/footer.tpl';
  113.  
  114. function title($title)
  115. {
  116.     return '<h2 class="title">'.$title.'</h2><hr><div class="entry">';
  117. }
  118. function startcontent()
  119. {
  120.     return '<div id="content"><div class="post">';
  121. }
  122. function endcontent()
  123. {
  124.     return '</div></div></div>';
  125. }
  126. function dataout($description,$data)
  127. {
  128.     return '<th align=right>'.$description.':</th><td align=left>'.$data.'</td>';
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement