View file modules/kabinet/admins.php

File size: 7.85Kb
<?php
########################################
##	           WAP-ENGINE             ##
########################################
##                                    ##
##  Автор : CHUMA (Токарев Владимир)  ##
##  e-mail : [email protected]     ##
##  WAP : http://wap-engine.ru        ##
##                                    ##
########################################
##         ВЫ НЕ ИМЕЕТЕ ПРАВО         ##
##        ИЗМЕНЯТЬ КОД СКРИПТА        ##
##  ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ!  ##
########################################
include ('../../config.php');
include ('../../templates/run.php');
include ('../../templates/func.php');
$title_page = 'Список администрации сайта';
$m_polozhenie = 'Просматривает список администрации';
include '../../themes/'.$themes.'.php';
$login_in = $login;
$passw_in = $passw;
$status_in = $status;

####################
if ($portal=='off')
 {
  echo'<p align="center">'.$offmes.'</p>';
 }
if ($portal=='on')
 {
echo'<p class="modul_name"align="center">Администрация сайта</p>';

$users_f = file('../../data/admins.php');
array_splice($users_f, 0, 2);
array_splice($users_f, -2, 2);
$users_on_f = file('../../data/user_online.txt');
$user_on_arr = implode('|', $users_on_f);

$users_count = count($users_f);

echo'<p class="a"><img src="/images/st/admin_m.gif"alt=""><img src="/images/st/admin_w.gif"alt=""> Администраторы</p>';
echo'<p class="b">';

for($i=0; $i <= $users_count; $i++)
 {
  $user_arr = explode('|', $users_f[$i]);
  if (!empty($users_f[$i]) && $user_arr[1] == 1)
   {
user_data('../../data/users/'.trim($user_arr[0]).'.php');

if(strstr($user_on_arr, '|'.trim($user_arr[0]).'|'))
{
if($pol == '1')
{
if($status == '1')
{
echo'<img src="/images/st/admin_m.gif"alt=""/>';
}
}
elseif($pol == '0')
{
if($status == '1')
{
echo'<img src="/images/st/admin_w.gif"alt=""/>';
}
}
}
else
{
if($pol == '1')
{
echo'<img src="/images/st/m_off.gif"alt=""/>';
}
elseif($pol == '0')
{
echo'<img src="/images/st/w_off.gif"alt=""/>';
}
}
$nick_name_arr = explode('::', $nickname);
$nickname = $nick_name_arr[0];
$nickcolor = $nick_name_arr[1];
if(!empty($nickname))
{
if(!empty($nickcolor))
{
$login_nick_color = '<font color="'.$nickcolor.'">'.$nickname.'</font>';
}
else
{
$login_nick_color = ''.$nickname.'';
}
}
else
{
$login_nick_color = ''.$user_arr[0].'';
}
    echo" <a href=\"user_info.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\">$login_nick_color</a> ";
if($rating >= $kolbronza && $rating <= $kolserebro)
{
echo'<img src="/images/st/bronza.gif"alt=""/>';
}
if($rating >= $kolserebro && $rating <= $kolzoloto)
{
echo'<img src="/images/st/serebro.gif"alt=""/>';
}
if($rating >= $kolzoloto)
{
echo'<img src="/images/st/zoloto.gif"alt=""/>';
}   
if(isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in)
     {if($icon_text == "1" || $icon_text == ""){
	  echo" <a href=\"send_privat.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\"><img src=\"/images/st/1.gif\"align=\"top\"alt=\"\" title=\"Написать сообщение\"></a>";}if($icon_text == "0"){echo" <a href=\"send_privat.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\">[ЛС]</a>";}
     }
echo"<br />";
    $adm = 1;
   }
    elseif(empty($users_f[$i]) && empty($adm))
   {
    echo'Администраторов еще не назначили.';
   }
 }
echo'</p>';
echo'<p class="a"><img src="/images/st/gmod_m.gif"alt=""><img src="/images/st/gmod_w.gif"alt=""> Главные модераторы</p>';
echo'<p class="b">';
for($i=0; $i <= $users_count; $i++)
 {
  $user_arr = explode('|', $users_f[$i]);
  if (!empty($users_f[$i]) && $user_arr[1] == 2)
   {
user_data('../../data/users/'.trim($user_arr[0]).'.php');
if(strstr($user_on_arr, '|'.trim($user_arr[0]).'|'))
{
if($pol == '1')
{
if($status == '2')
{
echo'<img src="/images/st/gmod_m.gif"alt=""/>';
}
}
elseif($pol == '0')
{
if($status == '2')
{
echo'<img src="/images/st/gmod_w.gif"alt=""/>';
}
}
}
else
{
if($pol == '1')
{
echo'<img src="/images/st/m_off.gif"alt=""/>';
}
elseif($pol == '0')
{
echo'<img src="/images/st/w_off.gif"alt=""/>';
}
}
$nick_name_arr = explode('::', $nickname);
$nickname = $nick_name_arr[0];
$nickcolor = $nick_name_arr[1];
if(!empty($nickname))
{
if(!empty($nickcolor))
{
$login_nick_color = '<font color="'.$nickcolor.'">'.$nickname.'</font>';
}
else
{
$login_nick_color = ''.$nickname.'';
}
}
else
{
$login_nick_color = ''.$user_arr[0].'';
}
    echo" <a href=\"user_info.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\">$login_nick_color</a> ";
if($rating >= $kolbronza && $rating <= $kolserebro)
{
echo'<img src="/images/st/bronza.gif"alt=""/>';
}
if($rating >= $kolserebro && $rating <= $kolzoloto)
{
echo'<img src="/images/st/serebro.gif"alt=""/>';
}
if($rating >= $kolzoloto)
{
echo'<img src="/images/st/zoloto.gif"alt=""/>';
}

    if(isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in)
     {if($icon_text == "1" || $icon_text == ""){
	  echo" <a href=\"send_privat.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\"><img src=\"/images/st/1.gif\"align=\"top\"alt=\"\"title=\"Написать сообщение\"></a>";}if($icon_text == "0"){echo" <a href=\"send_privat.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\">[ЛС]</a>";}
     }
echo"<br />";
    $gmod = 1;
   }
    elseif(empty($users_f[$i]) && empty($gmod))
   {
    echo'Главных модераторов еще не назначили.';
   }
 }
echo'</p>';
echo'<p class="a"><img src="/images/st/mod_m.gif"alt=""><img src="/images/st/mod_w.gif"alt=""> Модераторы</p>';
echo'<p class="b">';
for($i=0; $i <= $users_count; $i++)
 {
  $user_arr = explode('|', $users_f[$i]);
  if (!empty($users_f[$i]) && $user_arr[1] == 3)
   {
user_data('../../data/users/'.trim($user_arr[0]).'.php');
if(strstr($user_on_arr, '|'.trim($user_arr[0]).'|'))
{
if($pol == '1')
{
if($status == '3')
{
echo'<img src="/images/st/mod_m.gif"alt=""/>';
}
}
elseif($pol == '0')
{
if($status == '3')
{
echo'<img src="/images/st/mod_w.gif"alt=""/>';
}
}
}
else
{
if($pol == '1')
{
echo'<img src="/images/st/m_off.gif"alt=""/>';
}
elseif($pol == '0')

{
echo'<img src="/images/st/w_off.gif"alt=""/>';
}
}
$nick_name_arr = explode('::', $nickname);
$nickname = $nick_name_arr[0];
$nickcolor = $nick_name_arr[1];
if(!empty($nickname))
{
if(!empty($nickcolor))
{
$login_nick_color = '<font color="'.$nickcolor.'">'.$nickname.'</font>';
}
else
{
$login_nick_color = ''.$nickname.'';
}
}
else
{
$login_nick_color = ''.$user_arr[0].'';
}
    echo" <a href=\"user_info.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\">$login_nick_color</a> ";
if($rating >= $kolbronza && $rating <= $kolserebro)
{
echo'<img src="/images/st/bronza.gif"alt=""/>';
}
if($rating >= $kolserebro && $rating <= $kolzoloto)
{
echo'<img src="/images/st/serebro.gif"alt=""/>';
}
if($rating >= $kolzoloto)
{
echo'<img src="/images/st/zoloto.gif"alt=""/>';
}

    if(isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in)
     {if($icon_text == "1" || $icon_text == ""){
	  echo" <a href=\"send_privat.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\"><img src=\"/images/st/1.gif\"align=\"top\"alt=\"\"title=\"Написать сообщение\"></a>";}if($icon_text == "0"){echo" <a href=\"send_privat.php?nick=$user_arr[0]&amp;".session_name()."=".session_id()."\">[ЛС]</a>";}
     }
echo"<br />";

    $mod = 1;
   }
    elseif(empty($users_f[$i]) && empty($mod))
   {
    echo'Модераторов еще не назначили.';
   }
 }
echo'</p>';

echo'<p>Всего управляющих: '.$users_count.'<br />';
echo'<a href="index.php?'.session_name().'='.session_id().'">В кабинет</a></p>';
####################
}
include ('../../templates/foot.php');
?>