Location: PHPKode > projects > infoboard > infoboard/_req/ublock.php
<?
session_start();
include("../data/connect.php");
include("../data/_uconfig.php");
include("../_class/lang.php");
include("../_class/lang_".$iscon["getlang"].".php");

include("../_class/_func.php");
include("../_class/class.global.php");
include("../_class/class.req.php");

$infoboard = new req_infoboard();
$infoboard->checksess();
$infoboard->adminsess();

$infoboard->isconnect();

if(isset($_GET["action"])) $action=$_GET["action"]; else $action="";

		  switch($action){
		  case"block";
		  $cid=$_GET["cid"];
		  $mail=$_GET["mail"];
		  if(!$infoboard->checktb("_mail", "_block", "_mail", $mail)){
			   $infoboard->tbinsert("_block", "_mail", "'".$mail."'");
		  }
		  if($infoboard->tbupdate("_user", "_active='0'", "_cid", $cid)){
			   refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
		  }
		  break;
		  case"unblock";
		  $name=$_GET["n"];
		  $mail=$_GET["mail"];
		  if(mysql_db_query($infoboard->dbname, "delete from _block  where _mail='".$mail."'")){
			   if($infoboard->tbupdate("_user", "_active='1'", "_name", $name)){
				    refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
			   }
		  }
		  break;
		  case"delblock";
		  $mail=$_GET["mail"];
		  if(mysql_db_query($infoboard->dbname, "delete from _block  where _mail='".$mail."'")){
			   refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
		  }
		  break;
		  default;
		  }
refurl("", $_SERVER['HTTP_REFERER']);


?>
Return current item: infoboard