Namen Fehler Team - Hlfe

  • Guten Tag,


    Und zwar wenn ich auf mein Control Panel gehe und auf Team, dann wird nur ein Benutzer angezeigt das er im Team ist.
    Meine Frage:
    Was habe ich falsch gemacht das er nicht alles ausliest es sind ca 6 Admin*s im Team aber es wird nur einer Angezeigt.


    Team.tpl:


    PHP
    {include file="../header.tpl"}<div class="navbar navbar-static-top">	<div class="navbar-inner">		<a class="brand">{lang}LargeCity Reallife{/lang}</a>		<ul class="nav">			<li><a href="index.php?page=Home"><i class="icon-home"></i> {lang}Startseite{/lang}</a></li>			{if isset($fraktion_menu)}				{if isset($loggedname)}  					<li><a href="index.php?page=ServerInfo"><i ></i> {lang}Serverinfo{/lang}</a></li>					<li class="active"><a href="index.php?page=Team"><i ></i> {lang}Team{/lang}</a></li>					<li><a href="index.php?page=frak"><i ></i> {lang}Fraktionen{/lang}</a></li>					{/if}			{/if}			{if isset($beschwerde_page)}				{if isset($loggedname)}  					<li class="dropdown">						<a href="#" class="dropdown-toggle" data-toggle="dropdown">Beschwerden <b class="caret"></b></a>						<ul class="dropdown-menu">							<li><a href="index.php?page=discomfort"><i class="icon-file"></i> Meine Beschwerden</a></li>							<li><a href="index.php?page=createDiscomfort"><i class="icon-pencil"></i> Beschwerde Einreichen</a></li>						</ul>					</li>					{/if}			{/if}		</ul>		<ul class="nav pull-right">			{if isset($loggedname)}			<li class="dropdown" id="menu1">				<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Willkommen, {$loggedname} <b class="caret"></b></a>				<ul class="dropdown-menu">					<li><a href="index.php?page=Stats"><i class="icon-user"></i> {lang}Profil{/lang}</a></li>					<li><a href="index.php?page=EditProfil"><i class="icon-asterisk"></i> {lang}Einstellungen{/lang}</a></li>					{if $isPlayerAdmin != 0}						<li><a href="index.php?page=Admin"><i class="icon-home"></i> {lang}Administration{/lang}</a></li>							{/if}					<li class="divider"></li>					<li><a href="index.php?page=Logout"><i class="icon-off"></i> {lang}Abmelden{/lang}</a></li>				</ul>			</li>			{/if}		</ul>	</div></div><br><br><div class="navbar navbar-static-top">	{if isset($loggedname)}	<div class="container">		<div class="content">			<div class="row">				<div class="span12">				<h2>Teamliste</h2>				<table class="table table-bordered table-striped">				<tr>					<th>Name</th>					<th>Rang</th>					<th>Status</th>				</tr>				<tr>				{if $isPlayerAdmin == 5}				  <td>{$profile.userName}</td>				  <td><span class="label label-important">Projektleiter</span></td>				  <td>{if $profile.ingameStatus == 0}<span class="label label-important">Offline</span>{else}<span class="label label-success">Online</span>{/if}</td>				{/if}				</tr>				<tr>				{if $isPlayerAdmin == 4}				  <td>{$profile.userName}</td>				  <td><span class="label label-warning">Head Admin</span></td>				  <td>{if $profile.ingameStatus == 0}<span class="label label-important">Offline</span>{else}<span class="label label-success">Online</span>{/if}</td>				{/if}				</tr>				<tr>				{if $isPlayerAdmin == 3}				  <td>{$profile.userName}</td>				  <td><span class="label label-info">Administrator</span></td>				  <td>{if $profile.ingameStatus == 0}<span class="label label-important">Offline</span>{else}<span class="label label-success">Online</span>{/if}</td>				{/if}				</tr>				<tr>				{if $isPlayerAdmin == 2}				  <td>{$profile.userName}</td>				  <td><span class="label label-success">Supporter</span></td>				  <td>{if $profile.ingameStatus == 0}<span class="label label-important">Offline</span>{else}<span class="label label-success">Online</span>{/if}</td>				{/if}				</tr>				<tr>				{if $isPlayerAdmin == 1}				  <td>{$profile.userName}</td>				  <td><span class="label label-success">Supporter</span></td>				  <td>{if $profile.ingameStatus == 0}<span class="label label-important">Offline</span>{else}<span class="label label-success">Online</span>{/if}</td>				{/if}				</tr>				</table>				</div>			</div>		</div>	</div>	{else}	<br><br><br><br><br>	<div class="container">    <div class="content">	  {if isset($error)}{$error}{/if}      <h4>{lang}Anmelden{/lang}</h4>      <form method="POST" action="index.php?page=Login">         <table border="0" width="455">            <tr>               <td><b>{lang}Name:{/lang}</b></td>               <td><input type="text" style="height: 30px;" name="username" placeholder="Name"/></td>            </tr>            <tr>               <td><b>{lang}Passwort:{/lang}</b></td>               <td><input type="password" style="height: 30px;" name="password" placeholder="Passwort"/></td>            </tr>            </td>            <td><input type="submit" class="btn btn-success" name="submit" value="{lang}Login{/lang}" /></td>            </tr>         </table>		 </div>      </form>		</div>	 </div>{/if}{include file="../footer.tpl"}


    TeamPage.class.php:


    PHP
    <?php//@importsrequire_once("libs/pages/Page.class.php");require_once("libs/SampQueryAPI.php");class TeamPage extends Page{    public $templateName = "Team";	protected $player_array = array();      public function readData() {        parent::readData();		if( !isset( $_SESSION["loggedin"] ) ) header('Location: index.php?page=Home');		$username = @$_SESSION["loggedin"];		if( UCP_Framework::getConfig()->licensetable_exist == true ) {			$sql = UCP_Framework::getDB()->sendQuery("SELECT *													  FROM ". UCP_Framework::getConfig()->usertable ."													  WHERE ". UCP_Framework::getConfig()->userName ." = '". $username ."'													  LIMIT 1");			$sql_licenses = UCP_Framework::getDB()->sendQuery("SELECT *															   FROM ". UCP_Framework::getConfig()->licensetable ."															   WHERE ". UCP_Framework::getConfig()->lic_loadname ." = '". $username ."'															   LIMIT 1");			while($p = UCP_Framework::getDB()->fetchArray($sql) ) {				$p["userName"] = @$p[UCP_Framework::getConfig()->userName];				$p["userLevel"] = @$p[UCP_Framework::getConfig()->userLevel];				$p["userMail"] = @$p[UCP_Framework::getConfig()->userMail];				$p["userWarnings"] = @$p[UCP_Framework::getConfig()->userWarnings];				$p["ingameStatus"] = @$p[UCP_Framework::getConfig()->ingameStatus];				$p["userAdmin"] = @$p[UCP_Framework::getConfig()->userAdmin];				$p["userSkin"] = @$p[UCP_Framework::getConfig()->userSkin];					$p["userGeld"] = @number_format($p[UCP_Framework::getConfig()->userGeld], 0, '.','.');				$p["userBank"] = @number_format($p[UCP_Framework::getConfig()->userBank], 0, '.','.');				$p["userJob"] = @$p[UCP_Framework::getConfig()->userJob];					$p["userFrak"] = @$p[UCP_Framework::getConfig()->userFrak];					$p["userFrakRank"] = @$p[UCP_Framework::getConfig()->userFrakRank];					$p["userKills"] = @$p[UCP_Framework::getConfig()->userKills];					$p["userDeaths"] = @$p[UCP_Framework::getConfig()->userDeaths];					$p["userExp"] = @$p[UCP_Framework::getConfig()->userExp];					$p["userMaxExp"] = @$p[UCP_Framework::getConfig()->userMaxExp];					$p["userHandynr"] = @$p[UCP_Framework::getConfig()->userHandynr];				$p["userHeirat"] = @$p[UCP_Framework::getConfig()->userHeirat];				$p["userCarPunkte"] = @$p[UCP_Framework::getConfig()->userCarPunkte];				$p["userBusSkill"] = @$p[UCP_Framework::getConfig()->userBusSkill];				$p["userBusExp"] = @$p[UCP_Framework::getConfig()->userBusExp];				$p["userDeteSkill"] = @$p[UCP_Framework::getConfig()->userDeteSkill];				$p["userDeteExp"] = @$p[UCP_Framework::getConfig()->userDeteExp];				$p["userPremium"] = @$p[UCP_Framework::getConfig()->userPremium];				$f["userName"] = @$f[UCP_Framework::getConfig()->userName];				if( UCP_Framework::getDB()->numRows($sql_licenses) == 1) {					$licenses = UCP_Framework::getDB()->fetchArray($sql_licenses);					$p["userCar"] = @$licenses[UCP_Framework::getConfig()->userCar];					$p["userBike"] = @$licenses[UCP_Framework::getConfig()->userBike];					$p["userTruck"] = @$licenses[UCP_Framework::getConfig()->userTruck];					$p["userWeapon"] = @$licenses[UCP_Framework::getConfig()->userWeapon];					$p["userBoat"] = @$licenses[UCP_Framework::getConfig()->userBoat];					$p["userFish"] = @$licenses[UCP_Framework::getConfig()->userFish];					$p["userPlane"] = @$licenses[UCP_Framework::getConfig()->userPlane];					$p["userHeli"] = @$licenses[UCP_Framework::getConfig()->userHeli];					$p["userZollPass"] = @$licenses[UCP_Framework::getConfig()->userZollPass];				} else {					$p["userCar"] = @$p[UCP_Framework::getConfig()->userCar];					$p["userWeapon"] = @$p[UCP_Framework::getConfig()->userWeapon];					$p["userBoat"] = @$p[UCP_Framework::getConfig()->userBoat];					$p["userFish"] = @$p[UCP_Framework::getConfig()->userFish];					$p["userPlane"] = @$p[UCP_Framework::getConfig()->userPlane];					$p["userZollPass"] = @$p[UCP_Framework::getConfig()->userZollPass];				}								$this->player_array = $p;			}		} else {			$sql = UCP_Framework::getDB()->sendQuery("SELECT *													  FROM ". UCP_Framework::getConfig()->usertable ."													  WHERE ". UCP_Framework::getConfig()->userName ." = '". $username ."'													  LIMIT 1");								  			while($p = UCP_Framework::getDB()->fetchArray($sql) ) {				$f["userName"] = @$f[UCP_Framework::getConfig()->userName];				$p["userLevel"] = @$p[UCP_Framework::getConfig()->userLevel];				$p["userMail"] = @$p[UCP_Framework::getConfig()->userMail];				$p["userWarnings"] = @$p[UCP_Framework::getConfig()->userWarnings];				$p["ingameStatus"] = @$p[UCP_Framework::getConfig()->ingameStatus];				$p["userAdmin"] = @$p[UCP_Framework::getConfig()->userAdmin];				$p["userSkin"] = @$p[UCP_Framework::getConfig()->userSkin];					$p["userGeld"] = @$p[UCP_Framework::getConfig()->userGeld];					$p["userBank"] = @$p[UCP_Framework::getConfig()->userBank];					$p["userJob"] = @$p[UCP_Framework::getConfig()->userJob];					$p["userFrak"] = @$p[UCP_Framework::getConfig()->userFrak];					$p["userFrakRank"] = @$p[UCP_Framework::getConfig()->userFrakRank];					$p["userKills"] = @$p[UCP_Framework::getConfig()->userKills];					$p["userDeaths"] = @$p[UCP_Framework::getConfig()->userDeaths];					$p["userExp"] = @$p[UCP_Framework::getConfig()->userExp];					$p["userMaxExp"] = @$p[UCP_Framework::getConfig()->userMaxExp];					$p["userHandynr"] = @$p[UCP_Framework::getConfig()->userHandynr];					$p["userHeirat"] = @$p[UCP_Framework::getConfig()->userHeirat];					$p["userCarPunkte"] = @$p[UCP_Framework::getConfig()->userCarPunkte];					$p["userCar"] = @$p[UCP_Framework::getConfig()->userCar];				$p["userWeapon"] = @$p[UCP_Framework::getConfig()->userWeapon];				$p["userBoat"] = @$p[UCP_Framework::getConfig()->userBoat];				$p["userFish"] = @$p[UCP_Framework::getConfig()->userFish];				$p["userPlane"] = @$p[UCP_Framework::getConfig()->userPlane];				$p["userZollPass"] = @$p[UCP_Framework::getConfig()->userZollPass];				$p["userBusSkill"] = @$p[UCP_Framework::getConfig()->userBusSkill];				$p["userBusExp"] = @$p[UCP_Framework::getConfig()->userBusExp];				$p["userDeteSkill"] = @$p[UCP_Framework::getConfig()->userDeteSkill];				$p["userDeteExp"] = @$p[UCP_Framework::getConfig()->userDeteExp];					$p["userPremium"] = @$p[UCP_Framework::getConfig()->userPremium];									$this->player_array = $p;			}		}    }    public function assignVariables() 	{        parent::assignVariables();		$url = $_SERVER['PHP_SELF'];		$url = str_replace("/index.php", "", $url);		UCP_Framework::getTPL()->assign( array( 			"profile" => $this->player_array,			"exist_lic" => UCP_Framework::getConfig()->loadLicenses,			"url" => "http://".$_SERVER['SERVER_NAME'].$url		) );    }    public function show() 	{        parent::show();    }}?>


    Das ist nun der Code von Teampage, ich hoffe es könnte mir jemand helfen.


    So sieht es immoment aus, Foto:



    Mfg
    DMW007

    2 Mal editiert, zuletzt von DMW007 ()

  • So wie ich das sehe, greifst du nur auf den aktuellen Benutzer der Session zu und aus diesem Grund wird auch nur dein Account angezeigt. Probiere es mal mit einen anderen Admin Account dann sollte nur der in der Liste sein. Du musst also mit einer schleife alle Admins durchgehen und auflisten.



    MfG
    SLaYz

  • Beitrag von DMW007 ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.