View file wkat/adminka/adms.php

File size: 51.84Kb
<?
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
header("Cache-Control: no-cache");
   echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
   <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";?>

<?php
include "../xconf.php";
include "fo.php";
$where_data=$_GET['c'];
$kolich_adm=10;
$log=$_GET['log'];
$pass=$_GET['pass'];
$mode=$_GET['mode'];

echo "<wml><card title=\"A&#x0434;&#x043C;&#x0438;&#x043D;&#x043A;a\">";
 if ($log <> $log_a){
	print "<p>He&#x0432;ep&#x043D;&#x044B;&#x0439; &#x043B;o&#x0433;&#x0438;&#x043D;</p></card></wml>";
	exit;}
	if ($pass <> $pass_a){
	print "<p>He&#x0432;ep&#x043D;&#x044B;&#x0439; &#x043F;apo&#x043B;&#x044C;</p></card></wml>";
	exit;} 
	
	
	If (!isset($_GET['c']) || !is_numeric($_GET['c']) || $_GET['c']<0) 
{
$res=mysql_query("select * from `cool_site` order by `tin` desc ");
$kol=mysql_num_rows($res);
}

else { 
$resax=mysql_query("select * from `cool_raz` where id='$where_data' ");
$row=mysql_num_rows($resax);
if ($row=="0")
{
print "<p><small>O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">Ha&#x0437;a&#x0434;</a><br/></small></p></card></wml>";
exit;
}

$res=mysql_query("select * from `cool_site` where category='$where_data' order by `tin` desc ");
$kol=mysql_num_rows($res);
}

switch ($mode){
case "cats": //

print "<p><small>";
$q=mysql_query("select * from `cool_raz` where 1 order by por asc");
while($data = @mysql_fetch_array($q)){
$catid=$data['id'];
$i=@mysql_fetch_array($qs);
$qs=@mysql_query("select count(*) from `cool_site` where category='$catid' ");

$i=@mysql_fetch_array($qs);
print " <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$catid\">".$data['text']."</a>(".$i['count(*)'].") <br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=delkat&amp;c=$catid\">&#x0423;&#x0434;a&#x043B;&#x0438;&#x0442;&#x044C;</a>  ||  <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=edkat&amp;c=$catid\">&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>-----<br/>";

unset($catid);unset($qs);unset($i);}
print "<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></small></p>";


break;

case "vkat": //

$where_data=$_GET['c'];

echo "<p><small>";

If (!isset($_GET['c']) || !is_numeric($_GET['c']) || $_GET['c']<0) 
{
$res=mysql_query("select * from `cool_site` order by `tin` desc ");
$kol=mysql_num_rows($res);
}

else { 
$resax=mysql_query("select * from `cool_raz` where id='$where_data' ");
$row=mysql_num_rows($resax);
if ($row=="0")
{
print "O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"katalog.php\">Ha&#x0437;a&#x0434;</a><br/></small></p></card></wml>";
exit;
}

$res=mysql_query("select * from `cool_site` where category='$where_data' order by `tin` desc ");
$kol=mysql_num_rows($res);
}

  If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;
}else $page=$_GET['page'];
for ($i=($page-1)*$kolich_adm;$i<($kolich_adm*$page);$i++){
If ($i>=$kol) break;


$idss=mysql_result($res,$i,"id");
$link=mysql_result($res,$i,"link");
$title=mysql_result($res,$i,"title");
$about=mysql_result($res,$i,"about");
$tin=mysql_result($res,$i,"tin");
$toout=mysql_result($res,$i,"tout");
$ins=mysql_result($res,$i,"ins");
$outs=mysql_result($res,$i,"outs");
$act=mysql_result($res,$i,"activ");

echo "<b>id - $idss <a href=\"../go.php?go=$idss\">$title</a></b><br/>[$link]     <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usinfo&amp;c=$where_data&amp;page=$page&amp;id=$idss\">[&#x0418;&#x043D;&#x0444;o]</a><br/>$about<br/>
<u>&#x0417;a &#x043C;ec&#x044F;&#x0446;:    B: $ins | &#x0418;&#x0437;: $outs</u><br/><u>Ce&#x0433;o&#x0434;&#x043D;&#x044F;:    B: $tin | &#x0418;&#x0437;: $toout</u><br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usdel&amp;c=$where_data&amp;page=$page&amp;id=$idss\">del</a>  ||"; if ($act==1) { echo"<b>Active</b>|| <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usban&amp;c=$where_data&amp;page=$page&amp;id=$idss\">&#x0417;a&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>";} 
else {echo"<b>BANNED</b>|| <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usrazban&amp;c=$where_data&amp;page=$page&amp;id=$idss\">Pa&#x0437;&#x0431;a&#x043D;</a><br/>";}  echo"-----<br/>";
}

If ($page>1) {  $pagep=$page-1;  echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$pagep\">Ha&#x0437;a&#x0434;</a><br/>"; }
If ((ceil($kol/$kolich_adm))>$page) { $page++;    echo "

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">&#x0414;a&#x043B;&#x044C;&#x0448;e</a><br/>";}

$totalp=ceil($kol/10);
if ($totalp>1) {
  echo "<br/>страница</small> <input type=\"text\" name=\"pg\" size=\"2\" value=\"$totalp\" format=\"*N\"/><small>
<anchor> перейти
<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data\" method=\"get\">
<postfield name=\"page\" value=\"$(pg)\"/>
</go>
</anchor><br/>Bce&#x0433;o c&#x0442;pa&#x043D;&#x0438;&#x0446;: $totalp";
  }
  if ($totalp<2) {
 print  'Bce&#x0433;o c&#x0442;pa&#x043D;&#x0438;&#x0446;: 1'; }

echo "<br/>-----<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></small></p>";

break;




case "usdel": //
  If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;}else $page=$_GET['page'];
If (!isset($_GET['id']) || !is_numeric($_GET['id'])  ||  $_GET['id']<0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_GET['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

print "<p><small>";

 @unlink("../logs/$id.txt");
mysql_query ("delete from `cool_site` where id='".$_GET['id']."' ;");
mysql_query ("delete from `oper_in` where idaa='".$_GET['id']."' ;");
mysql_query ("delete from `opers` where idaa='".$_GET['id']."' ;");
echo "Ca&#x0439;&#x0442; yc&#x043F;e&#x0448;&#x043D;o y&#x0434;a&#x043B;e&#x043D;!<br/>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">Ha&#x0437;a&#x0434; &#x0432; &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044E;</a><br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkatn&amp;page=$page\">Ha&#x0437;a&#x0434; &#x043A; &#x043D;ea&#x043A;&#x0442;&#x0438;&#x0432;&#x043D;&#x044B;&#x043C;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "usban": 
  If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;}else $page=$_GET['page'];
If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_GET['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

print "<p><small>";


mysql_query("update `cool_site` set `activ`='0' where id='$id';");


echo "Ca&#x0439;&#x0442; &#x0437;a&#x0431;a&#x043D;e&#x043D;!!!<br/>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;
case "usrazban": 
  If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;}else $page=$_GET['page'];
If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_GET['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

print "<p><small>";


mysql_query("update `cool_site` set `activ`='1' where id='$id';");


echo "Ca&#x0439;&#x0442; yc&#x043F;e&#x0448;&#x043D;o pa&#x0437;&#x0431;a&#x043D;e&#x043D;!<br/>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;


case "usinfo": 

  If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;}else $page=$_GET['page'];
If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_GET['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

print "<p><small>";


$passw=mysql_result($result,0,"pass");
$link=mysql_result($result,0,"link");
$email=mysql_result($result,0,"email");
$act=mysql_result($result,0,"activ");

echo "<b>id - $id</b>"; if ($act==1) { echo"<b>Active</b>";} 
else {echo"<b>BANNED</b>";
}
 echo"<br/>
Ca&#x0439;&#x0442;: <u>$link</u><br/>
&#x041F;apo&#x043B;&#x044C;: <u>$passw</u><br/>
E-mail: <u>$email</u><br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=edit&amp;id=$id\">&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;


case "edit": 

If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_GET['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}


print "<p>";


$passw=mysql_result($result,0,"pass");
$ltime=mysql_result($result,0,"ltime");
$link=mysql_result($result,0,"link");
$email=mysql_result($result,0,"email");
$about=mysql_result($result,0,"about");
$categ=mysql_result($result,0,"category");
$title=mysql_result($result,0,"title");
$currDate=date("d.m.y", $ltime);
echo "Ha&#x0437;&#x0432;a&#x043D;&#x0438;e:<br/>
		<input type=\"text\" name=\"title\" maxlength=\"30\" value=\"$title\"/><br/>
		A&#x0434;pec:<br/>
		<input type=\"text\" name=\"link\" maxlength=\"100\" value=\"$link\"/><br/>";
		print"Ka&#x0442;e&#x0433;op&#x0438;&#x044F;:<br/><select name=\"k\" value=\"$categ\">";
		$q=mysql_query("select * from `cool_raz` where 1 order by por asc");
		while($datas = @mysql_fetch_array($q)){
		print"<option value=\"".$datas['id']."\">".$datas['text']."</option>";}
		print"</select><br/>
		O&#x043F;&#x0438;ca&#x043D;&#x0438;e:<br/>
		<input type=\"text\" name=\"about\" maxlength=\"250\" value=\"$about\"/><br/>
		Ho&#x0432;&#x044B;&#x0439; &#x041F;apo&#x043B;&#x044C;:<br/>
		<input type=\"text\" name=\"passw\" maxlength=\"30\" value=\"$passw\"/><br/>
		E-Mail:<br/>
		<input type=\"text\" name=\"email\" maxlength=\"70\" value=\"$email\"/><br/>
	
		<anchor>&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;
		<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=edit_ok&amp;id=$id\" method=\"post\">
		<postfield name=\"title\" value=\"$(title)\"/>
		<postfield name=\"passw\" value=\"$(passw)\"/>
		<postfield name=\"link\" value=\"$(link)\"/>
		<postfield name=\"about\" value=\"$(about)\"/>
		<postfield name=\"email\" value=\"$(email)\"/>
	
		<postfield name=\"k\" value=\"$(k)\"/>
		</go></anchor><br/>";

echo "
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</p>";


break;

case "edit_ok": 

If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_GET['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
if (!mysql_num_rows($result)){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}




$title=$_POST['title'];
$link=$_POST['link'];
$about=$_POST['about'];
$passw=$_POST['passw'];
$email=$_POST['email'];
$title=trimcode($title);
$link=coding_cool(substr(trim($link), 0, 100));
$about=coding_cool(substr(trim($about), 0, 300));
$passw=coding_cool(substr(trim($passw), 0, 30));
$email=coding_cool(substr(trim($email), 0, 70));
$k=$_POST['k'];
If (!is_numeric($_POST['k'])) {
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

if (!$title){
echo "<p>
He &#x0432;&#x0432;e&#x0434;e&#x043D;o &#x043D;a&#x0437;&#x0432;a&#x043D;&#x0438;e!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
if (!$about){
echo "<p>
He &#x0432;&#x0432;e&#x0434;e&#x043D;o o&#x043F;&#x0438;ca&#x043D;&#x0438;e!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
If (!preg_match("/^[-0-9a-z_.]+@[0-9a-z_^\.]+\.[a-z]{2,4}$/i",$email)){
echo "<p>
He&#x043A;oppe&#x043A;&#x0442;&#x043D;o y&#x043A;a&#x0437;a&#x043D; e-mail!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
If (!preg_match("/^(http:\/\/){1}[-0-9a-z_.]+\.[a-z]{2,4}$/i",$link)){
echo "<p>
He&#x043A;oppe&#x043A;&#x0442;&#x043D;o y&#x043A;a&#x0437;a&#x043D; ca&#x0439;&#x0442;!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
If (!preg_match('/^[a-z0-9]{1,}$/', $passw)){
echo "<p>
He&#x043A;oppe&#x043A;&#x0442;&#x043D;o y&#x043A;a&#x0437;a&#x043D; &#x043F;apo&#x043B;&#x044C;!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
print "<p><small>";
mysql_query("update `cool_site` set title='$title',email='$email',pass='$passw',link='$link',about='$about',category='$k' where id='$id';");
echo "Ca&#x0439;&#x0442; yc&#x043F;e&#x0448;&#x043D;o &#x0438;&#x0437;&#x043C;e&#x043D;e&#x043D;!!!<br/>
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;
case "nkat": 


print "<p>";

print" Ha&#x0437;&#x0432;a&#x043D;&#x0438;e:<br/>
<input type=\"text\" name=\"razd\" maxlength=\"200\" /><br/>
Pac&#x043F;o&#x043B;o&#x0436;e&#x043D;&#x0438;e:<br/>
<input type=\"text\"  name=\"por\" format=\"*N\" maxlength=\"5\"/><br/>
<anchor title=\"go\">&#x0414;o&#x0431;a&#x0432;&#x0438;&#x0442;&#x044C;<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=nkat_ok\" method=\"post\">
<postfield name=\"razd\" value=\"$(razd)\"/>
<postfield name=\"por\" value=\"$(por)\"/>
</go></anchor><br/>

<small>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ka&#x0442;e&#x0433;op&#x0438;&#x0438;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;


case "nkat_ok": 

If (!isset($_POST['por']) || !is_numeric($_POST['por'])){
echo "<p>
&#x0417;a&#x043F;poc &#x043D;e &#x043F;o&#x043B;&#x043D;&#x044B;&#x0439;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$razd=$_POST['razd'];
$por=$_POST['por'];
$razd=del($razd);
$razd=trimcode($razd);
if(!$razd)
		{
echo "<p>
&#x0417;a&#x043F;poc &#x043D;e &#x043F;o&#x043B;&#x043D;&#x044B;&#x0439;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

mysql_query("insert into `cool_raz` values(0, '$por', '$razd')");

echo "<p>";

echo "<small>Ka&#x0442;e&#x0433;op&#x0438;&#x044F; yc&#x043F;e&#x0448;&#x043D;o &#x0434;o&#x0431;a&#x0432;&#x043B;e&#x043D;a!<br/>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ka&#x0442;e&#x0433;op&#x0438;&#x0438;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
echo "</small></p>";


break;
case "delkat": 
If (!isset($_GET['c']) || !is_numeric($_GET['c'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$c=$_GET['c'];
$result=mysql_query("select * from `cool_raz` where id='$c';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

print "<p><small>";


mysql_query ("delete from `cool_raz` where id='".$_GET['c']."' ;");


echo "Ka&#x0442;e&#x0433;op&#x0438;&#x044F; yc&#x043F;e&#x0448;&#x043D;o y&#x0434;a&#x043B;e&#x043D;a!<br/>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "edkat": 

If (!isset($_GET['c']) || !is_numeric($_GET['c'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$c=$_GET['c'];
$result=mysql_query("select * from `cool_raz` where id='$c';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}


print "<p>";


$por=mysql_result($result,0,"por");
$text=mysql_result($result,0,"text");
echo "Ha&#x0437;&#x0432;a&#x043D;&#x0438;e:<br/>
		<input type=\"text\" name=\"text\" maxlength=\"50\" value=\"$text\"/><br/>
		Pac&#x043F;o&#x043B;o&#x0436;e&#x043D;&#x0438;e:<br/>
		<input type=\"text\" name=\"por\" maxlength=\"5\" value=\"$por\" format=\"*N\"/><br/>
	    <anchor>&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=edkat_ok\" method=\"post\">
		<postfield name=\"text\" value=\"$(text)\"/>
		<postfield name=\"c\" value=\"$c\"/>
		<postfield name=\"por\" value=\"$(por)\"/>
		</go></anchor><br/>";

echo "
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkat&amp;c=$where_data&amp;page=$page\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</p>";


break;


case "edkat_ok": 

If (!isset($_POST['c']) || !is_numeric($_POST['c'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$c=$_POST['c'];
$result=mysql_query("select * from `cool_raz` where id='$c';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;a &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
If (!isset($_POST['por']) || !is_numeric($_POST['por'])){
echo "<p>
&#x0417;a&#x043F;poc &#x043D;e &#x043F;o&#x043B;&#x043D;&#x044B;&#x0439;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$por=$_POST['por'];
$text=$_POST['text'];

$text=del($text);
$text=trimcode($text);
if(!$text)
		{
echo "<p>
&#x0417;a&#x043F;poc &#x043D;e &#x043F;o&#x043B;&#x043D;&#x044B;&#x0439;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

print "<p><small>";
$text=trimcode($text);


mysql_query("update `cool_raz` set text='$text', por='$por'  where id='$c';");
echo "Ka&#x0442;e&#x0433;op&#x0438;&#x044F; yc&#x043F;e&#x0448;&#x043D;o &#x0438;&#x0437;&#x043C;e&#x043D;e&#x043D;a!<br/>
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "vkatn": //

$where_data=$_GET['c'];

echo "<p><small>";

If (!isset($_GET['c']) || !is_numeric($_GET['c']) || $_GET['c']<0) 
{
$res=mysql_query("select * from `cool_site` where ins='0' order by `id` ");
$kol=mysql_num_rows($res);
}

else { 
$resax=mysql_query("select * from `cool_raz` where id='$where_data' ");
$row=mysql_num_rows($resax);
if ($row=="0")
{
print "O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"katalog.php\">Ha&#x0437;a&#x0434;</a><br/></small></p></card></wml>";
exit;
}

$res=mysql_query("select * from `cool_site` where ins='0' order by `id`  ");
$kol=mysql_num_rows($res);
}

  If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;
}else $page=$_GET['page'];
for ($i=($page-1)*$kolich_adm;$i<($kolich_adm*$page);$i++){
If ($i>=$kol) break;


$idss=mysql_result($res,$i,"id");
$link=mysql_result($res,$i,"link");
$title=mysql_result($res,$i,"title");
$about=mysql_result($res,$i,"about");
$tin=mysql_result($res,$i,"tin");
$toout=mysql_result($res,$i,"tout");
$ins=mysql_result($res,$i,"ins");
$outs=mysql_result($res,$i,"outs");
$act=mysql_result($res,$i,"activ");

echo "<b>id - $idss <a href=\"../go.php?go=$idss\">$title</a></b><br/>[$link]     <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usinfo&amp;c=$where_data&amp;page=$page&amp;id=$idss\">[&#x0418;&#x043D;&#x0444;o]</a><br/>$about<br/>
<u>&#x0417;a &#x043C;ec&#x044F;&#x0446;:    B: $ins | &#x0418;&#x0437;: $outs</u><br/><u>Ce&#x0433;o&#x0434;&#x043D;&#x044F;:    B: $tin | &#x0418;&#x0437;: $toout</u><br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usdel&amp;c=$where_data&amp;page=$page&amp;id=$idss\">del</a>  ||"; if ($act==1) { echo"<b>Active</b>|| <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usban&amp;c=$where_data&amp;page=$page&amp;id=$idss\">&#x0417;a&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>";} 
else {echo"<b>BANNED</b>|| <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usrazban&amp;c=$where_data&amp;page=$page&amp;id=$idss\">Pa&#x0437;&#x0431;a&#x043D;</a><br/>";}  echo"-----<br/>";
}

If ($page>1) {  $pagep=$page-1;  echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkatn&amp;page=$pagep\">Ha&#x0437;a&#x0434;</a><br/>"; }
If ((ceil($kol/$kolich_adm))>$page) { $page++;    echo "

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkatn&amp;page=$page\">&#x0414;a&#x043B;&#x044C;&#x0448;e</a><br/>";}

$totalp=ceil($kol/10);
if ($totalp>1) {
  echo "<br/>страница</small> <input type=\"text\" name=\"pg\" size=\"2\" value=\"$totalp\" format=\"*N\"/><small>
<anchor> перейти
<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=vkatn\" method=\"get\">
<postfield name=\"page\" value=\"$(pg)\"/>
</go>
</anchor><br/>Bce&#x0433;o c&#x0442;pa&#x043D;&#x0438;&#x0446;: $totalp";
  }
  if ($totalp<2) {
 print  'Bce&#x0433;o c&#x0442;pa&#x043D;&#x0438;&#x0446;: 1'; }

echo "<br/>-----<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></small></p>";

break;
case "searh_s": 

  echo "
<p> B&#x0432;e&#x0434;&#x0438;&#x0442;e ca&#x0439;&#x0442;:<br/><input type=\"text\" name=\"site\" maxlength=\"100\" value=\"http://\"/><br/>

<anchor>OK

<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=searh_s_ok\" method=\"post\">

<postfield name=\"site\" value=\"$(site)\"/>
</go>
</anchor><br/>-----<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></p>";
break;

case "searh_s_ok": 

$site=$_POST['site'];

$site=del($site);
$site=trimcode($site);
if(!$site)
		{
echo "<p>
He y&#x043A;a&#x0437;a&#x043D; ca&#x0439;&#x0442;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$result=mysql_query("select * from `cool_site` where link='$site';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
Ta&#x043A;o&#x0433;o ca&#x0439;&#x0442;a &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

$id=mysql_result($result,0,"id");
$title=mysql_result($result,0,"title");
$link=mysql_result($result,0,"link");
$email=mysql_result($result,0,"email");
$about=mysql_result($result,0,"about");
$outs=mysql_result($result,0,"outs");
$ins=mysql_result($result,0,"ins");
$tin=mysql_result($result,0,"tin");
$cat=mysql_result($result,0,"category");
$toout=mysql_result($result,0,"tout");
$act=mysql_result($result,0,"activ");
$results=mysql_query("select * from `cool_raz` where id='$cat';");
$text=mysql_result($results,0,"text");
$rtime=mysql_result($result,0,"rtime");
print "<p><small>";

$datas=date("d.m.y ", "$rtime()" );


echo "<b>id - $id</b> Ka&#x0442;e&#x0433;op&#x0438;&#x044F;: <u>$text</u><br/>";
if ($act<>1) { echo "<b>BANNED</b><br/>"; }
echo "
&#x0414;a&#x0442;a pe&#x0433;&#x0438;c&#x0442;pa&#x0446;&#x0438;&#x0438;: $datas<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=logs&amp;id=$id\">&#x041F;poc&#x043C;o&#x0442;p &#x043B;o&#x0433;o&#x0432;</a><br/> $title<br/><a href=\"$link\">$link</a><br/>$about<br/>
Ce&#x0433;o&#x0434;&#x043D;&#x044F; IN: $tin ||  OUT: $toout<br/>  
&#x0417;a &#x043C;ec&#x044F;&#x0446;  IN: $ins ||  OUT:  $outs<br/>";
if ($act==1) { echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usban&amp;c=$where_data&amp;page=$page&amp;id=$id\">&#x0417;a&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>";
}
else
{
echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usrazban&amp;c=$where_data&amp;page=$page&amp;id=$id\">Pa&#x0437;&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>";
}
echo "
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "searh_id": 

  echo "
<p> B&#x0432;e&#x0434;&#x0438;&#x0442;e id:<br/><input type=\"text\" name=\"id\" maxlength=\"5\" format=\"*N\"/><br/>

<anchor>OK

<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=searh_id_ok\" method=\"post\">

<postfield name=\"id\" value=\"$(id)\"/>
</go>
</anchor><br/>-----<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></p>";
break;

case "searh_id_ok": 
If (!isset($_POST['id']) || !is_numeric($_POST['id'])){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_POST['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

$rtime=mysql_result($result,0,"rtime");
$site=mysql_result($result,0,"site");
$title=mysql_result($result,0,"title");
$link=mysql_result($result,0,"link");
$email=mysql_result($result,0,"email");
$about=mysql_result($result,0,"about");
$outs=mysql_result($result,0,"outs");
$ins=mysql_result($result,0,"ins");
$tin=mysql_result($result,0,"tin");
$cat=mysql_result($result,0,"category");
$toout=mysql_result($result,0,"tout");
$act=mysql_result($result,0,"activ");
$results=mysql_query("select * from `cool_raz` where id='$cat';");
$text=mysql_result($results,0,"text");
print "<p><small>";
$datas=date("d.m.y ", "$rtime()" );

echo "<b>id - $id</b> Ka&#x0442;e&#x0433;op&#x0438;&#x044F;: <u>$text</u><br/> ";
if ($act<>1) { echo "<b>BANNED</b><br/>"; }
echo "
&#x0414;a&#x0442;a pe&#x0433;&#x0438;c&#x0442;pa&#x0446;&#x0438;&#x0438;: $datas<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=logs&amp;id=$id\">&#x041F;poc&#x043C;o&#x0442;p &#x043B;o&#x0433;o&#x0432;</a><br/>
 $title<br/><a href=\"$link\">$link</a><br/>$about<br/>
Ce&#x0433;o&#x0434;&#x043D;&#x044F; IN: $tin ||  OUT: $toout<br/>  
&#x0417;a &#x043C;ec&#x044F;&#x0446;  IN: $ins ||  OUT:  $outs<br/>";
if ($act==1) { echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usban&amp;c=$where_data&amp;page=$page&amp;id=$id\">&#x0417;a&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>";
}
else
{
echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=usrazban&amp;c=$where_data&amp;page=$page&amp;id=$id\">Pa&#x0437;&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>";
}
echo "
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=cats\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "ob":
echo "
<p>";
print "Название:<br/><input type=\"text\" name=\"tit\"/><br/>
A&#x0434;pec:<br/><input type=\"text\" name=\"site\" value=\"http://\"/><br/>
&#x0413;&#x0434;e pa&#x0437;&#x043C;e&#x0449;a&#x0442;&#x044C;?<br/>
<select name=\"type\">
<option value=\"0\">B&#x0432;epxy &#x0433;&#x043B;a&#x0432;&#x043D;o&#x0439;</option>
<option value=\"1\">B&#x043D;&#x0438;&#x0437;y &#x0433;&#x043B;a&#x0432;&#x043D;o&#x0439;</option>
<option value=\"2\">B &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;x</option>
</select><br/>
<anchor>Добавить<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=mobi\" method=\"post\">

<postfield name=\"tit\" value=\"$(tit)\"/>
<postfield name=\"site\" value=\"$(site)\"/>
<postfield name=\"type\" value=\"$(type)\"/>
</go></anchor><br/><br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></p>";
break;

case "mobi":
$type=$_POST['type'];
If (!isset($_POST['type']) || ($_POST['type']!="0"  &&  $_POST['type']!="1" && $_POST['type']!="2")){
echo "<p>He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;o &#x043C;ec&#x0442;o pa&#x0437;&#x043C;e&#x0449;e&#x043D;&#x0438;&#x044F; pe&#x043A;&#x043B;a&#x043C;&#x044B;!<br/><a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob\">Ha&#x0437;a&#x0434;</a>

</p></card></wml>";
exit;
}

$sites=$_POST['site'];

$sites=del($sites);
$sites=trimcode($sites);
if(!$sites)
		{
echo "<p>
He y&#x043A;a&#x0437;a&#x043D; a&#x0434;pec!<br/>

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob\">Ha&#x0437;a&#x0434;</a>
</p></card></wml>";
exit;
}
$type=$_POST['type'];
$titles=$_POST['tit'];
if(!$titles)
		{
echo "<p>
He &#x0432;&#x0432;e&#x0434;e&#x043D;o &#x043D;a&#x0437;&#x0432;a&#x043D;&#x0438;e!<br/>

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob\">Ha&#x0437;a&#x0434;</a>
</p></card></wml>";
exit;
} 

$titles=trimcode($titles);

echo "<p>";


mysql_query("insert into `obiav` values(0,'$type','$titles','$sites')");
echo "<small>
Pe&#x043A;&#x043B;a&#x043C;a yc&#x043F;e&#x0448;&#x043D;o &#x0434;o&#x0431;a&#x0432;&#x043B;e&#x043D;a!<br/>-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small>
</p>";
break;

case "ob_d":

$q = mysql_query("select * from `obiav` order by `id` desc ");
$kol=mysql_num_rows($q);
if ($kol==0)
{
print "<p>
Pe&#x043A;&#x043B;a&#x043C;&#x043D;&#x044B;x cc&#x044B;&#x043B;o&#x043A; &#x043D;e o&#x0431;&#x043D;apy&#x0436;e&#x043D;o!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></p></card></wml>";
exit;
}
else {
echo "<p><small>";
while($arr=mysql_fetch_array($q)) {
$type=$arr['type'];
if ($type==0) {
$poz="&#x0432;epx &#x0433;&#x043B;a&#x0432;&#x043D;o&#x0439;";
}
elseif ($type==1) {
$poz="&#x043D;&#x0438;&#x0437; &#x0433;&#x043B;a&#x0432;&#x043D;o&#x0439; &#x0433;&#x043B;a&#x0432;&#x043D;o&#x0439;";
}
elseif ($type==2) {
$poz="&#x0432; &#x043A;a&#x0442;e&#x0433;op&#x0438;&#x044F;x";
}
echo " ".$arr['title']."   -   <b>$poz</b><br/><u> ".$arr['site']."</u> <br/>  <a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob_d_ok&amp;mid=".$arr['id']."\">&#x0423;&#x0434;a&#x043B;&#x0438;&#x0442;&#x044C;</a><br/><a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob_ed&amp;mid=".$arr['id']."\">&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;</a><br/><br/>"; }
echo "-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small></p>"; 
}
break;

case "ob_d_ok":
If (!isset($_GET['mid']) ||  !is_numeric($_GET['mid'])  ||  $_GET['mid']<0){
print "<p>
Pe&#x043A;&#x043B;a&#x043C;&#x043D;&#x044B;x cc&#x044B;&#x043B;o&#x043A; &#x043D;e o&#x0431;&#x043D;apy&#x0436;e&#x043D;o!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass&amp;mode=ob_d\">Ha&#x0437;a&#x0434;</a><br/></p></card></wml>";
exit;
}
$mid=$_GET['mid'];
$q = mysql_query("select * from `obiav` where id='$mid'");
$kol=mysql_num_rows($q);
if ($kol==0)
{
print "<p>
Pe&#x043A;&#x043B;a&#x043C;&#x043D;&#x044B;x cc&#x044B;&#x043B;o&#x043A; &#x043D;e o&#x0431;&#x043D;apy&#x0436;e&#x043D;o!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass&amp;mode=ob_d\">Ha&#x0437;a&#x0434;</a><br/></p></card></wml>";
exit;
}
mysql_query("delete from `obiav` where id='$mid' limit 1");  echo "<p><small>
Cc&#x044B;&#x043B;&#x043A;a yc&#x043F;e&#x0448;&#x043D;o y&#x0434;a&#x043B;e&#x043D;a!<br/>-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small></p>";
break;

case "ob_ed": 
If (!isset($_GET['mid']) || !is_numeric($_GET['mid'])  ||  $_GET['mid']<0){
echo "<p>
O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$mid=$_GET['mid'];
$result=mysql_query("select * from `obiav` where id='$mid';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
&#x0442;a&#x043A;o&#x0439; cc&#x044B;&#x043B;&#x043A;&#x0438; &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
print "<p>";
$sites=mysql_result($result,0,"site");
$titl=mysql_result($result,0,"title");
$type=mysql_result($result,0,"type");
echo "Ha&#x0437;&#x0432;a&#x043D;&#x0438;e:<br/>
		<input type=\"text\" name=\"titl\"  value=\"$titl\"/><br/>
		A&#x0434;pec:<br/>
		<input type=\"text\" name=\"sites\" value=\"$sites\"/><br/>
	    <anchor>&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob_ed_ok&amp;mid=$mid\" method=\"post\">
		<postfield name=\"titl\" value=\"$(titl)\"/>		
		<postfield name=\"sites\" value=\"$(sites)\"/>
		<postfield name=\"type\" value=\"$type\"/>
		</go></anchor><br/>";

echo "
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob_d\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</p>";
break;

case "ob_ed_ok": 
If (!isset($_GET['mid']) || !is_numeric($_GET['mid'])  ||  $_GET['mid']<0){
echo "<p>
O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$type=$_POST['type'];
If (!isset($_POST['type']) || ($_POST['type']!="0"  &&  $_POST['type']!="1" && $_POST['type']!="2")){
echo "<p>He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;o &#x043C;ec&#x0442;o pa&#x0437;&#x043C;e&#x0449;e&#x043D;&#x0438;&#x044F; pe&#x043A;&#x043B;a&#x043C;&#x044B;!<br/><a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob\">Ha&#x0437;a&#x0434;</a>

</p></card></wml>";
exit;
}
$mid=$_GET['mid'];
$result=mysql_query("select * from `obiav` where id='$mid';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
&#x0442;a&#x043A;o&#x0439; cc&#x044B;&#x043B;&#x043A;&#x0438; &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}

$sites=$_POST['sites'];

$sites=del($sites);
$sites=trimcode($sites);
if(!$sites)
		{
echo "<p>
He y&#x043A;a&#x0437;a&#x043D; a&#x0434;pec!<br/>

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob\">Ha&#x0437;a&#x0434;</a>
</p></card></wml>";
exit;
}

$titl=$_POST['titl'];
if(!$titl)
		{
echo "<p>
He &#x0432;&#x0432;e&#x0434;e&#x043D;o &#x043D;a&#x0437;&#x0432;a&#x043D;&#x0438;e!<br/>

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob\">Ha&#x0437;a&#x0434;</a>
</p></card></wml>";
exit;
} 

$titl=trimcode($titl);


print "<p><small>";



mysql_query("update `obiav` set title='$titl', site='$sites'  where id='$mid';");
echo "Pe&#x043A;&#x043B;a&#x043C;a yc&#x043F;e&#x0448;&#x043D;o &#x0438;&#x0437;&#x043C;e&#x043D;e&#x043D;a!<br/>
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=ob_d\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "nakr": 

  echo "
<p> B&#x0432;e&#x0434;&#x0438;&#x0442;e id:<br/><input type=\"text\" name=\"id\" maxlength=\"5\" format=\"*N\"/><br/>
 Ko&#x043B;&#x0438;&#x0447;ec&#x0442;&#x0432;o:<br/><input type=\"text\" name=\"koll\" maxlength=\"5\" format=\"*N\"/><br/>
<anchor>OK

<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=nakr_ok\" method=\"post\">

<postfield name=\"id\" value=\"$(id)\"/>
<postfield name=\"koll\" value=\"$(koll)\"/>
</go>
</anchor><br/>-----<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></p>";
break;

case "nakr_ok": 
If (!isset($_POST['id']) || !is_numeric($_POST['id'])  ||  $_POST['id']<0 ){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$id=$_POST['id'];
$result=mysql_query("select * from `cool_site` where id='$id';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D; id! <br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
If (!isset($_POST['koll']) || !is_numeric($_POST['koll'])  ||  $_POST['koll']<0 ){
echo "<p>
He&#x0432;ep&#x043D;o y&#x043A;a&#x0437;a&#x043D;o &#x043A;o&#x043B;&#x0438;&#x0447;ec&#x0442;&#x0432;o!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$koll=$_POST['koll'];
$resultss=mysql_query("select `tin`  from `cool_site` where id=$id ");
$ish=mysql_result($resultss,0,"tin");
$ok=$ish+$koll;
    mysql_query("update `cool_site` set `tin`=$ok where id=$id");
    $resultat=mysql_query("select `ins`  from `cool_site` where id=$id ");
$ishs=mysql_result($resultat,0,"ins");
$oks=$ishs+$koll;
mysql_query("update `cool_site` set `ins`=$oks where id=$id");
print "<p><small>


&#x041F;epexo&#x0434;&#x044B; &#x043D;a&#x043A;py&#x0447;e&#x043D;&#x044B;!<br/>

-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=nakr\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</small></p>";


break;

case "news_add": 

  echo "
<p> 
Ho&#x0432;oc&#x0442;&#x044C;:<br/><input type=\"text\" name=\"news\" maxlength=\"500\" /><br/>
<anchor>OK

<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news_add_ok\" method=\"post\">

<postfield name=\"news\" value=\"$(news)\"/>
</go>
</anchor><br/>-----<br/><a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a></p>";
break;

case "news_add_ok":


$news=$_POST['news'];
if(!$news)
{
echo "<p>
B&#x044B; &#x043D;e &#x0432;&#x0432;e&#x043B;&#x0438; &#x043D;o&#x0432;oc&#x0442;&#x044C;!<br/>

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news_add\">Ha&#x0437;a&#x0434;</a>
</p></card></wml>";
exit;
}
$news=trimcode($news);
echo "<p>";
$time=time();
mysql_query("insert into `news` values(0,'$time','$news')");
echo "<small>
Ho&#x0432;oc&#x0442;&#x0438; yc&#x043F;e&#x0448;&#x043D;o &#x0434;o&#x0431;a&#x0432;&#x043B;e&#x043D;&#x044B;!<br/>-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small>
</p>";
break;

case "news":

$kolich_adm=10;

$res=mysql_query("select * from `news` order by `id` desc");
$kol=mysql_num_rows($res);

If (!isset($_GET['page']) || (ceil($kol/$kolich_adm))<$_GET['page'] || !is_numeric($_GET['page'])){
$page=1;
}else $page=$HTTP_GET_VARS['page'];


echo "<p><small>";
for ($i=($page-1)*$kolich_adm;$i<($kolich_adm*$page);$i++){
If ($i>=$kol) break;
$n=mysql_result($res,$i,"id");
$title=mysql_result($res,$i,"title");
$data=date("d.m.Y ","$title()");
$time=date("H:i","$title()");
$times="$data    $time";
$mess=mysql_result($res,$i,"mess");
$ress=mysql_query("select * from `news_komm` where n='$n'");
$kols=mysql_num_rows($ress);
echo "<u><b>$times</b></u><br/>
$mess<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news_ed&amp;n=$n\">&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;</a><br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news_d&amp;n=$n\">&#x0423;&#x0434;a&#x043B;&#x0438;&#x0442;&#x044C;</a><br/>
-----<br/>";
}

If ($page>1) {  $pagep=$page-1;  echo "
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news&amp;page=$pagep\">Ha&#x0437;a&#x0434;</a><br/>"; }
If ((ceil($kol/$kolich_adm))>$page) { $page++;    echo "

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news&amp;page=$page\">&#x0414;a&#x043B;&#x044C;&#x0448;e</a><br/>";}
echo "
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small>
</p>";

break;

case "news_ed": 
If (!isset($_GET['n']) || !is_numeric($_GET['n'])  ||  $_GET['n']<0){
echo "<p>
O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$n=$_GET['n'];
$result=mysql_query("select * from `news` where id='$n';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
Ta&#x043A;o&#x0439; &#x043D;o&#x0432;oc&#x0442;&#x0438; &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
print "<p>";

$mess=mysql_result($result,0,"mess");

echo "Ho&#x0432;oc&#x0442;&#x044C;:<br/>
		<input type=\"text\" name=\"news\"  value=\"$mess\"/><br/>
	
	    <anchor>&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C;<go href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news_ed_ok&amp;n=$n\" method=\"post\">
		<postfield name=\"news\" value=\"$(news)\"/>		
		</go></anchor><br/>";

echo "
-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news\">Ha&#x0437;a&#x0434;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>";
print "</p>";
break;

case "news_ed_ok":

If (!isset($_GET['n']) || !is_numeric($_GET['n'])  ||  $_GET['n']<0){
echo "<p>
O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$n=$_GET['n'];
$result=mysql_query("select * from `news` where id='$n';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
Ta&#x043A;o&#x0439; &#x043D;o&#x0432;oc&#x0442;&#x0438; &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$news=$_POST['news'];
if(!$news)
{
echo "<p>
B&#x044B; &#x043D;e &#x0432;&#x0432;e&#x043B;&#x0438; &#x043D;o&#x0432;oc&#x0442;&#x044C;!<br/>

<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=news_add\">Ha&#x0437;a&#x0434;</a>
</p></card></wml>";
exit;
}
$news=trimcode($news);
echo "<p>";

mysql_query("update `news` set `mess`='$news' where `id`='$n' ");
echo "<small>
Ho&#x0432;oc&#x0442;&#x0438; yc&#x043F;e&#x0448;&#x043D;o &#x0438;&#x0437;&#x043C;e&#x043D;e&#x043D;&#x044B;!<br/>-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small>
</p>";
break;

case "news_d":
If (!isset($_GET['n']) || !is_numeric($_GET['n'])  ||  $_GET['n']<0){
echo "<p>
O&#x0448;&#x0438;&#x0431;&#x043A;a!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$n=$_GET['n'];
$result=mysql_query("select * from `news` where id='$n';");
$row=mysql_num_rows($result);
if ($row==0){
echo "<p>
Ta&#x043A;o&#x0439; &#x043D;o&#x0432;oc&#x0442;&#x0438; &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;!<br/>

<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
mysql_query("delete from `news` where id='$n' limit 1");  echo "<p><small>
Ho&#x0432;oc&#x0442;&#x044C; yc&#x043F;e&#x0448;&#x043D;o y&#x0434;a&#x043B;e&#x043D;a!<br/>-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small></p>";
break;

case "logs":
If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He &#x0432;&#x0432;e&#x0434;&#x0451;&#x043D; ID <br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$result=mysql_query("select * from `cool_site` where id='".$_GET['id']."' ;");
$rows=mysql_num_rows($result);
if ($rows==0) {
echo "<p>
Ta&#x043A;o&#x0433;o id &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
echo "<p><small>";

$id=$_GET['id'];
$file=file_get_contents("../logs/$id.txt");
echo "<b>id || ip || &#x0431;pay&#x0437;ep || &#x0432;pe&#x043C;&#x044F; || &#x0434;a&#x0442;a</b><br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=logs_d&amp;id=$id\">O&#x0447;&#x0438;c&#x0442;&#x0438;&#x0442;&#x044C;</a><br/>-----<br/>$file<br/>-----<br/>
<a href=\"adms.php?log=$log&amp;pass=$pass&amp;mode=logs_d&amp;id=$id\">O&#x0447;&#x0438;c&#x0442;&#x0438;&#x0442;&#x044C;</a><br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small></p>";
break;

case "logs_d":
If (!isset($_GET['id']) || !is_numeric($_GET['id'])){
echo "<p>
He &#x0432;&#x0432;e&#x0434;&#x0451;&#x043D; ID <br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
$result=mysql_query("select * from `cool_site` where id='".$_GET['id']."' ;");
$rows=mysql_num_rows($result);
if ($rows==0) {
echo "<p>
Ta&#x043A;o&#x0433;o id &#x043D;e cy&#x0449;ec&#x0442;&#x0432;ye&#x0442;!<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a>
</p></card></wml>";
exit;
}
echo "<p><small>";

$id=$_GET['id'];
@unlink("../logs/$id.txt");
echo "O&#x043F;epa&#x0446;&#x0438;&#x044F; yc&#x043F;e&#x0448;&#x043D;o &#x0437;a&#x0432;ep&#x0448;e&#x043D;a!
<br/>-----<br/>
<a href=\"index.php?log=$log&amp;pass=$pass\">A&#x0434;&#x043C;&#x0438;&#x043D;-&#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small></p>";
break;

}
echo "</card></wml>";




?>