Source for file LC_Page_Admin_Basis_Mail.php
Documentation is available at LC_Page_Admin_Basis_Mail.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2010 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_PATH . "pages/LC_Page.php");
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_Basis_Mail.php 18734 2010-06-22 08:45:33Z nanasess $
$this->tpl_subnavi = 'basis/subnavi.tpl';
$this->tpl_subno = 'mail';
$this->tpl_subtitle = 'メール設定';
$masterData = new SC_DB_MasterData_Ex();
SC_Utils_Ex::sfIsSuccess($objSess);
$this->arrMailTEMPLATE = $masterData->getMasterData("mtb_mail_template");
if (!isset ($_POST['mode'])) $_POST['mode'] = "";
if ( $_POST['mode'] == 'id_set'){
if ( SC_Utils_Ex::sfCheckNumLength( $_POST['template_id']) ){
$sql = "SELECT * FROM dtb_mailtemplate WHERE template_id = ?";
$result = $conn->getAll($sql, array($_POST['template_id']) );
$this->arrForm = $result[0];
$this->arrForm['template_id'] = $_POST['template_id'];
} elseif ( $_POST['mode'] == 'regist' && SC_Utils_Ex::sfCheckNumLength( $_POST['template_id']) ){
$this->tpl_msg = "エラーが発生しました";
$this->tpl_onload = "window.alert('メール設定が完了しました。テンプレートを選択して内容をご確認ください。');";
$objView->assignobj($this);
$objView->display(MAIN_FRAME);
$data['creator_id'] = $_SESSION['member_id'];
$sql = "SELECT * FROM dtb_mailtemplate WHERE template_id = ?";
$result = $conn->getAll($sql, array($_POST['template_id']) );
$sql_where = "template_id = ". addslashes($_POST['template_id']);
$conn->query("UPDATE dtb_mailtemplate SET template_id = ?, subject = ?,header = ?, footer = ?,creator_id = ?, update_date = now() WHERE ". $sql_where, $data);
$conn->query("INSERT INTO dtb_mailtemplate (template_id,subject,header,footer,creator_id,update_date,create_date) values ( ?,?,?,?,?,now(),now() )", $data);
$new_array["template_id"] = $array["template_id"];
$new_array["subject"] = mb_convert_kana($array["subject"] ,"KV");
$new_array["header"] = mb_convert_kana($array["header"] ,"KV");
$new_array["footer"] = mb_convert_kana($array["footer"] ,"KV");
$objErr->doFunc(array("テンプレート",'template_id'), array("EXIST_CHECK"));
$objErr->doFunc(array("メールタイトル",'subject',MTEXT_LEN,"BIG"), array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("ヘッダー",'header',LTEXT_LEN,"BIG"), array("MAX_LENGTH_CHECK"));
$objErr->doFunc(array("フッター",'footer',LTEXT_LEN,"BIG"), array("MAX_LENGTH_CHECK"));
Documentation generated on Fri, 24 Feb 2012 13:58:28 +0900 by Seasoft
|