Hallo,
Ich habe ein Problem.
Habe Alles schon auf mein V-serve draufgepackt
Die Seite funktioniert gut wenn ich mich mit meine benutzername einlogen will
nur wenn sich Benuzter einlogen wollen seht da immer
Benutzername oder Passwort falsch
die acc daten sind bei uns in diesen verzeichnis
/home/gta_dsz/samp/scriptfiles/Accounts
Habe es auch dem entsprechen in functions.php geändert
<?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
habe auch in Index.php auch geander mit den login
if($PlayerInfo == true && $PlayerInfo['Key'] == $_POST['password'])
<?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;
}
Alles anzeigen
habe auch so wie beschreiben ;open_basedir = On geandert
habe auch neu gestart per Befehl auch mit root neu start
hier sind mal die test daten eines acc
http://www.file-upload.net/download-2872703/Test.ini.html
habe auch das auch mit der der neu.php probiert da seht immer "nicht ok"
den php cody Porbiert
<?php
include 'config.php';
$user = $_GET['user'];
if(file_exists("$GameDir/scriptfiles/Accounts/$user.ini"))
{
echo 'ok';
}else{
echo 'nicht ok';
}
?>
http://dsz-rl.de/NeuUCP/neu.php
kann mir jemand helfen weis nicht weiter Würde mich über hilfe seht freuen
Lg D.S.Z Joshii