/**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'mail/index.tpl';
     $this->tpl_mainno = 'mail';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = t('c_Mail magazine_02');
     $this->tpl_subtitle = t('c_Delivery content settings_01');
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob[t('c_Unknown_01')] = t('c_Unknown_01');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageRows = $masterData->getMasterData('mtb_page_max');
     $this->arrHtmlmail = array('' => t('c_Both_01'), 1 => t('c_HTML_01'), 2 => t('c_TEXT_02'));
     $this->arrMailType = $masterData->getMasterData('mtb_mail_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrBirthYear = $objDate->getYear();
     $this->arrRegistYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $this->objDate = $objDate;
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     // テンプレート一覧設定
     $this->arrTemplate = $this->lfGetMailTemplateList(SC_Helper_Mail_Ex::sfGetMailmagaTemplate());
     $this->httpCacheControl('nocache');
 }
 /**
  * (non-PHPdoc)
  *
  * @see LC_Page_Admin::init()
  */
 function init()
 {
     parent::init();
     $this->objDb = new SC_Helper_DB_Ex();
     $this->tpl_mainpage = 'basis/device_android.tpl';
     $this->tpl_subno = 'device_android';
     $this->tpl_mainno = 'basis';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '基本情報管理';
     $this->tpl_subtitle = 'Android 対応機種設定>対応機種一覧';
     $masterdata = new SC_DB_MasterData_Ex();
     $this->arrPageMax = $masterdata->getMasterData("mtb_page_max");
     $this->arrOsVersion = $masterdata->getMasterData("cp_mtb_android_os_version");
     $this->arrCarrier = $masterdata->getMasterData("cp_mtb_carrier");
     $this->arrStatus = $masterdata->getMasterData("mtb_disp");
     $this->arrStatusColor = $masterdata->getMasterData("mtb_product_status_color");
     $objCategory = new SC_Helper_Category_Ex(false);
     $arrCategory = $objCategory->getList(false);
     $this->arrCategory = SC_Utils_Ex::sfArrKeyValue($arrCategory, "category_id", "category_name");
     $this->arrCategory2 = $arrCategory;
     $objDate = new SC_Date_Ex(2000, date("Y") + 1);
     $this->arrDeviceReleaseYear = $objDate->getYear("", date("Y"), "");
     $this->arrMonth = $objDate->getMonth(true);
     $this->arrDay = $objDate->getDay(true);
     $this->arrDisplaySize = $masterdata->getMasterData("cp_mtb_device_displaysize");
     array_walk($this->arrDisplaySize, function (&$v) {
         $v = explode(",", $v);
     });
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'order/edit.tpl';
     $this->tpl_mainno = 'order';
     $this->tpl_maintitle = '受注管理';
     $this->tpl_subtitle = '受注登録';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrCountry = $masterData->getMasterData('mtb_country');
     $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
     $this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $objShippingDate = new SC_Date_Ex(RELEASE_YEAR);
     $this->arrYearShippingDate = $objShippingDate->getYear('', date('Y'), '');
     $this->arrMonthShippingDate = $objShippingDate->getMonth(true);
     $this->arrDayShippingDate = $objShippingDate->getDay(true);
     $objBirthDate = new SC_Date_Ex(BIRTH_YEAR, date('Y', strtotime('now')));
     $this->arrBirthYear = $objBirthDate->getYear('', START_BIRTH_YEAR, '');
     $this->arrBirthMonth = $objBirthDate->getMonth(true);
     $this->arrBirthDay = $objBirthDate->getDay(true);
     // 支払い方法の取得
     $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
     // 配送業者の取得
     $this->arrDeliv = SC_Helper_Delivery_Ex::getIDValueList();
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'mail/index.tpl';
     $this->tpl_mainno = 'mail';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = 'メルマガ管理';
     $this->tpl_subtitle = '配信内容設定';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob['不明'] = '不明';
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageRows = $masterData->getMasterData('mtb_page_max');
     $this->arrHtmlmail = array('' => '両方', 1 => 'HTML', 2 => 'TEXT');
     $this->arrMailType = $masterData->getMasterData('mtb_mail_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrBirthYear = $objDate->getYear();
     $this->arrRegistYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $this->objDate = $objDate;
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     // テンプレート一覧設定
     $this->arrTemplate = $this->lfGetMailTemplateList(SC_Helper_Mail_Ex::sfGetMailmagaTemplate());
     $this->httpCacheControl('nocache');
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     $objDate = new SC_Date_Ex(1901);
     $objDate->setStartYear(RELEASE_YEAR);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // パラメーター管理クラス
     $this->objFormParam = new SC_FormParam_Ex();
     // パラメーター情報の初期化
     $this->lfInitParam($this->objFormParam);
     $this->objFormParam->setParam($_POST);
     // 入力値の変換
     $this->objFormParam->convParam();
     // どんな状態の時に isset($arrRet) == trueになるんだ? これ以前に$arrRet無いが、、、、
     if (!isset($arrRet)) {
         $arrRet = array();
     }
     switch ($this->getMode()) {
         case 'confirm':
             $status = $this->createPdf($this->objFormParam);
             if ($status === true) {
                 exit;
             } else {
                 $this->arrErr = $status;
             }
             break;
         default:
             $this->arrForm = $this->createFromValues($_GET['order_id'], $_POST['pdf_order_id']);
             break;
     }
     $this->setTemplate($this->tpl_mainpage);
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'customer/edit.tpl';
     $this->tpl_mainno = 'customer';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '会員管理';
     $this->tpl_subtitle = '会員登録';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrCountry = $masterData->getMasterData('mtb_country');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrReminder = $masterData->getMasterData('mtb_reminder');
     $this->arrStatus = $masterData->getMasterData('mtb_customer_status');
     $this->arrMailMagazineType = $masterData->getMasterData('mtb_mail_magazine_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法種別
     $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'customer/edit.tpl';
     $this->tpl_mainno = 'customer';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = t('c_Member_02');
     $this->tpl_subtitle = t('c_Member registration_02');
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrReminder = $masterData->getMasterData('mtb_reminder');
     $this->arrStatus = $masterData->getMasterData('mtb_customer_status');
     $this->arrMailMagazineType = $masterData->getMasterData('mtb_mail_magazine_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法種別
     $objDb = new SC_Helper_DB_Ex();
     $this->arrPayment = $objDb->sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $masterdata = new SC_DB_MasterData_Ex();
     $this->arrAutoDispStatus = $masterdata->getMasterData("atd_mtb_auto_display_status");
     $objDate = new SC_Date_Ex(RELEASE_YEAR);
     $this->arrDispYear = $objDate->getYear("", date("Y"), "----");
     $this->arrDispMonth = $objDate->getMonth(true);
     $this->arrDispDay = $objDate->getDay(true);
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'customer/index.tpl';
     $this->tpl_mainno = 'customer';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '会員管理';
     $this->tpl_subtitle = '会員マスター';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob['不明'] = '不明';
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrStatus = $masterData->getMasterData('mtb_customer_status');
     $this->arrMagazineType = $masterData->getMasterData('mtb_magazine_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex();
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'order/index.tpl';
     $this->tpl_mainno = 'order';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = t('c_Orders_01');
     $this->tpl_subtitle = t('c_Order master_01');
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
     $this->arrORDERSTATUS_COLOR = $masterData->getMasterData('mtb_order_status_color');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $objDate = new SC_Date_Ex();
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法の取得
     $this->arrPayments = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  * @return void
  */
 function init()
 {
     parent::init();
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrReminder = $masterData->getMasterData('mtb_reminder');
     // 生年月日選択肢の取得
     $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y', strtotime('now')));
     $this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
     $this->arrMonth = $objDate->getMonth(true);
     $this->arrDay = $objDate->getDay(true);
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'contents/index.tpl';
     $this->tpl_subno = 'index';
     $this->tpl_mainno = 'contents';
     $this->arrForm = array('year' => date('Y'), 'month' => date('n'), 'day' => date('j'));
     $this->tpl_maintitle = 'コンテンツ管理';
     $this->tpl_subtitle = '新着情報管理';
     //---- 日付プルダウン設定
     $objDate = new SC_Date_Ex(ADMIN_NEWS_STARTYEAR);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_title = 'ログイン';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->tpl_onload = 'fnCheckInputDeliv();';
     $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y', strtotime('now')));
     $this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
     $this->arrMonth = $objDate->getMonth(true);
     $this->arrDay = $objDate->getDay(true);
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'contents/index.tpl';
     $this->tpl_subno = 'index';
     $this->tpl_mainno = 'contents';
     $this->arrForm = array('year' => date('Y'), 'month' => date('n'), 'day' => date('j'));
     $this->tpl_maintitle = t('c_Edit contents_01');
     $this->tpl_subtitle = t('c_Management of new information_01');
     //---- 日付プルダウン設定
     $objDate = new SC_Date_Ex(ADMIN_NEWS_STARTYEAR);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
 }
 /**
  * カレンダー情報取得.
  *
  * @param  integer $disp_month 表示する月数
  * @return array   カレンダー情報の配列を返す
  */
 public function lfGetCalendar($disp_month = 1)
 {
     $objDate = new SC_Date_Ex();
     $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;
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_subtitle = '会員登録内容変更(入力ページ)';
     $this->tpl_mypageno = 'change';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrReminder = $masterData->getMasterData('mtb_reminder');
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrMAILMAGATYPE = $masterData->getMasterData('mtb_mail_magazine_type');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->httpCacheControl('nocache');
     // 生年月日選択肢の取得
     $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y', strtotime('now')));
     $this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
     $this->arrMonth = $objDate->getMonth(true);
     $this->arrDay = $objDate->getDay(true);
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'order/edit.tpl';
     $this->tpl_mainno = 'order';
     $this->tpl_maintitle = '受注管理';
     $this->tpl_subtitle = '受注登録';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
     $this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
     $objDate = new SC_Date_Ex(RELEASE_YEAR);
     $this->arrYearShippingDate = $objDate->getYear('', date('Y'), '');
     $this->arrMonthShippingDate = $objDate->getMonth(true);
     $this->arrDayShippingDate = $objDate->getDay(true);
     // 支払い方法の取得
     $this->arrPayment = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
     // 配送業者の取得
     $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', 'name');
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     // GDライブラリのインストール判定
     $this->install_GD = function_exists('gd_info') ? true : false;
     $this->tpl_mainpage = 'total/index.tpl';
     $this->tpl_graphsubtitle = 'total/subtitle.tpl';
     $this->tpl_titleimage = ROOT_URLPATH . 'img/title/title_sale.jpg';
     $this->tpl_maintitle = $this->tpl_maintitle = t('c_Sales (history)_01');
     $this->tpl_mainno = 'total';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrWDAY = $masterData->getMasterData('mtb_wday');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     // 登録・更新日検索用
     $objDate = new SC_Date_Ex();
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // ページタイトル todo あとでなおす
     $this->arrTitle[''] = t('c_Sales by period_01');
     $this->arrTitle['term'] = t('c_Sales by period_01');
     $this->arrTitle['products'] = t('c_Sales by product_01');
     $this->arrTitle['age'] = t('c_Sales by age group_01');
     $this->arrTitle['job'] = t('c_Sales  by occupation_01');
     $this->arrTitle['member'] = t('c_Sales by member_01');
     // 月度集計のkey名
     $this->arrSearchForm1 = array('search_startyear_m', 'search_startmonth_m');
     // 期間別集計のkey名
     $this->arrSearchForm2 = array('search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday');
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     $objHoliday = new SC_Helper_Holiday_Ex();
     $objDate = new SC_Date_Ex();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $mode = $this->getMode();
     $objFormParam = new SC_FormParam_Ex();
     $this->lfInitParam($mode, $objFormParam);
     $objFormParam->setParam($_POST);
     $objFormParam->convParam();
     $holiday_id = $objFormParam->getValue('holiday_id');
     // 要求判定
     switch ($mode) {
         // 編集処理
         case 'edit':
             $this->arrErr = $this->lfCheckError($objFormParam, $objHoliday);
             if (!SC_Utils_Ex::isBlank($this->arrErr['holiday_id'])) {
                 trigger_error('', E_USER_ERROR);
                 return;
             }
             if (count($this->arrErr) <= 0) {
                 // POST値の引き継ぎ
                 $arrParam = $objFormParam->getHashArray();
                 // 登録実行
                 $res_holiday_id = $this->doRegist($holiday_id, $arrParam, $objHoliday);
                 if ($res_holiday_id !== FALSE) {
                     // 完了メッセージ
                     $holiday_id = $res_holiday_id;
                     $this->tpl_onload = "alert('登録が完了しました。');";
                 }
             }
             // POSTデータを引き継ぐ
             $this->tpl_holiday_id = $holiday_id;
             break;
             // 削除
         // 削除
         case 'delete':
             $objHoliday->delete($holiday_id);
             break;
             // 編集前処理
         // 編集前処理
         case 'pre_edit':
             // 編集項目を取得する。
             $arrHolidayData = $objHoliday->get($holiday_id);
             $objFormParam->setParam($arrHolidayData);
             // POSTデータを引き継ぐ
             $this->tpl_holiday_id = $holiday_id;
             break;
         case 'down':
             $objHoliday->rankDown($holiday_id);
             // 再表示
             $this->objDisplay->reload();
             break;
         case 'up':
             $objHoliday->rankUp($holiday_id);
             // 再表示
             $this->objDisplay->reload();
             break;
         default:
             break;
     }
     $this->arrForm = $objFormParam->getFormParamList();
     $this->arrHoliday = $objHoliday->getList();
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     $objDate = new SC_Date_Ex();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $mode = $this->getMode();
     if (!empty($_POST)) {
         $objFormParam = new SC_FormParam_Ex();
         $this->lfInitParam($mode, $objFormParam);
         $objFormParam->setParam($_POST);
         $objFormParam->convParam();
         $holiday_id = $objFormParam->getValue('holiday_id');
         $this->arrErr = $this->lfCheckError($mode, $objFormParam);
         if (!empty($this->arrErr['holiday_id'])) {
             SC_Utils_Ex::sfDispException();
             return;
         }
         $post = $objFormParam->getHashArray();
     }
     // 要求判定
     switch ($mode) {
         // 編集処理
         case 'edit':
             // POST値の引き継ぎ
             $this->arrForm = $this->arrForm = $_POST;
             if (count($this->arrErr) <= 0) {
                 // 新規作成
                 if ($post['holiday_id'] == "") {
                     $this->lfInsertClass($this->arrForm, $_SESSION['member_id']);
                 } else {
                     $this->lfUpdateClass($this->arrForm, $post['holiday_id']);
                 }
                 // 再表示
                 $this->objDisplay->reload();
             } else {
                 // POSTデータを引き継ぐ
                 $this->tpl_holiday_id = $post['holiday_id'];
             }
             break;
             // 削除
         // 削除
         case 'delete':
             $objDb->sfDeleteRankRecord("dtb_holiday", "holiday_id", $post['holiday_id'], "", true);
             // 再表示
             $this->objDisplay->reload();
             break;
             // 編集前処理
         // 編集前処理
         case 'pre_edit':
             // 編集項目を取得する。
             $arrHolidayData = $this->lfGetHolidayDataByHolidayID($post['holiday_id']);
             // 入力項目にカテゴリ名を入力する。
             $this->arrForm['title'] = $arrHolidayData[0]['title'];
             $this->arrForm['month'] = $arrHolidayData[0]['month'];
             $this->arrForm['day'] = $arrHolidayData[0]['day'];
             // POSTデータを引き継ぐ
             $this->tpl_holiday_id = $post['holiday_id'];
             break;
         case 'down':
             $objDb->sfRankDown("dtb_holiday", "holiday_id", $post['holiday_id']);
             // 再表示
             $this->objDisplay->reload();
             break;
         case 'up':
             $objDb->sfRankUp("dtb_holiday", "holiday_id", $post['holiday_id']);
             // 再表示
             $this->objDisplay->reload();
             break;
         default:
             break;
     }
     $this->arrHoliday = $this->lfGetHolidayList();
     // POSTデータを引き継ぐ
     $this->tpl_holiday_id = $holiday_id;
 }
 /**
  * 定休日情報をスタティック変数にセット.
  *
  * @return void
  */
 private function setRegularHoliday()
 {
     $arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
     SC_Date_Ex::$arrRegularHoliday = explode('|', $arrInfo['regular_holiday_ids']);
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'products/index.tpl';
     $this->tpl_mainno = 'products';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '商品管理';
     $this->tpl_subtitle = '商品マスター';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrDISP = $masterData->getMasterData('mtb_disp');
     $this->arrSTATUS = $masterData->getMasterData('mtb_status');
     $this->arrPRODUCTSTATUS_COLOR = $masterData->getMasterData('mtb_product_status_color');
     $objDate = new SC_Date_Ex();
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'products/review.tpl';
     $this->tpl_mainno = 'products';
     $this->tpl_subno = 'review';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '商品管理';
     $this->tpl_subtitle = 'レビュー管理';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPageMax = $masterData->getMasterData("mtb_page_max");
     $this->arrRECOMMEND = $masterData->getMasterData("mtb_recommend");
     $this->arrSex = $masterData->getMasterData("mtb_sex");
     $objDate = new SC_Date_Ex();
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $servername = "localhost";
     $username = "******";
     $password = "******";
     $dbname = "rise_up_shop";
     // Create connection
     $conn = new mysqli($servername, $username, $password, $dbname);
     // Check connection
     if ($conn) {
         $sql = "SELECT * FROM dtb_brand";
         $result = mysqli_query($conn, $sql);
         $arr = [];
         $i = 0;
         while ($row = mysqli_fetch_object($result)) {
             $arr[$i]['brand_id'] = $row->brand_id;
             $arr[$i]['name'] = $row->name;
             $arr[$i]['image_path'] = $row->image_path;
             $arr[$i]['description'] = $row->description;
             $arr[$i]['email'] = $row->email;
             $arr[$i]['address'] = $row->address;
             $arr[$i]['website'] = $row->website;
             $i++;
         }
         $this->arrResults = $arr;
     }
     $objDb = new SC_Helper_DB_Ex();
     $objDate = new SC_Date_Ex();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $mode = $this->getMode();
     if (!empty($_POST)) {
         $objFormParam = new SC_FormParam_Ex();
         $objFormParam->setParam($_POST);
         $objFormParam->convParam();
         $brand_id = $objFormParam->getValue('brand_id');
         if (!empty($this->arrErr['brand_id'])) {
             trigger_error('', E_USER_ERROR);
             return;
         }
         $post = $objFormParam->getHashArray();
     }
     // 要求判定
     switch ($mode) {
         // 編集処理
         case 'edit':
             // POST値の引き継ぎ
             $this->arrForm = $this->arrForm = $_POST;
             if (count($this->arrErr) <= 0) {
                 // 新規作成
                 if ($post['brand_id'] == '') {
                     $this->lfInsertClass($this->arrForm, $_SESSION['member_id']);
                 } else {
                     $this->lfUpdateClass($this->arrForm, $post['brand_id']);
                 }
                 // 再表示
                 $this->objDisplay->reload();
             } else {
                 // POSTデータを引き継ぐ
                 $this->tpl_brand_id = $post['brand_id'];
             }
             break;
         case 'down':
             $objDb->sfRankDown('dtb_brand', 'brand_id', $post['brand_id']);
             // 再表示
             $this->objDisplay->reload();
             break;
         case 'up':
             $objDb->sfRankUp('dtb_brand', 'brand_id', $post['brand_id']);
             // 再表示
             $this->objDisplay->reload();
             break;
         default:
             break;
     }
     $this->tpl_brand_id = $brand_id;
 }