Размер файла: 1.7Kb
<?php
header('Pragma: no-cache');
if (empty($v)) {
header("Content-type:text/vnd.wap.wml;charset=utf-8"); }
else {
header("Content-type:text/html; charset=utf-8");
}
include("config.php");
$i=intval($i);
$sd="qwertyuiopadfghjklzxcvbnm0123456789";
$size_sd=strlen($sd)-1;
$in="";
for($ab=0;$ab<32;$ab++){
$in.=$sd[rand(0,$size_sd)];}
$ipss = getenv('REMOTE_ADDR');
$q=mysql_query("select * from `cat_pro` where id='$i' and ip='$ipss';");
$rows=mysql_num_rows($q);
if($rows=="0"){@mysql_query("insert into `cat_pro` values('$i','$datecat','$ipss','$in')");
$catip=$ipss.".555";
@mysql_query("insert into `cat_pro` values('$i','$datecat','$catip','$in')");}
if (empty($v)) {
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">';
echo "<wml><card title='Подождите...' ontimer='index.php?id=$i&in=$in'><timer value='1'/>";
echo "<p align=\"left\"><small>";
echo "Подождите или кликните <a href=\"index.php?id=$i&in=$in\">сюда</a>!";
} else {echo '
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head><link rel="stylesheet" href="style.css" type="text/css"/>
<title>Подождите...</title></head><body>';
echo "<div class=\"wich\" style=\"text-align: left\">";
echo "Подождите или кликните <a href=\"index.php?id=$i&in=$in&v=html\">сюда</a>!";
echo "</div>";}
if (empty($v)) {
echo '</small></p></card></wml>';}
else {echo "</body></html>";}
@mysql_close($mysql);
?>