Убрано неиспользуемое ClanImage().

This commit is contained in:
Igor Barkov (iwork) 2020-08-27 15:38:06 +03:00
parent 0049b2d601
commit 618e51b179
3 changed files with 2 additions and 12 deletions

2
ch.php
View File

@ -263,7 +263,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
$aa = preg_replace("/sell ", "", $aa); $aa = preg_replace("/sell ", "", $aa);
$act_line = " <span onmouseover=\"fastshow(\'$aa\')\" onmouseout=\"hideshow()\"><b><small>{$act[0]}</small></b></span> "; $act_line = " <span onmouseover=\"fastshow(\'$aa\')\" onmouseout=\"hideshow()\"><b><small>{$act[0]}</small></b></span> ";
} else $act_line = ''; } else $act_line = '';
echo 'w(\'', $row['login'], '\',', $row['id'], ',', $in_battle, ',\'', $row['align'], '\',\'' . ClanImage($row['klan']) . '\', \'' . $act_line . '\',\'', $row['level'], '\',\'', $row['slp'], '\',\'', $row['trv'], '\',\'', '\',\'', $row['login2'], '\');'; echo 'w(\'', $row['login'], '\',', $row['id'], ',', $in_battle, ',\'', $row['align'], '\',\'' . $row['klan'] . '\', \'' . $act_line . '\',\'', $row['level'], '\',\'', $row['slp'], '\',\'', $row['trv'], '\',\'', '\',\'', $row['login2'], '\');';
} }
} }
?> ?>

View File

@ -121,7 +121,7 @@ class User
$nameString .= ' <b>' . $this->login . '</b> '; $nameString .= ' <b>' . $this->login . '</b> ';
} }
if ($this->clan) { if ($this->clan) {
$nameString .= sprintf('<img src="/i/clan/%s.png" >', ClanImage($this->clan)); $nameString .= sprintf('<img src="/i/clan/%s.png" >', $this->clan);
} }
echo '<div class="user-info">'; echo '<div class="user-info">';
echo '<div class="info">'; echo '<div class="info">';

View File

@ -232,16 +232,6 @@ function check_proc($u)
return $r; return $r;
} }
function ClanImage($clan_id)
{
$clanimg = db::c()->query('SELECT `short` FROM `clans` WHERE `id` = ?i ', $clan_id)->fetch_assoc();
if ($clanimg['short']) {
return $clanimg['short'];
} else {
return "1x1";
}
}
function GiveExp($id, $exp) function GiveExp($id, $exp)
{ {
db::c()->query('UPDATE users SET exp = exp + ?i WHERE id = ?i', $exp, $id); db::c()->query('UPDATE users SET exp = exp + ?i WHERE id = ?i', $exp, $id);