emaillogs.php

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

PHP
181
字号
<?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-28 22:59:40 +0100 (Fri, 28 Oct 2005) $|   > $Revision: 71 $|   > $Author: bfarber $+---------------------------------------------------------------------------||   > Email Logs Stuff|   > Module written by Matt Mecham|   > Date started: 11nd September 2002||	> 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_emaillogs{	var $base_url;	var $colours = array();	/**	* Section title name	*	* @var	string	*/	var $perm_main = "admin";		/**	* Section title name	*	* @var	string	*/	var $perm_child = "emaillog";	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->cache_add_query( 'emaillogs_view_email', 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%" );				$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['email_subject'] );							$row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'LONG' );				$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(													"<strong>From:</strong> {$row['name']} &lt;{$row['from_email_address']}&gt;													<br /><strong>To:</strong> {$row['to_name']} &lt;{$row['to_email_address']}&gt;													<br /><strong>Sent:</strong> {$row['email_date']}													<br /><strong>From IP:</strong> {$row['from_ip_address']}													<br /><strong>Subject:</strong> {$row['email_subject']}													<hr>													<br />{$row['email_content']}												    "										 )      );										 		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();				$this->ipsclass->admin->print_popup();	}			//-----------------------------------------	// Remove row(s)	//-----------------------------------------		function remove_entries()	{		if ( $this->ipsclass->input['type'] == 'all' )		{			$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'email_logs' ) );		}		else		{			$ids = array();					foreach ($this->ipsclass->input as $k => $v)			{				if ( preg_match( "/^id_(\d+)$/", $k, $match ) )				{					if ($this->ipsclass->input[ $match[0] ])					{						$ids[] = $match[1];					}				}			}						//-----------------------------------------						if ( count($ids) < 1 )			{				$this->ipsclass->admin->error("鎮ㄦ病鏈夐

⌨️ 快捷键说明

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