Ah Grex. Habs auf den Webspace von Gta Servers gepackt trotzdem steht PW falsch. Daten sind unter: Scriptfiles/accounts/
Hab alles geändert. Pw hab ich auch in Klartext gemacht. Hab kein Plan.
Hier die Sachen:
PHP
<?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'] == $_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>';
}
Alles anzeigen
PHP
<?php
/* Grex's Godfather API for PHP was made by Grex
For developers who want use this API for releasing CP or others:
Do not edit andything
Do not say, it is your own (without my premission), write my Name (Grex) at your footer. If you do not use one, write me under the credits
Do not selling it!, it's free for everyone
For developers who want use this for his OWN project:
You are allowed to edit anything where you want
Do not say, it is your own, write my Name (Grex) at your footer. If you do not use one, write me under the credits
Fullname: Gregor Ganglberger
E-Mail: grexaut@gmail.com
Project: San Andreas [Fun]RealLife - German | http://sa-rl.de
*/
class functions
{
// Read out the userinformations
function GetPlayerInfo($user)
{
require "config.php";
$file="$GameDir/scriptfiles/Accounts/$user.ini";
if(!file_exists($file)) return false;
$data = parse_ini_file($file);
return $data;
}
// Read out the bizzinformations
function GetPlayerBizzInfo($user)
{
require "config.php";
if(!$file=fopen("$GameDir/scriptfiles/bizz.cfg","r")) die("Error reading bizzfile");
while (($data=fgetcsv($file,1024, "|")) !== FALSE)
{
if($data[1] == $user)
{
$datanew = array(
"Owned" => $data[0],
"Owner" => $data[1],
"Message" => $data[2],
"Extortion" => $data[3],
"EntranceX" => $data[4],
"EntranceY" => $data[5],
"EntranceZ" => $data[6],
"ExitX" => $data[7],
"ExitY" => $data[8],
"ExitZ" => $data[9],
"LevelNeeded" => $data[10],
"BuyPrice" => $data[11],
"EntranceCost" => $data[12],
"Till" => $data[13],
"Locked" => $data[14],
"Interior" => $data[15],
"Products" => $data[16],
"MaxProducts" => $data[17],
"PriceProd" => $data[18]
);
return $datanew;
}
}
}
// Read out the sbizzinformations
function GetPlayerSBizzInfo($user)
{
require "config.php";
if(!$file=fopen("$GameDir/scriptfiles/sbizz.cfg","r")) die("Error reading bizzfile");
while (($data=fgetcsv($file,1024, "|")) !== FALSE)
{
if($data[1] == $user)
{
$datanew = array(
"Owned" => $data[0],
"Owner" => $data[1],
"Message" => $data[2],
"Extortion" => $data[3],
"EntranceX" => $data[4],
"EntranceY" => $data[5],
"EntranceZ" => $data[6],
"LevelNeeded" => $data[7],
"BuyPrice" => $data[8],
"EntranceCost" => $data[9],
"Till" => $data[10],
"Locked" => $data[11],
"Interior" => $data[12],
"Products" => $data[13],
"MaxProducts" => $data[14],
"PriceProd" => $data[15]
);
return $datanew;
}
}
}
function GetPlayerHouseInfo($user)
{
require "config.php";
if(!$file=fopen("$GameDir/scriptfiles/property.cfg","r")) die("Error reading bizzfile");
while (($data=fgetcsv($file,1024, ",")) !== FALSE)
{
if($data[12] == $user)
{
$datanew = array(
"Entrancex" => $data[0],
"Entrancey" => $data[1],
"Entrancez" => $data[2],
"Exitx" => $data[3],
"Exity" => $data[4],
"Exitz" => $data[5],
"Healthx" => $data[6],
"Healthy" => $data[7],
"Healthz" => $data[8],
"Armourx" => $data[9],
"Armoury" => $data[10],
"Armourz" => $data[11],
"Owner" => $data[12],
"Discription" => $data[13],
"Value" => $data[14],
"Hel" => $data[15],
"Arm" => $data[16],
"Int" => $data[17],
"Lock" => $data[18],
"Owned" => $data[19],
"Rooms" => $data[20],
"Rent" => $data[21],
"Rentabil" => $data[22],
"Takings" => $data[23],
"Vec" => $data[24],
"Vcol1" => $data[25],
"Vcol2" => $data[26],
"Date" => $data[27],
"Level" => $data[28]
);
return $datanew;
}
}
}
// Crypts the input password for comparing
function cryptpw($password)
{
for($i=0; $i < strlen($password); $i++)
{
$temp = ord($password[$i]);
$temp += (3^$i) * ($i % 15);
if($temp > (0xff))
{
$temp -= 256;
}
$password[$i] = chr($temp);
}
return $password;
}
function GetVehicleName($vehicleid)
{
$carname = array("Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
"Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
"Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
"Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
"Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
"Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
"Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
"Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
"Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
"Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
"Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
"Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
"Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
"Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
"Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
"Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
"Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
"Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
"FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
"Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
"Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
"Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
"Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
"Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
"Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
"Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
"Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
"News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
"Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
"Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
"Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
"Tiller", "Utility Trailer");
return $carname[$vehicleid-400];
}
// Logs who has where logged into his account
function accesslog($user,$access)
{
require "config.php";
if(!$file=fopen("$LogDir/access.log","a+")) return false;
fwrite($file,mktime().";".$_SERVER['REMOTE_ADDR'].";".$user.";".$access."\n");
fclose($file);
return true;
}
// Writes the userinformation
function UpdatePlayerInfo($assoc_array,$user)
{
require "config.php";
$content = '';
foreach ($assoc_array as $key => $data) $content .= "$key=$data\n";
if (!$file = fopen("$GameDir/scriptfiles/Accounts/$user.ini", 'w')) return false;
if (!fwrite($file, $content)) {
return false;
}
fclose($file);
return true;
}
}
class fractions
{
function ReadOrg()
{
while($user = readdir(opendir("$GameDir/scriptfiles/Accounts/")))
{
if(substr($user, -3) == 'ini')
{
$file = fopen("$GameDir/scriptfiles/Accounts/$user","r");
$user = substr($user,0,-4);
$functions = new functions();
$PlayerInfo = $functions->GetPlayerInfo($user);
if($PlayerInfo['Leader'] > 0) return $PlayerOrg[$user][true][$PlayerInfo['Leader']];
else if($PlayerInfo['Member'] > 0) return $PlayerOrg[$user][false][$PlayerInfo['Member']];
}
}
closedir($dir_handle);
}
}
?>
Alles anzeigen
Beispiel Datei:
Name: Ramiz.ini
Inhalt:
Code
Key=asmirribic
Level=5
AdminLevel=1339
Supporter=0
DonateRank=0
UpgradePoints=0
ConnectedTime=12
Registered=1
Sex=1
Age=13
Origin=2
CK=0
Muted=0
Respect=12
Money=50000
Bank=9976
Kredit=0
KreditDauer=0
Crimes=0
Kills=0
Deaths=0
Arrested=0
WantedDeaths=3
Phonebook=1
LottoNr=0
Fishes=0
BiggestFish=0
Job=9
Paycheck=1185
HeadValue=0
Jailed=0
GangJailed=0
wJailed=0
Mauled=0
JailTime=0
Materials=1000
Drugs=0
BoxMaterials=0
BoxDrugs=0
FightingStyle=4
Leader=7
Member=0
FMember=255
Rank=6
Char=295
ContractTime=16
DetSkill=0
SexSkill=0
BoxSkill=30
LawSkill=0
MechSkill=0
JackSkill=0
CarSkill=0
NewsSkill=0
DrugsSkill=134
CookSkill=0
FishSkill=0
pSHealth=0.0
pHealth=86.0
Int=0
Local=255
Team=0
Model=7
PhoneNr=2910
House=255
Bizz=255
HandyGeld=94
HandyVer=0
Pos_x=2246.6
Pos_y=-1161.9
Pos_z=1029.5
CarLic=1
NewLic=0
FlyLic=1
BoatLic=1
FishLic=1
GunLic=1
LKWLic=1
RollerLic=1
MotoLic=1
Zig=0
Kekse=0
ZigSucht=0
Gun1=0
Gun2=0
Gun3=0
Gun4=0
Ammo1=0
Ammo2=0
Ammo3=0
Ammo4=0
CarTime=0
Mulltime=0
PayDay=0
PayDayHad=0
CDPlayer=0
Wins=0
Loses=0
AlcoholPerk=0
DrugPerk=0
MiserPerk=0
PainPerk=0
TraderPerk=0
Tutorial=1
Warnings=0
Adjustable=1
Fuel=20
Married=0
MarriedTo=No-one
SpawnChange=1
WantedLevel=0
WantedPoints=0
PlayMinutes=19
GesamtMinutes=799
MinutesSinceAn=799
SFPASS=0
LVPASS=0
Offflucht=0
Knast=0
Uhr=5
Handy=7
KnastTime=0
Perso=0
FrakSperre=0
Gehalt=0
InvWeapon=0
InvAmmo=0
InvWeapon2=0
InvAmmo2=0
InvMats=0
InvDrugs=0
FlugTime=0
FarmTime=0
GDeaths=0
GKills=0
Meldung=0
Alles anzeigen