Файл: sys/fnc/user.php
Строк: 202
<?php
function user($user = NULL) {
global $set, $time;
@$ank = mysql_fetch_array(mysql_query("SELECT `id`, `nick`, `country`, `activity`, `online`, `sex`, `rating`, `money`, `ncolor`, `ncolor2`, `group_access`, `date_reg`, `date_last` FROM `user` WHERE `id` = $user LIMIT 1"));
if ($ank['sex'] == 1) {
echo "<img src = '/style/icons/user_1.png' /> ";
} else {
echo "<img src = '/style/icons/user_0.png' /> ";
}
if ($ank['id'] > 0) {
echo "<a href = '/info.php?id=$ank[id]'>";
echo text::gradient("$ank[nick]", "$ank[ncolor]", "$ank[ncolor2]");
echo "</a> ";
} elseif ($ank['id'] == 0) {
echo "Система";
}
if ($ank['date_last'] > (TIME - 600)) {
if ($ank['online'] == 'wap') {
echo "<img src='/style/icons/mobile.png' title='Пользователь с телефона'/><small>Моб</small>";
} else {
echo "<img src='/style/icons/web.png' title='Пользователь с компьютера'/><small>Веб</small>";
}
}
}
function medals($user = 0) {
$ank = mysql_fetch_array(mysql_query("SELECT `nick`, `country`, `activity`, `sex`, `rating`, `ncolor`, `ncolor2`, `group_access`, `date_reg`, `date_last` FROM `user` WHERE `id` = $user LIMIT 1"));
if ($ank['activity'] >= 100 && $ank['activity'] <= 199) {
echo "<img src = '/style/icons/medals/bronze_1.png' alt = '' /> ";
}
if ($ank['activity'] >= 200 && $ank['activity'] <= 299) {
echo " <img src = '/style/icons/medals/bronze_2.png' alt = '' /> ";
}
if ($ank['activity'] >= 300 && $ank['activity'] <= 499) {
echo " <img src = '/style/icons/medals/bronze_3.png' alt = '' /> ";
}
if ($ank['activity'] >= 500 && $ank['activity'] <= 599) {
echo " <img src = '/style/icons/medals/silver_1.png' alt = '' /> ";
}
if ($ank['activity'] >= 600 && $ank['activity'] <= 699) {
echo " <img src = '/style/icons/medals/silver_2.png' alt = '' /> ";
}
if ($ank['activity'] >= 700 && $ank['activity'] <= 999) {
echo " <img src = '/style/icons/medals/silver_3.png' alt = '' /> ";
}
if ($ank['activity'] >= 1000 && $ank['activity'] <= 1099) {
echo " <img src = '/style/icons/medals/gold_1.png' alt = '' /> ";
}
if ($ank['activity'] >= 1100 && $ank['activity'] <= 1199) {
echo " <img src = '/style/icons/medals/gold_2.png' alt = '' /> ";
}
if ($ank['activity'] >= 1200 && $ank['activity'] <= 1599) {
echo " <img src = '/style/icons/medals/gold_3.png' alt = '' /> ";
}
if ($ank['activity'] >= 1600 && $ank['activity'] <= 999999999999) {
echo "<img src = '/style/icons/medals/vip.png' alt = '' /> ";
}
}
function country($user = 0) {
$ank = mysql_fetch_array(mysql_query("SELECT `nick`, `country`, `activity`, `sex`, `rating`, `ncolor`, `ncolor2`, `group_access`, `date_reg`, `date_last` FROM `user` WHERE `id` = $user LIMIT 1"));
if ($ank['country'] == "Россия" || $ank['country'] == "россия" || $ank['country'] == "russia" || $ank['country'] == "Russia") {
echo "<img src = '/style/icons/country/russia.png' title = 'Живет в России'/> ";
} elseif ($ank['country'] == "Украина" || $ank['country'] == "украина" || $ank['country'] == "ukraine" || $ank['country'] == "Ukraine") {
echo "<img src = '/style/icons/country/ukraine.png' title = 'Живет в Украине'/> ";
} elseif ($ank['country'] == "США" || $ank['country'] == "сша" || $ank['country'] == "USA" || $ank['country'] == "usa") {
echo "<img src = '/style/icons/country/usa.png' title = 'Живет в Соединенных Штатах Америки'/> ";
} elseif ($ank['country'] == "Испания" || $ank['country'] == "испания" || $ank['country'] == "Spain" || $ank['country'] == "spain") {
echo "<img src = '/style/icons/country/spain.png' title = 'Живет в Испании'/> ";
} elseif ($ank['country'] == "Армения" || $ank['country'] == "армения" || $ank['country'] == "armenia" || $ank['country'] == "Armenia") {
echo "<img src = '/style/icons/country/armenia.png' title = 'Живет в Армении' /> ";
} elseif ($ank['country'] == "Германия" || $ank['country'] == "германия" || $ank['country'] == "germany" || $ank['country'] == "Germany") {
echo "<img src = '/style/icons/country/germany.png' title = 'Живет в Германии' /> ";
} elseif ($ank['country'] == "Румыния" || $ank['country'] == "румыния" || $ank['country'] == "romania" || $ank['country'] == "Romania") {
echo "<img src = '/style/icons/country/romania.png' title = 'Живет в Румынии' /> ";
} elseif ($ank['country'] == "Узбекистан" || $ank['country'] == "узбекистан" || $ank['country'] == "uzbekistan" || $ank['country'] == "Uzbekistan") {
echo "<img src = '/style/icons/country/uzbekistan.png' title = 'Живет в Узбекистане' /> ";
}
}