📄 maintain_event.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('event', 'event_maintain', $_SESSION['connection_permission'])) { include_once($language_path . 'common.lang.php'); include_once($language_path . 'maintain_event.lang.php'); if (isset($_POST['update_events'])) { if (!empty($_POST['event_ids'])) { foreach ($_POST['event_ids'] as $key => $i): $query = " UPDATE " . $db->prefix . "_plugin_event SET webpage_id=" . $_POST['event_webpage_id'][$i] ; if (!empty($_POST['event_archived'][$i])) { $query .= ", event_archived=1"; } else { $query .= ", event_archived=NULL"; } $query .= " WHERE event_id=" . $i; $result = $db->Execute($query); endforeach; } } $query = " SELECT e.event_id, e.event_title, UNIX_TIMESTAMP(e.event_create_datetime) as event_create_datetime, e.event_archived, e.webpage_id FROM " . $db->prefix . "_plugin_event e WHERE e.webspace_id=" . $output_webspace['webspace_id'] . " AND " ; $query .= "1=1 ORDER BY e.event_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'] . "&event_id=" . $i['event_id']; endforeach; $body->set('events', $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 + -