Guten Abend,
in meinem UCP wird in der Profil Ansicht ein Pfad angezeigt wo die Datei htdocs/controlpanel/pages/profile.php on line 45 vorkommt.
Daraufhin habe ich mal die Datei rausgesucht und mir die Line 45 angeschaut nun weiß ich aber nicht wirklich wo der Fehler liegt da ich mich
jetzt auch nicht wirklich mit PHP auskenne.
PHP
<?php
include("../include/allgemein.php");
session_start();
@ob_start();
error_reporting(E_ALL);
if(isset($_SESSION['username']))
{
$username = $_SESSION['username'];
$query = mysql_query("SELECT * FROM users WHERE Name = '$username' LIMIT 1;");
$row = mysql_fetch_assoc($query);
$sqlid = $row['SQLid'];
$name = $row['Name'];
$SkinID = $row['Skin'];
$RespektPkt = $row['Respect'];
$Level = $row['Level'];
$GeldHand = $row['Money'];
$GeldBank = $row['Bank'];
$Spielstunden = $row['ConnectedTime'];
$Gehalt = $row['Gehalt'];
$Fraktion = $row['Member'] >= 1 ? $row['Member'] : $row['Leader'];
$FRang = $row['Rank'];
$Beruf = $row['Job'];
$Admin = $row['AdminLevel'];
$verwarnungen = $row['Warnings'];
$morde = $row['Kills'];
$kills = $row['Deaths'];
}
if(isset($_SESSION['username']))
{
$username = $_SESSION['username'];
$query = mysql_query("SELECT Leader,Member FROM users WHERE Name = '$username' LIMIT 1;");
$row = mysql_fetch_assoc($query);
{
$Member = $row['Member'] >= 1;
$Leader = $row['Leader'] >=1;
}
}
else echo header('location: anmelden.php');
$RespektPktVoll2 = $Level+1;
$RespektPktVoll = $RespektPktVoll2*2;
$kdrate = $kills / $morde;
switch($verwarnungen)
{
case 0: $verwarnungentext = "Keine Verwarnungen"; break;
case 1: $verwarnungentext = "Eine Verwarnung"; break;
case 2: $verwarnungentext = "Zwei Verwarnungen"; break;
case 3: $verwarnungentext = "Drei Verwarnungen";
}
switch($Admin)
{
case 0: $adminname = "Kein Admin"; break;
case 1: $adminname = "Volunteer"; break;
case 2: $adminname = "Supporter"; break;
case 3: $adminname = "Supporter+"; break;
case 4: $adminname = "Trial Admin"; break;
case 1337: $adminname = "Admin"; break;
case 1338: $adminname = "Head Admin"; break;
case 2000: $adminname = "Projektleiter"; break;
default: $adminname = "Unbekannter Adminrang";
}
switch($Fraktion)
{
case -1: $FraktionsName = "Zivi"; break;
case 4: $FraktionsName = "SAED"; break;
case 5: $FraktionsName = "LCN"; break;
case 6: $FraktionsName = "Yakuza"; break;
case 7: $FraktionsName = "Bundeswehr"; break;
case 8: $FraktionsName = "Hitman Agency"; break;
case 9: $FraktionsName = "News Reporter"; break;
case 10: $FraktionsName = "Wheelman Agency"; break;
case 11: $FraktionsName = "Fahrschullehrer"; break;
case 12: $FraktionsName = "Regierung"; break;
case 13: $FraktionsName = "Ordnungsamt"; break;
case 14: $FraktionsName = "SAPD"; break;
case 18: $FraktionsName = "V.L Aztecas"; break;
case 19: $FraktionsName = "Grove Street"; break;
case 20: $FraktionsName = "Ballas"; break;
case 22: $FraktionsName = "Triaden"; break;
case 24: $FraktionsName = "L.S.Vagos"; break;
case 26: $FraktionsName = "Cali Kartell"; break;
default: $FraktionsName = "Keine Fraktion";
}
$query = mysql_query("SELECT `rangname$FRang` AS Rank FROM gangrangs WHERE fID = '$Fraktion'");
$result = mysql_fetch_assoc($query);
mysql_free_result($query);
$rangname = $result["Rank"];
switch($Beruf)
{
case 0: $berufname = "Arbeitslos"; break;
case 16: $berufname = "Trucker"; break;
case 18: $berufname = "Pilot"; break;
case 123: $berufname = "Grubenarbeiter"; break;
case 200: $berufname = "Linienbusfahrer"; break;
case 201: $berufname = "ATM-Belader"; break;
default: $berufname = "Unbekannter Job";
}
function getVehicleNameFromAHType($type)
{
$carName = "-";
$modelID = -1;
switch($type)
{
case 0: { $carName = "Sultan"; $modelID = 560; break; }
case 1: { $carName = "Sunrise"; $modelID = 550; break; }
case 2: { $carName = "Bullet"; $modelID = 541; break; }
case 3: { $carName = "Cheetah"; $modelID = 415; break; }
case 4: { $carName = "Euros"; $modelID = 587; break; }
case 5: { $carName = "Infernus"; $modelID = 411; break; }
case 6: { $carName = "Jester"; $modelID = 559; break; }
case 7: { $carName = "Super GT"; $modelID = 506; break; }
case 8: { $carName = "Turismo"; $modelID = 451; break; }
case 9: { $carName = "Premier"; $modelID = 426; break; }
case 10: { $carName = "ZR-350"; $modelID = 477; break; }
case 11: { $carName = "Sanchez"; $modelID = 468; break; }
case 12: { $carName = "Freeway"; $modelID = 463; break; }
case 13: { $carName = "Mower"; $modelID = 572; break; }
case 14: { $carName = "Quad"; $modelID = 471; break; }
case 15: { $carName = "Kart"; $modelID = 571; break; }
case 16: { $carName = "Caddy"; $modelID = 457; break; }
case 17: { $carName = "Camper"; $modelID = 483; break; }
case 18: { $carName = "Hotknife"; $modelID = 434; break; }
case 19: { $carName = "BF-Injection"; $modelID = 424; break; }
case 20: { $carName = "Bandito"; $modelID = 568; break; }
case 21: { $carName = "Mountain Bike"; $modelID = 510; break; }
case 22: { $carName = "NRG-500"; $modelID = 522; break; }
case 23: { $carName = "Maverick"; $modelID = 487; break; }
case 24: { $carName = "Vortex"; $modelID = 539; break; }
case 25: { $carName = "Hotring A"; $modelID = 502; break; }
case 26: { $carName = "Sandking"; $modelID = 495; break; }
case 27: { $carName = "Perenniel"; $modelID = 404; break; }
case 28: { $carName = "Manana"; $modelID = 410; break; }
case 29: { $carName = "Bobcat"; $modelID = 422; break; }
case 31: { $carName = "Majestic"; $modelID = 517; break; }
case 32: { $carName = "Tampa"; $modelID = 594; break; }
case 33: { $carName = "Wayfarer"; $modelID = 586; break; }
case 34: { $carName = "PCJ-600"; $modelID = 461; break; }
case 35: { $carName = "Comet"; $modelID = 480; break; }
case 36: { $carName = "Flash"; $modelID = 565; break; }
case 37: { $carName = "Pony"; $modelID = 413; break; }
case 38: { $carName = "Hermes"; $modelID = 474; break; }
case 39: { $carName = "Virgo"; $modelID = 491; break; }
case 40: { $carName = "Tahoma"; $modelID = 566; break; }
case 41: { $carName = "Yosemite"; $modelID = 554; break; }
case 42: { $carName = "Sadler"; $modelID = 543; break; }
case 43: { $carName = "Emperor"; $modelID = 585; break; }
case 44: { $carName = "Solair"; $modelID = 458; break; }
case 45: { $carName = "Rancher"; $modelID = 489; break; }
case 46: { $carName = "Greenwood"; $modelID = 492; break; }
case 47: { $carName = "Mesa"; $modelID = 500; break; }
case 48: { $carName = "Fortune"; $modelID = 526; break; }
case 49: { $carName = "Journey"; $modelID = 508; break; }
case 50: { $carName = "Tanker"; $modelID = 514; break; }
case 51: { $carName = "Shamal"; $modelID = 519; break; }
case 52: { $carName = "Elegy"; $modelID = 562; break; }
case 53: { $carName = "Barracks"; $modelID = 433; }
}
return array($carName, $modelID);
}
$query = mysql_query("SELECT `AH_Typ`, `AH_Meter`, `AH_TankVolumen`, `AH_Lock` FROM `usercars` WHERE `AH_Typ` >= 0 AND `uID` = $sqlid LIMIT 4");
$carInfos = array();
while($row = mysql_fetch_assoc($query))
{
array_push($carInfos, $row);
}
mysql_free_result($query);
$keinauto = count($carInfos);
?>
<!DOCTYPE html>
<html style="font-family: 'Calibri'; "class="full" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Entire Reallife - UCP</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="../css/local.css" />
<link rel="stylesheet" type="text/css" href="../css/the-big-picture" />
<script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<style>
div {
padding-bottom:20px;
}
</style>
</head>
<body>
<div id="wrapper">
<div style=" margin-left: -125px;
left: 225px; height:10px;
width: 225px;
position: fixed;
top: 50px;
height: 100%;
border-radius: 0;
border: none;
background-color: #222222;
overflow-y: auto;float:left;
margin-left: -225px;
margin-top: -50px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
text-decoration: none;
font-size: 18px;
line-height: 20px;
height: 50px;
color: white;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);"></div>
<u><a href="../index.php" style="margin-left: -100px;
text-decoration: none;
font-size: 18px;
position: fixed;
line-height: 20px;
height: 50px;
z-index: 100; margin-left: -220px; margin-top: 0px; font-family: 'Arial'; font-size:18px; color:white; font-weight: bold;" >ENTIRE REALLIFE</a> </u><br>
<a href="../index.php"><p style="z-index:1324;position:fixed; margin-left: -190px; margin-top: 0px; font-family: 'Bebas'; font-size:18px; color:white;">User Control Panel</p></a>
<img src="../images/strichheader.jpg" style="z-index:1324;position:fixed; margin-left: -225px; margin-top:35px; " alt="Grafik">
<img src="../images/strichheader.jpg" style="z-index:1324;position:fixed; margin-left: -225px; margin-top:-38px; " alt="Grafik">
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav" >
<?
if(isset($_SESSION['username']))
{
?>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;" ><a href="../index.php"><i class="fa fa-bullseye"></i> Startseite</a></li>
<li class="selected"style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="profile.php"><i class="fa fa-user"></i> Mein Profil</a></li>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="stats.php"><i class="fa fa-globe"></i> Statistiken</a></li>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="team.php"><i class="fa fa-briefcase"></i> Teammitglieder</a></li>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="leader.php"><i class="fa fa-briefcase"></i> Leaderliste</a></li>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="einstellungen.php"><i class="fa fa-gear"></i> Einstellungen</a></li>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="abmelden.php"><i class="fa fa-list-ol"></i> Abmelden</a></li>
<?php
if($Member || $Leader)
{
?>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-gear fa-fw"></i> <i class="fa fa-caret-down">Fraktion</i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="fverwalten.php"><i class="fa fa-user fa-fw"></i> Meine Fraktion</a>
</li>
<?php
if($Leader)
{
?>
<li><a href="memberList.php"><i class="fa fa-user fa-fw"></i>Mitglieder verwalten</a>
</li>
<?
}
?>
</ul>
<!-- /.dropdown-user -->
</li>
<?php
}
}
else
{
?>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;" class="selected"><a href="index.php"><i class="fa fa-bullseye"></i> Startseite</a></li>
<li style="top: 100px; font-family: 'Calibri'; font-size:16px; color:white;"><a href="pages/anmelden.php"><i class="fa fa-list-ol"></i> Anmelden</a></li>
<?
}?>
</ul>
</div>
<div class="container" style="font-family: 'Calibri';">
<div id="VorDemBild">
<img src="../images/userbar.png" style=" width:100%;" alt="Grafik" />
</div>
<div id="aufdembild">
<h1 style="font-family: 'Calibri';" class="page-header">
Mein Profil
</h1>
<div class="row">
<div class="col-lg-4">
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 100px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$name"?></span>
Name:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 100px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$RespektPkt / $RespektPktVoll"?></span>
Respektpunkte:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 100px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$Level"?></span>
Level:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 100px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo(number_format($GeldHand, 0, '','.'));?>$</span>
Bargeld:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 100px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo(number_format($GeldBank, 0, '','.'));?>$</span>
Bankkonto:
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 50px;height: 32px;padding-top: 6px;font-size: 16px">
<span class="badge"><? echo "$FraktionsName"?></span>
Fraktion:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 50px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$rangname"?></span>
Rang:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 50px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo(number_format($Gehalt, 0, '','.'));?>$</span>
Gehalt:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 50px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$berufname"?></span>
Beruf:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 50px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$Spielstunden"?></span>
Spielstunden:
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 5px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$adminname"?></span>
Admin:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 5px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$verwarnungentext"?></span>
Warns:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 5px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$morde"?></span>
Morde:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 5px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "$kills"?></span>
Tode:
<li class="list-group-item" style="width: 222px; bottom: -250px;right: -200px;top: 35px;left: 5px;height: 32px;padding-top: 6px;">
<span class="badge"><? echo "". sprintf("%.02f", $kdrate) ?></span>
K/D:
</ul>
</div>
</div>
<div class="row" style="margin-top: 280px; margin-left:40px; ">
<? echo "<tr><th align='left'><img src='../images/skins/Skin_$SkinID.png' style='margin-top:-350px; width:70px; margin-left:15px;'></th></tr>";?>
<div style="margin-left:425px; font-size:30px;" id="nocars">
<?if($keinauto == 0)
{?>
<p style="font-weight:bold;">KEINE FAHRZEUGE</p><?
}?>
<div style="float:left; margin-left:-360px; max-width:1140px;">
<?
foreach($carInfos as $ah):
$vehInfo = getVehicleNameFromAHType($ah["AH_Typ"]);
$carName = $vehInfo[0];
$carID = $vehInfo[1];
echo "<div style='max-width:211px; float:right; margin-right:25px; margin-top: 10px;'>
<img src='../images/cars/$carID.png' style='margin-top:-30px; margin-left:10px; width:200px; heigth:149px;'>
";?>
<p style="font-family: 'Calibri'; font-size:16px;font-weight: bold; color:#696464; margin-left:10px; margin-top:5px;">
<? echo "Fahrzeugname: $carName<br />
Meter: " . sprintf("%dkm", $ah["AH_Meter"] / 1000) . "<br />
Tank: " . $ah["AH_TankVolumen"] . "%<br />
Status: <font color='" . ($ah["AH_Lock"] >= 1 ? "green'>abgeschlossen" : "red'>aufgeschlossen") . "</font>" ?>
</p>
</div>
<? endforeach; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Alles anzeigen