Hay
Ich bin für den Server German Elite Reallife ein UCP am Bearbeiten, und ich möchte gerne die Hausinformationen der User ausgeben.
Ich habe dieses im UCP in der Index.php stehen
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['hOwner'] == $_SESSION['username'])
{
if($PlayerInfo['House'] > 0 && $PlayerInfo['House'] < 100) $PlayerBizzInfo = $functions->GetPlayerHouseInfo($_SESSION['username']);
else $PlayerHouseInfo = $functions->GetPlayerHouseInfo($_SESSION['username']);
}
else echo 'Nur der Besitzer des Hauses kann diese Informationen einsehen';
}
else echo 'Du besitzt kein Haus';
//echo '</tr></table>'.
echo endcontent();
}
Alles anzeigen
Und dies in der functions.php
function GetPlayerHouseInfo($user)
{
require "config.php";
if(!$file=fopen("$HouseDir/property.cfg","r")) die("Error reading Housefile");
while (($data=fgetcsv($file,1024, ",")) !== FALSE)
{
if($data[12] == $user)
{
$datanew = array(
"hEntrancex" => $data[0],
"hEntrancey" => $data[1],
"hEntrancez" => $data[2],
"hExitx" => $data[3],
"hExity" => $data[4],
"hExitz" => $data[5],
"hHealthx" => $data[6],
"hHealthy" => $data[7],
"hHealthz" => $data[8],
"hArmourx" => $data[9],
"hArmoury" => $data[10],
"hArmourz" => $data[11],
"hOwner" => $data[12],
"hDiscription" => $data[13],
"hValue" => $data[14],
"hHel" => $data[15],
"hArm" => $data[16],
"hInt" => $data[17],
"hLock" => $data[18],
"hOwned" => $data[19],
"hRooms" => $data[20],
"hRent" => $data[21],
"hRentabil" => $data[22],
"hTakings" => $data[23],
"hVec" => $data[24],
"hVcol1" => $data[25],
"hVcol2" => $data[26],
"hDate" => $data[27],
"hLevel" => $data[28]
);
return $datanew;
}
}
Alles anzeigen
Und ich möchte nun die ganzen Informationen sprich:
Besitzer
Mietbar (0 = ja 1 = nein )
Miete (also die Mietkosten)
Der Preis des Hauses
Was halt normal im UCP steht ausgeben, aber ich weis nicht wie, so wie ich es nun in der index.php stehen habe, gibt er mir keine Informationen aus,
Deshalb Frage ich euch, was ich Eintragen muss, um verschiedene Daten aus dem Array auszugeben.
Danke schonmal
MFG
Raphael