warnlogs.php

来自「sabreipb 2.1.6 utf-8中文版本!」· PHP 代码 · 共 232 行

PHP
232
字号
<?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 $+---------------------------------------------------------------------------||   > Warn Log functions|   > Module written by Matt Mecham|   > Date started: 4th June 2003||	> 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_warnlogs {	var $base_url;		/**	* Section title name	*	* @var	string	*/	var $perm_main = "admin";		/**	* Section title name	*	* @var	string	*/	var $perm_child = "warnlog";		function auto_run()	{		//-----------------------------------------		// 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 'view':				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );				$this->view();				break;							case 'viewcontact':				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );				$this->view_contact();				break;							case 'viewnote':				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );				$this->view_note();				break;							case 'remove':				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );				$this->remove();				break;											//-----------------------------------------			default:				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );				$this->list_current();				break;		}			}		//-----------------------------------------	// View NOTE in da pop up innit	//-----------------------------------------		function view_note()	{		if ($this->ipsclass->input['id'] == "")		{			$this->ipsclass->admin->error("Could not resolve the email ID, please try again");		}				//-----------------------------------------        // Load and config the post parser        //-----------------------------------------                require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );        $this->parser                      = new parse_bbcode();        $this->parser->ipsclass            = $this->ipsclass;        $this->parser->allow_update_caches = 1;                $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']);				$id = intval($this->ipsclass->input['id']);				$this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) );		$this->ipsclass->DB->cache_exec_query();				if ( ! $row = $this->ipsclass->DB->fetch_row() )		{			$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");		}				$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "100%" );				$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cont );				$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "璀﹀憡璁板綍" );			$row['date']  = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );				$this->parser->parse_html    = 0;		$this->parser->parse_nl2br   = 1;		$this->parser->parse_smilies = 1;		$this->parser->parse_bbcode  = 1;				$text = $this->parser->pre_display_parse( $this->parser->pre_db_parse($cont[1]) );				$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(													"<strong>From:</strong> {$row['p_name']}													<br /><strong>To:</strong> {$row['a_name']}													<br /><strong>Sent:</strong> {$row['date']}													<hr>													<br />$text												    "										 )      );										 		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();				$this->ipsclass->admin->print_popup();			}			//-----------------------------------------	// View contact in da pop up innit	//-----------------------------------------		function view_contact()	{		if ($this->ipsclass->input['id'] == "")		{			$this->ipsclass->admin->error("Could not resolve the email ID, please try again");		}				$id = intval($this->ipsclass->input['id']);				$this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) );		$this->ipsclass->DB->cache_exec_query();				if ( ! $row = $this->ipsclass->DB->fetch_row() )		{			$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");		}				$type = $row['wlog_contact'] == 'pm' ? "PM" : "EMAIL";				$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "100%" );				$subject = preg_match( "#<subject>(.+?)</subject>#is", $row['wlog_contact_content'], $subj );		$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_contact_content'], $cont );				$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $type.": ".$subj[1] );							$row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );				$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(													"<strong>From:</strong> {$row['p_name']}													<br /><strong>To:</strong> {$row['a_name']}													<br /><strong>Sent:</strong> {$row['date']}													<br /><strong>Subject:</strong> $subj[1]													<hr>													<br />$cont[1]												    "										 )      );										 		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();				$this->ipsclass->admin->print_popup();			}					//-----------------------------------------	// Remove archived files	//-----------------------------------------		function view()	{		$start = $this->ipsclass->input['st'] ? $this->ipsclass->input['st'] : 0;				$this->ipsclass->html .= ""; // removed js popwin				$this->ipsclass->admin->page_detail = "鏌ョ湅鏌愪細鍛樼殑鍏ㄩ儴璀﹀憡璁板綍";		$this->ipsclass->admin->page_title  = "璀﹀憡璁板綍绠$悊鍣

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?