View file linkexchanger/admin/multicheck.php

File size: 2.87Kb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>LinkExchanger ADMIN AREA</title>
</head>

<?
include "../config.php";
include "menu.php";
echo "<body bgcolor=$bgcolor>";

if ($_GET[id]) {
echo "<center><table cellpadding=3 width=500>";
echo "<tr><td colspan=4><font face=$title_face size=$title_size color=$title_color><b>Результаты проверки ссылок</b></font><hr size=1></td></tr>";
echo "<tr><td align=center><font face=$font_face size=$font_size color=$font_color><b>Nick</b></font></td><td align=center><font face=$font_face size=$font_size color=$font_color><b>Категория</b></font></td><td align=center><font face=$font_face size=$font_size color=$font_color><b>Ссылка</b></font></td><td align=center><font face=$font_face size=$font_size color=$font_color><b>Результат</b></font></td></tr>";
$check_date = date("d-m-Y H:i:s");
$base = file("../base.dat");
for ($i=0;$i<count($base);$i++) {
$a = explode("|", $base[$i]);
if ($a[0] == $_GET[id]) {
$where = file("$a[7]");
$where = implode($where, "\r\n");
if (strpos($where, "$myhome")) {
$check_result = YES;
$marker = time();
$days_code = 86400*$days_to_check;
$check_next = $marker+$days_code;
$file=file("../base.dat");
$fp=fopen("../base.dat","w");
flock($fp, LOCK_EX);
for($k=0;$k<count($file);$k++) {
$b = explode("|", $file[$k]);
if ($b[0]!==$_GET[id]) {fwrite($fp, $file[$k]);} else {
fputs($fp, "$b[0]|$b[1]|$b[2]|$b[3]|$b[4]|$b[5]|$b[6]|$b[7]|$check_result|$check_next|$b[10]|$check_date\n");
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>$b[1]</font></td><td><font face=$font_face size=$font_size color=$font_color>$b[4]</font></td><td><font face=$font_face size=$font_size color=$font_color><a href=$b[7] target=_blank>$b[7]</a></font></td><td align=center><font face=$font_face size=$font_size color=$font_color>$check_result</font></td></tr>";
} 
}
flock($fp, LOCK_UN);
fclose($fp);
} else {$check_result = NO;
$marker = time();
$days_code = 86400*$days_to_check;
$check_next = $marker+$days_code;
$file=file("../base.dat"); 
$fp=fopen("../base.dat","w");
flock($fp, LOCK_EX);
for($k=0;$k<count($file);$k++) {
$b = explode("|", $file[$k]);
if ($b[0]!==$_GET[id]) {fwrite($fp, $file[$k]);} else {
fputs($fp, "$b[0]|$b[1]|$b[2]|$b[3]|$b[4]|$b[5]|$b[6]|$b[7]|$check_result|$check_next|$b[10]|$check_date\n");
echo "<tr><td><font face=$wrn_face size=$wrn_size color=$wrn_color>$b[1]</font></td><td><font face=$wrn_face size=$wrn_size color=$wrn_color>$b[4]</font></td><td><font face=$wrn_face size=$wrn_size color=$wrn_color><a href=$b[7] target=_blank>$b[7]</a></font></td><td align=center><font face=$wrn_face size=$wrn_size color=$wrn_color>$check_result</font></td></tr>";
} 
}
flock($fp, LOCK_UN);
fclose($fp);
}
} // end if
} // end for
echo "<tr><td colspan=4><hr size=1></td></tr>";
echo "</table></center>";
} // end if

?>
</body>
</html>