Размер файла: 1.03Kb
<?php
include_once "../config.php";
include_once "../inc/inc.php";
include_once "../inc/func.php";
include_once "../inc/user.php";
if ($dostup != '1') {
echo "ПАШШШШШШШОЛНАХУЙ";
include_once "../themes/$theme/foot.php";
exit;
} else {
$razd = (int)$razd;
// $vsego = mysql_num_rows(mysql_query("SELECT * FROM ".$pref."tema WHERE in_rard=".$razd));
$query = "SELECT * FROM " . $pref . "tema WHERE in_razd=" . $razd;
$result = mysql_query($query);
// for ($i=0; $i<$vsego; $i++){
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
// echo $result['tema_nomer'];
$zapros = 'DROP TABLE ' . $pref . 'tema_random_' . $line['tema_nomer'];
mysql_query($zapros);
// echo $line['tema_nomer'];
}
$query = 'DELETE FROM ' . $pref . 'forum WHERE id=' . $razd;
$result = mysql_query($query);
$query = 'DELETE FROM ' . $pref . 'tema WHERE in_razd=' . $razd;
$result = mysql_query($query);
header("Location: forum.php");
}
?>