diff --git a/ag/include/designfunctions.inc.php b/ag/include/designfunctions.inc.php index 01637c9..0f59d29 100644 --- a/ag/include/designfunctions.inc.php +++ b/ag/include/designfunctions.inc.php @@ -13,7 +13,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/settings.inc.php'); // Diese Funktion muss in ein Darstellungspackage hinein und muss noch verlegt werden, Gestaltung in css-Datei /** - * use displayUserLinkByID instead + * use generateUserLinkByID instead * @deprecated */ function displayUserLink($userid, $username = NULL, $clanpre = NULL, $clansu = NULL){ @@ -21,7 +21,15 @@ function displayUserLink($userid, $username = NULL, $clanpre = NULL, $clansu = N return displayUserLinkByID($userid); } +/** + * use generateUserNameByID instead + * @deprecated + */ function displayUserNameByID($userid, $showClanTags = TRUE){ + return generateUserNameByID($userid, $showClanTags); +} + +function generateUserNameByID($userid, $showClanTags = TRUE){ if($userid === null){return '';} $groups = getUserGroups($userid); @@ -57,8 +65,15 @@ function displayUserNameByID($userid, $showClanTags = TRUE){ } } -// Diese Funktion muss in ein Darstellungspackage hinein und muss noch verlegt werden, Gestaltung in css-Datei +/** + * use generateUserLinkByID instead + * @deprecated + */ function displayUserLinkByID($userid, $showClanTags = TRUE){ + return generateUserLinkByID($userid, $showClanTags); +} + +function generateUserLinkByID($userid, $showClanTags = TRUE){ return ''.displayUserNameByID($userid, $showClanTags).''; } diff --git a/ag/ranglist.php b/ag/ranglist.php index 80a0843..116dde8 100644 --- a/ag/ranglist.php +++ b/ag/ranglist.php @@ -38,13 +38,11 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){ } if($wahl == 'geld') { - $choice_s = mysql_query('SELECT geld, id, nickname FROM user where id >= 2 ORDER BY geld DESC LIMIT 50'); + $choice_s = mysql_query('SELECT geld, id FROM user where id >= 2 ORDER BY geld DESC LIMIT 50'); } else { - $sql = 'SELECT cl.clanzeichen, u.nickname, u.id as userid, c.name, c.level, c.besitzer, c.starke, c.preis, c.speed, c.glueck, c.bild, c.verteidigung, c.ausdauer, c.siege, c.niederlagen, c.id as charid, starke+verteidigung+speed+ausdauer+glueck as powerlevel' . - ' FROM chars as c INNER JOIN user as u on c.besitzer = u.id' . - ' LEFT JOIN clan as cl on u.clan = cl.id ' . + $sql = 'SELECT c.name, c.level, c.besitzer, c.starke, c.preis, c.speed, c.glueck, c.bild, c.verteidigung, c.ausdauer, c.siege, c.niederlagen, c.id as charid, starke+verteidigung+speed+ausdauer+glueck as powerlevel' . 'WHERE rasse != \'NPC\' ORDER BY ('.$wahl.') DESC LIMIT 50'; - + // Uncomment for hp/mp in PL // $sql = 'SELECT cl.clanzeichen, u.nickname, u.id as userid, c.name, c.level, c.besitzer, c.starke, c.preis, c.speed, c.glueck, c.bild, c.verteidigung, c.ausdauer, c.siege, c.niederlagen, c.id as charid, starke+verteidigung+speed+ausdauer+glueck+substring_index(hp,\',\',-1)/10+substring_index(mp,\',\',-1)/5 as powerlevel' . // ' FROM chars as c INNER JOIN user as u on c.besitzer = u.id' . @@ -122,9 +120,9 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){ $cols[$x] = 'bgcolor="#666666"'; $found = 1; } - + $row['bild'] = getPicture($row); - + $row['wahl'] = $row[$wahl]; $clan_logo = explode(',',$row['clanzeichen']); @@ -133,7 +131,7 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){ ?>