tpl_mainpage = 'entry/kiyaku.tpl'; $this->tpl_title = "ご利用規約"; } /** * Page のプロセス. * * @return void */ function process() { $this->action(); $this->sendResponse(); } /** * Page のアクション. * * @return void */ function action() { $objCustomer = new SC_Customer(); // 規約内容の取得 $objQuery = new SC_Query(); $objQuery->setOrder("rank DESC"); $arrRet = $objQuery->select("kiyaku_title, kiyaku_text", "dtb_kiyaku", "del_flg <> 1"); $max = count($arrRet); $this->tpl_kiyaku_text = ""; for ($i = 0; $i < $max; $i++) { $this->tpl_kiyaku_text.=$arrRet[$i]['kiyaku_title'] . "\n\n"; $this->tpl_kiyaku_text.=$arrRet[$i]['kiyaku_text'] . "\n\n"; } } /** * モバイルページを初期化する. * * @return void */ function mobileInit() { $this->init(); } /** * Page のプロセス(モバイル). * * @return void */ function mobileProcess() { $this->mobilAection(); $this->sendResponse(); } /** * Page のアクション(モバイル). * * @return void */ function mobileAction() { $objCustomer = new SC_Customer(); $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0; $next = $offset; // 規約内容の取得 $objQuery = new SC_Query(); $count = $objQuery->count("dtb_kiyaku", "del_flg <> 1"); $objQuery->setOrder("rank DESC"); $objQuery->setLimitOffset(1, $offset); $arrRet = $objQuery->select("kiyaku_title, kiyaku_text", "dtb_kiyaku", "del_flg <> 1"); if($count > $offset + 1){ $next++; } else { $next = -1; } $max = count($arrRet); $this->tpl_kiyaku_text = ""; for ($i = 0; $i < $max; $i++) { $this->tpl_kiyaku_text.=$arrRet[$i]['kiyaku_title'] . "\n\n"; $this->tpl_kiyaku_text.=$arrRet[$i]['kiyaku_text'] . "\n\n"; } } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } } ?>