skin_wrappers.php
来自「sabreipb 2.1.6 utf-8中文版本!」· PHP 代码 · 共 147 行
PHP
147 行
<?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-3-6| > $Revision: 23 $| > $Author: matt $+---------------------------------------------------------------------------|| > Help Control functions| > Module written by Matt Mecham| > Date started: 2nd April 2002|| > Module Version Number: 1.0.0| > DBA Checked: Tue 25th May 2004+--------------------------------------------------------------------------*/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_skin_wrappers { var $base_url; var $template = ""; var $functions = ""; /** * Section title name * * @var string */ var $perm_main = "lookandfeel"; /** * Section title name * * @var string */ var $perm_child = "wrap"; function auto_run() { //----------------------------------------- // Get the libraries //----------------------------------------- require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' ); $this->functions = new admin_template_functions(); $this->functions->ipsclass =& $this->ipsclass; //----------------------------------------- // Kill globals - globals bad, Homer good. //----------------------------------------- $tmp_in = array_merge( $_GET, $_POST, $_COOKIE ); foreach ( $tmp_in as $k => $v ) { unset($$k); } //----------------------------------------- switch($this->ipsclass->input['code']) { case 'floateditor': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->functions->build_editor_area_floated(1); break; case 'edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->do_form('edit'); break; case 'doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->save_wrapper('edit'); break; case 'export': $this->export(); default: print "No action chosen"; exit(); break; //case 'wrapper': // $this->list_wrappers(); // break; //case 'add': // $this->add_splash(); // break; //case 'doadd': // $this->save_wrapper('add'); // break; //case 'remove': // $this->remove(); // break; } } //----------------------------------------- // ADD / EDIT WRAPPERS //----------------------------------------- function save_wrapper( $type='add' ) { //----------------------------------------- // INIT //----------------------------------------- $id = intval( $this->ipsclass->input['id'] ); //----------------------------------------- // Type? //----------------------------------------- if ($type == 'edit') { if ($this->ipsclass->input['id'] == "") { $this->ipsclass->admin->error("You must specify an existing wrapper ID, go back and try again"); } } if ($this->ipsclass->input['txtwrapper'] == "") { $this->ipsclass->admin->error("妯℃澘涓嶈兘涓虹┖锛
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?