<?
###########################
## Автор: Haruka ##
## --------- ##
## ICQ:444-977-782 ##
## ##
## Доработка: *CRIME* ##
## ------------- ##
## ICQ:699-322 ##
## Посети ##
## http://skywap.su ##
###########################
############################################################
## ##
## Скрипт преднозначен для бесплатного распространения ##
## ##
############################################################
session_start(); // Начало сессии
$title2='Админка';
include_once "../header.php"; // Загружаем верх страницы
include_once "../func/translit.php";
if (empty($_SESSION['passw'])) $_SESSION['passw']=$pass;
if ($_SESSION['passw']!=$passadmin)
{
echo $div["header"];
echo "<b>Ошибка</b><br/>";
echo $div["end"];
echo $div["ten"];
echo "<b>Доступ запрещен!</b><br/>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/><a href=\"../index.php?".session_name()."=".session_id()."\">На главную</a><br/>";
echo $div["end"];
include_once ("../footer.php");
exit();
}
echo $div["header"];
$q = mysql_query("select * from `uzvers`;");
$reg=mysql_num_rows($q);
$q1 = mysql_query("select * from `uzvers` where `ban`=1;");
$cl=mysql_num_rows($q1);
echo "Всего сайтов: <b>$reg</b>";
$q = mysql_query("select * from uzvers where `allmonth`>'0';");
$reg=mysql_num_rows($q);
while ($field=mysql_fetch_array($q))
{
$w=$field['all'];
$all=$all+$w;
}
echo ", из них активных: <b>$reg</b><br/>
Забаненных: <b>$cl</b><br/>";
echo $div["end"];
if (empty($op)) $op="index";
switch ($op)
{
case "index":
echo $div["ten"];
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a>";
$q = mysql_query("select * from `news` order by id desc limit 1;");
$row=mysql_fetch_array($q);
if (!empty($row))
echo " [<b>".$row['date']."</b>]";
echo "<br/>";
$q = mysql_query("select count(*) from `support` where `ans`!='';");
$row = mysql_result($q, 0);
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=ticketplus&".session_name()."=".session_id()."\">Тикетс(+)</a> [<b>$row</b>]<br/>";
$q = mysql_query("select count(*) from `support` where `ans`='';");
$row = mysql_result($q, 0);
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=ticketmin&".session_name()."=".session_id()."\">Тикетс(-)</a> [<b>$row</b>]<br/>";
$q = mysql_query("select count(*) from `uzvers`;");
$row = mysql_result($q, 0);
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=allsite&".session_name()."=".session_id()."\">Все сайты</a> [<b>$row</b>]<br/>";
$q = mysql_query("select count(*) from `uzvers` where `allmonth`>'$mincost';");
$row = mysql_result($q, 0);
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=siteready&".session_name()."=".session_id()."\">Готовые к выплатам</a> [<b>$row</b>]<br/>";
$q = mysql_query("select count(*) from `uzvers` where `help`='1';");
$row = mysql_result($q, 0);
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=sitehelp&".session_name()."=".session_id()."\">Просят выплат</a> [<b>$row</b>]<br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=operators&".session_name()."=".session_id()."\">Операторы</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=traff&".session_name()."=".session_id()."\">Траффик</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=config&".session_name()."=".session_id()."\">Настройка сис-мы</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=about&".session_name()."=".session_id()."\">О участнике</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=logs&".session_name()."=".session_id()."\">Логи</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=stats&".session_name()."=".session_id()."\">Статистика</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"../index.php?mod=exit&".session_name()."=".session_id()."\">Выход</a><br/>";
break;
case "news": // НОВОСТИ
if ($mod=="add") // ДОБАВЛЕНИЕ НОВОСТЕЙ
{
if (empty($message))
{
if ($_SESSION['wap']=="xml")
{
echo $div["ten"];
echo "<form action=\"index.php?op=news&mod=add&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";echo "Новость: <br/>";
echo "<input name=\"message\" maxlength=\"250\" value=\"$msg_db\" title=\"Text\"/><br/>";
echo "<input type=\"checkbox\" name=\"translit\" value=\"1\" /> Транслит<br/>\n";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Отправить\"/>";
echo "</form>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/><a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/><a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
}
else
{
echo "Новость: <br/>";
echo "</small><input name=\"message".$ref."\" value=\"$msg_db\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "</small><input type=\"checkbox\" name=\"translit\" value=\"1\" /> <small>Транслит<br/>\n";
echo "<anchor title=\"send\">Отправить<go href=\"index.php?op=news&mod=add&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
echo "<postfield name=\"translit\" value=\"$(translit)\"/>";
echo "</go></anchor><br/>";
echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
}
else
{
echo $div["ten"];
if($translit==1) $message=latrus($message);
$message=base64_encode(htmlspecialchars($message));
@mysql_query("insert into `news` values(0,'$date','$message');")or die ("FUCK");
echo "<b>Новость добавлена!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
}
include_once ("../footer.php");
exit();
}
echo $div["ten"]; // ОТОБРАЖЕНИЕ НОВОСТЕЙ
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0;
$arr = mysql_query("select * from `news`");
$qi = mysql_query("select * from `news` order by `id` desc limit $startan,$num_msgs_an;");
if (mysql_affected_rows()==0)
{
echo "<b>Нет новостей</b><br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
echo "".$row['date']." |
".base64_decode($row['msg'])." <a href=\"index.php?op=editnews&postid=".$row['id']."&".session_name()."=".session_id()."\">ред</a> <a href=\"index.php?op=delnews&id=".$row['id']."&".session_name()."=".session_id()."\">удал</a><br/>";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("Назад")."</a> |";
if($i>$startan+$num_msgs_an)
echo "| <a href=\"index.php?op=news&".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Далее")."</a>";
echo '<br/>';
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=news&mod=add&".session_name()."=".session_id()."\">Добавить Новость</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "editnews": // РЕДАКТИРОВАНИЕ НОВОСТЕЙ
if (empty($go))
{
$q_msg = mysql_query("select * from `news` where (`id`='$postid');");
$row_msg=mysql_fetch_array($q_msg);
$msg_db=$row_msg['msg'];
if ($_SESSION['wap']=="xml")
{
echo $div["ten"];
echo "<form action=\"index.php?op=editnews&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<div>";
echo "Сообщение: <br/>";
echo "<input name=\"message\" maxlength=\"250\" value=\"".base64_decode($msg_db)."\" title=\"Text\"/><br/>";
echo "<input type=\"checkbox\" name=\"translit\" value=\"1\" /> Транслит<br/>\n";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Отправить\"/>";
echo "</div>";
echo "</form>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
}
else
{
echo "Сообщение: <br/>";
echo "</small><input name=\"message".$ref."\" value=\"".base64_decode($msg_db)."\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "</small><input type=\"checkbox\" name=\"translit\" value=\"1\" /> <small>Транслит<br/>\n";
echo "<anchor title=\"send\">Отправить<go href=\"index.php?op=editnews&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
echo "<postfield name=\"translit\" value=\"$(translit)\"/>";
echo "</go></anchor><br/>";
echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
include_once ("../footer.php");
exit();
}
else
{
if($translit==1) $message=latrus($message);
$message=base64_encode(htmlspecialchars($message));
@mysql_query("UPDATE `news` SET `msg`='$message' WHERE (`id`='$postid')");
echo $div["ten"];
echo "<b>Новость изменена!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "delnews": // УДАЛЕНИЕ НОВОСТЕЙ
echo $div["ten"];
@mysql_query("delete from `news` where `id`='$id'");
echo "<b>Новость удалена!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=news&".session_name()."=".session_id()."\">Новости</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "ticketplus": // ОТВЕЧЕННЫЕ ТИКЕТЫ
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0;
$arr = mysql_query("select * from `support`");
$qi = mysql_query("select * from `support` where `ans`!='' order by `id` desc limit $startan,$num_msgs_an;");
if (mysql_affected_rows()==0)
{
echo "<b>Нет тикетов</b><br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
$qi2 = mysql_query("select * from `uzvers` where `id`='$row[idc]';");
$row2=mysql_fetch_array($qi2);
$msg1=trim($row['msg']);
$msg1=str_replace("&","&",$msg1);
$row['ans']=str_replace("&","&",$row['ans']);
echo "#".$row['id']." | <a href=\"index.php?op=about&go=go&id=".$row2['id']."&".session_name()."=".session_id()."\">".$row2['log']."</a> | ".$row['date']." | ID:".$row['idc']." | ".base64_decode($msg1)." | <b>".base64_decode($row['ans'])."</b> <a href=\"index.php?op=editticket&postid=".$row['id']."&".session_name()."=".session_id()."\">ред</a> <a href=\"index.php?op=deltick&id=".$row['id']."&tk=ticketplus&".session_name()."=".session_id()."\">удал</a><br/>";
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"index.php?op=ticketplus&".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("Назад")."</a> |";
if($i>$startan+$num_msgs_an)
echo "| <a href=\"index.php?op=ticketplus&".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Далее")."</a>";
}
if ($_SESSION['wap']=="xml"){echo "<br/><img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "ticketmin": // НЕОТВЕЧЕННЫЕ ТИКЕТЫ
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0;
$arr = mysql_query("select * from `support` where `ans`=''");
$qi = mysql_query("select * from `support` where `ans`='' order by `id` desc limit $startan,$num_msgs_an;");
if (mysql_affected_rows()==0)
{
echo "<b>Нет тикетов</b><br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
$qi2 = mysql_query("select * from `uzvers` where `id`='$row[idc]';");
$row2=mysql_fetch_array($qi2);
$row['msg']=trim($row['msg']);
$row['msg']=str_replace("&","&",$row['msg']);
echo "#".$row['id']." | <a href=\"index.php?op=about&go=go&id=".$row2['id']."&".session_name()."=".session_id()."\">".$row2['log']."</a> | ".$row['date']." | ID:".$row['idc']." | ".base64_decode($row['msg'])." <a href=\"index.php?op=answ&postid=".$row['id']."&".session_name()."=".session_id()."\">отв</a> <a href=\"index.php?op=deltick&id=".$row['id']."&tk=ticketmin&".session_name()."=".session_id()."\">удал</a><br/>";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"index.php?op=ticketmin&".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("Назад")."</a> |";
if($i>$startan+$num_msgs_an)
echo "| <a href=\"index.php?op=ticketmin&".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Далее")."</a>";
if ($_SESSION['wap']=="xml"){echo "<br/><img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "deltick": // УДАЛЕНИЕ ТИКЕТОВ
echo $div["ten"];
@mysql_query("delete from `support` where `id`='$id'");
echo "<b>Тикет удалён!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=$tk&".session_name()."=".session_id()."\">Тикеты</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "editticket": //РЕДАКТИРОВАНИЕ ТИКЕТОВ
if (empty($go))
{
$q_msg = mysql_query("select * from `support` where (`id`='$postid');");
$row_msg=mysql_fetch_array($q_msg);
$msg_db=$row_msg['ans'];
if ($_SESSION['wap']=="xml")
{
echo $div["ten"];
echo "<form action=\"index.php?op=editticket&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<div>";
echo "Сообщение: <br/>";
echo "<input name=\"message\" maxlength=\"250\" value=\"".base64_decode($msg_db)."\" title=\"Text\"/><br/>";
echo "<input type=\"checkbox\" name=\"translit\" value=\"1\" /> Транслит<br/>\n";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Отправить\"/>";
echo "</div>";
echo "</form>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";echo "<a href=\"index.php?op=ticketplus&".session_name()."=".session_id()."\">Тикеты</a><br/>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
}
else
{
echo "Сообщение: <br/>";
echo "</small><input name=\"message".$ref."\" value=\"".base64_decode($msg_db)."\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "</small><input type=\"checkbox\" name=\"translit\" value=\"1\" /> <small>Транслит<br/>\n";
echo "<anchor title=\"send\">Отправить<go href=\"index.php?op=editticket&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
echo "<postfield name=\"translit\" value=\"$(translit)\"/>";
echo "</go></anchor><br/>";
echo "<a href=\"index.php?op=ticketplus&".session_name()."=".session_id()."\">Тикеты</a><br/>";
echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
include_once ("../footer.php");
exit();
}
else
{
echo $div["ten"];
if($translit==1) $message=latrus($message);
$message=base64_encode(htmlspecialchars($message));
@mysql_query("UPDATE `support` SET `ans`='$message' WHERE (`id`='$postid')");
echo "<b>Ответ изменен!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=ticketplus&".session_name()."=".session_id()."\">Тикеты</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "answ": // ОТВЕТ НА ТИКЕТ
if (empty($go))
{
$q_msg = mysql_query("select * from `support` where (`id`='$postid');");
$row_msg=mysql_fetch_array($q_msg);
$msg_db=$row_msg['ans'];
echo $div["ten"];
if ($_SESSION['wap']=="xml")
{
echo "<form action=\"index.php?op=answ&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<div>";
echo "Сообщение: <br/>";
echo "<input name=\"message\" maxlength=\"250\" value=\"$msg_db\" title=\"Text\"/><br/>";
echo "<input type=\"checkbox\" name=\"translit\" value=\"1\" /> Транслит<br/>\n";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Ответить\"/>";
echo "</div>";
echo "</form>";
}
else
{
echo "Сообщение: <br/>";
echo "</small><input name=\"message".$ref."\" value=\"$msg_db\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "</small><input type=\"checkbox\" name=\"translit\" value=\"1\" /> <small>Транслит<br/>\n";
echo "<anchor title=\"send\">Ответить<go href=\"index.php?op=answ&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
echo "<postfield name=\"translit\" value=\"$(translit)\"/>";
echo "</go></anchor><br/>";
}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=ticketmin&".session_name()."=".session_id()."\">Тикеты</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
include_once ("../footer.php");
exit();
}
else
{
echo $div["ten"];
if($translit==1) $message=latrus($message);
$message=base64_encode(htmlspecialchars($message));
@mysql_query("UPDATE `support` SET `ans`='$message' WHERE (`id`='$postid')");
echo "<b>Ответ добавлен!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=ticketmin&".session_name()."=".session_id()."\">Тикеты</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "allsite": // ВСЕ САЙТЫ
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0;
$arr = mysql_query("select * from `uzvers`");
$qi = mysql_query("select * from `uzvers` order by `allmonth` desc limit $startan,$num_msgs_an;");
if (mysql_affected_rows()==0)
{
echo "<b>Нет сайтов!</b><br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
$ban='';
if ($row['ban']==1)
{
$ban='| <font color="red">BAN</font> ('.base64_decode($row['ban_pr']).')';
}
if ($_SESSION['rate']=='dol') // Если валюта в долларах
$allmonth = $row['allmonth']." у.е.";
else // Иначе (рубли)
$allmonth = floor($row['allmonth']*$dollar)." руб.";
echo "<b>".$row['id']."</b> | <a href=\"index.php?op=about&go=go&id=".$row['id']."&".session_name()."=".session_id()."\">".$row['log']."</a> $ban | <a href=\"".$row['site']."\">".$row['site']."</a> | $allmonth | <a href=\"index.php?op=opl&postid=".$row['id']."&".session_name()."=".session_id()."\">опл</a> <a href=\"index.php?op=delsite&id=".$row['id']."&".session_name()."=".session_id()."\">удл</a>";
if ($row['ban']==0)
echo " <a href=\"index.php?op=bansite&id=".$row['id']."&".session_name()."=".session_id()."\">бан</a><br/>";
else
echo " <a href=\"index.php?op=unbansite&id=".$row['id']."&".session_name()."=".session_id()."\">разбанить</a><br/>";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"index.php?op=allsite&".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("Назад")."</a> |";
if($i>$startan+$num_msgs_an)
echo "| <a href=\"index.php?op=allsite&".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Далее")."</a>";
echo "<br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "siteready": // ГОТОВЫЕ К ВЫПЛАТАМ
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0;
$arr = mysql_query("select * from `uzvers` where `allmonth`>'$mincost' and `ban`!='1'");
$qi = mysql_query("select * from `uzvers` where `allmonth`>'$mincost' and `ban`!='1' order by `allmonth` desc limit $startan,$num_msgs_an;");
if (mysql_affected_rows()==0)
{
echo "<b>Нет сайтов!</b><br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
if ($_SESSION['rate']=='dol') // Если валюта в долларах
$allmonth = $row['allmonth']." у.е.";
else // Иначе (рубли)
$allmonth = floor($row['allmonth']*$dollar)." руб.";
echo "<b>".$row['id']."</b> | <a href=\"index.php?op=about&go=go&id=".$row['id']."&".session_name()."=".session_id()."\">".$row['log']."</a> | <a href=\"".$row['site']."\">".$row['site']."</a> | $allmonth | <a href=\"index.php?op=opl&postid=".$row['id']."&".session_name()."=".session_id()."\">опл</a> <a href=\"index.php?op=delsite&id=".$row['id']."&".session_name()."=".session_id()."\">удл</a> <a href=\"index.php?op=bansite&id=".$row['id']."&".session_name()."=".session_id()."\">бан</a><br/>";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"index.php?op=siteready&".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("Назад")."</a> |";
if($i>$startan+$num_msgs_an)
echo "| <a href=\"index.php?op=siteready&".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Далее")."</a>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "operators": // Операторы
echo $div["ten"];
if ($yes!=1)
{
echo "<b>Настройка операторов (цены в $)</b><br/>";
echo "<form action=\"index.php?op=operators&yes=1&".session_name()."=".session_id()."\" method=\"post\">";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Мегафон:<br/>";
echo "<input name=\"price1\" title=\"Цена\" value=\"".$op_bd['1_price']."\"/> ";
echo "<select name=\"status1\">\n";
$check='';
if ($op_bd['1_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['1_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Билайн:<br/>";
echo "<input name=\"price2\" title=\"Цена\" value=\"".$op_bd['2_price']."\"/> ";
echo "<select name=\"status2\">\n";
$check='';
if ($op_bd['2_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['2_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Utel:<br/>";
echo "<input name=\"price3\" title=\"Цена\" value=\"".$op_bd['3_price']."\"/> ";
echo "<select name=\"status3\">\n";
$check='';
if ($op_bd['3_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['3_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "БайкалВестКом:<br/>";
echo "<input name=\"price4\" title=\"Цена\" value=\"".$op_bd['4_price']."\"/> ";
echo "<select name=\"status4\">\n";
$check='';
if ($op_bd['4_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['4_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "МТС:<br/>";
echo "<input name=\"price5\" title=\"Цена\" value=\"".$op_bd['5_price']."\"/> ";
echo "<select name=\"status5\">\n";
$check='';
if ($op_bd['5_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['5_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "TELE2:<br/>";
echo "<input name=\"price6\" title=\"Цена\" value=\"".$op_bd['6_price']."\"/> ";
echo "<select name=\"status6\">\n";
$check='';
if ($op_bd['6_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['6_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "МОТИВ:<br/>";
echo "<input name=\"price7\" title=\"Цена\" value=\"".$op_bd['7_price']."\"/> ";
echo "<select name=\"status7\">\n";
$check='';
if ($op_bd['7_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['7_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Енисейтелеком:<br/>";
echo "<input name=\"price8\" title=\"Цена\" value=\"".$op_bd['8_price']."\"/> ";
echo "<select name=\"status8\">\n";
$check='';
if ($op_bd['8_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['8_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "НСС:<br/>";
echo "<input name=\"price9\" title=\"Цена\" value=\"".$op_bd['9_price']."\"/> ";
echo "<select name=\"status9\">\n";
$check='';
if ($op_bd['9_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['9_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "СМАРТС:<br/>";
echo "<input name=\"price10\" title=\"Цена\" value=\"".$op_bd['10_price']."\"/> ";
echo "<select name=\"status10\">\n";
$check='';
if ($op_bd['10_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['10_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "СТЕК GSM:<br/>";
echo "<input name=\"price11\" title=\"Цена\" value=\"".$op_bd['11_price']."\"/> ";
echo "<select name=\"status11\">\n";
$check='';
if ($op_bd['11_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['11_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Татинком-Т:<br/>";
echo "<input name=\"price12\" title=\"Цена\" value=\"".$op_bd['12_price']."\"/> ";
echo "<select name=\"status12\">\n";
$check='';
if ($op_bd['12_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['12_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Ульяновск GSM:<br/>";
echo "<input name=\"price13\" title=\"Цена\" value=\"".$op_bd['13_price']."\"/> ";
echo "<select name=\"status13\">\n";
$check='';
if ($op_bd['13_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['13_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "НТК:<br/>";
echo "<input name=\"price14\" title=\"Цена\" value=\"".$op_bd['14_price']."\"/> ";
echo "<select name=\"status14\">\n";
$check='';
if ($op_bd['14_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['14_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "СКАЙЛИНК:<br/>";
echo "<input name=\"price15\" title=\"Цена\" value=\"".$op_bd['15_price']."\"/> ";
echo "<select name=\"status15\">\n";
$check='';
if ($op_bd['15_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['15_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Цифровая экспансия:<br/>";
echo "<input name=\"price16\" title=\"Цена\" value=\"".$op_bd['16_price']."\"/> ";
echo "<select name=\"status16\">\n";
$check='';
if ($op_bd['16_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['16_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "ИНДИГО:<br/>";
echo "<input name=\"price17\" title=\"Цена\" value=\"".$op_bd['17_price']."\"/> ";
echo "<select name=\"status17\">\n";
$check='';
if ($op_bd['17_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['17_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Emt (Эстония):<br/>";
echo "<input name=\"price18\" title=\"Цена\" value=\"".$op_bd['18_price']."\"/> ";
echo "<select name=\"status18\">\n";
$check='';
if ($op_bd['18_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['18_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Elisa (Эстония):<br/>";
echo "<input name=\"price19\" title=\"Цена\" value=\"".$op_bd['19_price']."\"/> ";
echo "<select name=\"status19\">\n";
$check='';
if ($op_bd['19_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['19_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Tele-2 (Эстония):<br/>";
echo "<input name=\"price20\" title=\"Цена\" value=\"".$op_bd['20_price']."\"/> ";
echo "<select name=\"status20\">\n";
$check='';
if ($op_bd['20_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['20_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Bite (Литва):<br/>";
echo "<input name=\"price21\" title=\"Цена\" value=\"".$op_bd['21_price']."\"/> ";
echo "<select name=\"status21\">\n";
$check='';
if ($op_bd['21_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['21_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Omnitel (Литва):<br/>";
echo "<input name=\"price22\" title=\"Цена\" value=\"".$op_bd['22_price']."\"/> ";
echo "<select name=\"status22\">\n";
$check='';
if ($op_bd['22_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['22_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Tele-2 (Литва):<br/>";
echo "<input name=\"price23\" title=\"Цена\" value=\"".$op_bd['23_price']."\"/> ";
echo "<select name=\"status23\">\n";
$check='';
if ($op_bd['23_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['23_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Tele-2 (Латвия):<br/>";
echo "<input name=\"price24\" title=\"Цена\" value=\"".$op_bd['24_price']."\"/> ";
echo "<select name=\"status24\">\n";
$check='';
if ($op_bd['24_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['24_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Lmt (Латвия):<br/>";
echo "<input name=\"price25\" title=\"Цена\" value=\"".$op_bd['25_price']."\"/> ";
echo "<select name=\"status25\">\n";
$check='';
if ($op_bd['25_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['25_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Киевстар:<br/>";
echo "<input name=\"price26\" title=\"Цена\" value=\"".$op_bd['26_price']."\"/> ";
echo "<select name=\"status26\">\n";
$check='';
if ($op_bd['26_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['26_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "UMC:<br/>";
echo "<input name=\"price27\" title=\"Цена\" value=\"".$op_bd['27_price']."\"/> ";
echo "<select name=\"status27\">\n";
$check='';
if ($op_bd['27_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['27_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "life:):<br/>";
echo "<input name=\"price28\" title=\"Цена\" value=\"".$op_bd['28_price']."\"/> ";
echo "<select name=\"status28\">\n";
$check='';
if ($op_bd['28_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['28_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "WellCOM (Билайн):<br/>";
echo "<input name=\"price29\" title=\"Цена\" value=\"".$op_bd['29_price']."\"/> ";
echo "<select name=\"status29\">\n";
$check='';
if ($op_bd['29_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['29_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "KCELL:<br/>";
echo "<input name=\"price30\" title=\"Цена\" value=\"".$op_bd['30_price']."\"/> ";
echo "<select name=\"status30\">\n";
$check='';
if ($op_bd['30_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['30_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "KARTEL:<br/>";
echo "<input name=\"price31\" title=\"Цена\" value=\"".$op_bd['31_price']."\"/> ";
echo "<select name=\"status31\">\n";
$check='';
if ($op_bd['31_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['31_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Opera Mini:<br/>";
echo "<input name=\"price32\" title=\"Цена\" value=\"".$op_bd['32_price']."\"/> ";
echo "<select name=\"status32\">\n";
$check='';
if ($op_bd['32_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['32_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "АКОС:<br/>";
echo "<input name=\"price33\" title=\"Цена\" value=\"".$op_bd['33_price']."\"/> ";
echo "<select name=\"status33\">\n";
$check='';
if ($op_bd['33_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['33_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Bashcell:<br/>";
echo "<input name=\"price34\" title=\"Цена\" value=\"".$op_bd['34_price']."\"/> ";
echo "<select name=\"status34\">\n";
$check='';
if ($op_bd['34_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['34_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "T-Mobile:<br/>";
echo "<input name=\"price35\" title=\"Цена\" value=\"".$op_bd['35_price']."\"/> ";
echo "<select name=\"status35\">\n";
$check='';
if ($op_bd['35_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['35_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "AzerCellTelecom:<br/>";
echo "<input name=\"price36\" title=\"Цена\" value=\"".$op_bd['36_price']."\"/> ";
echo "<select name=\"status36\">\n";
$check='';
if ($op_bd['36_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['36_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Ge-Magticom:<br/>";
echo "<input name=\"price37\" title=\"Цена\" value=\"".$op_bd['37_price']."\"/> ";
echo "<select name=\"status37\">\n";
$check='';
if ($op_bd['37_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['37_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Vodafone:<br/>";
echo "<input name=\"price38\" title=\"Цена\" value=\"".$op_bd['38_price']."\"/> ";
echo "<select name=\"status38\">\n";
$check='';
if ($op_bd['38_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['38_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Geocell:<br/>";
echo "<input name=\"price39\" title=\"Цена\" value=\"".$op_bd['39_price']."\"/> ";
echo "<select name=\"status39\">\n";
$check='';
if ($op_bd['39_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['39_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Voxtel:<br/>";
echo "<input name=\"price40\" title=\"Цена\" value=\"".$op_bd['40_price']."\"/> ";
echo "<select name=\"status40\">\n";
$check='';
if ($op_bd['40_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['40_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "MobTel:<br/>";
echo "<input name=\"price41\" title=\"Цена\" value=\"".$op_bd['41_price']."\"/> ";
echo "<select name=\"status41\">\n";
$check='';
if ($op_bd['41_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['41_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Orange:<br/>";
echo "<input name=\"price42\" title=\"Цена\" value=\"".$op_bd['42_price']."\"/> ";
echo "<select name=\"status42\">\n";
$check='';
if ($op_bd['42_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['42_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "TME:<br/>";
echo "<input name=\"price43\" title=\"Цена\" value=\"".$op_bd['43_price']."\"/> ";
echo "<select name=\"status43\">\n";
$check='';
if ($op_bd['43_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['43_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Unitel:<br/>";
echo "<input name=\"price44\" title=\"Цена\" value=\"".$op_bd['44_price']."\"/> ";
echo "<select name=\"status44\">\n";
$check='';
if ($op_bd['44_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['44_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "MTT:<br/>";
echo "<input name=\"price45\" title=\"Цена\" value=\"".$op_bd['45_price']."\"/> ";
echo "<select name=\"status45\">\n";
$check='';
if ($op_bd['45_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['45_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Компьютеры:<br/>";
echo "<input name=\"price46\" title=\"Цена\" value=\"".$op_bd['46_price']."\"/> ";
echo "<select name=\"status46\">\n";
$check='';
if ($op_bd['46_status']==1){$check=' selected="selected"';}
echo "<option$check value=\"1\">Вкл</option>\n";
$check='';
if ($op_bd['46_status']==0){$check=' selected="selected"';}
echo "<option$check value=\"0\">Выкл</option>\n";
$check='';
echo "</select><br />\n";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Применить\"/>";
echo "</form>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
else
{
@mysql_query("UPDATE `operators` SET `1_status`='".intval($status1)."',`1_price`='".intval($price1)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `2_status`='".intval($status2)."',`2_price`='".intval($price2)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `3_status`='".intval($status3)."',`3_price`='".intval($price3)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `4_status`='".intval($status4)."',`4_price`='".intval($price4)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `5_status`='".intval($status5)."',`5_price`='".intval($price5)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `6_status`='".intval($status6)."',`6_price`='".intval($price6)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `7_status`='".intval($status7)."',`7_price`='".intval($price7)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `8_status`='".intval($status8)."',`8_price`='".intval($price8)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `9_status`='".intval($status9)."',`9_price`='".intval($price9)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `10_status`='".intval($status10)."',`10_price`='".intval($price10)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `11_status`='".intval($status11)."',`11_price`='".intval($price11)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `12_status`='".intval($status12)."',`12_price`='".intval($price12)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `13_status`='".intval($status13)."',`13_price`='".intval($price13)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `14_status`='".intval($status14)."',`14_price`='".intval($price14)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `15_status`='".intval($status15)."',`15_price`='".intval($price15)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `16_status`='".intval($status16)."',`16_price`='".intval($price16)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `17_status`='".intval($status17)."',`17_price`='".intval($price17)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `18_status`='".intval($status18)."',`18_price`='".intval($price18)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `19_status`='".intval($status19)."',`19_price`='".intval($price19)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `20_status`='".intval($status20)."',`20_price`='".intval($price20)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `21_status`='".intval($status21)."',`21_price`='".intval($price21)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `22_status`='".intval($status22)."',`22_price`='".intval($price22)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `23_status`='".intval($status23)."',`23_price`='".intval($price23)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `24_status`='".intval($status24)."',`24_price`='".intval($price24)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `25_status`='".intval($status25)."',`25_price`='".intval($price25)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `26_status`='".intval($status26)."',`26_price`='".intval($price26)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `27_status`='".intval($status27)."',`27_price`='".intval($price27)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `28_status`='".intval($status28)."',`28_price`='".intval($price28)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `29_status`='".intval($status29)."',`29_price`='".intval($price29)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `30_status`='".intval($status30)."',`30_price`='".intval($price30)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `31_status`='".intval($status31)."',`31_price`='".intval($price31)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `32_status`='".intval($status32)."',`32_price`='".intval($price32)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `33_status`='".intval($status33)."',`33_price`='".intval($price33)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `34_status`='".intval($status34)."',`34_price`='".intval($price34)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `35_status`='".intval($status35)."',`35_price`='".intval($price35)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `36_status`='".intval($status36)."',`36_price`='".intval($price36)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `37_status`='".intval($status37)."',`37_price`='".intval($price37)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `38_status`='".intval($status38)."',`38_price`='".intval($price38)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `39_status`='".intval($status39)."',`39_price`='".intval($price39)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `40_status`='".intval($status40)."',`40_price`='".intval($price40)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `41_status`='".intval($status41)."',`41_price`='".intval($price41)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `42_status`='".intval($status42)."',`42_price`='".intval($price42)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `43_status`='".intval($status43)."',`43_price`='".intval($price43)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `44_status`='".intval($status44)."',`44_price`='".intval($price44)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `45_status`='".intval($status45)."',`45_price`='".intval($price45)."' where `id`='1'");
@mysql_query("UPDATE `operators` SET `46_status`='".intval($status46)."',`46_price`='".intval($price46)."' where `id`='1'");
echo "<b>Изменено!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=operators&".session_name()."=".session_id()."\">Операторы</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "config": // Настройка сис-мы
echo $div["ten"];
if ($yes!=1)
{
echo "<b>Настройка системы</b><br/>";
echo "<form action=\"index.php?op=config&yes=1&".session_name()."=".session_id()."\" method=\"post\">";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Заголовок страниц:<br/>";
echo "<input name=\"title_c\" value=\"".base64_decode($conf_bd['title'])."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "ICQ админа:<br/>";
echo "<input name=\"icq_c\" value=\"".$conf_bd['icq']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "E-mail админа:<br/>";
echo "<input name=\"email_c\" value=\"".$conf_bd['email']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Id в telepat'e:<br/>";
echo "<input name=\"telepat_c\" value=\"".$conf_bd['telepat']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Курс доллара:<br/>";
echo "<input name=\"dollar_c\" value=\"".$conf_bd['dollar']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Валюта по умолчанию:<br/>";
echo "<select name=\"valuta_c\">\n";
$check='';
if ($conf_bd['valuta']=='dol'){$check=' selected="selected"';}
echo "<option$check value=\"dol\">Доллары</option>\n";
$check='';
if ($conf_bd['valuta']=='rub'){$check=' selected="selected"';}
echo "<option$check value=\"rub\">Рубли</option>\n";
$check='';
echo "</select><br />\n";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Кол-во элементов на стр:<br/>";
echo "<input name=\"num_msgs_an_c\" value=\"".$conf_bd['num_msgs_an']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Пароль админа:<br/>";
echo "<input name=\"passadmin_c\" value=\"".$conf_bd['passadmin']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Минималка в \$:<br/>";
echo "<input name=\"mincost_c\" value=\"".$conf_bd['mincost']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Реферальские проценты:<br/>";
echo "<input name=\"partproc_c\" value=\"".$conf_bd['partproc']."\"/><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Применить\"/>";
echo "</form>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
else
{
@mysql_query("UPDATE `config` SET `title`='".base64_encode(htmlspecialchars($title_c))."',`icq`='".intval($icq_c)."',`email`='".htmlspecialchars($email_c)."',`telepat`='".intval($telepat_c)."',`dollar`='".htmlspecialchars($dollar_c)."',`valuta`='".htmlspecialchars($valuta_c)."',`num_msgs_an`='".intval($num_msgs_an_c)."',`passadmin`='".htmlspecialchars($passadmin_c)."',`mincost`='".htmlspecialchars($mincost_c)."',`partproc`='".intval($partproc_c)."' where `id`='1'");
$_SESSION['passw']=htmlspecialchars($passadmin_c);
echo "<b>Изменено!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=config&".session_name()."=".session_id()."\">Настройка сис-мы</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "traff": // Траффик
echo $div["ten"];
if ($yes!=1)
{
$q = @mysql_query("select * from `urls` where `id`='1' limit 1;");
$urls_bd = @mysql_fetch_array($q);
echo "<b>Куда пускать траффик?</b><br/>";
echo "<form action=\"index.php?op=traff&yes=1&".session_name()."=".session_id()."\" method=\"post\">";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Opera Mini:<br/>";
echo "<input name=\"sayt_om\" value=\"".$urls_bd['sayt_om']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Операторы:<br/>";
echo "<input name=\"sayt_operators\" value=\"".$urls_bd['sayt_operators']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Компы:<br/>";
echo "<input name=\"sayt_pc\" value=\"".$urls_bd['sayt_pc']."\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/> ";}echo "Другие:<br/>";
echo "<input name=\"sayt_more\" value=\"".$urls_bd['sayt_more']."\"/><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Применить\"/>";
echo "</form>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
else
{
@mysql_query("UPDATE `urls` SET `sayt_om`='".htmlspecialchars($sayt_om)."',`sayt_operators`='".htmlspecialchars($sayt_operators)."',`sayt_pc`='".htmlspecialchars($sayt_pc)."',`sayt_more`='".htmlspecialchars($sayt_more)."' where `id`='1'");
echo "<b>Изменено!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=traff&".session_name()."=".session_id()."\">Управление траффиком</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "delsite": // УДАЛИТЬ САЙТ
echo $div["ten"];
if ($yes!=1)
{
echo "<b>Вы действительно хотите удалить сайт, ID[$id]?</b><br/>";
echo "<a href=\"index.php?op=delsite&id=$id&".session_name()."=".session_id()."&yes=1\">Да</a> | <a href=\"index.php?".session_name()."=".session_id()."\">Нет</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
else
{
$q_msg = mysql_query("select * from `uzvers` where (`id`='$id');");
$row_msg=mysql_fetch_array($q_msg);
$ballall=$row_msg['allmonth'];
$part=$row_msg['partid'];
$ball=($ballall*15)/100;
@mysql_query("delete from `uzvers` where `id`='$id'");
@mysql_query("UPDATE `uzvers` SET `allmonth`=`allmonth`-'$ball' WHERE `id`='$part';");
echo "<b>Сайт удалён!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "bansite": // ЗАБАНИТЬ САЙТ
echo $div["ten"];
if ($yes!=1)
{
echo "<b>Бан сайта ID[$id]</b><br/>";
echo "<form action=\"index.php?op=bansite&id=$id&yes=1&".session_name()."=".session_id()."\" method=\"post\">";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "Причина:<br/>";
echo "<input name=\"message\" maxlength=\"250\" title=\"Причина\"/><br/>";
echo "<input type=\"checkbox\" name=\"translit\" value=\"1\" /> Транслит<br/>\n";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Забанить\"/>";
echo "</form>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
else
{
if($translit==1) $message=latrus($message);
$message=base64_encode(htmlspecialchars($message));
@mysql_query("UPDATE `uzvers` SET `ban`='1',`ban_pr`='".htmlspecialchars($message)."' where `id`='$id'"); // ,`allmonth`='0'
echo "<b>Сайт забанен!</b><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "unbansite": // РАЗБАНИТЬ САЙТ
echo $div["ten"];
if ($yes!=1)
{
echo "<b>Разбанить сайт ID[$id]?</b><br/>";
echo "<img src=\"../pics/st.gif\" alt=\"*\"/>Причина:<br/>";
$q_ban = mysql_query("select * from `uzvers` where (`id`='$id');");
$row_ban=mysql_fetch_array($q_ban);
echo "<b>".base64_decode($row_ban['ban_pr'])."</b><br/>";
echo "<a href=\"index.php?op=unbansite&id=$id&yes=1&".session_name()."=".session_id()."\">Разбанить</a><br/>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
else
{
@mysql_query("UPDATE `uzvers` SET `ban`='0',`ban_pr`='' where `id`='$id'");
echo "<b>Сайт разбанен!</b><br/>";
echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "opl": // ОПЛАТИТЬ
$q_msg = mysql_query("select * from `uzvers` where (`id`='$postid');");
$row_msg=mysql_fetch_array($q_msg);
if (empty($go))
{
$msg_db=$row_msg['allmonth'];
echo $div["ten"];
if ($_SESSION['wap']=="xml")
{
echo "<form action=\"index.php?op=opl&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<div>";
echo "Сколько платим ($)?: <br/>";
echo "<input name=\"sum\" maxlength=\"250\" value=\"$msg_db\" title=\"Text\"/><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Платить\"/>";
echo "</div>";
echo "</form>";
}
else
{
echo "Сколько платим ($)?: <br/>";
echo "</small><input name=\"sum".$ref."\" value=\"$msg_db\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "<anchor title=\"send\">Платить<go href=\"index.php?op=opl&go=edit&postid=$postid&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<postfield name=\"sum\" value=\"$(sum".$ref.")\"/>";
echo "</go></anchor><br/>";
}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
echo $div["end"];
include_once ("../footer.php");
exit();
}
else
{
echo $div["ten"];
@mysql_query("UPDATE `uzvers` SET `allmonth`=`allmonth`-'$sum',`opl`=`opl`+'$sum',`help`='0' WHERE (`id`='$postid')");
echo "<b>Оплаченно [$sum y.e. / ".floor($sum*$dollar)." руб.]!</b><br/>";
echo "WMR: <input type=\"text\" value=\"$row_msg[wmr]\"/><br/>";
echo "WMZ: <input type=\"text\" value=\"$row_msg[wmz]\"/><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
}
break;
case "logs": // логи
if (empty($id))
{
echo $div["ten"];
if ($_SESSION['wap']=="xml")
{
echo "<form action=\"index.php?op=logs&".session_name()."=".session_id()."\" method=\"post\">";
echo "<div>";
echo "ID: <br/>";
echo "<input name=\"id\" maxlength=\"250\" title=\"Text\"/><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Отправить\"/>";
echo "</div>";
echo "</form>";
}
else
{
echo "ID: <br/>";
echo "</small><input name=\"id".$ref."\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "<anchor title=\"send\">Отправить<go href=\"index.php?op=logs&".session_name()."=".session_id()."\" method=\"post\">";
echo "<postfield name=\"id\" value=\"$(id".$ref.")\"/>";
echo "</go></anchor><br/>";
}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
include_once ("../footer.php");
exit();
}
else
{
$id=intval($id);
$file_name = "../logs/$id.log"; //file with links
$sim=10; //how much links on page
if(!isset($_GET['p']))$p=0; else $p = $_GET['p'];
if (!is_file($file_name))
{
echo $div["ten"];
echo '<b>Нет логов для данного ID!</b><br/>';
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=logs&".session_name()."=".session_id()."\">Логи</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
include_once ("../footer.php");
exit();
}
$file=file($file_name);
$all=count($file);
$obsum = $all - $p * $sim;
$nasum = $obsum - $sim;
$end='0';
for($i=$obsum; $i>$nasum; $i--)
{
if(!isset($file[$i]))
{
$end='1';
}
else
{
$file[$i]=str_replace("\n","<br/>",$file[$i]);
$read.=$file[$i];
}
}
if($end=='1') $read.="<br/>";
$read=str_replace("&","&",$read);
//$read=iconv("Windows-1251", "UTF-8", $read);
$echo .="---";
$echo .= '<br/><a href="'.$PHP_SELF.'?'.session_name().'='.session_id().'&p='.($p-1).'&id='.$id.'&op=logs">Пред</a> |';
$echo .= '| <a href="'.$PHP_SELF.'?'.session_name().'='.session_id().'&p='.($p+1).'&id='.$id.'&op=logs">След</a><br/>';
echo $div["ten"];
echo $read;
echo $echo;
}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=logs&".session_name()."=".session_id()."\">Логи</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
include_once ("../footer.php");
exit();
break;
case "stats": // Статистика
echo $div["ten"];
echo "<b>Дата</b> - Опсосов | Всего<br/>";
$arr = mysql_query("select * from `stats`");
$qi = mysql_query("select * from `stats` order by `id` desc;");
if (mysql_affected_rows()==0)
{
echo "Нет статы !!!";
}
else
{
while($row=mysql_fetch_array($qi))
{
$data=substr($row['data'],6,2).'.'.substr($row['data'],4,2).'.'.substr($row['data'],0,4);
echo "<b>$data</b> - ".$row['OP']." | ".$row['ALL']."<br/>";
}
}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=more_stats&".session_name()."=".session_id()."\">Подробная статистика</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "more_stats": // Подробная статистика
echo $div["ten"];
$arr = mysql_query("select * from `adm_stats` where `id`='1'");
$row=mysql_fetch_array($arr);
echo "<b>Opera Mini</b> - $row[om] | <a href=\"index.php?op=reset_more_stats&id=om&".session_name()."=".session_id()."\">СБРОС</a><br/>";
echo "<b>Операторы</b> - $row[op] | <a href=\"index.php?op=reset_more_stats&id=op&".session_name()."=".session_id()."\">СБРОС</a><br/>";
echo "<b>Компьютеры</b> - $row[pc] | <a href=\"index.php?op=reset_more_stats&id=pc&".session_name()."=".session_id()."\">СБРОС</a><br/>";
echo "<b>Другие</b> - $row[more] | <a href=\"index.php?op=reset_more_stats&id=more&".session_name()."=".session_id()."\">СБРОС</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=stats&".session_name()."=".session_id()."\">Cтатистика</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "reset_more_stats": // Сброс подробной статистики
echo $div["ten"];
if ($id=='om')
{
@mysql_query("UPDATE `adm_stats` SET `om`='0' where `id`='1'");
echo "<b>Статистика по Opera Mini сброшена!</b><br/>";
}
elseif ($id=='op')
{
@mysql_query("UPDATE `adm_stats` SET `op`='0' where `id`='1'");
echo "<b>Статистика по операторам сброшена!</b><br/>";
}
elseif ($id=='pc')
{
@mysql_query("UPDATE `adm_stats` SET `pc`='0' where `id`='1'");
echo "<b>Статистика по компьютерам сброшена!</b><br/>";
}
elseif ($id=='more')
{
@mysql_query("UPDATE `adm_stats` SET `more`='0' where `id`='1'");
echo "<b>Статистика по неизвестным опсосам сброшена!</b><br/>";
}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=more_stats&".session_name()."=".session_id()."\">Подробная статистика</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "about": // О юзере
if (empty($go))
{
echo $div["ten"];
if ($_SESSION['wap']=="xml")
{
echo "<form action=\"index.php?op=about&go=go&".session_name()."=".session_id()."\" method=\"post\">";
echo "<div>";
echo "ID: <br/>";
echo "<input name=\"id\" maxlength=\"250\" title=\"Text\"/><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Отправить\"/>";
echo "</div>";
echo "</form>";
}
else
{
echo "ID: <br/>";
echo "</small><input name=\"id".$ref."\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "<anchor title=\"send\">Отправить<go href=\"index.php?op=about&go=go&".session_name()."=".session_id()."\" method=\"post\">";
echo "<postfield name=\"id\" value=\"$(id".$ref.")\"/>";
echo "</go></anchor><br/>";
}
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
echo $div["end"];
include_once ("../footer.php");
exit();
}
else
{
echo $div["ten"];
$qi = mysql_query("select * from `uzvers` where `id`='$id';");
if (mysql_affected_rows()==0)
{
echo "<b>Нет такого ID!</b>";
}
else
{
$row=mysql_fetch_array($qi);
if ($_SESSION['rate']=='dol') // Если валюта в долларах
$allmonth = $row['allmonth']." у.е.";
else // Иначе (рубли)
$allmonth = floor($row['allmonth']*$dollar)." руб.";
echo "<b>ID - ".$row['id']."</b><br/>";
if ($row['ban']==1) echo "<b>Юзер забанен (".base64_decode($row['ban_pr']).")!</b><br/>";
echo "Логин: ".$row['log']."<br/>
Пароль: ".$row['psss']."<br/>
WMR: ".$row['wmr']."<br/>
WMZ: ".$row['wmz']."<br/>
Мыло: ".$row['email']."<br/>
Сайт: ".$row['site']."<br/>
ICQ: ".$row['icq']."<br/>
Баланс $allmonth<br/>";
}
}
echo "<br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?op=about&".session_name()."=".session_id()."\">О участнике</a><br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st2.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
case "sitehelp": // Просят выплат
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0;
$arr = mysql_query("select * from `uzvers` where `help`='1' and `ban`!='1'");
$qi = mysql_query("select * from `uzvers` where `help`='1' and `ban`!='1' order by `allmonth` desc limit $startan,$num_msgs_an;");
if (mysql_affected_rows()==0)
{
echo "<b>Нет сайтов!</b>";
}
else
{
while($row=mysql_fetch_array($qi))
{
if ($_SESSION['rate']=='dol') // Если валюта в долларах
$allmonth = $row['allmonth']." у.е.";
else // Иначе (рубли)
$allmonth = floor($row['allmonth']*$dollar)." руб.";
echo "<b>".$row['id']."</b> | <a href=\"index.php?op=about&go=go&id=".$row['id']."&".session_name()."=".session_id()."\">".$row['log']."</a> | <a href=\"".$row['site']."\">".$row['site']."</a> | $allmonth | <a href=\"index.php?op=opl&postid=".$row['id']."&".session_name()."=".session_id()."\">опл</a> <a href=\"index.php?op=delsite&id=".$row['id']."&".session_name()."=".session_id()."\">удл</a> <a href=\"index.php?op=bansite&id=".$row['id']."&".session_name()."=".session_id()."\">бан</a><br/>";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"index.php?op=sitehelp&".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("Назад")."</a> |";
if($i>$startan+$num_msgs_an)
echo "| <a href=\"index.php?op=sitehelp&".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Далее")."</a>";
echo "<br/>";
if ($_SESSION['wap']=="xml"){echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";}echo "<a href=\"index.php?".session_name()."=".session_id()."\">АдминПанель</a><br/>";
break;
}
echo $div["end"];
include_once ("../footer.php");
?>