index.php
来自「sabreipb 2.1.6 utf-8中文版本!」· PHP 代码 · 共 212 行
PHP
212 行
<?php/*+--------------------------------------------------------------------------| Invision Power Board v2.1.6| =============================================| by Matthew Mecham| (c) 2001 - 2005 Invision Power Services, Inc.| http://www.invisionpower.com| =============================================| Web: http://www.invisionboard.com| Time: Thu, 04 May 2006 17:39:49 GMT| Release: b415613eeb952a2741ff6d53e0266428| Licence Info: http://www.invisionboard.com/?license+---------------------------------------------------------------------------| > $Date: 2006-01-11 22:47:48 +0000 (Wed, 11 Jan 2006) $| > $Revision: 122 $| > $Author: bfarber $+---------------------------------------------------------------------------|| > Admin "welcome" screen functions| > Module written by Matt Mecham| > Date started: 1st march 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_index{ # Global var $ipsclass; var $html; var $mysql_version = ""; /** * Section title name * * @var string */ var $perm_main = "admin"; /** * Section title name * * @var string */ var $perm_child = "splash"; function auto_run() { //----------------------------------------- // INIT //----------------------------------------- $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $content = array(); $thiscontent = ""; $upgrade_history = array(); $latest_version = array(); $reg_end = ""; $sm_install = 0; $lock_file = 0; if ( @file_exists( ROOT_PATH . 'install/index.php' ) ) { $sm_install = 1; } if ( @file_exists( ROOT_PATH . 'install/install.lock' ) ) { $lock_file = 1; } //----------------------------------------- // Kill globals - globals bad, Homer good. //----------------------------------------- $tmp_in = array_merge( $_GET, $_POST, $_COOKIE ); foreach ( $tmp_in as $k => $v ) { unset($$k); } //----------------------------------------- // LOAD HTML //----------------------------------------- $this->html = $this->ipsclass->acp_load_template('cp_skin_index'); //----------------------------------------- // continue... //----------------------------------------- $this->ipsclass->admin->page_title = "娆㈣繋璁块棶 Invision Power Board 绠$悊闈㈡澘"; $this->ipsclass->admin->page_detail = ""; //----------------------------------------- // PHP INFO? //----------------------------------------- if ( $this->ipsclass->input['phpinfo'] ) { @ob_start(); phpinfo(); $parsed = @ob_get_contents(); @ob_end_clean(); preg_match( "#<body>(.*)</body>#is" , $parsed, $match1 ); $php_body = $match1[1]; # PREVENT WRAP: Most cookies $php_body = str_replace( "; " , ";<br />" , $php_body ); # PREVENT WRAP: Very long string cookies $php_body = str_replace( "%3B", "<br />" , $php_body ); # PREVENT WRAP: Serialized array string cookies $php_body = str_replace( ";i:", ";<br />i:" , $php_body ); $php_style = "<style type='text/css'> .center {text-align: center;} .center table { margin-left: auto; margin-right: auto; text-align: left; } .center th { text-align: center; } h1 {font-size: 150%;} h2 {font-size: 125%;} .p {text-align: left;} .e {background-color: #ccccff; font-weight: bold;} .h {background-color: #9999cc; font-weight: bold;} .v {background-color: #cccccc; white-space: normal;} </style>\n"; $this->ipsclass->html = $php_style . $php_body; $this->ipsclass->admin->output(); } //----------------------------------------- // Get MySQL & PHP Version //----------------------------------------- $this->ipsclass->DB->sql_get_version(); //----------------------------------------- // Upgrade history? //----------------------------------------- $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(0, 5) ) ); $this->ipsclass->DB->simple_exec(); while( $r = $this->ipsclass->DB->fetch_row() ) { if ( $r['upgrade_version_id'] > $latest_version['upgrade_version_id'] ) { $latest_version = $r; } $upgrade_history[] = $r; } //----------------------------------------- // Resetting security image? //----------------------------------------- if ( $_REQUEST['reset_security_flag'] == 1 AND $_REQUEST['new_build'] ) { $new_build = intval( $_REQUEST['new_build'] ); $new_reason = trim( substr( $_REQUEST['new_reason'], 0, 1 ) ); $new_version = $latest_version['upgrade_version_id'].'.'.$new_build.'.'.$new_reason; $this->ipsclass->DB->do_update( 'upgrade_history', array( 'upgrade_notes' => $new_version ), 'upgrade_version_id='.$latest_version['upgrade_version_id'] ); $latest_version['upgrade_notes'] = $new_version; } //----------------------------------------- // Got real version number? //----------------------------------------- $this->ipsclass->version = 'v'.$latest_version['upgrade_version_human']; $this->ipsclass->vn_full = $latest_version['upgrade_notes'] ? $latest_version['upgrade_notes'] : $this->ipsclass->vn_full; $content['update_img'] = $this->html->update_img( base64_encode( $this->ipsclass->vn_full.'|^|'.$this->ipsclass->vars['board_url'] ) ); //----------------------------------------- // Licensed? //----------------------------------------- $content['reg_html'] = $this->html->acp_licensed(); //----------------------------------------- // Notepad //----------------------------------------- if ( $this->ipsclass->input['save'] == 1 ) { $this->ipsclass->DB->do_update( 'cache_store', array( 'cs_value' => $this->ipsclass->txt_stripslashes($_POST['notes']) ), "cs_key='adminnotes'" ); } $text = "鎮ㄥ彲浠ュ湪杩欓噷涓鸿嚜宸卞拰鍏朵粬绠$悊鍛樹繚瀛樹竴浜涚瑪璁版垨璧勬枡銆
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?