<?
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일

if (!defined("_GNUBOARD_")) exit;
if (!defined("_BOARD_DELETE_")) exit; // 禁止单独访问此页面 

// $tmp_bo_table 需要传递 $bo_table 
if (!$tmp_bo_table) { return; }

// 为了复制不能删除单独一个论坛
//$row = sql_fetch(" select count(*) as cnt from $g4[board_table] ");
//if ($row[cnt] <= 1) { return; }

// 删除论坛设定
sql_query(" delete from $g4[board_table] where bo_table = '$tmp_bo_table' ");

// 最新主题删除
sql_query(" delete from $g4[board_new_table] where bo_table = '$tmp_bo_table' ");

// 收藏数据删除
sql_query(" delete from $g4[scrap_table] where bo_table = '$tmp_bo_table' ");

// 附件删除
sql_query(" delete from $g4[board_file_table] where bo_table = '$tmp_bo_table' ");

// 删除数据表 DROP
sql_query(" drop table $g4[write_prefix]$tmp_bo_table ", FALSE);

// 删除论坛目录
rm_rf("$g4[path]/data/file/$tmp_bo_table");
?>