Ignore:
Timestamp:
2007/07/20 15:58:59 (19 years ago)
Author:
nanasess
Message:

r15064 から svn cp
とりあえず暫定コミット.

  • UTF-8 に変更
  • slib.php, glib.php のクラス化
  • LC_Page の抽象化(一部)
Location:
branches/feature-module-update
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update

    • Property svn:ignore set to
      .cache

      .settings

      .projectOptions
  • branches/feature-module-update/html/admin/contents/recommend_search.php

    r12157 r15078  
    2222$objSess = new SC_Session(); 
    2323 
    24 // ǧ¾Ú²ÄÈݤÎȽÄê 
     24// 認証可否の判定 
    2525sfIsSuccess($objSess); 
    2626 
    2727if ($_POST['mode'] == "search") { 
    2828     
    29     // POSTÃͤΰú¤­·Ñ¤® 
     29    // POST値の引き継ぎ 
    3030    $objPage->arrForm = $_POST; 
    31     // ÆþÎÏʸ»ú¤Î¶¯À©ÊÑ´¹ 
     31    // 入力文字の強制変換 
    3232    lfConvertParam(); 
    3333     
     
    3535    $where = "del_flg = 0"; 
    3636     
    37     /* ÆþÎÏ¥¨¥é¡¼¤Ê¤· */ 
     37    /* 入力エラーなし */ 
    3838    foreach ($objPage->arrForm as $key => $val) { 
    3939        if($val == "") { 
     
    4848                break; 
    4949            case 'search_category_id': 
    50                 // »Ò¥«¥Æ¥´¥êID¤Î¼èÆÀ 
     50                // 子カテゴリIDの取得 
    5151                $arrRet = sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 
    5252                $tmp_where = ""; 
     
    7474    $order = "update_date DESC, product_id DESC"; 
    7575     
    76     // ÆÉ¤ß¹þ¤àÎó¤È¥Æ¡¼¥Ö¥ë¤Î»ØÄê 
     76    // 読み込む列とテーブルの指定 
    7777    $col = "product_id, name, category_id, main_list_image, status, product_code, price01, stock, stock_unlimited"; 
    7878    $from = "vw_products_nonclass AS noncls "; 
    7979         
    8080    $objQuery = new SC_Query(); 
    81     // ¹Ô¿ô¤Î¼èÆÀ 
     81    // 行数の取得 
    8282    $linemax = $objQuery->count("dtb_products", $where, $arrval); 
    83     $objPage->tpl_linemax = $linemax;               // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ 
     83    $objPage->tpl_linemax = $linemax;               // 何件が該当しました。表示用 
    8484 
    85     // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý 
     85    // ページ送りの処理 
    8686    if(is_numeric($_POST['search_page_max'])) {  
    8787        $page_max = $_POST['search_page_max']; 
     
    9090    } 
    9191 
    92     // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ 
     92    // ページ送りの取得 
    9393    $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX); 
    94     $objPage->tpl_strnavi = $objNavi->strnavi;      // ɽ¼¨Ê¸»úÎó 
     94    $objPage->tpl_strnavi = $objNavi->strnavi;      // 表示文字列 
    9595    $startno = $objNavi->start_row; 
    9696 
    97     // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) 
     97    // 取得範囲の指定(開始行番号、行数のセット) 
    9898    if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); 
    99     // ɽ¼¨½ç½ø 
     99    // 表示順序 
    100100    $objQuery->setorder($order); 
    101101 
    102     // view¤â¹Ê¹þ¤ß¤ò¤«¤±¤ë(mysqlÍÑ) 
     102    // viewも絞込みをかける(mysql用) 
    103103    sfViewWhere("&&noncls_where&&", $where, $arrval, $objQuery->order . " " .  $objQuery->setlimitoffset($page_max, $startno, true)); 
    104104 
    105     // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
     105    // 検索結果の取得 
    106106    $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    107107} 
    108108 
    109 // ¥«¥Æ¥´¥ê¼èÆÀ 
     109// カテゴリ取得 
    110110$objPage->arrCatList = sfGetCategoryList(); 
    111111 
     
    115115 
    116116 
    117 //----¡¡¥Ú¡¼¥¸É½¼¨ 
     117//---- ページ表示 
    118118$objView->assignobj($objPage); 
    119119$objView->display($objPage->tpl_mainpage); 
     
    123123//--------------------------------------------------------------------------------------------------------------------------------------------------------- 
    124124 
    125 /* ¼èÆÀʸ»úÎó¤ÎÊÑ´¹ */ 
     125/* 取得文字列の変換 */ 
    126126function lfConvertParam() { 
    127127    global $objPage; 
    128128    /* 
    129      *  ʸ»úÎó¤ÎÊÑ´¹ 
    130      *  K :  ¡ÖȾ³Ñ(ŽÊŽÝ޶ޏ)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹ 
    131      *  C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹ 
    132      *  V :  ÂùÅÀÉÕ¤­¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹   
    133      *  n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(ŽÊŽÝ޶ޏ)¡×¤ËÊÑ´¹ 
     129     *  文字列の変換 
     130     *  K :  「半角(ハンカク)片仮名」を「全角片仮名」に変換 
     131     *  C :  「全角ひら仮名」を「全角かた仮名」に変換 
     132     *  V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します  
     133     *  n :  「全角」数字を「半角(ハンカク)」に変換 
    134134     */ 
    135135    $arrConvList['search_name'] = "KVa"; 
    136136    $arrConvList['search_product_code'] = "KVa"; 
    137137     
    138     // ʸ»úÊÑ´¹ 
     138    // 文字変換 
    139139    foreach ($arrConvList as $key => $val) { 
    140         // POST¤µ¤ì¤Æ¤­¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£ 
     140        // POSTされてきた値のみ変換する。 
    141141        if(isset($objPage->arrForm[$key])) { 
    142142            $objPage->arrForm[$key] = mb_convert_kana($objPage->arrForm[$key] ,$val); 
Note: See TracChangeset for help on using the changeset viewer.