Просмотр файла www/p/adm.php

Размер файла: 44.26Kb
<?php
#-----------------------------------------------------#
#          ********* Бизнес Сайты *********           #
#             Made by   :  BIZON                      #
#               E-mail  :  [email protected]            #
#                 Site  :  http://f913218p.bget.ru    #
#  Вы не имеете право вносить изменения в код скрипта #
#      это может повлечь неработоспособность сайта    #
#-----------------------------------------------------#
if (($numaz != 0)&&($admin>0)){
////////////////////////////////////////////////////////////// Навигация
echo'<div class="wrapper">';
echo'<div id="breadcrumb">';
echo'<ul>';
if(empty($st)){
echo'<li class="first">Настройки</li>';
}else{
echo'<li><a href="'.$link.SID.'">Настройки</a></li>';
echo'<li>&#187;</li>';

if($st==7){
if(isset($ps)or isset($dt)){
echo'<li><a href="'.$link.'st='.$st.'&amp;start='.$start.'&amp;'.SID.'">Витрина на сайте</a></li>';
echo'<li>&#187;</li>';
if(isset($rbn['name']))echo'<li class="first">'.$rbn['name'].'</li>';
if($ps==1)echo'<li class="first">Категории ('.all_dbname(s_vit_categ).')</li>';
if($ps==2)echo'<li class="first">Добавить категорию</li>';
if($ps==3)echo'<li class="first">Настройки</li>';
}
else{echo'<li class="first">Витрина на сайте</li>';}}
if($st==6){
if(isset($id)){
echo'<li><a href="'.$link.'st='.$st.'&amp;start='.$start.'&amp;'.SID.'">Пользователи</a></li>';
echo'<li>&#187;</li>';
echo'<li class="first">'.$usma['login'].'</li>';
}else{
echo'<li class="first">Пользователи</li>';}}
if($st==5)echo'<li class="first">Галерея сайта</li>';
if($st==4){
if($ix==1)
$namez="Входящие";
else
$namez="Иcходящие";
if(isset($idm)){
echo'<li><a href="'.$link.'st='.$st.'&amp;ix='.$ix.'&amp;'.SID.'">'.$namez.'</a></li>';
echo'<li>&#187;</li>';
echo'<li class="first">'.$usma['tema'].'</li>';
}else{
echo'<li class="first">'.$namez.'</li>';
}}
if($st==3 && $onas==1)echo'<li class="first">Изменить соглашение</li>';
if($st==3 && $onas==2)echo'<li class="first">Изменить о нас</li>';
if($st==1){
if(empty($nev)){
echo'<li class="first">Новости</li>';
}else{
echo'<li><a href="'.$link.'st='.$st.'&amp;'.SID.'">Новости</a></li>';
echo'<li>&#187;</li>';
if($nev=="add")echo'<li class="first">Добавить новость</li>';
if($nev!="add")echo'<li class="first">Изменить новость</li>';
}}}
echo'</ul>';
echo'</div></div>';
///////////////////////////////////////////////////////////// Середина
echo'<div class="wrapper">';
echo'<div class="container">';
echo'<div class="content">';
/////////////////////////////////

switch($st)
{
case 1:
if(empty($nev)){
$total = all_dbname(s_nevs);
if ($total>0){
echo'<h1>Список новостей ('.$total.')</h1>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>Название</th><th>Дата</th><th></th></tr></thead>';

if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_nevs  ORDER BY id DESC LIMIT $start,10";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
echo'<tr><td><input type=image src="images/new/'.$ron['image'].'" width="" height="20%" alt="20%" align="center"> <a href="'.$link.'st='.$st.'&amp;nev='.$ron['id'].'&amp;'.SID.'">'.$ron['nazvanie'].'</td><td width="120px" align="center"><b>'.date("d.m.y",$ron['data']).'</b></td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;nev='.$ron['id'].'&amp;'.SID.'" method="post"><input type="hidden" name="addnev" value="del"><input type=image src="images/del.gif" name="sub"></form></td>';
echo'</tr>';
}
}else{echo'<h1>Нет записей</h1>';}
echo'</table>';
if($total>10)page_strnavigation($link.'st='.$st.'&amp;', 10, $start, $total);
}else{
if($nev=="add"){
////////////////////////////
if(!empty($N_error))echo'<div class="error">'.$N_error.'</div>';
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;nev='.$nev.'&amp;'.SID.'" id="form" enctype="multipart/form-data">';
echo'<div class="field"><label>Название:</label><div class="input"><input type="text" name="naznew"  maxlength="150"></div></div>';
echo'<div class="field"><label>Формат файла <b>610*190 px (JPG) </b>:</label><div class="input"><input type="file" name="filenew"></div></div>';
echo'<div class="field"><label>';
bb_codimg();
echo'</label><div class="input"><textarea id="textarea" type="text" name="textnev"  maxlength="2000"></textarea></div></div>';
echo'<input type="hidden" name="addnev" value="go"><div class="submit"><button type="submit">Добавить</button></div>';
echo'</form>';
include_once("includes/bbcod.php");
/////////////////////////////
}else{
if(!empty($N_error))echo'<div class="error">'.$N_error.'</div>';
else
echo'<div class="warning">&nbsp;&nbsp;Все поля обязательны для заполнения.</div>';
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;nev='.$n_db['id'].'&amp;'.SID.'" id="form" enctype="multipart/form-data">';
echo'<div class="field"><label>Название:</label><div class="input"><input type="text" name="naznew"  maxlength="150" value="'.$n_db['nazvanie'].'"></div></div>';
echo'<div class="field"><label>
Текущий:<br />
<a rel="gallery" class="photo" href="gallery.php?url='.$n_db['image'].'&amp;cat=images/new" title="'.$n_db['nazvanie'].'"><img src="gallery.php?url='.$n_db['image'].'&amp;small=90&amp;cat=images/new" alt="" /></a>
<br />Формат файла <b>610*190 px (JPG) </b>:</label><div class="input"><input type="file" name="filenew"></div></div>';
echo'<div class="field"><label>';
bb_codimg();
echo'</label><div class="input"><textarea id="textarea" type="text" name="textnev"  maxlength="2000">'.$n_db['nevs'].'</textarea></div></div>';
echo'<input type="hidden" name="addnev" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
include_once("includes/bbcod.php");
}
}

break;

case 2:

break;


case 3:
$db_so = "SELECT * FROM s_soglhen WHERE `status`='".$onas."'";
$db_ps = mysql_query($db_so);
$tpp = mysql_num_rows($db_ps);
if($tpp==0) $us['text']="Укажите текст"; else $us = mysql_fetch_array($db_ps);
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;onas='.$onas.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>';
bb_codimg();
echo'</label><div class="input"><textarea id="textarea" type="text" name="textnev"  maxlength="10000" class="message" >'.$us['text'].'</textarea></div></div>';
echo'<input type="hidden" name="adsog" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
include_once("includes/bbcod.php");
break;

case 4:

if($dbn==0){
echo'<h1>'.$ifop.'</h1>';
}else{
if($tpp!=0){
echo'<div id="comments"><h2>'.$usma['tema'].'</h2><ul class="commentlist"><li class="comment_odd">
<div class="author"><form action="'.$link.'st='.$st.'&amp;ix='.$ix.'&amp;idm='.$usma['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="del" value="go">
<input type=image src="images/delm.png" name="sub">
</form>
<img class="avatar" src="./images/avatar/'.prof_dan(avatar,$usma['avtor']).'" width="42" height="42" alt="" />
<span class="name">Автор: <a href=/?p=profil&amp;id='.$usma['avtor'].'&amp;'.SID.'>'.prof_dan(login,$usma['avtor']).'</a>'.prof_onli($usma['avtor'],2).'<br />
Кому: &nbsp;<a href=/?p=profil&amp;id='.$usma['user'].'&amp;'.SID.'>'.prof_dan(login,$usma['user']).'</a>'.prof_onli($usma['user'],2).'</span><br />
<span class="wrote">Дата: '.date("d.m.y",$usma['time']).'</span></div>
<div class="submitdate"><b>Сообщение</b></div><p>&nbsp;&nbsp;'.bb_code($usma['text']).'</p>
</li></ul></div>';
}else{
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>Автор</th><th>Кому</th><th>Тема</th><th>Дата</th><th></th></tr></thead>';
$total = $dbn;
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM $db_mal ORDER BY time DESC LIMIT $start,15";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
echo'
<tr>
<td width="120px">
<div align="center">
<a href="/?p=profil&amp;id='.$ron['avtor'].'&amp;'.SID.'"><b>'.prof_dan(login,$ron['avtor']).'</b></a></div></td>
<td width="120px">
<div align="center">
<a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'"><b>'.prof_dan(login,$ron['user']).'</b></a></div></td>
<td>
<a href="'.$link.'st='.$st.'&amp;ix='.$ix.'&amp;idm='.$ron['id'].'&amp;'.SID.'">'.$ron['tema'].'</a></td>
<td width="70px" align="center"><b>'.date("d.m.y",$ron['time']).'</b></td>
<td width="18px">
<form action="'.$link.'st='.$st.'&amp;ix='.$ix.'&amp;idm='.$ron['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="del" value="go">
<input type=image src="images/del.gif" name="sub">
</form></td></tr>';
}
echo'</table>';
if($total>15)page_strnavigation($link."st=$st&amp;ix=$ix&amp;", 15, $start, $total);
}}
break;

case 5:
$strSQL = "SELECT * FROM s_gallery";
$rs = mysql_query($strSQL);
$total = mysql_num_rows($rs);
if ($total>0){
if(isset($oki))echo'<div class="success">'.$oki.'</div>';
echo'<h2>Всего: '.$total.'</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>Автор</th><th>Фото</th><th>Описание</th><th>Статус</th><th colspan="2">Измен.</th></tr></thead>';
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_gallery ORDER BY status LIMIT $start,5";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
if($ron['status']==0) $stata="<b>На проверке</b>"; else $stata="<s>Проверено</s>";
echo'<tr><td width="120px">
<div align="center">
<a href="/?p=profil&amp;id='.$ron['avtor'].'&amp;'.SID.'">
<img src="images/avatar/'.prof_dan(avatar,$ron['avtor']).'" width="60" height="60"/></a><br />
<a href="/?p=profil&amp;id='.$ron['avtor'].'&amp;'.SID.'"><b>'.prof_dan(login,$ron['avtor']).'</b></a><br />
'.prof_onli($ron['avtor'],1).'</div></td>
<td width="70px"><div align="center"><a rel="gallery" class="photo" href="gallery.php?url='.$ron['url'].'&amp;cat=images/gallery" title="'.$ron['nazvan'].'"><img src="ipg.php?url=images/gallery/'.$ron['url'].'&amp;h=58&amp;w=58" alt="pix"></a></div></td><td>'.$ron['nazvan'].'</td><td width="80px" align="center">'.$stata.'</td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;start='.$start.'&amp;'.SID.'" method="post"><input type="hidden" name="ok" value="'.$ron['id'].'"><input type=image src="images/open.gif" name="sub"></form></td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;start='.$start.'&amp;'.SID.'" method="post"><input type="hidden" name="del" value="'.$ron['id'].'"><input type=image src="images/del.gif" name="sub"></form></td>';
echo'</tr>';
}
echo'</table>';
if($total>5)page_strnavigation($link.'st='.$st.'&amp;', 5, $start, $total);
}else{echo'<h1>Снимков нет</h1>';}
break;

case 6:
if(isset($usma['id'])){
if(time()>$usma['ban']){ $stata="<b>Активен</b>"; }else {$timeban=$usma['ban']-time(); $stata='<i>Забанен на <b>'.formattime($timeban).'</b></i>';}
echo'<h2><span>Профиль '.prof_dan(login,$usma['id']).'</span> ('.$stata.')</h2><br />';
$ava_p=prof_dan(avatar,$usma['id']);
if(empty($ava_p)) $ava_p="0.gif"; else $ava_p=prof_dan(avatar,$usma['id']);
$P_pol=prof_dan(pol,$usma['id']);
if($P_pol==2) $P_pmg="Девушка"; else $P_pmg="Парень";
$P_timereg = date("d.m.y",prof_dan(timereg,$usma['id']));
$P_onli = date("d.m.y h:i",prof_dan(onli,$usma['id']));
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>Аватар</th><th>Наименование</th><th>Данные</th></tr></thead>';
echo'<tbody><td width="10%" rowspan="7" align="center"><img src="images/avatar/'.$ava_p.'" height="100" alt="100"><br />'.prof_onli($usma['id'],1).'</td>';
echo'<tr><td>E-mail</td><td><b>'.prof_dan(mail,$usma['id']).'</b></td></tr>';
echo'<tr><td>Пол</td><td><b>'.$P_pmg.'</b></td></tr>';
echo'<tr><td>Дата регистрации</td><td><b>'.$P_timereg.'</b></td></tr>';
echo'<tr><td>Статус</td><td><b>'.status_us(prof_dan(admin,$usma['id'])).'</b></td></tr>';
echo'<tr><td>Был на сайте:</td><td><b>'.$P_onli.'</b></td></tr>';
echo'<tr><td>Фотографий</td><td><b>'.all_dbnamewat(s_gallery,avtor,$usma['id']).'</b></td></tr>';
echo'</tbody></table>';
if(time()>$usma['ban']){
if(!empty($error))echo'<div class="error">'.$error.'</div>';
else
echo'<div class="warning">&nbsp;&nbsp;Все поля обязательны для заполнения.</div>';
echo'<form method="post" action="'.$link.'st='.$st.'&amp;start='.$start.'&amp;id='.$usma['id'].'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Время БАННА:</label><div class="input"><input type="text" name="timeb"  maxlength="11"></div></div>';
echo'<div class="field"><label>Интервал:</label><div class="input"><select name="inet">
<option value="1">Секунды</option>
<option value="2">Минуты</option>
<option value="3">Часы</option>
<option value="4">Сутки</option>
</select></div></div>';
echo'<div class="field"><label>Причина:</label><div class="input"><input type="text" name="tema"  maxlength="250"></div></div>';
echo'<input type="hidden" name="ban" value="go"><div class="submit"><button type="submit">Забанить</button></div>';
echo'</form>';
}else{
echo'<form method="post" action="'.$link.'st='.$st.'&amp;start='.$start.'&amp;id='.$usma['id'].'&amp;'.SID.'" id="form">';
echo'<input type="hidden" name="razban" value="go"><div class="submit"><button type="submit">Разбанить</button></div>';
echo'</form>';
}
}else{
$total = coll_us();
if ($total>0){
if ($start < 0 || $start > $total){$start = 0;}
$db_comfor= "SELECT * FROM s_useres ORDER BY id DESC LIMIT $start,5";
$db_vi = mysql_query($db_comfor);
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>ID</th><th></th><th>Логин</th><th>Статус</th><th>Визит</th></tr></thead><tbody>';
while($com_v = mysql_fetch_array($db_vi)){
if(empty($com_v['avatar'])) $ava_p="0.gif"; else $ava_p=$com_v['avatar'];
if(time()>$com_v['ban']){ $stata="<b>Активен</b>"; }else {$timeban=$com_v['ban']-time(); $stata='<i>Забанен на<br /><b>'.formattime($timeban).'</b></i>';}
echo'<tr><td width="10%" align="center">'.$com_v['id'].'</td><td width="10%" align="center">
<a href="'.$link.'st='.$st.'&amp;start='.$start.'&amp;id='.$com_v['id'].'&amp;'.SID.'"><img src="images/avatar/'.$ava_p.'" width="60" height="60" alt="user" class="userpic" /></a><br />'.prof_onli($com_v['id'],1).'
</td><td><span class="link"><a href="'.$link.'st='.$st.'&amp;start='.$start.'&amp;id='.$com_v['id'].'&amp;'.SID.'">'.$com_v['login'].'</a></span></td>
<td width="25%" align="center">'.$stata.'</td><td width="25%" align="center"><b>'.date("d.m.y h:i",$com_v['onli']).'</b></td></tr>';
}
echo'</tbody></table>';
if($total>5)page_strnavigation($link.'st='.$st.'&amp;', 5, $start, $total);
}else{echo'<h2>Пользователей нет</h2>';}
}
break;

case 7:
switch($ps)
{
case 1:
if(all_dbname(s_vit_categ)==0){
echo'<div class="warning">На сайте нет категорий!</div>';
}else{
if(isset($ct)){
if(!empty($error))echo'<div class="error">'.$error.'</div>';
echo'<form method="post" action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;ct='.$ct.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Название:</label><div class="input"><input type="text" name="name" value="'.inf_db(s_vit_categ,id,$ct,name).'"/></div></div>';
echo'<input type="hidden" name="red" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form><br />';
}
echo'<h2>Категории ('.all_dbname(s_vit_categ).')</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th></th><th>Название</th><th>Товаров</th><th></th></tr></thead>';
$total = all_dbname(s_vit_categ);
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_vit_categ ORDER BY name LIMIT $start,10";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
echo'<tr>
<td width="22px"><img src="/images/favorites.gif"></td>
<td><a href="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;ct='.$ron['id'].'&amp;'.SID.'"><b>'.$ron['name'].'</b></a></td>
<td width="90px" align="right"><b>'.all_dbnamewat(s_vit_tovar,categ,$ron['id']).'</b></td>
<td width="18px"><form action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;ct='.$ron['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="delet" value="go">
<input type=image src="images/del.gif" name="sub">
</form></td></tr>';
}
echo'</table>';
if($total>10)page_strnavigation($link."st=$st&amp;ps=$ps&amp;", 10, $start, $total);
}
break;
/////////////////////////////////////
case 2:
if(!empty($error))echo'<div class="error">'.$error.'</div>';
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;ps='.$ps.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Название:</label><div class="input"><input type="text" name="name"/></div></div>';
echo'<input type="hidden" name="add" value="go"><div class="submit"><button type="submit">Добавить</button></div>';
echo'</form>';
break;
////////////////////////////////////
case 3:
if(!empty($error))echo'<div class="error">'.$error.'</div>';
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;ps='.$ps.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Ссылка на главной:</label><div class="input"><input type="text" name="name" value="'.$nvit['link'].'" /></div></div>';
echo'<input type="hidden" name="add" value="go"><div class="submit"><button type="submit">Настроить</button></div>';
echo'</form>';
break;
//////////////////////////////////
default:
if(all_dbname(s_vit_tovar)==0){
echo'<div class="warning">На сайте нет товаров!</div>';
}else{
if(isset($dt)){
$categ=inf_db(s_vit_categ,id,$rbn['categ'],name);
if(!empty($error))echo'<div class="error">'.$error.'</div>';
echo'<div class="clr"></div>';
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;dt='.$dt.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Коментарий Автору:</label><div class="input"><input type="text" name="name" value="'.$rbn['tth'].'"/></div></div>';
echo'<div class="field"><label><label>Функции:</label><div class="input"><select name="deis">';
if($rbn['status']==0)
{echo'<option value="0">На проверке</option>'; echo'<option value="1">Одобрить</option>';
}else{
echo'<option value="1">Одобрить</option>'; echo'<option value="0">На проверке</option>';}
echo'<option value="2">Удалить</option>';
echo'</select></div></div>';
echo'<input type="hidden" name="dei" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
echo'<div class="center_content">';
echo'<div class="center_title_bar">'.$categ.'</div>';
echo'<div class="prod_box_big"><div class="top_prod_box_big"></div><div class="center_prod_box_big"><div class="product_img_big">';
echo'<a rel="gallery" class="photo" href="gallery.php?url='.$rbn['foto1'].'&amp;cat=vit" title="'.$rbn['name'].'"><img src="vipg.php?url='.$rbn['foto1'].'&amp;h=92" alt="pix" /></a>';
echo'<div class="thumbs">';
echo'<a rel="gallery" class="photo" href="gallery.php?url='.$rbn['foto1'].'&amp;cat=vit" title="'.$rbn['name'].'"><img src="vipg.php?url='.$rbn['foto1'].'&amp;h=25" alt="pix" /></a>';
echo'<a rel="gallery" class="photo" href="gallery.php?url='.$rbn['foto1'].'&amp;cat=vit" title="'.$rbn['name'].'"><img src="vipg.php?url='.$rbn['foto1'].'&amp;h=25" alt="pix" /></a>';
echo'<a rel="gallery" class="photo" href="gallery.php?url='.$rbn['foto1'].'&amp;cat=vit" title="'.$rbn['name'].'"><img src="vipg.php?url='.$rbn['foto1'].'&amp;h=25" alt="pix" /></a>';
echo'</div></div><div class="details_big_box">';
echo'<div class="product_title_big">'.$rbn['name'].'</div>';
echo'<div class="specifications">';
echo'Дата: <span class="blue">'.date("d.m.y",$rbn['time']).'</span><br />';
echo'Автор: <span class="blue">'.prof_dan(login,$rbn['user']).'</span><br />';
echo'</div>';
echo'<div class="prod_price_big">ЦЕНА:&nbsp;';
if($rbn['szena']!=0)echo'<span class="reduce">'.$rbn['szena'].'</span>';
echo'&nbsp;<span class="price">'.$rbn['zena'].'  '.vala($rbn['valet']).'</span>';
echo'</div>';
echo'</div></div><div class="bottom_prod_box_big"></div></div>';
echo'<div class="center_title_bar">Описание';
echo'</div> </div>
<p>&nbsp;&nbsp;'.bb_code($rbn['opis']).'</p>
</div>';
}else{
echo'<h2>Товары ('.all_dbnamewat(s_vit_tovar,status,"0").'/'.all_dbname(s_vit_tovar).')</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th></th><th>Название</th><th>Автор</th><th>Статус</th><th></th></tr></thead>';
$total = all_dbname(s_vit_tovar);
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_vit_tovar ORDER BY status LIMIT $start,8";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
if($ron['status']==1) $tinj="<span class='reduce'>На проверке</span>"; else  $tinj="<span class='price'>На проверке</span>";
if(!empty($ron['tth'])) $namen="<span class='price'>Замечания Админа</span>"; else $namen=$ron['name'];
echo'<tr>
<td width="40px"><a href="'.$link.'st='.$st.'&amp;dt='.$ron['id'].'&amp;'.SID.'"><img src="vipg.php?url='.$ron['foto1'].'&amp;h=40" alt="pix" title="'.$ron['name'].'"/></a>';
echo'</td><td><a href="'.$link.'st='.$st.'&amp;dt='.$ron['id'].'&amp;'.SID.'" title="'.$ron['name'].'"><b>'.$namen.'</b></a>';
echo'</td>
<td width="90px" align="center">
<a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'"><img src="images/avatar/'.prof_dan(avatar,$ron['user']).'" width="40" height="40" alt="user" class="userpic" /></a>
<br /><b><a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'">'.prof_dan(login,$ron['user']).'</a></b></td>';
echo'<td width="90px" align="center">'.$tinj.'</td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;dt='.$ron['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="deis" value="2">
<input type="hidden" name="dei" value="go">
<input type=image src="images/del.gif" name="sub">
</form></td></tr>';
}
echo'</table>';
if($total>8)page_strnavigation($link."st=$st&amp;", 8, $start, $total);
}}}
break;
//////////////////////////////////////////////////////////////////// Форум .......
case 8:
switch($ps)
{
case 4:
echo'<form method="post" action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label><label>Новые темы отмечены:</label><div class="input"><select name="tema">';
if(inf_db(s_forum_nast,id,1,tema)==1)
{
echo'<option value="1">На проверку</option>'; echo'<option value="0">Проверено</option>';
}else{
echo'<option value="0">Проверено</option>'; echo'<option value="1">На проверку</option>';
}
echo'</select></div></div>';
echo'<div class="field"><label><label>Добаленные ответы:</label><div class="input"><select name="msg">';
if(inf_db(s_forum_nast,id,1,mgs)==1)
{
echo'<option value="1">На проверку</option>'; echo'<option value="0">Проверено</option>';
}else{
echo'<option value="0">Проверено</option>'; echo'<option value="1">На проверку</option>';
}
echo'</select></div></div>';
echo'<input type="hidden" name="ednast" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
break;

case 3:
if(isset($mt)){
echo'<form name="Form1" method="post" action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;mt='.$mt.'&amp;'.SID.'" id="form">
<div class="field"><label>Автор: &nbsp;<b><a href="/?p=profil&amp;id='.inf_db(s_forum_mgs,id,$mt,user).'&amp;'.SID.'">'.prof_dan(login,inf_db(s_forum_mgs,id,$mt,user)).'</a></b></label></div>
<div class="field"><label>Название темы: &nbsp;<b>'.inf_db(s_forum_tema,id,inf_db(s_forum_mgs,id,$mt,tema),name).'</b></label></div>';
echo'<div class="field"><label>';
bb_codimg();
echo'</label><div class="input"><textarea id="textarea" type="text" name="text"  maxlength="3000" >'.inf_db(s_forum_mgs,id,$mt,mgs).'</textarea></div></div>';
echo'<div class="field"><label><label>Функции:</label><div class="input"><select name="deis">';
if(inf_db(s_forum_mgs,id,$mt,status)==0)
{echo'<option value="0">Проверено</option>'; echo'<option value="1">На проверке</option>';
}else{
echo'<option value="1">На проверке</option>'; echo'<option value="0">Проверено</option>';}
echo'<option value="2">Удалить</option>';
echo'</select></div></div>';
echo'<input type="hidden" name="edmgs" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
include_once("includes/bbcod.php");
}else{
if(all_dbname(s_forum_mgs)==0){
echo'<div class="warning">На форуме нет сообшений.</div>';
}else{
echo'<h2>Создано ответов ('.all_dbname(s_forum_mgs).')</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>#ID</th><th>Название</th><th>Автор</th><th>Статус</th><th colspan="2">Измен.</th></tr></thead>';
$total = all_dbname(s_forum_mgs);
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_forum_mgs ORDER BY status DESC LIMIT $start,5";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
if($ron['status']==0) $tinj="<span class='reduce'>Проверено</span>"; else  $tinj="<span class='price'>На проверке</span>";
echo'<tr><td width="20px" align="center"><b>'.$ron['id'].'</b></td><td>
Тема: <b>'.inf_db(s_forum_tema,id,$ron['tema'],name).'</b><br />
<span class="postbody">'.bb_code($ron['mgs']).'</span>';
echo'</td>
<td width="90px" align="center">
<a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'"><img src="images/avatar/'.prof_dan(avatar,$ron['user']).'" width="40" height="40" alt="user" class="userpic" /></a>
<br /><b><a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'">'.prof_dan(login,$ron['user']).'</a></b></td>';
echo'<td width="90px" align="center">'.$tinj.'</td>';
echo'<td width="18px"><a href="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;mt='.$ron['id'].'&amp;'.SID.'"><img src="images/open.gif"></a></td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;mt='.$ron['id'].'&amp;'.SID.'" method="post"><input type="hidden" name="deis" value="2">
<input type="hidden" name="edmgs" value="go">
<input type=image src="images/del.gif" name="sub"></form></td>';
echo'</tr>';
}
echo'</table>';
if($total>5)page_strnavigation($link."st=$st&amp;ps=$ps&amp;", 5, $start, $total);
}}
break;



case 2:
if(all_dbname(s_forum_razdel)==0){
echo'<div class="warning">На форуме нет разделов.</div>';
}else{
if(all_dbname(s_forum_podraz)==0){
echo'<div class="warning">На форуме нет подразделов.</div>';
}else{
if(all_dbname(s_forum_tema)==0){
echo'<div class="warning">На форуме нет тем.</div>';
}else{

if(isset($tt)){
echo'<form name="Form1" method="post" action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;tt='.$tt.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label><b>'.inf_db(s_forum_razdel,id,inf_db(s_forum_tema,id,$tt,razdel),name).'</b>:</label><div class="input"><select name="razdel" id="cboMake" onchange="GetModel(this)">';
echo'<option value="0" selected>Изменить раздел</option>';
$v_cat = "SELECT * FROM s_forum_razdel ORDER BY name";
$v_c = mysql_query($v_cat);
while($vc = mysql_fetch_array($v_c)){
echo'<option value="'.$vc['id'].'">'.$vc['name'].'</option>';
}
echo'</select></div></div>
<div class="field"><label><b>'.inf_db(s_forum_podraz,id,inf_db(s_forum_tema,id,$tt,podrazdel),name).'</b>:</label><div class="input"><select name="prazdel" id="cboModel" onchange="GetCategor(this)">
<option value="0" selected>Изменить подраздел</option>
</select></div></div>
<div class="field"><label>Автор: &nbsp;<b><a href="/?p=profil&amp;id='.inf_db(s_forum_tema,id,$tt,user).'&amp;'.SID.'">'.prof_dan(login,inf_db(s_forum_tema,id,$tt,user)).'</a></b></label></div>
<div class="field"><label>Название темы:</label><div class="input"><input type="text" name="nazvan" value="'.inf_db(s_forum_tema,id,$tt,name).'" maxlength="150"></div></div>';
echo'<div class="field"><label>';
bb_codimg();
echo'</label><div class="input"><textarea id="textarea" type="text" name="text"  maxlength="3000" >'.inf_db(s_forum_tema,id,$tt,mgs).'</textarea></div></div>';
echo'<div class="field"><label><label>Функции:</label><div class="input"><select name="deis">';
if(inf_db(s_forum_tema,id,$tt,status)==0)
{echo'<option value="0">Открыта</option>'; echo'<option value="1">Закрыть</option>';
}else{
echo'<option value="1">Закрыта</option>'; echo'<option value="0">Открыть</option>';}
echo'<option value="2">Удалить</option>';
echo'</select></div></div>';
echo'<input type="hidden" name="edtema" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
include_once("includes/bbcod.php");
?>
<script>
document.Form1.reset();
var cboModel = document.getElementById('cboModel');
var divCategor = document.getElementById('categor');
var arr = [
<?php
$v_pat = "SELECT * FROM s_forum_podraz ORDER BY name";
$v_cp = mysql_query($v_pat);
while($vpc = mysql_fetch_array($v_cp)){
echo"['".$vpc['razdel']."', '".$vpc['id']."', '".$vpc['name']."'],";
}
?>
];
function GetModel(el){
cboModel.options.length = 1;
if(el.value == '0'){ResetCategorText();return};
var i = 0; cnt = arr.length;
for(i=0;i<cnt;i++){
if(arr[i][0] == el.value){
cboModel.options[cboModel.options.length] = new Option(arr[i][2], arr[i][1]);
}}}
</script>
<?php
}else{
echo'<h2>Создано тем ('.all_dbname(s_forum_tema).')</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>#ID</th><th>Название</th><th>Автор</th><th>Статус</th><th></th></tr></thead>';
$total = all_dbname(s_forum_tema);
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_forum_tema ORDER BY status DESC LIMIT $start,5";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
if($ron['status']==0) $tinj="<span class='reduce'>Проверено</span>"; else  $tinj="<span class='price'>Закрыта</span>";
echo'<tr><td width="20px" align="center"><b>'.$ron['id'].'</b></td><td>
Раздел: <b>'.inf_db(s_forum_razdel,id,$ron['razdel'],name).'</b><br />
Подраздел: <b>'.inf_db(s_forum_podraz,id,$ron['podrazdel'],name).'</b><br />
<a href="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;tt='.$ron['id'].'&amp;'.SID.'" title="'.$ron['name'].'"><b>'.$ron['name'].'</b></a> ('.all_dbnamewat(s_forum_mgs,tema,$ron['id']).')';
echo'</td>
<td width="90px" align="center">
<a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'"><img src="images/avatar/'.prof_dan(avatar,$ron['user']).'" width="40" height="40" alt="user" class="userpic" /></a>
<br /><b><a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'">'.prof_dan(login,$ron['user']).'</a></b></td>';
echo'<td width="90px" align="center">'.$tinj.'</td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;tt='.$ron['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="deis" value="2">
<input type="hidden" name="edtema" value="go">
<input type=image src="images/del.gif" name="sub">
</form></td></tr>';
}
echo'</table>';
if($total>5)page_strnavigation($link."st=$st&amp;ps=$ps&amp;", 5, $start, $total);
}}}}
break;


case 1:
if(all_dbname(s_forum_razdel)==0){
echo'<div class="warning">Необходимо в первую очередь создать раздел.</div>';
}else{

if(!empty($error))echo'<div class="error">'.$error.'</div>';
if(isset($pt)){
echo'<form method="post" action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;pt='.$pt.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Разделы Форума:</label><div class="input"><select name="razdel" >';
echo'<option value="'.inf_db(s_forum_razdel,id,inf_db(s_forum_podraz,id,$pt,razdel),id).'">'.inf_db(s_forum_razdel,id,inf_db(s_forum_podraz,id,$pt,razdel),name).'</option>';
$v_cat = "SELECT * FROM s_forum_razdel ORDER BY name";
$v_c = mysql_query($v_cat);
while($vc = mysql_fetch_array($v_c)){
echo'<option value="'.$vc['id'].'">'.$vc['name'].'</option>';
}
echo'</select></div></div>';
echo'<div class="field"><label>Название подраздела:</label><div class="input"><input type="text" name="name" value="'.inf_db(s_forum_podraz,id,$pt,name).'"/></div></div>';
echo'<div class="field"><label>Краткое описание:</label><div class="input"><input type="text" name="opis" value="'.inf_db(s_forum_podraz,id,$pt,opis).'"/></div></div>';
echo'<div class="field"><label><label>Функции:</label><div class="input"><select name="deis">';
if(inf_db(s_forum_podraz,id,$pt,status)==0)
{echo'<option value="0">Открыта</option>'; echo'<option value="1">Закрыть</option>';
}else{
echo'<option value="1">Закрыта</option>'; echo'<option value="0">Открыть</option>';}
echo'<option value="2">Удалить</option>';
echo'</select></div></div>';
echo'<input type="hidden" name="edpraz" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
}else{
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;ps='.$ps.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Разделы Форума:</label><div class="input"><select name="razdel" >';
$v_cat = "SELECT * FROM s_forum_razdel ORDER BY name";
$v_c = mysql_query($v_cat);
while($vc = mysql_fetch_array($v_c)){
echo'<option value="'.$vc['id'].'">'.$vc['name'].'</option>';
}
echo'</select></div></div>';
echo'<div class="field"><label>Название подраздела:</label><div class="input"><input type="text" name="name" /></div></div>';
echo'<div class="field"><label>Краткое описание:</label><div class="input"><input type="text" name="opis" /></div></div>';
echo'<input type="hidden" name="addpraz" value="go"><div class="submit"><button type="submit">Создать</button></div>';
echo'</form>';
}

echo'<br />';
if(all_dbname(s_forum_podraz)==0){
echo'<div class="warning">На сайте нет подразделов!</div>';
}else{
echo'<h2>Подразделов ('.all_dbname(s_forum_podraz).')</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>#ID</th><th>Название</th><th>Автор</th><th>Статус</th><th></th></tr></thead>';
$total = all_dbname(s_forum_podraz);
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_forum_podraz ORDER BY status DESC LIMIT $start,5";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
if($ron['status']==0) $tinj="<span class='reduce'>Закрыта</span>"; else  $tinj="<span class='price'>Закрыта</span>";
echo'<tr><td width="20px" align="center"><b>'.$ron['id'].'</b></td><td><b>'.inf_db(s_forum_razdel,id,$ron['razdel'],name).'</b><br /><a href="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;pt='.$ron['id'].'&amp;'.SID.'" title="'.$ron['name'].'"><b>'.$ron['name'].'</b></a> ('.all_dbnamewat(s_forum_tema,podrazdel,$ron['id']).'|'.all_dbnamewat(s_forum_mgs,podrazdel,$ron['id']).')';
echo'</td>
<td width="90px" align="center">
<a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'"><img src="images/avatar/'.prof_dan(avatar,$ron['user']).'" width="40" height="40" alt="user" class="userpic" /></a>
<br /><b><a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'">'.prof_dan(login,$ron['user']).'</a></b></td>';
echo'<td width="90px" align="center">'.$tinj.'</td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;ps='.$ps.'&amp;pt='.$ron['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="deis" value="2">
<input type="hidden" name="edpraz" value="go">
<input type=image src="images/del.gif" name="sub">
</form></td></tr>';
}
echo'</table>';
if($total>5)page_strnavigation($link."st=$st&amp;ps=$ps&amp;", 5, $start, $total);
}
}
break;
////////////////////////////////////
default:
if(!empty($error))echo'<div class="error">'.$error.'</div>';
if(isset($dt)){
echo'<form method="post" action="'.$link.'st='.$st.'&amp;dt='.$dt.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Назваие:</label><div class="input"><input type="text" name="name" value="'.inf_db(s_forum_razdel,id,$dt,name).'"/></div></div>';
echo'<div class="field"><label><label>Функции:</label><div class="input"><select name="deis">';
if(inf_db(s_forum_razdel,id,$dt,status)==0)
{echo'<option value="0">Открыта</option>'; echo'<option value="1">Закрыть</option>';
}else{
echo'<option value="1">Закрыта</option>'; echo'<option value="0">Открыть</option>';}
echo'<option value="2">Удалить</option>';
echo'</select></div></div>';
echo'<input type="hidden" name="edraz" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
}else{
echo'<form method="post" action="'.$link.'st='.$st.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Назваие раздела:</label><div class="input"><input type="text" name="name" /></div></div>';
echo'<input type="hidden" name="addraz" value="go"><div class="submit"><button type="submit">Создать</button></div>';
echo'</form>';
}
echo'<br />';
if(all_dbname(s_forum_razdel)==0){
echo'<div class="warning">На сайте нет разделов!</div>';
}else{
echo'<h2>Разделов ('.all_dbname(s_forum_razdel).')</h2>';
echo'<table summary="Summary Here" cellpadding="0" cellspacing="0" width="100%">';
echo'<thead><tr><th>#ID</th><th>Название</th><th>Автор</th><th>Статус</th><th></th></tr></thead>';
$total = all_dbname(s_forum_razdel);
if ($start < 0 || $start > $total){$start = 0;}
$strdb = "SELECT * FROM s_forum_razdel ORDER BY status DESC LIMIT $start,5";
$rdd = mysql_query($strdb);
while($ron = mysql_fetch_array($rdd)){
if($ron['status']==0) $tinj="<span class='reduce'>Закрыта</span>"; else  $tinj="<span class='price'>Закрыта</span>";
echo'<tr><td width="20px" align="center"><b>'.$ron['id'].'</b></td><td><a href="'.$link.'st='.$st.'&amp;dt='.$ron['id'].'&amp;'.SID.'" title="'.$ron['name'].'"><b>'.$ron['name'].'</b></a> ('.all_dbnamewat(s_forum_podraz,razdel,$ron['id']).'|'.all_dbnamewat(s_forum_tema,razdel,$ron['id']).'|'.all_dbnamewat(s_forum_mgs,razdel,$ron['id']).')';
echo'</td>
<td width="90px" align="center">
<a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'"><img src="images/avatar/'.prof_dan(avatar,$ron['user']).'" width="40" height="40" alt="user" class="userpic" /></a>
<br /><b><a href="/?p=profil&amp;id='.$ron['user'].'&amp;'.SID.'">'.prof_dan(login,$ron['user']).'</a></b></td>';
echo'<td width="90px" align="center">'.$tinj.'</td>';
echo'<td width="18px"><form action="'.$link.'st='.$st.'&amp;dt='.$ron['id'].'&amp;'.SID.'" method="post">
<input type="hidden" name="deis" value="2">
<input type="hidden" name="edraz" value="go">
<input type=image src="images/del.gif" name="sub">
</form></td></tr>';
}
echo'</table>';
if($total>5)page_strnavigation($link."st=$st&amp;", 5, $start, $total);
}

}
break;
///////////////////////////////////////////////////////////////// писок
default:
echo'<h2>Настройки Сайта</h2>';
if(empty($sbros)){
if($nast['reg_s']=="1") $checked="checked"; else $checked="";
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;'.SID.'" id="form">';
echo'<div class="field"><label>Название (синим)</label><div class="input"><input type="text" name="name_sp" value="'.$nast['name_sp'].'"/></div></div>';
echo'<div class="field"><label>Название (серым)</label><div class="input"><input type="text" name="name_s" value="'.$nast['name_s'].'"/></div></div>';
echo'<div class="field"><label>Ссылка на Логотип </label><div class="input"><input type="text" name="url_img" value="'.$nast['url_img'].'"/></div></div>';
echo'<div class="input"><input type="checkbox" name="reg_s" '.$checked.' value="1"/> Разрешить регистрацию на сайте</div>';
echo'<input type="hidden" name="nas" value="go"><div class="submit"><button type="submit">Изменить</button></div>';
echo'</form>';
}else{
echo'<div class="warning">При сбросе настроек они вернут прежний вид сайту как при установлении.</div>';
echo'<form method="post" action="/?p='.$pages.'&amp;st='.$st.'&amp;sbros='.$sbros.'&amp;'.SID.'" id="form">';
echo'<input type="hidden" name="deler" value="go"><div class="submit"><button type="submit">Сбросить Настройки</button></div>';
echo'</form>';
}

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
echo'</div><div class="column">';
echo'<div class="subnav">';
echo'<h2>Управление</h2>';
echo'<ul>';
echo'<li><a href="'.$link.SID.'">Настройки</a>';
if(empty($sbros)&& empty($st)){
echo'<ul><li><a href="'.$link.'sbros=del&amp;'.SID.'">Сбросить настройки</a></li></ul>';
}
echo'</li>';

echo'<li><a href="'.$link.'st=1&amp;'.SID.'">Новости Сайта ('.all_dbname(s_nevs).')</a>';
if($st==1){
echo'<ul><li><a href="'.$link.'st=1&amp;nev=add&amp;'.SID.'">Добавить новость</a></li></ul>';
}
echo'</li>';
echo'<li><a href="'.$link.'st=3&amp;'.SID.'">Соглашение</a></li>';
echo'<li><a href="'.$link.'st=3&amp;onas=2&amp;'.SID.'">О нас (изм.)</a></li>';
echo'<li><a href="'.$link.'st=4&amp;'.SID.'">Почта сайта ('.all_dbname(s_vhmail).'/'.all_dbname(s_ismail).')</a>';
if($st==4){
echo'<ul><li><a href="'.$link.'st=4&amp;'.SID.'">Входящие ('.all_dbname(s_vhmail).')</a></li>';
echo'<li><a href="'.$link.'st=4&amp;ix=2&amp;'.SID.'">Исходящие ('.all_dbname(s_ismail).')</a></li>';
echo'<li><a href="'.$link.'st=4&amp;ix=3&amp;'.SID.'">Удалить все</a></li></ul>';
}
echo'</li>';
echo'<li><a href="'.$link.'st=5&amp;'.SID.'">Галерея сайта ('.all_dbname(s_gallery).')</a></li>';
echo'<li><a href="'.$link.'st=6&amp;'.SID.'">Пользователи ('.all_dbname(s_useres).')</a></li>';
echo'<li><a href="'.$link.'st=7&amp;'.SID.'">Витрина на сайте ('.all_dbnamewat(s_vit_tovar,status,"0").'/'.all_dbname(s_vit_tovar).')</a>';
if($st==7){
echo'<ul><li><a href="'.$link.'st=7&amp;ps=1&amp;'.SID.'">Категории ('.all_dbname(s_vit_categ).')</a></li>';
echo'<li><a href="'.$link.'st=7&amp;ps=2&amp;'.SID.'">Добавить категорию</a></li>';
echo'<li><a href="'.$link.'st=7&amp;ps=3&amp;'.SID.'">Настройки витрины</a></li></ul>';
}
echo'</li>';
echo'<li><a href="'.$link.'st=8&amp;'.SID.'">Форум ('.all_dbname(s_forum_tema).'/'.all_dbname(s_forum_mgs).')</a>';
if($st==8){
echo'<ul><li><a href="'.$link.'st='.$st.'&amp;'.SID.'">Разделы ('.all_dbname(s_forum_razdel).')</a></li>';
echo'<li><a href="'.$link.'st='.$st.'&amp;ps=1&amp;'.SID.'">Подразделы ('.all_dbname(s_forum_podraz).')</a></li>';
echo'<li><a href="'.$link.'st='.$st.'&amp;ps=2&amp;'.SID.'">Темы ('.all_dbname(s_forum_tema).')</a></li>';
echo'<li><a href="'.$link.'st='.$st.'&amp;ps=3&amp;'.SID.'">Сообщения ('.all_dbname(s_forum_mgs).')</a></li>';
echo'<li><a href="'.$link.'st='.$st.'&amp;ps=4&amp;'.SID.'">Настройки</a>';
if($ps==4)echo'<ul><li><a href="'.$link.'st='.$st.'&amp;ps=4&amp;del=1'.SID.'">Начальные настройки</a></li></ul>';
echo'</li>';
echo'</ul>';
}
echo'</li>';
echo'</ul>';
echo'</div>';
echo'</div>';
///////////////////////////////////// низ
echo'<br class="clear" />';
echo'</div>';
echo'</div>';
}
?>