<?php
/*
 * member/mail/Load.class.php
 * 
 * CopyRight(C) 2010 Shopformer Development Team. All Right Reserved
 * URL: http://sourceforge.jp/projects/shopformer/
 * 
 * 
 * Mail: m_nakashima@users.sourceforge.jp
 * Auther: Masanori Nakashima
 * Last Update: 2010-06-18
 */
require_once( dirname(dirname(__FILE__))
.DIRECTORY_SEPARATOR.'PackageConfig.class.php');
class member_mail_Load extends system_login_ModuleBase {
	var $errors				= array();
	function member_mail_Load() {
		array_push($this->require_module_array,'database2.Connect');
	}
	function execute( & $request ) {
		$dbo					= $request->getAttribute( 'dbo' );
		$mail_id			= stripslashes( $_GET['magid'] );
		$mail_object		= spider_Controller::createObject('member_DaoMemberMail');
		if ( strlen(trim($mail_id)) == 0 ) {
			$request->addLocaledError('member.error.mail.requireid',SPIDER_LOG_LEVEL_FATAL,array(''));
		} else if( !$dbo->loadById( $mail_object, $mail_id, true ) ){
			$request->addLocaledError('member.error.mail.notfound',SPIDER_LOG_LEVEL_FATAL,array(''));
		} else if( $mail_object->status_flag == 255 ){
			$request->addLocaledError('member.error.mail.notfound',SPIDER_LOG_LEVEL_FATAL,array(''));
		} else {
		}
		$request->setAttribute( 'member.mail.mail_object', $mail_object );
	}
}
?>