alert('error');history.go(-1);"; exit(); } include("../../class/connect.php"); include("../../class/db_sql.php"); $link=db_connect(); $empire=new mysqlquery(); $r=$empire->fetch1("select title,url,adid from phome_enewsad where adid='$adid'"); if(empty($r[adid])) { echo""; exit(); } $url=$r[url]; $empire->query("update phome_enewsad set onclick=onclick+1 where adid='$adid'"); $IP = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"]; $IP = ($user_IP) ? $user_IP : $_SERVER["REMOTE_ADDR"]; $showtime=date("Y-m-d H:i:s"); $empire->query("insert into ad_stat (class,ad_id,title,ip,date) values('click',{$adid},'{$r[title]}','{$IP}','{$showtime}');"); db_close(); $empire=null; Header("Location:$url"); ?>