Source for file LC_Page_Admin_Order_Mail.php
Documentation is available at LC_Page_Admin_Order_Mail.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once CLASS_EX_REALDIR . 'page_extends/admin/order/LC_Page_Admin_Order_Ex.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_Order_Mail.php 20970 2011-06-10 10:27:24Z Seasoft $
$this->tpl_mainpage = 'order/mail.tpl';
$this->tpl_mainno = 'order';
$this->tpl_subno = 'index';
$this->tpl_maintitle = '受注管理';
$this->tpl_subtitle = '受注管理';
$masterData = new SC_DB_MasterData_Ex();
$this->arrMAILTEMPLATE = $masterData->getMasterData("mtb_mail_template");
$this->httpCacheControl('nocache');
$objFormParam = new SC_FormParam_Ex();
$objFormParam->setParam($_POST);
$objFormParam->convParam();
$this->tpl_order_id = $objFormParam->getValue('order_id');
$this->arrSearchHidden = $objFormParam->getSearchArray();
switch($this->getMode()) {
$sendStatus = $this->doSend($objFormParam);
if($sendStatus === true){
SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH);
$this->arrErr = $sendStatus;
$status = $this->confirm($objFormParam);
$this->arrHidden = $objFormParam->getHashArray();
if(SC_Utils_Ex::sfIsInt($objFormParam->getValue('order_id'))) {
$this->arrMailHistory = $this->getMailHistory($objFormParam->getValue('order_id'));
$this->arrForm = $objFormParam->getFormParamList();
$objQuery = & SC_Query_Ex::getSingletonInstance();
$col = "send_date, subject, template_id, send_id";
$objQuery->setOrder("send_date DESC");
return $objQuery->select($col, "dtb_mail_history", $where, array($order_id));
* @param SC_FormParam $objFormParam
function doSend(&$objFormParam){
$arrErr = $objFormParam->checkerror();
if (count($arrErr) == 0) {
$objMail = new SC_Helper_Mail_Ex();
$objSendMail = $objMail->sfSendOrderMail($objFormParam->getValue('order_id'),
$objFormParam->getValue('template_id'),
$objFormParam->getValue('subject'),
$objFormParam->getValue('header'),
$objFormParam->getValue('footer'));
// TODO $SC_SendMail から送信がちゃんと出来たか確認できたら素敵。
* @param SC_FormParam $objFormParam
$arrErr = $objFormParam->checkerror();
if (count($arrErr) == 0) {
$objMail = new SC_Helper_Mail_Ex();
$objSendMail = $objMail->sfSendOrderMail(
$objFormParam->getValue('order_id'),
$objFormParam->getValue('template_id'),
$objFormParam->getValue('subject'),
$objFormParam->getValue('header'),
$objFormParam->getValue('footer'), false);
$this->tpl_subject = $objFormParam->getValue('subject');
$this->tpl_body = mb_convert_encoding( $objSendMail->body, CHAR_CODE, 'auto' );
$this->tpl_to = $objSendMail->tpl_to;
$this->tpl_mainpage = 'order/mail_confirm.tpl';
* @param SC_FormParam $objFormParam
if(SC_Utils_Ex::sfIsInt($objFormParam->getValue('template_id'))) {
$objQuery = & SC_Query_Ex::getSingletonInstance();
$where = "template_id = ?";
$mailTemplates = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($objFormParam->getValue('template_id')));
foreach(array('subject','header','footer') as $key){
$objFormParam->setValue($key,$mailTemplates[$key]);
$objFormParam->setParam($mailTemplates[0]);
foreach(array('subject','header','footer') as $key){
$objFormParam->setValue($key,"");
* @param SC_FormParam $objFormParam
parent::lfInitParam($objFormParam);
$objFormParam->addParam("オーダーID", "order_id", INT_LEN, 'n', array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
$objFormParam->addParam("テンプレート", "template_id", INT_LEN, 'n', array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
$objFormParam->addParam("メールタイトル", 'subject', STEXT_LEN, 'KVa', array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK"));
$objFormParam->addParam("ヘッダー", 'header', LTEXT_LEN, 'KVa', array("MAX_LENGTH_CHECK", "SPTAB_CHECK"));
$objFormParam->addParam("フッター", 'footer', LTEXT_LEN, 'KVa', array("MAX_LENGTH_CHECK", "SPTAB_CHECK"));
Documentation generated on Fri, 24 Feb 2012 14:01:27 +0900 by Seasoft
|