File size: 1.71Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";
include_once"../template/db.php";
$themes = mysql_query("SELECT * FROM `theme` WHERE `author` = '$log' ORDER BY `id` DESC");
$theme = mysql_fetch_array($themes);
$act = isset($_GET['act']) ? $_GET['act'] : '';
switch($act){
default:
$id = (int)$id;
$psts = mysql_result(mysql_query("SELECT COUNT(*) FROM `posts` WHERE `forums` = '$id'"),0);
mysql_query("UPDATE `forums` SET `posts`='$psts' WHERE `id` = '$id'");
$thms = mysql_result(mysql_query("SELECT COUNT(*) FROM `theme` WHERE `forums` = '$id'"),0);
mysql_query("UPDATE `forums` SET `theme`='$thms' WHERE `id` = '$id'");
$udrs = mysql_result(mysql_query("SELECT COUNT(*) FROM `under` WHERE `forum` = '$id'"),0);
mysql_query("UPDATE `forums` SET `under`='$udrs' WHERE `id` = '$id'");
header ("Location: ".$_SERVER['HTTP_REFERER'].""); exit;
break;
case('under'):
$id = (int)$id;
$pst = mysql_result(mysql_query("SELECT COUNT(*) FROM `posts` WHERE `under`='$id'"),0);
$thm = mysql_result(mysql_query("SELECT COUNT(*) FROM `theme` WHERE `under` = '$id'"),0);
mysql_query("UPDATE `under` SET `posts`='$pst' WHERE `id` = '$id'");
mysql_query("UPDATE `under` SET `theme`='$thm' WHERE `id` = '$id'");
header ("Location: ".$_SERVER['HTTP_REFERER'].""); exit;
break;}
include_once"../themes/$config_themes/foot.php";
?>