View file admin_list/user_profile.php

File size: 2.76Kb
<?php
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Профили пользователей
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/system_core.php';
$shcmsengine['title'] = Lang::get('SHCMS Engine Управление пользователями');
include_once'../template/head.php';
engine::available();
user::users_admin();

if($user_id and $user4['team'] != 6) {
echo engine::errors(Lang::get('У вас недостаточно прав для доступа'));
header('Refresh: 1; url=/index.php?'.$conservation.'&');
	include_once'../template/foot.php';
exit();
}

  $allfield = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"),0);
  $newlist = new Navigation($allfield,10, true);   
$user4 = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='$user_id'"));
if($user4['team'] < 6)
{
    engine::errors(Lang::get('Доступ закрыт'));
    header('Refresh: 1; url=/index.php?'.$conservation.'&');
	include_once'../template/foot.php';
    exit();
}
include_once'secu.php';
$user = mysql_query("SELECT * FROM `users` ORDER BY `id` DESC ". $newlist->limit()."");

$user_table = '
  <thead>
    <tr>
	  <td>ID:</td>
      <td>Логин: </td>
      <td align="center">'.Lang::get('Дата регистрации:').' </td>
      <td align="center">'.Lang::get('Последнее посещение:').' </td>
      <td align="center">'.Lang::get('IP адрес:').' </td>
      <td align="center">'.Lang::get('Изменить:').' </td>
    </tr>
  </thead>';
    
	while($user_profile = mysql_fetch_array($user)) {
	$user_table .= '<tr>
	     <td align="center">
		<span style="font-weight:bold;">'.$user_profile['id'].'</span>
      </td>
	
      <td>
		<a class="pm_list" href="'.DIR_SHCMS.'change_view.php?id='.$user_profile['id'].'">'.$user_profile['login'].'</a>
      </td>

            <td align="center">'.DateClass::make_date($user_profile['datereg']).'</td>
      <td align="center">'.DateClass::make_date($user_profile['datelast']).'</td>
      <td align="center">'.long2ip($user_profile['ip']).'</td>
      <td align="center">
        [ 
        <a href="user_edit.php?id='.$user_profile['id'].'">'.Lang::get('Изм').'</a>
         ]
		      [ 
        <a href="ban.php?id='.$user_profile['id'].'">'.Lang::get('Бан').'</a>
         ]
      </td>
    </tr>
';
}
echo '<table width="100%" class="userstop">'.$user_table.'</table>';
echo '<div class="pages">';
echo $newlist->pagination();
echo '</div>';

	include_once'../template/foot.php';
?>