<?
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");

$id=$_GET["id"];
$op=$_GET["op"];
$blogtypeid=$_GET["blogtypeid"];
$page=$_GET["page"];
if ($page==""){
$page=1;
}

if ($op=="del"){
	 $sql="update {$tablepre}ftblog_type set totalnum=totalnum-1 where totalnum>0 and id=".$blogtypeid;
	 mysql_query($sql);
     $sql="delete from {$tablepre}ftblog where id=".$id;
	 mysql_query($sql);
   }
elseif ($op=="top"){
	 $sql="update {$tablepre}ftblog set blogtop=".$_GET["v"]." where id=".$id;
	 mysql_query($sql);
   }
elseif ($op=="tj"){
	 $sql="update {$tablepre}ftblog set blogtj=".$_GET["t"]." where id=".$id;
	 mysql_query($sql);
}
header("Location:userblog.php?page=".$page);
?>