Файл: region_clean/fo/download.php
Строк: 53
<?
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "../start.php";
require_once "../sid.php";
header('Cache-Control: no-store, no-cache, must-revalidate');
if ($ver == "wml")header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "../inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "../version.php";
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="change" title="Wap обменник">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="../css/$css.css"/>
<title>Wap обменник</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">n";
}
$mid = intval($mid);
header('files/'.$array['type'].'/'.$array['url']);
echo '<div class="c4">Wap обменник</div><br/>';
$mid = intval($_GET['mid']);
$query = mysql_query("SELECT `type`, `url` FROM `fo_files` WHERE `id` = '$mid'");
if (mysql_affected_rows() > 0)
{
$array = mysql_fetch_array($query);
$name = substr($array['url'], 10, strlen($array['url']));
$file = @fopen('all.dat', 'r');
$all = intval(@fgets($file));
@fclose($file);
$file = @fopen('all.dat', 'w');
@fwrite($file,"".$all + "1"."");
@fclose($file);
mysql_query("UPDATE `fo_files` SET `clicks` = `clicks` + 1, `ltime` = '".time()."' WHERE `id` = '$mid'");
header("Location: files/".$array['type']."/".$array['url']."");
}
else
{
echo 'Файла не существует!<br/>';
}
echo "<div class = 'd1'><a href="../enter.php?$ses">Прихожая</a></div>n";
include_once "../foot.php";
exit;
?>