Файл: buff.php
Строк: 113
<?php
include_once ('./core/base.php');
falseauth();
$id=fl($_GET['id']);
$u_buff = $base -> query('SELECT * FROM `buffs` WHERE `id` = "'.$id.'" LIMIT 1') -> fetch_assoc();
$skill = $base -> query('SELECT * FROM `skills` WHERE `id` = "'.$u_buff['buff'].'" LIMIT 1') -> fetch_assoc();
$header = ''.$skill['name'].'';
include_once ('./core/head.php');
if($u_buff != 0 AND $skill != 0) {
echo '<div class="b"><div class="title">'.$skill['name'].'</div>';
echo ''.skill($skill['id']).'';
if($skill['type'] == 'buff'){
if($skill['p_att']>0) $skill['p_att']='<font color="#30C530">+'.$skill['p_att'].'</font>';
if($skill['p_def']>0) $skill['p_def']='<font color="#30C530">+'.$skill['p_def'].'</font>';
if($skill['m_att']>0) $skill['m_att']='<font color="#30C530">+'.$skill['m_att'].'</font>';
if($skill['m_def']>0) $skill['m_def']='<font color="#30C530">+'.$skill['m_def'].'</font>';
if($skill['endurance']>0) $skill['endurance']='<font color="#30C530">+'.$skill['endurance'].'</font>';
if($skill['intellect']>0) $skill['intellect']='<font color="#30C530">+'.$skill['intellect'].'</font>';
if($skill['agility']>0) $skill['agility']='<font color="#30C530">+'.$skill['agility'].'</font>';
if($skill['skill']>0) $skill['skill']='<font color="#30C530">+'.$skill['skill'].'</font>';
}elseif($skill['type'] == 'debuff'){
if($skill['p_att']>0) $skill['p_att']='<font color="#D21818">-'.$skill['p_att'].'</font>';
if($skill['p_def']>0) $skill['p_def']='<font color="#D21818">-'.$skill['p_def'].'</font>';
if($skill['m_att']>0) $skill['m_att']='<font color="#D21818">-'.$skill['m_att'].'</font>';
if($skill['m_def']>0) $skill['m_def']='<font color="#D21818">-'.$skill['m_def'].'</font>';
if($skill['endurance']>0) $skill['endurance']='<font color="#D21818">-'.$skill['endurance'].'</font>';
if($skill['intellect']>0) $skill['intellect']='<font color="#D21818">-'.$skill['intellect'].'</font>';
if($skill['agility']>0) $skill['agility']='<font color="#D21818">-'.$skill['agility'].'</font>';
if($skill['skill']>0) $skill['skill']='<font color="#D21818">-'.$skill['skill'].'</font>';
}
echo '<div class="title">Информация</div>';
echo '<table class="table table-common" style="margin-top: 5px; border-collapse: collapse; text-align: left;">';
echo '<tr><td><img src="/images/icons/p_att.png"> Физ. Атака</td><td><center>'.$skill['p_att'].'</center></td><td><img src="/images/icons/endurance.png"> Выносливость</td><td><center>'.$skill['endurance'].'</center></td></tr>';
echo '<tr><td><img src="/images/icons/p_def.png"> Физ. Защита</td><td><center>'.$skill['p_def'].'</center></td><td><img src="/images/icons/intellect.png"> Интеллект</td><td><center>'.$skill['intellect'].'</center></td></tr>';
echo '<tr><td><img src="/images/icons/m_att.png"> Маг. Атака</td><td><center>'.$skill['m_att'].'</center></td><td><img src="/images/icons/agility.png"> Ловкость</td><td><center>'.$skill['agility'].'</center></td></tr>';
echo '<tr><td><img src="/images/icons/m_def.png"> Маг. Защита</td><td><center>'.$skill['m_def'].'</center></td><td><img src="/images/icons/skill.png"> Мастерство</td><td><center>'.$skill['skill'].'</center></td></tr>';
$u_buff_remain_time = ($u_buff['time'] + $skill['duration']) - time();
echo '<tr><td colspan="2"><img src="/images/icons/time.png"> Осталось времени</td><td colspan="2"><center>'.tl($u_buff_remain_time).'</center></td></tr>';
echo '</table>';
echo '<br/><a class="btn" href="javascript:history.go(-1)"><img src="/images/icons/back.png"> Назад</a>';
echo '</div>';
}else{
header('Location: /');
}
include_once ('./core/foot.php');
?>