public function setPrevURL() { // TODO SiteSession で実装した方が良さげ /* @var $objCartSess CartSession */ $objCartSess = Application::alias('eccube.cart_session'); $objCartSess->setPrevURL($_SERVER['REQUEST_URI']); }
/** * カートの情報を取得する * * @param Eccube\CartSession $objCart カートセッション管理クラス * @return array カートデータ配列 */ public function lfGetCartData(CartSession &$objCart) { $arrCartKeys = $objCart->getKeys(); foreach ($arrCartKeys as $cart_key) { // 購入金額合計 $products_total += $objCart->getAllProductsTotal($cart_key); // 合計数量 $total_quantity += $objCart->getTotalQuantity($cart_key); // 送料無料チェック if (!$this->isMultiple && !$this->hasDownload) { $is_deliv_free = $objCart->isDelivFree($cart_key); } } $arrCartList = array(); $arrCartList['ProductsTotal'] = $products_total; $arrCartList['TotalQuantity'] = $total_quantity; // 店舗情報の取得 $arrInfo = Application::alias('eccube.helper.db')->getBasisData(); $arrCartList['free_rule'] = $arrInfo['free_rule']; // 送料無料までの金額 if ($is_deliv_free) { $arrCartList['deliv_free'] = 0; } else { $deliv_free = $arrInfo['free_rule'] - $products_total; $arrCartList['deliv_free'] = $deliv_free; } return $arrCartList; }
/** * Page のアクション. * * @return void */ public function action() { $arrParam = $_REQUEST; list($response_outer, $arrResponse) = Operation::doApiAction($arrParam); Operation::sendApiResponse('xml', $response_outer, $arrResponse); Application::alias('eccube.response')->actionExit(); }
/** * オペレーション名に対応した認証の設定情報を取得する * Configが無い場合は、APIデフォルトを取得する * * @param string $operation_name * @return array 設定配列 */ public function getApiConfig($operation_name) { // 設定優先度 DB > plugin default > base $objQuery = Application::alias('eccube.query'); $where = 'operation_name Like ? AND del_flg = 0 AND enable = 1'; $arrApiConfig = $objQuery->getRow('*', 'dtb_api_config', $where, array($operation_name)); if (Utils::isBlank($arrApiConfig)) { $objApi = static::loadApiOperation($operation_name); if (is_object($objApi)) { $arrApiConfig = $objApi->getDefaultConfig(); } if (!Utils::isBlank($arrApiConfig)) { // デフォルト設定がロード出来た場合は自動で設定に反映 $arrData = $arrApiConfig; $arrData['update_date'] = 'CURRENT_TIMESTAMP'; $arrData['api_config_id'] = $objQuery->nextVal('dtb_api_config_api_config_id'); $objQuery->insert('dtb_api_config', $arrData); } else { // ロード出来ない場合はAPI_Defaultを適用 $operation_name = 'Default'; $objApi = static::loadApiOperation($operation_name); $arrApiConfig = $objApi->getDefaultConfig(); } } return $arrApiConfig; }
/** * Page を初期化する. * * @return void */ public function init() { $this->template = MAIN_FRAME; //IP制限チェック $allow_hosts = unserialize(ADMIN_ALLOW_HOSTS); if (is_array($allow_hosts) && count($allow_hosts) > 0) { if (array_search($_SERVER['REMOTE_ADDR'], $allow_hosts) === FALSE) { Utils::sfDispError(AUTH_ERROR); } } //SSL制限チェック if (ADMIN_FORCE_SSL == TRUE) { if (Utils::sfIsHTTPS() === false) { Application::alias('eccube.response')->sendRedirect($_SERVER['REQUEST_URI'], $_GET, FALSE, TRUE); } } $this->tpl_authority = $_SESSION['authority']; // ディスプレイクラス生成 $this->objDisplay = Application::alias('eccube.display'); // スーパーフックポイントを実行. $objPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg); $objPlugin->doAction('LC_Page_preProcess', array($this)); // トランザクショントークンの検証と生成 $this->doValidToken(true); $this->setTokenTo(); // ローカルフックポイントを実行 $parent_class_name = get_parent_class($this); $objPlugin->doAction($parent_class_name . '_action_before', array($this)); $class_name = get_class($this); if ($class_name != $parent_class_name) { $objPlugin->doAction($class_name . '_action_before', array($this)); } }
/** * 受注IDをキーにして, 決済モジュールのパスを取得する. * * 決済モジュールが取得できた場合は, require 可能な決済モジュールのパスを返す. * 受注IDが無効な場合, 取得したパスにファイルが存在しない場合は false * * @param integer $order_id 受注ID * @return string|false 成功した場合は決済モジュールのパス; * 失敗した場合 false */ public function getModulePath($order_id) { /* @var $objPurchase PurchaseHelper */ $objPurchase = Application::alias('eccube.helper.purchase'); /* @var $objPayment PaymentHelper */ $objPayment = Application::alias('eccube.helper.payment'); $order = $objPurchase->getOrder($order_id); $payment = $objPayment->get($order['payment_id']); $module_path = $payment['module_path']; /* * 2.12.x までは dtb_payment.module_path がフルパスとなっていた. * 2.13.x より, MODULE_REALDIR からのパスでも対応できるよう修正 * http://svn.ec-cube.net/open_trac/ticket/2292 */ if (realpath($module_path) !== false) { $module_path = str_replace('\\', '/', realpath($module_path)); } else { $module_path = str_replace('\\', '/', $module_path); } $module_realdir = str_replace('\\', '/', realpath(MODULE_REALDIR) . '/'); if (strpos($module_path, $module_realdir) !== false) { $module_path = str_replace($module_realdir, '', $module_path); } $module_path = $module_realdir . $module_path; if (file_exists($module_path)) { return $module_path; } return false; }
/** * おすすめ商品検索. * * @return array $arrBestProductsHelper 検索結果配列 */ public function lfGetRanking() { /* @var $objRecommend BestProductsHelper */ $objRecommend = Application::alias('eccube.helper.best_products'); // おすすめ商品取得 $arrRecommends = $objRecommend->getList(RECOMMEND_NUM); $response = array(); if (count($arrRecommends) > 0) { // 商品一覧を取得 $objQuery = Application::alias('eccube.query'); /* @var $objProduct Product */ $objProduct = Application::alias('eccube.product'); // where条件生成&セット $arrProductId = array(); foreach ($arrRecommends as $key => $val) { $arrProductId[] = $val['product_id']; } $arrProducts = $objProduct->getListByProductIds($objQuery, $arrProductId); // 税込金額を設定する Application::alias('eccube.product')->setIncTaxToProducts($arrProducts); // おすすめ商品情報にマージ foreach ($arrRecommends as $key => $value) { if (isset($arrProducts[$value['product_id']])) { $product = $arrProducts[$value['product_id']]; if ($product['status'] == 1 && (!NOSTOCK_HIDDEN || ($product['stock_max'] >= 1 || $product['stock_unlimited_max'] == 1))) { $response[] = array_merge($value, $arrProducts[$value['product_id']]); } } else { // 削除済み商品は除外 unset($arrRecommends[$key]); } } } return $response; }
/** * Page のアクション. * * @return void */ public function action() { /* @var $objReview ReviewHelper */ $objReview = Application::alias('eccube.helper.review'); // パラメーター情報の初期化 $objFormParam = Application::alias('eccube.form_param'); $this->lfInitParam($objFormParam); $objFormParam->setParam($_POST); $objFormParam->convParam(); // 検索ワードの引き継ぎ $this->arrSearchHidden = $objFormParam->getSearchArray(); $this->arrForm = $objFormParam->getHashArray(); switch ($this->getMode()) { // 登録 case 'complete': $this->arrErr = $objFormParam->checkError(); // エラー無し if (Utils::isBlank($this->arrErr)) { // レビュー情報の更新 $arrValues = $objFormParam->getDbArray(); $objReview->save($arrValues); // レビュー情報のDB取得 $this->arrForm = $objReview->get($this->arrForm['review_id']); $this->tpl_onload = "alert('登録が完了しました。');"; } break; default: // レビュー情報のDB取得 $this->arrForm = $objReview->get($this->arrForm['review_id']); break; } }
/** * Page を初期化する. * * @return void */ public function init() { parent::init(); $this->tpl_title = '当サイトについて'; $masterData = Application::alias('eccube.db.master_data'); $this->arrPref = $masterData->getMasterData('mtb_pref'); }
/** * Page のアクション. * * @return void */ public function action() { // パラメーター管理クラス $objFormParam = Application::alias('eccube.form_param'); $this->initParam($objFormParam); $objFormParam->setParam($_POST); $mode = $this->getMode(); switch ($mode) { // ON/OFF case 'update_use': // エラーチェック $this->arrErr = $objFormParam->checkError(); if (!(count($this->arrErr) > 0)) { $arrPluginHookpointUse = $objFormParam->getValue('plugin_hookpoint_use'); $plugin_hookpoint_id = $objFormParam->getValue('plugin_hookpoint_id'); $use_flg = $arrPluginHookpointUse[$plugin_hookpoint_id] == 1 ? 1 : 0; PluginUtil::setPluginHookPointChangeUse($plugin_hookpoint_id, $use_flg); // Smartyコンパイルファイルをクリア Utils::clearCompliedTemplate(); } break; default: break; } // DBからプラグイン情報を取得 $arrRet = PluginUtil::getPluginHookPointList(); // 競合チェック $this->arrConflict = PluginUtil::checkConflictPlugin(); $arrHookPoint = array(); foreach ($arrRet as $key => $val) { $arrHookPoint[$val['hook_point']][$val['plugin_id']] = $val; } $this->arrHookPoint = $arrHookPoint; }
/** * 新着情報を取得する * * @return array $arrNews 取得結果を配列で返す */ public function lfGetNews() { /* @var $objNews NewsHelper */ $objNews = Application::alias('eccube.helper.news'); $arrNews = $objNews->getList(); /* @var $objDb DbHelper */ $objDb = Application::alias('eccube.helper.db'); $arrInfo = $objDb->getBasisData(); // RSS用に変換 foreach (array_keys($arrNews) as $key) { $netUrlHttpUrl = new \Net_URL(HTTP_URL); $row =& $arrNews[$key]; $row['shop_name'] = $arrInfo['shop_name']; $row['email'] = $arrInfo['email04']; // 日付 $row['news_date'] = date('r', strtotime($row['news_date'])); // 新着情報URL if (Utils::isBlank($row['news_url'])) { $row['news_url'] = HTTP_URL; } elseif ($row['news_url'][0] == '/') { // 変換(絶対パス→URL) $netUrl = new \Net_URL($row['news_url']); $netUrl->protocol = $netUrlHttpUrl->protocol; $netUrl->user = $netUrlHttpUrl->user; $netUrl->pass = $netUrlHttpUrl->pass; $netUrl->host = $netUrlHttpUrl->host; $netUrl->port = $netUrlHttpUrl->port; $row['news_url'] = $netUrl->getUrl(); } } return $arrNews; }
/** * Page のアクション. * * @return void */ public function action() { if (strpos(HTTPS_URL, 'https://') !== FALSE) { $this->tpl_enable_ssl = TRUE; } $objFormParam = Application::alias('eccube.form_param'); // パラメーターの初期化 $this->initParam($objFormParam, $_POST); if (count($_POST) > 0) { // エラーチェック $arrErr = $objFormParam->checkError(); $this->arrForm = $objFormParam->getHashArray(); //設定ファイルの権限チェック if (!is_writable(CONFIG_REALFILE)) { $arrErr['all'] = CONFIG_REALFILE . ' を変更する権限がありません。'; } //管理画面ディレクトリのチェック $this->lfCheckAdminArea($this->arrForm, $arrErr); if (Utils::isBlank($arrErr) && $this->lfUpdateAdminData($this->arrForm)) { $this->tpl_onload = "window.alert('管理機能の設定を変更しました。URLを変更した場合は、新しいURLにアクセスしてください。');"; } else { $this->tpl_onload = "window.alert('設定内容に誤りがあります。設定内容を確認してください。');"; $this->arrErr = array_merge($arrErr, $this->arrErr); } } else { $admin_dir = str_replace('/', '', ADMIN_DIR); $this->arrForm = array('admin_dir' => $admin_dir, 'admin_force_ssl' => ADMIN_FORCE_SSL, 'admin_allow_hosts' => ''); if (defined('ADMIN_ALLOW_HOSTS')) { $allow_hosts = unserialize(ADMIN_ALLOW_HOSTS); $this->arrForm['admin_allow_hosts'] = implode("\n", $allow_hosts); } } }
/** * カレンダー情報取得. * * @param integer $disp_month 表示する月数 * @return array カレンダー情報の配列を返す */ public function lfGetCalendar($disp_month = 1) { /* @var $objDate Date */ $objDate = Application::alias('eccube.date'); $arrCalendar = array(); $today = date('Y/m/d'); for ($j = 0; $j <= $disp_month - 1; $j++) { $time = mktime(0, 0, 0, date('n') + $j, 1); $year = date('Y', $time); $month = date('n', $time); $objMonth = new \Calendar_Month_Weekdays($year, $month, 0); $objMonth->build(); $i = 0; while ($objDay = $objMonth->fetch()) { $arrCalendar[$j][$i]['in_month'] = $month == $objDay->month; $arrCalendar[$j][$i]['first'] = $objDay->first; $arrCalendar[$j][$i]['last'] = $objDay->last; $arrCalendar[$j][$i]['empty'] = $objDay->empty; $arrCalendar[$j][$i]['year'] = $year; $arrCalendar[$j][$i]['month'] = $month; $arrCalendar[$j][$i]['day'] = $objDay->day; $arrCalendar[$j][$i]['holiday'] = $objDate->isHoliday($year, $month, $objDay->day); $arrCalendar[$j][$i]['today'] = $today === sprintf('%04d/%02d/%02d', $year, $month, $objDay->day); $i++; } } return $arrCalendar; }
/** * * メールの履歴を取り出す。 * @param int $send_id */ public function getMailHistory($send_id) { $objQuery = Application::alias('eccube.query'); $col = 'subject, mail_body'; $where = 'send_id = ?'; $mailHistory = $objQuery->select($col, 'dtb_mail_history', $where, array($send_id)); return $mailHistory; }
/** * Enter description here... * * @param unknown_type $errCode */ public function setError($errCode) { $masterData = Application::alias('eccube.db.master_data'); $arrOStoreErrMsg = $masterData->getMasterData('mtb_ownersstore_err'); $this->arrData['status'] = OSTORE_STATUS_ERROR; $this->arrData['errcode'] = $errCode; $this->arrData['msg'] = isset($arrOStoreErrMsg[$errCode]) ? $arrOStoreErrMsg[$errCode] : $arrOStoreErrMsg[OSTORE_E_UNKNOWN]; }
/** * Page のAction. * * @return void */ public function action() { //決済処理中ステータスのロールバック /* @var $objPurchase PurchaseHelper */ $objPurchase = Application::alias('eccube.helper.purchase'); $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG); Application::alias('eccube.response')->sendRedirect(DIR_INDEX_PATH); }
/** * ブロックファイルに応じて tpl_mainpage を設定する * * @param string $bloc_file ブロックファイル名 * @return void */ public function setTplMainpage($bloc_file) { if (Utils::isAbsoluteRealPath($bloc_file)) { $this->tpl_mainpage = $bloc_file; } else { $this->tpl_mainpage = Application::alias('eccube.helper.page_layout')->getTemplatePath($this->objDisplay->detectDevice()) . BLOC_DIR . $bloc_file; } $this->setTemplate($this->tpl_mainpage); }
/** * Page のアクション. * * @return void */ public function action() { //決済処理中ステータスのロールバック $objPurchase = Application::alias('eccube.helper.purchase'); $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG); $this->tpl_title = ''; $objCustomer = Application::alias('eccube.customer'); $this->isLogin = $objCustomer->isLoginSuccess(true); }
/** * Page のアクション. * * @return void */ public function action() { $arrParam = $_REQUEST; list($response_outer, $arrResponse) = Operation::doApiAction($arrParam); if (isset($arrParam["callback"])) { $arrResponse["callback"] = $arrParam["callback"]; } Operation::sendApiResponse('json', $response_outer, $arrResponse); Application::alias('eccube.response')->actionExit(); }
/** * Page のプロセス. * * @return void */ public function process($mode) { $objLog = new LogHelper(); $objJson = new JsonHelper(); $objLog->start($mode); $dbFactory = Application::alias('eccube.db.factory'); $arrSystemInfo = array('eccube_version' => ECCUBE_VERSION, 'php_version' => phpversion(), 'db_version' => $dbFactory->sfGetDBVersion()); $objJson->setSuccess($arrSystemInfo); $objJson->display(); $objLog->end(); }
/** * Page のアクション. * * @return void */ public function action() { parent::action(); //ヘッダーナビのカート情報を取得 /* @var $objCart CartSession */ $objCart = Application::alias('eccube.cart_session'); $cartKeys = $objCart->getKeys(); $arrInfo = Application::alias('eccube.helper.db')->getBasisData(); $this->freeRule = $arrInfo['free_rule']; $this->arrCartList = $this->lfGetCartData($objCart, $arrInfo, $cartKeys); }
/** * Page を初期化する. * * @return void */ public function init() { parent::init(); $this->tpl_title = 'MYページ'; if (Application::alias('eccube.display')->detectDevice() === DEVICE_TYPE_MOBILE) { $this->tpl_title .= '/退会手続き(完了ページ)'; } else { $this->tpl_subtitle = '退会手続き(完了ページ)'; } $this->tpl_navi = Application::alias('eccube.helper.page_layout')->getTemplatePath(Application::alias('eccube.display')->detectDevice()) . 'mypage/navi.tpl'; $this->tpl_mypageno = 'refusal'; $this->point_disp = false; }
/** * Page のプロセス。 * * @return void */ public function action() { Application::alias('eccube.response')->sendHttpStatus(500); $this->tpl_error = 'システムエラーが発生しました。<br />大変お手数ですが、サイト管理者までご連絡ください。'; if (DEBUG_MODE) { echo '<div class="debug">'; echo '<div>▼▼▼ デバッグ情報ここから ▼▼▼</div>'; echo '<pre>'; echo htmlspecialchars($this->sfGetErrMsg(), ENT_QUOTES, CHAR_CODE); echo '</pre>'; echo '<div>▲▲▲ デバッグ情報ここまで ▲▲▲</div>'; echo '</div>'; } }
protected function checkErrorExtended($arrParam) { switch ($arrParam['IdType']) { case 'product_code': break; case 'product_id': case 'product_class_id': default: /* @var $objErr CheckError */ $objErr = Application::alias('eccube.check_error', $arrParam); $objErr->doFunc(array('指定ID', 'ItemId', INT_LEN), array('MAX_LENGTH_CHECK', 'NUM_CHECK')); $this->addError($objErr->arrErr); break; } }
public function IsSuccess() { if ($this->cert == CERT_STRING) { $masterData = Application::alias('eccube.db.master_data'); $admin_path = strtolower(preg_replace('/\\/+/', '/', $_SERVER['SCRIPT_NAME'])); $arrPERMISSION = array_change_key_case($masterData->getMasterData('mtb_permission')); if (isset($arrPERMISSION[$admin_path])) { // 数値が自分の権限以上のものでないとアクセスできない。 if ($arrPERMISSION[$admin_path] < $this->authority) { return AUTH_ERROR; } } return SUCCESS; } return ACCESS_ERROR; }
/** * Page のアクション. * * @return void */ public function action() { $objFormParam = Application::alias('eccube.form_param'); // パラメーター情報初期化 $this->lfInitParam($objFormParam); // POST値をセット $objFormParam->setParam($_REQUEST); $this->arrErr = $objFormParam->checkError(); $this->arrForm = $objFormParam->getFormParamList(); $this->loadLogList(); if (empty($this->arrErr)) { $this->line_max = $objFormParam->getValue('line_max'); $log_path = $this->getLogPath($objFormParam->getValue('log')); $this->tpl_ec_log = $this->getEccubeLog($log_path); } }
public function doAction($arrParam) { $arrRequest = $this->doInitParam($arrParam); if (!$this->isParamError()) { $category_id = $arrRequest['BrowseNodeId']; if ($category_id && !Application::alias('eccube.helper.db')->isRecord('dtb_category', 'category_id', (array) $category_id, 'del_flg = 0')) { $category_id = '0'; } elseif (Utils::isBlank($category_id)) { $category_id = '0'; } // LC_Page_Products_CategoryList::lfGetCategories() と相当類似しているので共通化したい $arrCategory = null; // 選択されたカテゴリ $arrChildren = array(); // 子カテゴリ $arrAll = Application::alias('eccube.helper.db')->getCatTree($category_id, true); foreach ($arrAll as $category) { if ($category_id != 0 && $category['category_id'] == $category_id) { $arrCategory = $category; continue; } if ($category['parent_category_id'] != $category_id) { continue; } $arrGrandchildrenID = Utils::sfGetUnderChildrenArray($arrAll, 'parent_category_id', 'category_id', $category['category_id']); $category['has_children'] = count($arrGrandchildrenID) > 0; $arrChildren[] = $category; } if (!Utils::isBlank($arrCategory)) { $arrData = array('BrowseNodeId' => $category_id, 'Name' => $arrCategory['category_name'], 'PageURL' => HTTP_URL . 'products/list.php?category_id=' . $arr['category_id'], 'has_children' => count($arrChildren) > 0); } else { $arrData = array('BrowseNodeId' => $category_id, 'Name' => 'ホーム', 'PageURL' => HTTP_URL, 'has_children' => count($arrChildren) > 0); } if (!Utils::isBlank($arrChildren)) { $arrData['Children'] = array(); foreach ($arrChildren as $category) { $arrData['Children']['BrowseNode'][] = array('BrowseNodeId' => $category['category_id'], 'Name' => $category['category_name'], 'PageURL' => HTTP_URL . 'products/list.php?category_id=' . $category['category_id'], 'has_children' => $category['has_children']); } } $this->setResponse('BrowseNode', $arrData); // TODO: Ancestors 親ノード return true; } return false; }
/** * Page のプロセス. * * @return void */ public function process() { parent::process(); $objView = new SiteView(); $objSess = new Session(); Utils::sfIsSuccess($objSess); if (isset($_SESSION['preview']) && $_SESSION['preview'] === 'ON') { // プレビュー用のレイアウトデザインを取得 /* @var $objLayout PageLayoutHelper */ $objLayout = Application::alias('eccube.helper.page_layout'); $objLayout->sfGetPageLayout($this, true); // 画面の表示 $objView->assignobj($this); $objView->display(SITE_FRAME); return; } Utils::sfDispSiteError(PAGE_ERROR); }
public function register(BaseApplication $app) { $app->match('/products/review.php', '\\Eccube\\Plugin\\ProductReview\\Page\\Products\\Review')->bind('products_review'); $app->match('/products/review_complete.php', '\\Eccube\\Plugin\\ProductReview\\Page\\Products\\ReviewComplete')->bind('products_review_complete'); $app->match('/admin/products/review.php', '\\Eccube\\Plugin\\ProductReview\\Page\\Admin\\Products\\Review')->bind('admin_products_review'); $app->match('/admin/products/review_edit.php', '\\Eccube\\Plugin\\ProductReview\\Page\\Admin\\Products\\ReviewEdit')->bind('admin_products_review_edit'); $app['eccube.helper.review'] = $app->share(function () use($app) { return new ReviewHelper(); }); $app['eccube.helper.plugin'] = $app->extend('eccube.helper.plugin', function (PluginHelper $objHelperPlugin, $app) { $objHelperPlugin->addAction("Eccube.Page.Products.Detail.action_after", function ($objPage) use($app) { //レビュー情報の取得 $objReview = Application::alias('eccube.helper.review'); $objPage->arrReview = $objReview->getListByProductId($objPage->tpl_product_id); }); return $objHelperPlugin; }); // TODO: 管理画面メニューに追加 }
/** * Page のアクション. * * @return void */ public function action() { $masterData = Application::alias('eccube.db.master_data'); /* @var $objMailtemplate MailtemplateHelper */ $objMailtemplate = Application::alias('eccube.helper.mailtemplate'); $mode = $this->getMode(); if (!empty($_POST)) { $objFormParam = Application::alias('eccube.form_param'); $this->lfInitParam($mode, $objFormParam); $objFormParam->setParam($_POST); $objFormParam->convParam(); $this->arrErr = $objFormParam->checkError(); $post = $objFormParam->getHashArray(); } $this->arrMailTEMPLATE = $masterData->getMasterData('mtb_mail_template'); switch ($mode) { case 'id_set': $mailtemplate = $objMailtemplate->get($post['template_id']); if ($mailtemplate) { $this->arrForm = $mailtemplate; } else { $this->arrForm['template_id'] = $post['template_id']; } break; case 'regist': $this->arrForm = $post; if ($this->arrErr) { // エラーメッセージ $this->tpl_msg = 'エラーが発生しました'; } else { // 正常 $this->lfRegistMailTemplate($this->arrForm, $_SESSION['member_id'], $objMailtemplate); // 完了メッセージ $this->tpl_onload = "window.alert('メール設定が完了しました。テンプレートを選択して内容をご確認ください。');"; unset($this->arrForm); } break; default: break; } }