Размер файла: 1.94Kb
<?
function list_users($users_list)
{
global $settings_shcms;
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban_users` WHERE `user_id` = '".$users_list."' AND `time_1` > '".time()."'"), 0)!=0)
{
echo ' <font color="red">[забанен]</font>';
}
/*
Если пользователь на сайте выводит ON
если нет то OFF
*/
elseif(mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `id`= '".$users_list."' AND `datelast` > '".(time()-400)."'"),0) == 1)
{
if($settings_shcms['onoff'] == 1) {
echo false;
}
elseif($settings_shcms['onoff'] == 2) {
echo ' <span class="login_on">[online]</span>';
}
elseif($settings_shcms['onoff'] == 0) {
echo ' <span class="login_on">[на сайте]</span>';
}
}
}
function users_profile($loginid,$nick = true) {
$profile_user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = ".$loginid." LIMIT 1"));
if($profile_user['pol'] == 1) {
if($profile_user['team'] == 6) {
echo ' <img title="Администратор" src="/template/icon/users/admin_m.png"/>';
} else {
echo ' <img src="/template/icon/users/1.png"/>';
}
}
else {
if($profile_user['team'] == 6) {
echo ' <img title="Администратор" src="/template/icon/users/admin_well.png"/>';
} else {
echo ' <img src="/template/icon/users/2.png"/>';
}
}
if($nick == true) {
echo ' <a href="'.DIR_SHCMS.'change_view.php?id='.$profile_user['id'].'">'.$profile_user['login'].'</a>';
}
}
function users_list($logi)
{
$profile_users = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = ".$logi." LIMIT 1"));
echo ' <a href="'.DIR_SHCMS.'change_view.php?id='.$profile_users['id'].'">'.$profile_users['login'].'</a>';
}
?>