Просмотр файла comm/inc/del_comm.php

Размер файла: 1.53Kb
<?php
###########################################
###       Сообщества для соц. сети      ###
###       Автор: Неизвестен             ###
###    Доделка и переделка: WapStyle    ###
###          НЕ ДЛЯ ПРОДАЖИ             ###
### НЕ ДЛЯ БЕСПЛАТНОГО РАСПРОСТРАНЕНИЯ  ###
###########################################

$id = intval($_GET['id']);

if(isset($_GET['act']) && $_GET['act']=='delete'){
	mysql_query("DELETE FROM `community_board` WHERE `id_comm` = '".$id."'"); //мини чат
	mysql_query("DELETE FROM `community_comm` WHERE `id_comm` = '".$id."'"); //сообщества
	mysql_query("DELETE FROM `community_user_incomm` WHERE `cid` = '".$id."'"); //пользователи
	mysql_query("DELETE FROM `comm_ban` WHERE `id_comm` = '".$id."'"); //баны
	mysql_query("DELETE FROM `comm_forum_f` WHERE `id_comm` = '".$id."'"); //форум
	mysql_query("DELETE FROM `comm_forum_p` WHERE `id_comm` = '".$id."'");
	mysql_query("DELETE FROM `comm_forum_r` WHERE `id_comm` = '".$id."'");
	mysql_query("DELETE FROM `comm_forum_t` WHERE `id_comm` = '".$id."'");
	mysql_query("DELETE FROM `comm_forum_zakl` WHERE `id_comm` = '".$id."'");
	mysql_query("OPTIMIZE TABLE `community_board` , `community_comm` , `community_user_incomm` , `comm_ban` , `comm_forum_f` , `comm_forum_files` , `comm_forum_files_rating` , `comm_forum_p` , `comm_forum_r` , `comm_forum_t` , `comm_forum_zakl`");
	msg("Сообщество успешно удалено");
	}
?>