tpl_mainpage = 'contents/upload.tpl'; $this->tpl_mainno = 'contents'; $this->tpl_subno = 'upload'; $this->tpl_maintitle = 'コンテンツ管理'; $this->tpl_subtitle = 'トップ画像管理'; } /** * Page のプロセス. * * @return void */ function process() { $this->action(); $this->sendResponse(); } /** * Page のアクション. * * @return void */ function action() { $objDb = new SC_Helper_DB_Ex(); $mode = $this->getMode(); if (!empty($_POST)) { $objFormParam = new SC_FormParam_Ex(); $objFormParam->addParam('画像ID', 'id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); $objFormParam->setParam($_POST); $objFormParam->convParam(); $arrErr = $objFormParam->checkError(); if (!empty($this->arrErr['id'])) { SC_Utils_Ex::sfDispException(); return; } $post = $objFormParam->getHashArray(); } switch($this->getMode()) { case 'delete': // ランク付きレコードの削除 $objDb->sfDeleteRankRecord("dtb_upload_photo", "id", $post['id']); // 再表示 $this->objDisplay->reload(); break; case 'up': $objDb->sfRankUp("dtb_upload_photo", "id", $post['id']); // 再表示 $this->objDisplay->reload(); break; case 'down': $objDb->sfRankDown("dtb_upload_photo", "id", $post['id']); // 再表示 $this->objDisplay->reload(); break; } $this->arrPaymentListFree = $this->lfGetPaymentList(); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } /** * 一覧の取得. */ function lfGetPaymentList() { $objQuery =& SC_Query_Ex::getSingletonInstance(); $col = "id, top_image, memo01, memo02"; $where = "del_flg = 0"; $table = "dtb_upload_photo"; $objQuery->setOrder("rank DESC"); $arrRet = $objQuery->select($col, $table, $where); return $arrRet; } } ?>