Source for file LC_Page_Admin_Mail_TemplateInput.php
Documentation is available at LC_Page_Admin_Mail_TemplateInput.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.
$this->tpl_subnavi = 'mail/subnavi.tpl';
$this->tpl_subno = "template";
$masterData = new SC_DB_MasterData_Ex();
$this->arrMagazineType = $masterData->getMasterData("mtb_magazine_type");
// arrMagazineTypAll ではないため, unset する.
unset ($this->arrMagazineType['3']);
SC_Utils_Ex::sfIsSuccess($objSess);
if (!isset ($_REQUEST['template_id'])) $_REQUEST['template_id'] = "";
if ( $_REQUEST['template_id'] ){
if (!isset ($_GET['mode'])) $_GET['mode'] = "";
if (!isset ($_POST['mode'])) $_POST['mode'] = "";
if ( $_GET['mode'] == 'edit' && SC_Utils_Ex::sfCheckNumLength($_GET['template_id'])=== true ){
$sql = "SELECT * FROM dtb_mailmaga_template WHERE template_id = ? AND del_flg = 0";
$result = $conn->getAll($sql, array($_GET['template_id']));
$this->arrForm = $result[0];
} elseif ( $_POST['mode'] == 'regist' ) {
$this->lfRegistData( $this->arrForm, $_POST['template_id']);
$this->reload(array("mode" => "complete"));
} elseif ( $_GET['mode'] == 'complete' ) {
$objView->assignobj($this);
$objView->display(MAIN_FRAME);
$sqlval['subject'] = $arrVal['subject'];
$sqlval['mail_method'] = $arrVal['mail_method'];
$sqlval['creator_id'] = $_SESSION['member_id'];
$sqlval['body'] = $arrVal['body'];
$sqlval['update_date'] = "now()";
$query->update("dtb_mailmaga_template", $sqlval, "template_id=". $id );
$sqlval['create_date'] = "now()";
$query->insert("dtb_mailmaga_template", $sqlval);
// 文字列の変換(mb_convert_kanaの変換オプション)
foreach ($arrFlag as $key=> $line) {
$data[$key] = mb_convert_kana($data[$key], $line);
$objErr->doFunc(array("メール形式", "mail_method"), array("EXIST_CHECK", "ALNUM_CHECK"));
$objErr->doFunc(array("Subject", "subject", STEXT_LEN), array("EXIST_CHECK","MAX_LENGTH_CHECK"));
$objErr->doFunc(array("本文", 'body', LLTEXT_LEN), array("EXIST_CHECK","MAX_LENGTH_CHECK"));
Documentation generated on Fri, 24 Feb 2012 13:58:50 +0900 by Seasoft
|