<?
include_once("../inc/config.php");
include_once("../inc/publicfun.php");
include_once("../inc/ftbbsdbclass.php");
include_once("../conn.php");
include_once("../admin/check_master.php");
include_once("../admin/check_admin_qs.php");

$flag=$_GET["flag"];
$id=$_GET["id"];
$tb=$_GET["tb"];
if ($flag==3){
  $sql="delete from {$tablepre}".$tb." where id=".$id;
}
elseif ($flag==1){
  $sql="update {$tablepre}".$tb." set flag=".$flag." where id=".$id;
}
elseif ($flag==2){
  $sql="update {$tablepre}".$tb." set flag=".$flag." where id=".$id;
}
else{
  $sql="update {$tablepre}".$tb." set flag=".$flag." where id=".$id;
}
mysql_query($sql);
if ($tb="links"){
include_once("../admin/makejs.php");
linkjs();
}
$db->close(); 
header("Location:".$_SERVER["HTTP_REFERER"]);
?>
