<?php
include "../CheckUser.php";
include("../comm/db_sql.php");
include("../comm/config.php");
include("../comm/connect.php");
include("../comm/Function.php");

$id= $_GET['id'];
$sub= $_GET['sub'];
$proid= $_GET['proid'];

$news_query=new mysql_db();
if($sub=="recommend" and $id!=="" and $proid!==""){
$news_query->update_value="Recommend='$id'";
$news_query->table=$db."product_info";;  //表名
$news_query->table_mod="2"; 
$news_query->table_where="Id=$proid";
$news_query->query();
		echo ("<script language=javascript>alert('更新成功!');window.history.go(-1);</script>");
}else
if($sub=="TOP" and $id!=="" and $proid!==""){
$news_query->update_value="TOP='$id'";
$news_query->table=$db."product_info";;  //表名
$news_query->table_mod="2"; 
$news_query->table_where="Id=$proid";
$news_query->query();
		echo ("<script language=javascript>alert('更新成功!');window.history.go(-1);</script>");
}else if($sub=="Hot" and $id!=="" and $proid!=="")
{
$news_query->update_value="Hot='$id'";
$news_query->table=$db."product_info";;  //表名
$news_query->table_mod="2"; 
$news_query->table_where="Id=$proid";
$news_query->query();
		echo ("<script language=javascript>alert('更新成功!');window.history.go(-1);</script>");
}
else{
		echo ("<script language=javascript>alert('提交失败。unsuccessful!');window.history.go(-1);</script>");
}
$news_query=NULL;
?>