profilefields.php
来自「sabreipb 2.1.6 utf-8中文版本!」· PHP 代码 · 共 152 行
PHP
152 行
<?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 $+---------------------------------------------------------------------------|| > Custom profile field functions| > Module written by Matt Mecham| > Date started: 24th June 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_profilefields { var $base_url; var $func; /** * Section title name * * @var string */ var $perm_main = "content"; /** * Section title name * * @var string */ var $perm_child = "field"; function auto_run() { //----------------------------------------- // Kill globals - globals bad, Homer good. //----------------------------------------- $tmp_in = array_merge( $_GET, $_POST, $_COOKIE ); foreach ( $tmp_in as $k => $v ) { unset($$k); } //----------------------------------------- // get class //----------------------------------------- require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); $this->func = new custom_fields( $DB ); //----------------------------------------- // switch-a-magoo //----------------------------------------- switch($this->ipsclass->input['code']) { case 'add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->main_form('add'); break; case 'doadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->main_save('add'); break; case 'edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->main_form('edit'); break; case 'doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->main_save('edit'); break; case 'delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->delete_form(); break; case 'dodelete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->do_delete(); break; default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->main_screen(); break; } } //----------------------------------------- // // Rebuild cache // //----------------------------------------- function rebuild_cache() { $this->ipsclass->cache['profilefields'] = array(); $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); $this->ipsclass->DB->simple_exec(); while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['profilefields'][ $r['pf_id'] ] = $r; } $this->ipsclass->update_cache( array( 'name' => 'profilefields', 'array' => 1, 'deletefirst' => 1 ) ); } //----------------------------------------- // // Delete a group // //----------------------------------------- function delete_form() { if ($this->ipsclass->input['id'] == "") { $this->ipsclass->admin->error("鏃犳硶纭
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?