header ("Content-Type: text/html; charset=utf-8"); include("ATDu89~m_DGv/common/connection.php"); $conn = get_conn(); $limit_time = 600; $mtimes = date("U"); $mtimes2 = $mtimes - $limit_time; $taudioCate = (int)$_GET['taudioCate']; $gory = (int)$_GET['gory']; $product = (int)$_GET['product']; mysql_query("replace onsite (ip,mtimes) values ('$REMOTE_ADDR','$mtimes')") or die (mysql_error()); mysql_query("delete from onsite where mtimes<='$mtimes2'") or die (mysql_error()); $result_onsite = mysql_query("select count(*) from onsite") or die (mysql_error()); $onsite = mysql_result($result_onsite,0,"count(*)"); $today = date("Y-m-d"); $sql = "insert ignore index_pv (pv_date,pv_count) values ('".$today."','1')"; get_rs($conn,$sql); if (mysql_affected_rows() < 1) { $sql = "update index_pv set pv_count = pv_count + 1 where pv_date = '".$today."'"; get_rs($conn,$sql); } $sql_updateproduct = "update products set ProductClick = ProductClick + 1 where Id = ".(int)$product ; $rs_updateproduct = get_rs($conn, $sql_updateproduct); $founddata="0"; $sql_product = " Select a.* , e.Name ProdCateName,e.Id ProdCateId,e.Pic3 ProdCatePic3,e.Pic4 ProdCatePic4,e.Pic5 ProdCatePic5,e.Warranty ProdCateWarranty,e.Brand ProdCateBrand, b.Name ProductClaName, b.View ProductClaView,b.Id ProductClaId "; $sql_product .= " from products a, prodcategory b , prodcate e "; $sql_product .= " where a.Hidden='N' and a.PId=e.Id and b.Id=a.PPId and a.Id=" .(int)$product ; if($act=="List" && $gory<>""){ $sql_product .= " and a.PPId=" .(int)$gory ; } $rs_product_detail = get_rs($conn, $sql_product); $row_product_detail = mysql_fetch_object($rs_product_detail); if (mysql_num_rows($rs_product_detail )>0) $founddata="1"; $sql_find = " Select a.* , b.Name ProductClaName "; $sql_find .= " from products a, prodcategory b "; $sql_find .= " where a.Hidden='N' and b.Id=a.PPId"; if($act=="List" && $gory<>""){ $sql_find .= " and a.PPId=" .(int)$gory ; } $sql_find .= " order by a.Sortid desc"; $rs_find = get_rs($conn, $sql_find); for ($i=1;$i<=mysql_num_rows($rs_find);$i++){ $find_obj = mysql_fetch_object($rs_find); $prev[0]=$now[0]; $now[0]=$find_obj->Id; if($find_obj->Id==$Id){ $find_obj = mysql_fetch_row($rs_find); break; } } if ($founddata<>"1") { echo ""; exit(); } ?>