Файл: bot.php
Строк: 105
<?
session_start();
error_reporting(0);
set_time_limit(99999);
list($msec,$sec)=explode(chr(32),microtime());
$headtime=$sec+$msec;
include_once "header.php";
echo $div["im"];
echo "<img src="/logo.gif" alt=""/><br/>";
echo $div["end"];
echo $div["okcent"];
echo $div["gif"];
$q = @mysql_query("select * from `config` where `id`='1' limit 1;");
$conf_bd = @mysql_fetch_array($q);
$passadmin = $conf_bd['passadmin'];
if ($_SESSION['passw']!=$passadmin)
{
$title="Пашол нах!n";
echo $div["ten"];
echo "Иди на хуй хакер Ебаный!!!";
echo $div["end"];
include ("footers.php");
exit();
}
echo $div["ten"];
echo "<b>Бот проверки партнёров</b><br/>";
echo $div["end"];
$q = mysql_query("select * from uzvers;");
while ($field=mysql_fetch_array($q))
{ $n = $field['id']; }
switch ($op){
case false:
default:
echo "Последний ID: [ $n ]<br/>";
$q = mysql_query("select * from uzvers;");
$reg=mysql_num_rows($q);
echo'Всего: '.$reg;
echo "<form action="bot.php?op=skan&".session_name()."=".session_id()."" method="post">";
echo "Начинаем с: <br/>";
echo "<input class="ibutton" name="nachalo" maxlength="12" value="2" title="Text"/><br/>";
echo "Заканчуем: <br/>";
echo "<input class="ibutton" name="konec" maxlength="20" value="$n" title="Text"/><br/><br/>";
echo "<input class="ibutton" type="submit" value=" Go! "/>";
echo "</form>";
echo"<a href='bot.php?op=truncate&".session_name()."=".session_id()."'>Чистка и оптимизация таблицы</a>";
echo $div["ten"];
echo "<a href="admin/index.php?".session_name()."=".session_id()."">К админке</a><br/>";
echo $div["end"];
break;
case skan:
if($_POST['nachalo']&&$_POST['konec'])
{
$q = mysql_query("select * from uzvers;");
$reg=mysql_num_rows($q);
$nachalo = intval($_POST['nachalo']);
$konec = intval($_POST['konec']);
if($nachalo < 2 ){echo"ERROR!";
include_once ("footergl.php");
exit;}
if($konec > $n){echo"ERROR!";
include_once ("footergl.php");
exit;}
$konec = $konec + 1;
for($i=$nachalo; $i<$konec; $i++)
{
$qi = mysql_query("select * from `uzvers` where `id`='$i'");
$row=mysql_fetch_array($qi);
$site=$row['site'];
$email=$row['email'];
$file = file($row['site']);
if(!$file)
{
//mysql_query("insert into botskan set `id_uzers`='$i',`status`='0',`sait`='$site',`mail`='$email',`date`='$date'") or die ('Error!');
}
else{
$file = implode("", $file);
if(stripos($file,'jibu.ru/click.php?id='.$i.''))
{
// @mysql_query("UPDATE `uzvers` SET `ban`='0' where `id`='$i'");
}
else
{
@mysql_query("UPDATE `uzvers` SET `ban`='1' where `id`='$i'");
mysql_query("insert into botskan set `id_uzers`='$i',`status`='1', `sait`='$site',`mail`='$email',`date`='$date'") or die ('Error!');
}
}
}
$q = mysql_query("select * from botskan where `status`='1'");
$id_col=mysql_num_rows($q);
echo"Готово<br/>";
echo "Забаненых:".$id_col."<br/>";
$e=mysql_query("SELECT * FROM `botskan`");
while($link=mysql_fetch_array($e))
{
echo $div["ten"];
echo $link['id_uzers']." <a href="$link[sait]"><font color='black'><b>$link[sait]</b></font></a><br/>n";
echo"Мыло: ".$link['mail']."<br/>";
echo $div["end"];
}
echo"<a href='bot.php?".session_name()."=".session_id()."'>Назад</a>";
}
else{
echo "ERROR!";
}
break;
case 'truncate':
if(mysql_query("TRUNCATE `botskan`")){echo"Таблица почищена";}
else{echo'ERROR!';}
if(mysql_query("OPTIMIZE TABLE `botskan`")){echo" и оптимизиромана<br/>";}
else{echo'ERROR!';}
echo"<a href='bot.php?".session_name()."=".session_id()."'>Назад</a>";
break;
}
list($msec,$sec)=explode(chr(32),microtime());
echo "<br/>".round(($sec+$msec)-$headtime,4)." сек.";
include_once ("footergl.php");
?>