Просмотр файла index.php

Размер файла: 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 '

&#1040;&#1076;&#1088;&#1077;&#1089; &#1057;&#1072;&#1081;&#1090;&#1072;:
<br/>
<input name="test_link" type="text" maxlength="100" value="http://"/>
<br/>
<anchor title="ok">&#1055;&#1088;&#1086;&#1074;&#1077;&#1088;&#1080;&#1090;&#1100;
	<go href="index.php?cmd=test" method="post">
	<postfield name="test_link" value="$(test_link)"/>
	</go>
	</anchor>
	<br/>
	<br/>
<a href="add_banner.php">&#1055;&#1086;&#1074;&#1077;&#1089;&#1080;&#1090;&#1100; &#1041;&#1072;&#1085;&#1085;&#1077;&#1088;</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('
&#1053;&#1077;&#1074;&#1077;&#1088;&#1085;&#1099;&#1081; &#1040;&#1076;&#1088;&#1077;&#1089; &#1080;&#1083;&#1080; &#1089;&#1072;&#1081;&#1090; &#1085;&#1077; &#1085;&#1072;&#1081;&#1076;&#1077;&#1085;!
<br/><anchor>&#1053;&#1072;&#1079;&#1072;&#1076;<prev/></anchor><br/><a href="http://mega-wap.com.ru/">[&#169;mega-wap.com.ru]</a>
</p>
<p align="center">
<small>&#169; 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 "&#1057;&#1072;&#1081;&#1090; &#1085;&#1077; &#1085;&#1072;&#1081;&#1076;&#1077;&#1085; &#1080;&#1083;&#1080; &#1041;&#1072;&#1085;&#1085;&#1077;&#1088;&#1085;&#1099;&#1077; &#1087;&#1086;&#1082;&#1072;&#1079;&#1099; &#1076;&#1083;&#1103; &#1074;&#1072;&#1096;&#1077;&#1075;&#1086; &#1089;&#1072;&#1081;&#1090;&#1072; &#1079;&#1072;&#1082;&#1086;&#1085;&#1095;&#1080;&#1083;&#1080;&#1089;&#1100;!<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 '
&#1041;&#1072;&#1085;&#1085;&#1077;&#1088; &#1087;&#1086;&#1082;&#1072;&#1079;&#1072;&#1085;: '.@$total.' &#1088;&#1072;&#1079;,<br/> &#1054;&#1089;&#1090;&#1072;&#1083;&#1086;&#1089;&#1100; &#1087;&#1086;&#1082;&#1072;&#1079;&#1086;&#1074;: '.@$remain.'
<br/><br/>
<a href="'.$link.'"><img src="'.$banner_link.'" alt="'.$alt.'" /></a>
<br/>
&#1042;&#1072;&#1096; &#1073;&#1072;&#1085;&#1085;&#1077;&#1088; &#1073;&#1091;&#1076;&#1077;&#1090; &#1087;&#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1090;&#1100;&#1089;&#1103; &#1095;&#1077;&#1088;&#1077;&#1079; '.$time_remain.' &#1087;&#1086;&#1082;&#1072;&#1079;&#1086;&#1074;
';

}
}

include "footer.php";

?>