Размер файла: 3.67Kb
<?
/*
#=====================================================#
# (c) 2006 Banner Rotate v.1 #
#=====================================================#
# WAP site http://mega-wap.com.ru #
# WEB site http://art-tech.net.ru #
#=====================================================#
# Programmed By Demonaz #
# [email protected] #
#=====================================================#
*/
include "header.php";
if (empty($cmd)){$cmd = false;
print '
Адрес Сайта:
<br/>
<input name="test_link" type="text" maxlength="100" value="http://"/>
<br/>
<anchor title="ok">Проверить
<go href="index.php?cmd=test" method="post">
<postfield name="test_link" value="$(test_link)"/>
</go>
</anchor>
<br/>
<br/>
<a href="add_banner.php">Повесить Баннер</a>
<br/>
';
}
if ($cmd == "test"){
$test_link = str_replace("'", "", $test_link);
$test_link = htmlspecialchars(stripslashes(trim($test_link)));
$test_link = "http://".str_replace("http://", "", $test_link);
$openurl = @fopen ("$test_link", "r")or die('
Неверный Адрес или сайт не найден!
<br/><anchor>Назад<prev/></anchor><br/><a href="http://mega-wap.com.ru/">[©mega-wap.com.ru]</a>
</p>
<p align="center">
<small>© mega-wap.com.ru</small>
</p>
</card>
</wml>
');
include "./config.php";
$test_query = "SELECT * FROM user WHERE link='$test_link' LIMIT 1";
if (!$test_query) {
}$res = mysql_query($test_query) or die(mysql_error());
$number = mysql_num_rows($res);if ($number == 0) {
}else{while ($row=mysql_fetch_array($res)){
$link = $row['link'];
$banner_link = $row['banner_link'];
$alt = $row['alt'];
$all = $row['all'];
$total = $row['total'];
$time = $row['time'];
}}
if (empty($link)){print "Сайт не найден или Баннерные показы для вашего сайта закончились!<br/>";}else{
$remain = @$all-@$total;
$test_query = "SELECT * FROM user WHERE time<'$time'";
$time_remain = 0;
if (!$test_query) {
}$res = mysql_query($test_query) or die(mysql_error());
$number = mysql_num_rows($res);if ($number == 0) {
}else{while ($row=mysql_fetch_array($res)){
$all2 = $row['all'];
$total2 = $row['total'];
$time_remain = $time_remain + $all2 - $total2;
}}
print '
Баннер показан: '.@$total.' раз,<br/> Осталось показов: '.@$remain.'
<br/><br/>
<a href="'.$link.'"><img src="'.$banner_link.'" alt="'.$alt.'" /></a>
<br/>
Ваш баннер будет показываться через '.$time_remain.' показов
';
}
}
include "footer.php";
?>