nick3() and partially nick7() functions replaced by nick class
This commit is contained in:
@@ -24,41 +24,8 @@ if (($user['align'] >= 1.98 && $user['align'] <= 1.99) || $user['admin'] == 1 ||
|
||||
}
|
||||
|
||||
$edit = '';
|
||||
|
||||
function nick3($id)
|
||||
{
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '" . mysql_real_escape_string($id) . "' LIMIT 1"));
|
||||
$mm = '';
|
||||
if (isset($user['id'])) {
|
||||
if ($user['baned'] == 1) {
|
||||
$mm .= '<img src=i/blocked.png />';
|
||||
}
|
||||
if ($user['align'] > 0) {
|
||||
$mm .= '<img src=i/align_' . $user['align'] . '.gif />';
|
||||
}
|
||||
if ($user['klan'] != '') {
|
||||
$mm .= '<img title=' . ClanImage($user['klan']) . ' src=i/klan/' . ClanImage($user['klan']) . '.gif /> ';
|
||||
}
|
||||
$mm .= '<b>' . $user['login'] . '</b>';
|
||||
|
||||
$mm .= ' [' . $user['level'] . ']<a href=/inf.php?' . $user['id'] . ' target=_blank><img src=i/inf.gif width=12 height=11 /></a>';
|
||||
|
||||
}
|
||||
return $mm;
|
||||
}
|
||||
|
||||
function ClanImage($clan_id)
|
||||
{
|
||||
$clanimg = mysql_fetch_assoc(mysql_query("SELECT `short` FROM `clans` WHERE `id` = '{$clan_id}' LIMIT 1"));
|
||||
if ($clanimg['short']) {
|
||||
$clanimg = $clanimg['short'];
|
||||
} else {
|
||||
$clanimg = "1x1";
|
||||
}
|
||||
return $clanimg;
|
||||
}
|
||||
|
||||
$search = '';
|
||||
|
||||
if (isset($_GET['do']) && $_GET['do'] != "search" && $_GET['do'] != "my_topics" && $_GET['do'] != "my_comments" && $_GET['do'] != "open" && $_GET['do'] != "close" && $_GET['do'] != "fix" && $_GET['do'] != "unfix") {
|
||||
echo '<script type="text/javascript">location.href="forum.php"</script>';
|
||||
} elseif (isset($_GET['do']) && $_GET['do'] == "search") {
|
||||
@@ -120,7 +87,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
|
||||
if (!$user['id']) {
|
||||
echo "<b>Не авторизованы</b><br />";
|
||||
} else {
|
||||
echo "Игрок : " . nick3($user['id']) . "<br />";
|
||||
echo "Игрок : " . nick::id($user['id'])->full(1) . "<br />";
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
@@ -381,7 +348,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
|
||||
if ($user['invis'] == 1) {
|
||||
$userPost = '<b>Невидимка</b>';
|
||||
} else {
|
||||
$userPost = nick3($user['id']);
|
||||
$userPost = nick::id($user['id'])->full(1);
|
||||
}
|
||||
if ($dostupPal == true) {
|
||||
$text1 = $text1;
|
||||
@@ -417,7 +384,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
|
||||
if ($user['invis'] == 1) {
|
||||
$userPost = '<b>Невидимка</b>';
|
||||
} else {
|
||||
$userPost = nick3($user['id']);
|
||||
$userPost = nick::id($user['id'])->full(1);
|
||||
}
|
||||
|
||||
if ($dostupPal == false) {
|
||||
@@ -464,7 +431,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
|
||||
if ($user['invis'] == 1) {
|
||||
mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'<br /><font color=red><b>Невидимка</b>: " . mysql_real_escape_string($_GET['cpr']) . "</font>') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1");
|
||||
} else {
|
||||
mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'<br /><font color=red>" . mysql_real_escape_string(nick3($user['id'])) . ": " . mysql_real_escape_string($_GET['cpr']) . "</font>') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1");
|
||||
mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'<br /><font color=red>" . mysql_real_escape_string(nick::id($user['id'])->full(1)) . ": " . mysql_real_escape_string($_GET['cpr']) . "</font>') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1");
|
||||
}
|
||||
echo "<script>window.location='?topic=" . $_GET['topic'] . "&rnd'</script>";
|
||||
exit();
|
||||
@@ -472,7 +439,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
|
||||
|
||||
if (isset($_GET['do']) && $dostupPal == true) {
|
||||
if ($user['align'] >= 1.7 && $user['align'] < 2) {
|
||||
$palclose = 'паладином ' . nick3($user['id']);
|
||||
$palclose = 'паладином ' . nick::id($user['id'])->full(1);
|
||||
} elseif ((int)$user['admin'] == 1) {
|
||||
$palclose = '<b>Администрацией</b>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user