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

$id=$_GET["id"];
$pic=$_GET["pic"];
$sign=$_GET["sign"];
$page=$_GET["page"];
if ($page==""){
$page=1;
}
if ($sign==""){
   if (file_exists("../".$pic)){
   unlink("../".$pic);
   } 
   $sql="delete from {$tablepre}ftbbs_upload where id=".$id;
   mysql_query($sql);
}
else{
   $sql="update {$tablepre}ftbbs_upload set sign=".$sign." where id=".$id;
   mysql_query($sql);
}
$db->close();
delcache("../cache/ftbbshome.txt");
delcache("../cache/default_list.txt");
header("Location:".$_SERVER["HTTP_REFERER"]);
?>