Файл: X-MAN/upload/count.php
Строк: 37
<?
    include ("config/bd.php");
    function code($url,$code)
    {
        $key = "hGqb381".$code;
        $hash = md5($url.$key);
        $hash = substr($hash, 0, 5);
        return $hash;
    }
    function err($str)
    {
    echo("<html>
    <head>
    <title>Error $str</title>
    <style>
    BODY {background-color:#323232; color:#efefef; margin-top:50px;}
    H1 {margin:auto;}
    </style>
    </head>
    <body>
    <div align='center'>
    <h1>Ошибка: $str</h1>
    </div>
    </body>
    </html>");
    }
    $id = (int)$_GET['id'];
    
    $result = mysql_query("SELECT active,count,bann,url FROM    url WHERE id='$id'",$db); 
    $myrow = mysql_fetch_array($result);
    $url = $myrow['url'];
    $hash1 = code($url,'');
    $hash3 = code($url,'count');
    $hash = (string)$_GET['hash'];
    if ($hash != $hash3) {err("#104035<br>Некорректный хэш."); exit('');}
?>
<html>
<head>
<title>head</title>
<script language="javascript">
function go()
{
    document.getElementsByTagName("span")[0].innerHTML = sec;
    sec -= 1;
    if (sec == 0)
    {
        top.location.href='transfer.php?id=<? echo $id; ?>&hash=<? echo $hash1; ?>';
    }
    setTimeout("go()",1000);
}
var sec = 7;
</script>
<style>
body {background-color: #232323; margin-left:45%; margin-top: 5px; color: white; font-family: Century;}
</style>
</head>
<body onLoad="go()">
<h1>
<span>
7
</span>
 sec.
</h1>
</body>
</html>