View file system/inc/include/list_users.php

File size: 1.14Kb
<?
function list_users($users_list = "")
{
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)
{echo ' <span class="login_on">[на сайте]</span>';}
}

function users_profile($loginid){
$profile_user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = ".$loginid." LIMIT 1"));

	if($profile_user['pol'] == 1)
	 {echo ' <img src="/template/icon/users/1.png"/>';}
	 else{echo ' <img src="/template/icon/users/2.png"/>';}
echo ' <a href="'.DIR_SHCMS.'change_view.php?id='.$profile_user['id'].'">'.$profile_user['login'].'</a>';
}

	function users_list($logi){
$profile_user1 = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = ".$logi." LIMIT 1"));

echo ' <a href="'.DIR_SHCMS.'change_view.php?id='.$profile_user1['id'].'">'.$profile_user1['login'].'</a>';
}

?>