Файл: pages/rewrite_user_site.php
Строк: 50
<?php # Created by Up
include_once '../sistem/start.php';
include_once $config['OTS'].'sistem/config.php';
include_once $config['OTS'].'sistem/function.php';
include_once $config['OTS'].'sistem/db.php';
//include_once $config['OTS'].'sistem/users.php';
if(isset($_GET['id']))
{
$id=((int)abs($_GET['id']));
if(mysql_num_rows($sql=mysql_query('SELECT * FROM `users` where `id`=''.$id.'' LIMIT 1;'))>=1)
{
$arr=mysql_fetch_assoc($sql);
$config['TITLE']='Все сайты пользователя';
include_once $config['OTS'].'sistem/head.php';
$count=mysql_result(mysql_query('SELECT COUNT(*) FROM `site` WHERE `admin`=''.$id.'';'),0);
if($page=page($count,isset($_GET['page'])?$_GET['page']:1))
{
$sql=mysql_query('SELECT * FROM `site` WHERE `admin`=''.$id.'' ORDER BY `host` DESC LIMIT '.$page['ot'].','.$_SESSION['kol_sites'].';');
while($arr=mysql_fetch_assoc($sql))
print '<a'.($_SESSION['wiev_opis']==1?' title="'.$arr['opisanie'].'"':'').' class="link" href="'.$config['home'].'/site/'.$arr['id'].'/index.php">'.$arr['name'].'</a> ('.$arr['host'].'/<small>'.$arr['hit'].'</small>)'.($arr['status']==1?' <b>На проверке</b>':'').'<br />'.($_SESSION['wiev_opis']!=1?'<div class="func">'.$arr['opisanie'].'<br /></div>':'').((isset($_SESSION['id']) and isset($_SESSION['pass']) and $_SESSION['id']==$arr['admin'] and $_SESSION['adm_rezim']==1)?'[<a href="../../pages/adm.php?act=re_site&id='.$arr['id'].'">Изменить</a>/<a href="../../pages/adm.php?act=code&id='.$arr['id'].'">Код</a>/<a href="../../pages/adm.php?act=set_site&id='.$arr['id'].'">Настройка</a>/<a href="../../pages/adm.php?act=del_site&id='.$arr['id'].'">Удалить</a>]<br />':'');
pages($page['page'],$page['str'],'index.php?page=','');
}
else
print 'Такой страници не существует, или у пользователя еще нету добавленных сайтов!<br />';
print '<a href="doska.php">Доска пользователя</a><br />';
include_once $config['OTS'].'sistem/foot.php';
}
else
{
header('location: '.$config['home'].'/?act=error&error=404');
exit;
}
}
else
{
header('location: '.$config['home'].'/?act=error&error=404');
exit;
}
?>