tpl_mainpage = 'mail/template.tpl'; $this->tpl_mainno = 'mail'; $this->tpl_subnavi = 'mail/subnavi.tpl'; $this->tpl_subno = "template"; $this->tpl_subtitle = 'テンプレート設定'; $masterData = new SC_DB_MasterData_Ex(); $this->arrMagazineType = $masterData->getMasterData("mtb_magazine_type"); } /** * Page のプロセス. * * @return void */ function process() { $this->action(); $this->sendResponse(); } /** * Page のアクション. * * @return void */ function action() { $objQuery = new SC_Query(); $objSess = new SC_Session(); // 認証可否の判定 SC_Utils_Ex::sfIsSuccess($objSess); if (!isset($_GET['mode'])) $_GET['mode'] = ""; if (!isset($_GET['id'])) $_GET['id'] = ""; if ( $_GET['mode'] == "delete" && SC_Utils_Ex::sfCheckNumLength($_GET['id'])===true ){ // メール担当の画像があれば削除しておく $sql = "SELECT charge_image FROM dtb_mailmaga_template WHERE template_id = ?"; $result = $objQuery->getOne($sql, array($_GET["id"])); if (strlen($result) > 0) { @unlink(IMAGE_SAVE_REALDIR. $result); } // 登録削除 $sql = "UPDATE dtb_mailmaga_template SET del_flg = 1 WHERE template_id = ?"; $objQuery->query($sql, array($_GET['id'])); $this->objDisplay->reload(null, true); } $sql = "SELECT *, create_date as disp_date FROM dtb_mailmaga_template WHERE del_flg = 0 ORDER BY create_date DESC"; $this->list_data = $objQuery->getAll($sql); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } } ?>