<?
function ban_unban($account){
require("includes/ctlcode.php");
require("config.php");
$check_gm = $db->Execute("Select ctlcode from character where ctlcode='$ctlcode' and accountid=?",array($account));
$check_gm = $check_gm->fetchrow();
if($check_gm[0] == $ctlcode){
Echo ' <span class="style1">|</span> <a href="index.php?op=user&option=gm">Ban/UnBan</a>';
}
}
function gm($ban_unban){
require("config.php");
$character_check = $db->Execute("Select name from character where name=?",array($character));
$character_check = $character_check->numrows();
if(empty($character)){
show_error("$warning_start Some Fields Where Left Blank! $warning_end");
}
elseif($character_check <= 0){
show_error("$warning_start Character $character Not Exist! $warning_end");
} else {
if($_POST['metod']=='ban'){
$met = "Baned";
$script = "Update character set ctlcode='1' where name=?";
}
elseif($_POST['metod']=='unban'){
$met = "UnBaned";
$script = "Update character set ctlcode='0' where name=?";
}
$exc_script = $db->Execute($script,array($character));
show_error("$ok_start $character SuccessFully $met !$ok_end");
}
}
function check_gm($account){
require("includes/ctlcode.php");
require("config.php");
$check_gm = $db->Execute("Select ctlcode from character where ctlcode='$ctlcode' and accountid=?",array($account));
$check_gm = $check_gm->fetchrow();
if($check_gm[0] != $ctlcode){jump('index.php?op=user');}
}
?>