📄 maintain_forum.php
字号:
<?php// -----------------------------------------------------------------------// This file is part of AROUNDMe// // Copyright (C) 2003-2007 Barnraiser// http://www.barnraiser.org/// info@barnraiser.org// // This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// // This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// // You should have received a copy of the GNU General Public License// along with this program; see the file COPYING.txt. If not, see// <http://www.gnu.org/licenses/>// -----------------------------------------------------------------------if(isset($_SESSION['connection_permission']) && checkPermission('forum', 'forum_maintain', $_SESSION['connection_permission'])) { include_once($language_path . 'common.lang.php'); include_once($language_path . 'maintain_forum.lang.php'); if (isset($_POST['update_subjects'])) { if (!empty($_POST['subject_ids'])) { foreach ($_POST['subject_ids'] as $key => $i): $query = " UPDATE " . $db->prefix . "_plugin_forum SET webpage_id=" . $_POST['subject_webpage_id'][$i] ; if (!empty($_POST['subject_archived'][$i])) { $query .= ", subject_archived=1"; } else { $query .= ", subject_archived=NULL"; } $query .= " WHERE subject_id=" . $i; $result = $db->Execute($query); endforeach; } } $query = " SELECT s.subject_id, s.subject_title, UNIX_TIMESTAMP(s.subject_create_datetime) as subject_create_datetime, s.subject_archived, s.webpage_id FROM " . $db->prefix . "_plugin_forum s WHERE s.webspace_id=" . $output_webspace['webspace_id'] . " AND " ; $query .= "1=1 ORDER BY s.subject_create_datetime"; if (isset($attributes['limit'])) { $result = $db->Execute($query, (int) $attributes['limit']); } else { $result = $db->Execute($query); } if (!empty($result)) { $link = "index.php?ws=" . $output_webspace['webspace_id']; foreach($result as $key => $i): $result[$key]['link'] = $link . "&wp=" . $i['webpage_id'] . "&subject_id=" . $i['subject_id']; endforeach; $body->set('subjects', $result); } $query = " SELECT * FROM " . $db->prefix . "_webpage WHERE webspace_id=" . $output_webspace['webspace_id'] ; $output_pages = $db->Execute($query); if (!empty($output_pages)) { $body->set('pages', $output_pages); }}else { // no permission to be here header("Location: index.php?ws=" . $_REQUEST['ws']); exit;}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -