<?php /// Copyright (c) 2004-2015, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) $IV = array('GET' => array('item' => array('string'))); require ROOT . '/library/preprocessor.php'; requireStrictRoute(); requirePrivilege('group.creators'); $items = explode(",", $_GET['item']); if (in_array(getServiceSetting("defaultBlogId", 1), $items)) { $result = _t('대표 블로그는 삭제할 수 없습니다.'); Respond::PrintResult(array('error' => -1, 'result' => $result)); } foreach ($items as $item) { $result = removeBlog($item); if ($result !== true) { Respond::PrintResult(array('error' => -1, 'result' => $result)); } } Respond::PrintResult(array('error' => 0));
</head> <body> <?php /** * @author 刘贺 * @copyright 2014(C) Bingyan Studio All Rights Reserved * @date 2015-11-28 * @since Version 1.0.0 * @modified if you modified this file, please sign up you name. * **/ require 'connectSql.php'; if (!isset($_POST['edit_blog'])) { echo "Error!"; exit(0); } $id = $_POST['edit_blog']; $db = connect(); //$query = 'DELETE from blogs where blog_id = '.$id; //$db->query($query); if (removeBlog($db, $id)) { echo "删除成功<br>"; } else { echo "Remove Failed!<br>"; } $db->close(); ?> <a href="houtai.php">返回后台首页</a> </body> </html>