mysql_query("update {$group_table} set board_num=board_num+" . $num[board_num] . " where no='{$board_move}'"); } else { $temp = mysql_query("select name from {$admin_table} where group_no='{$group_no}'"); while ($data = mysql_fetch_array($temp)) { $table_name = $data[name]; $tmpData = mysql_query("select file_name1, file_name2 from {$t_board}" . "_{$table_name}") or die("An occured error when deleted attached file(s)"); while ($data = mysql_fetch_array($tmpData)) { if ($data[file_name1]) { @z_unlink("./" . $data[file_name1]); } if ($data[file_name2]) { @z_unlink("./" . $data[file_name2]); } } if (is_dir("./data/" . $table_name)) { zRmDir("./data/" . $table_name); } mysql_query("delete from {$admin_table} where no='{$no}'") or Error("An occured error from admin table when deleted board"); mysql_query("drop table {$t_board}" . "_{$table_name}") or Error("An occured error when deleted board's main table"); mysql_query("drop table {$t_division}" . "_{$table_name}") or Error("An occured error when deleted board's division table"); mysql_query("drop table {$t_comment}" . "_{$table_name}") or Error("An occured error when deleted board's comment"); mysql_query("drop table {$t_category}" . "_{$table_name}") or Error("An occured error when deleted board's category table"); mysql_query("update {$group_table} set board_num=board_num-1 where no='{$group_no}'"); } @mysql_query("delete from {$admin_table} where group_no='{$group_no}'"); } // 그룹삭제 @mysql_query("delete from {$group_table} where no='{$group_no}'") or Error("An occured error when deleted group"); movepage("{$PHP_SELF}"); } elseif ($exec == "modify_member_join_ok") { mysql_query("update {$group_table} set join_level='{$join_level}',use_icq='{$use_icq}',use_aol='{$use_aol}',use_msn='{$use_msn}', \n\t\tuse_jumin='{$use_jumin}',use_comment='{$use_comment}',use_job='{$use_job}',use_hobby='{$use_hobby}', \n\t\tuse_home_address='{$use_home_address}',use_home_tel='{$use_home_tel}',use_office_address='{$use_office_address}',\n\t\tuse_office_tel='{$use_office_tel}',use_handphone='{$use_handphone}',use_mailing='{$use_mailing}', \n\t\tuse_birth='{$use_birth}',use_picture='{$use_picture}' where no='{$group_no}'") or error(mysql_error());
function zRmDir($path) { $directory = dir($path); while ($entry = $directory->read()) { if ($entry != "." && $entry != "..") { if (Is_Dir($path . "/" . $entry)) { zRmDir($path . "/" . $entry); } else { @UnLink($path . "/" . $entry); } } } $directory->close(); @RmDir($path); }
} if (!$u_password) { Error("Please input Password"); } if (!$u_dbname) { Error("please input DB name"); } mysql_close($connect); $connect = @mysql_connect($u_hostname, $u_userid, $u_password) or error(mysql_error()); @mysql_select_db($u_dbname) or Error(mysql_error()); $result = mysql_query("show table status from {$u_dbname} like 'zetyx%'", $connect) or error(mysql_error()); while ($data = mysql_fetch_array($result)) { mysql_query("drop table {$data['Name']}"); } zRmDir("./data"); zRmDir("./icon"); z_unlink("./config.php"); error("The ZeroBoard in your server was deleted", "install.php"); exit; } ?> <table border=0 cellspacing=0 cellpadding=10 bgcolor=eeeeee width=100% height=100%> <form name=uninstall method=post onsubmit="return confirm('Are you want to remove?')"> <input type=hidden name=exec value="uninstall"> <input type=hidden name=uninstall value="ok"> <tr> <td valign=top style=line-height:160% align=center> <br> <font size=4 color=black><b>Delete ZeroBoard</b><br></font>