Farben können via db eingestellt werden.
main
radiskull 13 years ago
parent ecf374561d
commit 175be80a0b

@ -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 '<a href="index.php?as=info/attacken&p=1&at_id='.$attackid.'">'.generateAttackNameByID($attackid, $withColor).'</a>';
}
function generateAttackNameByID($attackid, $withColor = TRUE) {
$sql = 'SELECT * from attacken WHERE id = ' .$attackid;
$qry = mysql_query($sql);
$row = mysql_fetch_assoc($qry);
return '<a href="index.php?as=info/attacken&p=1&at_id='.$attackid.'">'.$row['name'].'</a>';
}
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 '<span '.$color.'>'.$row['name'].'</span>';
} 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 '<a href="index.php?as=clan/clan_info&clan_id='.$clanid.'">'.$clanname.'</a>';
if($clanname === NULL) {
$qry = mysql_query('SELECT clanname FROM clan WHERE id = ' . $clanid);
$row = mysql_fetch_assoc($qry);
$clanname = $row['clanname'];
}
return '<a href="index.php?as=clan/clan_info&clan_id='.$clanid.'">'.$clanname.'</a>';
}
function displayHistoryBackLink(){
@ -203,13 +228,11 @@ function displayCount($value){
function generateTimerHtml($timerId, $timeInSeconds, $htmlOnExpire) {
?>
<span id='timer_<?php echo $timerId; ?>'>
<?php
if($timeInSeconds <= 0){
echo $htmlOnExpire;
} else{
?>
<script type='text/javascript'>
<span id='timer_<?php echo $timerId; ?>'> <?php
if($timeInSeconds <= 0){
echo $htmlOnExpire;
} else{
?> <script type='text/javascript'>
v=new Date();
var ht=document.getElementById('timer_<?php echo $timerId; ?>');
function t(){
@ -237,12 +260,10 @@ function generateTimerHtml($timerId, $timeInSeconds, $htmlOnExpire) {
window.setTimeout('t();',950);
}
window.onload=t;
</script>
<?php
}
?>
</span>
<?php
</script> <?php
}
?> </span>
<?php
}

Loading…
Cancel
Save