From 175be80a0b772fc645bee7ed05ab9af693c20ac7 Mon Sep 17 00:00:00 2001 From: radiskull Date: Wed, 18 Jan 2012 17:54:26 +0000 Subject: [PATCH] =?UTF-8?q?#91=20gel=C3=B6st=20Farben=20k=C3=B6nnen=20via?= =?UTF-8?q?=20db=20eingestellt=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ag/include/designfunctions.inc.php | 65 ++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/ag/include/designfunctions.inc.php b/ag/include/designfunctions.inc.php index 8da4985..9ddf5d3 100644 --- a/ag/include/designfunctions.inc.php +++ b/ag/include/designfunctions.inc.php @@ -18,6 +18,12 @@ defineIfNotDefined('GROUP_COLOR_DEVELOPER', 'orange'); defineIfNotDefined('GROUP_COLOR_CREATIVE', 'red'); defineIfNotDefined('GROUP_COLOR_MODERATOR', 'green'); +defineIfNotDefined('ATTACK_COLOR_DMGATTACK', 'white'); +defineIfNotDefined('ATTACK_COLOR_BUFF', 'blue'); +defineIfNotDefined('ATTACK_COLOR_DEBUFF', 'orange'); +defineIfNotDefined('ATTACK_COLOR_HEAL', 'green'); +defineIfNotDefined('ATTACK_COLOR_SPECIAL', 'red'); + // Diese Funktion muss in ein Darstellungspackage hinein und muss noch verlegt werden, Gestaltung in css-Datei /** @@ -88,21 +94,40 @@ function generateUserLinkByID($userid, $showClanTags = TRUE){ } -function generateAttackLinkByID($attackid) { +function generateAttackLinkByID($attackid, $withColor = TRUE) { + return ''.generateAttackNameByID($attackid, $withColor).''; +} + +function generateAttackNameByID($attackid, $withColor = TRUE) { $sql = 'SELECT * from attacken WHERE id = ' .$attackid; $qry = mysql_query($sql); $row = mysql_fetch_assoc($qry); - return ''.$row['name'].''; -} + if($row['type'] == 'normal'){ + $color = 'style="color:'.ATTACK_COLOR_DMGATTACK.'"'; + } else if($row['type'] == 'kaioken' || $row['type'] == 'kaioken2' || $row['type'] == 'SSJ'){ + $color = 'style="color:'.ATTACK_COLOR_BUFF.'"'; + } else if($row['type'] == 'lose' || $row['type'] == 'lose2'){ + $color = 'style="color:'.ATTACK_COLOR_DEBUFF.'"'; + } else if($row['type'] == 'hp' || $row['type'] == 'hpmp'){ + $color = 'style="color:'.ATTACK_COLOR_HEAL.'"'; + } else { + $color = 'style="color:'.ATTACK_COLOR_SPECIAL.'"'; + } + if($withColor) { + return ''.$row['name'].''; + } else { + return $row['name']; + } +} function displayClanLink($clanid, $clanname = NULL){ - if($clanname === NULL) { - $qry = mysql_query('SELECT clanname FROM clan WHERE id = ' . $clanid); - $row = mysql_fetch_assoc($qry); - $clanname = $row['clanname']; - } - return ''.$clanname.''; + if($clanname === NULL) { + $qry = mysql_query('SELECT clanname FROM clan WHERE id = ' . $clanid); + $row = mysql_fetch_assoc($qry); + $clanname = $row['clanname']; + } + return ''.$clanname.''; } function displayHistoryBackLink(){ @@ -203,13 +228,11 @@ function displayCount($value){ function generateTimerHtml($timerId, $timeInSeconds, $htmlOnExpire) { ?> - - - - - - +