emailerror.php

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

PHP
136
字号
<?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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|   > $Revision: 23 $
|   > $Author: matt $
+---------------------------------------------------------------------------
|
|   > Email Error Logs Stuff
|   > Module written by Matt Mecham
|   > Date started: 7th April 2004
|
|	> Module Version Number: 1.0.0
|   > DBA Checked: Mon 24th 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_emailerror
{
	/**
	* Section title name
	*
	* @var	string
	*/
	var $perm_main = "admin";
	
	/**
	* Section title name
	*
	* @var	string
	*/
	var $perm_child = "emailerror";
	
	function auto_run()
	{
		//-----------------------------------------
		// Kill globals - globals bad, Homer good.
		//-----------------------------------------
		
		$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
		
		foreach ( $tmp_in as $k => $v )
		{
			unset($$k);
		}
		
		//-----------------------------------------
		// Make sure we're a root admin, or else!
		//-----------------------------------------
		
		if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
		{
			//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
		}
		
		switch($this->ipsclass->input['code'])
		{
			case 'list':
				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
				$this->list_current();
				break;
				
			case 'remove':
				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
				$this->remove_entries();
				break;
				
		    case 'viewemail':
		    	$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
		    	$this->view_email();
		    	break;
				
				
			//-----------------------------------------
			default:
				$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
				$this->list_current();
				break;
		}
		
	}
	
	//-----------------------------------------
	// View a single email.
	//-----------------------------------------
	
	function view_email()
	{
		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->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id=$id" ) );
		$this->ipsclass->DB->simple_exec();
		
		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%" );
		
		$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['mlog_subject'] );
	
		$row['mlog_date']    = $this->ipsclass->admin->get_date( $row['mlog_date'], 'LONG' );
		$row['mlog_content'] = nl2br($row['mlog_content']);
		
		$row['mlog_msg']        = $row['mlog_msg']        ? $row['mlog_msg']        : '<em>娌℃湁淇℃伅</em>';
		$row['mlog_code']       = $row['mlog_code']       ? $row['mlog_code']       : '<em>娌℃湁淇℃伅</em>';
		$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : '<em>娌℃湁淇℃伅</em>';
		
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
																			  "<strong>鍙戜欢浜

⌨️ 快捷键说明

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