- Timestamp:
- 2011/01/11 16:34:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_List.php
r19833 r19865 30 30 * @package Page 31 31 * @author LOCKON CO.,LTD. 32 * @version $Id :LC_Page_Products_List.php 15532 2007-08-31 14:39:46Z nanasess$32 * @version $Id$ 33 33 */ 34 34 class LC_Page_Products_List extends LC_Page { … … 90 90 91 91 /** 92 * ページのアクション(旧process) 92 * Page のAction. 93 * 93 94 * @return void 94 95 */ 95 96 function action() { 96 97 $this->lfLoadParam(); 97 //$objView = new SC_SiteView(!$this->inCart);98 98 $objQuery = new SC_Query(); 99 99 $objDb = new SC_Helper_DB_Ex(); … … 182 182 } 183 183 184 // ページャ用データ設定(モバイル) 185 if (Net_UserAgent_Mobile::isMobile() === true) { 186 $this->lfSetPagerMobile(); 187 } 188 184 189 $this->tpl_javascript .= 'function fnOnLoad(){' . $js_fnOnLoad . '}'; 185 190 $this->tpl_onload .= 'fnOnLoad(); '; 186 191 187 192 $this->tpl_rnd = SC_Utils_Ex::sfGetRandomString(3); 188 }189 190 /**191 * モバイルページを初期化する.192 *193 * @return void194 */195 function mobileInit() {196 $this->init();197 }198 199 /**200 * Page のプロセス(モバイル).201 *202 * @return void203 */204 function mobileProcess() {205 parent::mobileProcess();206 $this->mobieAction();207 $this->sendResponse();208 }209 210 /**211 * Page のAction(モバイル).212 *213 * FIXME スパゲッティ...214 *215 * @return void216 */217 function mobieAction(){218 $this->lfLoadParam();219 //$objView = new SC_MobileView();220 $objQuery = new SC_Query();221 $objDb = new SC_Helper_DB_Ex();222 223 // タイトル編集224 $tpl_search_mode = false;225 226 if ($this->mode == 'search') {227 $this->tpl_subtitle = "検索結果";228 $tpl_search_mode = true;229 } elseif ($this->arrSearchData['category_id'] == 0) {230 $this->tpl_subtitle = "全商品";231 } else {232 $arrCat = $objDb->sfGetCat($this->arrSearchData['category_id']);233 $this->tpl_subtitle = $arrCat['name'];234 }235 236 $count = $objQuery->count("dtb_best_products", "category_id = ?", array($this->arrSearchData['category_id']));237 238 // 商品一覧の表示処理239 $this->lfDispProductsList();240 241 // 検索条件を画面に表示242 // カテゴリー検索条件243 if ($this->arrSearchData['category_id'] == 0) {244 $this->arrSearch['category'] = "指定なし";245 } else {246 $arrCat = $objQuery->getOne("SELECT category_name FROM dtb_category WHERE category_id = ?",array($category_id));247 $this->arrSearch['category'] = $arrCat;248 }249 250 // 商品名検索条件251 if ($this->arrForm['name'] === "") {252 $this->arrSearch['name'] = "指定なし";253 } else {254 $this->arrSearch['name'] = $this->arrForm['name'];255 }256 257 // ページ送り機能用のURLを作成する。258 $objURL = new Net_URL($_SERVER['PHP_SELF']);259 foreach ($_REQUEST as $key => $value) {260 if ($key == session_name() || $key == 'pageno') {261 continue;262 }263 $objURL->addQueryString($key, mb_convert_encoding($value, 'SJIS', CHAR_CODE));264 }265 266 if ($this->objNavi->now_page > 1) {267 $objURL->addQueryString('pageno', $this->objNavi->now_page - 1);268 $this->tpl_previous_page = $objURL->path . '?' . $objURL->getQueryString();269 }270 if ($this->objNavi->now_page < $this->objNavi->max_page) {271 $objURL->addQueryString('pageno', $this->objNavi->now_page + 1);272 $this->tpl_next_page = $objURL->path . '?' . $objURL->getQueryString();273 }274 275 $this->tpl_search_mode = $tpl_search_mode;276 277 $this->tpl_mainpage = MOBILE_TEMPLATE_REALDIR . "products/list.tpl";278 193 } 279 194 … … 368 283 $arrval[] = $this->arrSearchData['maker_id']; 369 284 } 370 285 371 286 // 検索結果対象となる商品の数を取得 372 287 $objQuery =& SC_Query::getSingletonInstance(); … … 537 452 $this->inCart = strlen($this->arrForm['product_id']) >= 1; 538 453 } 454 455 /** 456 * ページャ用データ設定(モバイル) 457 * 458 * @return void 459 */ 460 function lfSetPagerMobile() { 461 // ページ送り機能用のURLを作成する。 462 $objURL = new Net_URL($_SERVER['PHP_SELF']); 463 foreach ($_REQUEST as $key => $value) { 464 if ($key == session_name() || $key == 'pageno') { 465 continue; 466 } 467 $objURL->addQueryString($key, mb_convert_encoding($value, 'SJIS', CHAR_CODE)); 468 } 469 470 if ($this->objNavi->now_page > 1) { 471 $objURL->addQueryString('pageno', $this->objNavi->now_page - 1); 472 $this->tpl_previous_page = $objURL->path . '?' . $objURL->getQueryString(); 473 } 474 if ($this->objNavi->now_page < $this->objNavi->max_page) { 475 $objURL->addQueryString('pageno', $this->objNavi->now_page + 1); 476 $this->tpl_next_page = $objURL->path . '?' . $objURL->getQueryString(); 477 } 478 } 539 479 } 540 480 ?>
Note: See TracChangeset
for help on using the changeset viewer.