calendars.php
来自「sabreipb 2.1.6 utf-8中文版本!」· PHP 代码 · 共 144 行
PHP
144 行
<?php/*+--------------------------------------------------------------------------| Invision Power Board v2.1.5| =============================================| by Matthew Mecham| (c) 2001 - 2005 Invision Power Services, Inc.| | =============================================| Web: | Time: Wed, 01 Mar 2006 19:11:27 GMT| Release: | Licence Info: +---------------------------------------------------------------------------| > $Date: 2006-01-31 22:47:20 +0000 (Tue, 31 Jan 2006) $| > $Revision: 131 $| > $Author: bfarber $+---------------------------------------------------------------------------|| > Components Functions| > Module written by Matt Mecham| > Date started: 12th April 2005 (13:09)+--------------------------------------------------------------------------*/# CALENDAR SORTING!if ( ! defined( 'IN_ACP' ) ){ print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit();}class ad_calendars{ # Globals var $ipsclass; var $perm_main = 'content'; var $perm_child = 'calendars'; /*-------------------------------------------------------------------------*/ // Main handler /*-------------------------------------------------------------------------*/ function auto_run() { $this->html = $this->ipsclass->acp_load_template('cp_skin_management'); switch($this->ipsclass->input['code']) { case 'calendar_list': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->calendar_list(); break; case 'calendar_delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->calendar_delete(); break; case 'calendar_add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->calendar_form('add'); break; case 'calendar_add_do': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->calendar_save('add'); break; case 'calendar_edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->calendar_form('edit'); break; case 'calendar_edit_do': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->calendar_save('edit'); break; case 'calendar_move': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->calendar_move(); break; case 'calendar_rebuildcache': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); $this->calendar_rebuildcache( 1 ); break; case 'calendar_rss_cache': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); $this->calendar_rss_cache( intval($this->ipsclass->input['cal_id']), 1 ); break; default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->calendar_list(); break; } } /*-------------------------------------------------------------------------*/ // Components: Delete /*-------------------------------------------------------------------------*/ function calendar_delete() { //-------------------------------------------- // INIT //-------------------------------------------- $cal_id = intval($this->ipsclass->input['cal_id']); //-------------------------------------------- // Checks... //-------------------------------------------- if ( ! $cal_id ) { $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->components_list(); return; } //-------------------------------------------- // Delete calendar events //-------------------------------------------- $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_events', 'where' => 'event_calendar_id='.$cal_id ) ); //-------------------------------------------- // Delete calendar //-------------------------------------------- $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) ); //-------------------------------------------- // Recache and re-RSS //-------------------------------------------- $this->calendar_rebuildcache(); $this->calendar_rss_cache(); $this->ipsclass->main_msg = "鏃ュ巻宸插垹闄
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?