<?php
define('IN_SYS',TRUE);
header("Content-Type: text/html;charset=utf-8");
require '../../config.php';
require '../../setup.php';
require '../../lib/system_SqlIn.php';
?>
<?php
	$id=intval($_REQUEST["aid"]);
	if($id=="" || !is_numeric($id)){
		OutErrorBack("Error, please return!");
	}else{
		$db = mysql_query("select id,type,title,attachments,aCount,adate from ".DB_TablePre."content where id = '$id'");
		$rs = mysql_fetch_array($db);
		if($rs){
			mysql_query("update ".DB_TablePre."content set aCount = aCount + 1 where id = '$id'");
			$title = $rs["title"];
			$Files = $rs["attachments"];
			$Linkcount = $rs["aCount"]+1;
			//echo $pic;
		}
		header("location: ".$Files."");
		exit();
	}
?>