Ignore:
Timestamp:
2007/10/09 01:21:38 (19 years ago)
Author:
adachi
Message:

merged branches/feature-templates r16325-16337

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/html/products/list.php

    r13579 r16338  
    1818        $this->arrDELIVERYDATE = $arrDELIVERYDATE; 
    1919        global $arrPRODUCTLISTMAX; 
    20         $this->arrPRODUCTLISTMAX = $arrPRODUCTLISTMAX;       
     20        $this->arrPRODUCTLISTMAX = $arrPRODUCTLISTMAX; 
    2121        /* 
    2222         session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç 
     
    6666    // ¾¦ÉÊTOP¤Îɽ¼¨½èÍý 
    6767    /** ɬ¤º»ØÄꤹ¤ë **/ 
    68     $objPage->tpl_mainpage = HTML_PATH . "user_data/templates/list.tpl";        // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È     
    69      
     68    $objPage->tpl_mainpage = HTML_PATH . "user_data/templates/list.tpl";        // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È 
     69 
    7070    $objPage->arrBestItems = sfGetBestProducts($conn, $category_id); 
    7171    $objPage->BEST_ROOP_MAX = ceil((BEST_MAX-1)/2); 
     
    7373    if ($_GET['mode'] == 'search' && strlen($_GET['category_id']) == 0 ){ 
    7474        // ¸¡º÷»þ¤Ëcategory_id¤¬GET¤Ë¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï¡¢²¾¤ËËä¤á¤¿ID¤ò¶õÇò¤ËÌ᤹ 
    75         $category_id = '';   
    76     } 
    77      
     75        $category_id = ''; 
     76    } 
     77 
    7878    // ¾¦ÉʰìÍ÷¤Îɽ¼¨½èÍý 
    7979    $objPage = lfDispProductsList($category_id, $_GET['name'], $objPage->disp_number, $_POST['orderby']); 
    80      
     80 
    8181    // ¸¡º÷¾ò·ï¤ò²èÌ̤Ëɽ¼¨ 
    8282    // ¥«¥Æ¥´¥ê¡¼¸¡º÷¾ò·ï 
     
    8787        $arrSearch['category'] = $arrCat; 
    8888    } 
    89      
     89 
    9090    // ¾¦ÉÊ̾¸¡º÷¾ò·ï 
    9191    if ($_GET['name'] === "") { 
     
    141141$objPage->arrSearch = $arrSearch; 
    142142 
    143 sfCustomDisplay($objPage); 
    144  
     143$objView = new SC_SiteView(); 
     144$objView->assignObj($objPage); 
     145$objView->display(SITE_FRAME); 
    145146//----------------------------------------------------------------------------------------------------------------------------------- 
    146147/* ¥«¥Æ¥´¥êID¤¬¥ë¡¼¥È¤«¤É¤¦¤«¤ÎȽÄê */ 
     
    157158function lfDispProductsList($category_id, $name, $disp_num, $orderby) { 
    158159    global $objPage; 
    159     $objQuery = new SC_Query();  
     160    $objQuery = new SC_Query(); 
    160161    $objPage->tpl_pageno = $_POST['pageno']; 
    161162 
    162163    //ɽ¼¨·ï¿ô¤Ç¥Æ¥ó¥×¥ì¡¼¥È¤òÀÚ¤êÂØ¤¨¤ë 
    163     $objPage->tpl_mainpage = HTML_PATH . "user_data/templates/list.tpl";        // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È         
     164    $objPage->tpl_mainpage = HTML_PATH . "user_data/templates/list.tpl";        // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È 
    164165 
    165166    //ɽ¼¨½ç½ø 
     
    177178        break; 
    178179    } 
    179      
     180 
    180181    // ¾¦Éʸ¡º÷¾ò·ï¤ÎºîÀ®¡Ê̤ºï½ü¡¢É½¼¨¡Ë 
    181182    $where = "del_flg = 0 AND status = 1 "; 
     
    187188        } 
    188189    } 
    189          
     190 
    190191    // ¾¦ÉÊ̾¤òwhereʸ¤Ë 
    191192    $name = ereg_replace(",", "", $name); 
    192193    if ( strlen($name) > 0 ){ 
    193194        $where .= " AND ( name ILIKE ? OR comment3 ILIKE ?) "; 
    194         $ret = sfManualEscape($name);        
     195        $ret = sfManualEscape($name); 
    195196        $arrval[] = "%$ret%"; 
    196197        $arrval[] = "%$ret%"; 
    197198    } 
    198              
     199 
    199200    // ¹Ô¿ô¤Î¼èÆÀ 
    200201    $linemax = $objQuery->count("vw_products_allclass AS allcls", $where, $arrval); 
    201202    $objPage->tpl_linemax = $linemax;   // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ 
    202      
     203 
    203204    // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ 
    204205    $objNavi = new SC_PageNavi($_POST['pageno'], $linemax, $disp_num, "fnNaviPage", NAVI_PMAX); 
    205      
     206 
    206207    $strnavi = $objNavi->strnavi; 
    207208    $strnavi = str_replace('onclick="fnNaviPage', 'onclick="form1.mode.value=\''.'\'; fnNaviPage', $strnavi); 
    208209    $objPage->tpl_strnavi = $strnavi;       // ɽ¼¨Ê¸»úÎó 
    209210    $startno = $objNavi->start_row;                 // ³«»Ï¹Ô 
    210      
     211 
    211212    // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) 
    212213    $objQuery->setlimitoffset($disp_num, $startno); 
    213214    // ɽ¼¨½ç½ø 
    214215    $objQuery->setorder($order); 
    215      
    216      
    217      
    218      
    219      
    220      
    221      
    222      
     216 
     217 
     218 
     219 
     220 
     221 
     222 
     223 
    223224    // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    224225    $objPage->arrProducts = $objQuery->select("*", "vw_products_allclass AS allcls", $where, $arrval); 
    225      
     226 
    226227    // µ¬³Ê̾°ìÍ÷ 
    227228    $arrClassName = sfGetIDValueList("dtb_class", "class_id", "name"); 
     
    243244function lfMakeSelect($product_id, $arrClassName, $arrClassCatName) { 
    244245    global $objPage; 
    245      
     246 
    246247    $classcat_find1 = false; 
    247248    $classcat_find2 = false; 
    248249    // ºß¸Ë¤¢¤ê¤Î¾¦ÉʤÎ̵ͭ 
    249250    $stock_find = false; 
    250      
    251     // ¾¦Éʵ¬³Ê¾ðÊó¤Î¼èÆÀ     
     251 
     252    // ¾¦Éʵ¬³Ê¾ðÊó¤Î¼èÆÀ 
    252253    $arrProductsClass = lfGetProductsClass($product_id); 
    253      
     254 
    254255    // µ¬³Ê1¥¯¥é¥¹Ì¾¤Î¼èÆÀ 
    255256    $objPage->tpl_class_name1[$product_id] = $arrClassName[$arrProductsClass[0]['class_id1']]; 
    256257    // µ¬³Ê2¥¯¥é¥¹Ì¾¤Î¼èÆÀ 
    257258    $objPage->tpl_class_name2[$product_id] = $arrClassName[$arrProductsClass[0]['class_id2']]; 
    258      
    259     // ¤¹¤Ù¤Æ¤ÎÁȤ߹ç¤ï¤»¿ô    
     259 
     260    // ¤¹¤Ù¤Æ¤ÎÁȤ߹ç¤ï¤»¿ô 
    260261    $count = count($arrProductsClass); 
    261      
     262 
    262263    $classcat_id1 = ""; 
    263      
     264 
    264265    $arrSele = array(); 
    265266    $arrList = array(); 
    266      
     267 
    267268    $list_id = 0; 
    268269    $arrList[0] = "\tlist". $product_id. "_0 = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤'"; 
    269270    $arrVal[0] = "\tval". $product_id. "_0 = new Array(''"; 
    270      
     271 
    271272    for ($i = 0; $i < $count; $i++) { 
    272273        // ºß¸Ë¤Î¥Á¥§¥Ã¥¯ 
     
    274275            continue; 
    275276        } 
    276          
     277 
    277278        $stock_find = true; 
    278          
     279 
    279280        // µ¬³Ê1¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ 
    280281        if($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']){ 
     
    285286            $list_id++; 
    286287        } 
    287          
     288 
    288289        // µ¬³Ê2¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ 
    289290        $classcat_id2 = $arrProductsClass[$i]['classcategory_id2']; 
    290          
     291 
    291292        // ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹É½¼¨ÃÍ 
    292293        if($arrList[$list_id] == "") { 
     
    295296            $arrList[$list_id].= ", '".$arrClassCatName[$classcat_id2]."'"; 
    296297        } 
    297          
     298 
    298299        // ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹POSTÃÍ 
    299300        if($arrVal[$list_id] == "") { 
     
    302303            $arrVal[$list_id].= ", '".$classcat_id2."'"; 
    303304        } 
    304     }    
    305      
     305    } 
     306 
    306307    $arrList[$list_id].=");\n"; 
    307308    $arrVal[$list_id].=");\n"; 
    308          
     309 
    309310    // µ¬³Ê1 
    310311    $objPage->arrClassCat1[$product_id] = $arrSele; 
    311      
     312 
    312313    $lists = "\tlists".$product_id. " = new Array("; 
    313314    $no = 0; 
     
    322323    } 
    323324    $objPage->tpl_javascript.= $lists.");\n"; 
    324      
     325 
    325326    $vals = "\tvals".$product_id. " = new Array("; 
    326327    $no = 0; 
     
    335336    } 
    336337    $objPage->tpl_javascript.= $vals.");\n"; 
    337      
     338 
    338339    // ÁªÂò¤µ¤ì¤Æ¤¤¤ëµ¬³Ê2ID 
    339340    $classcategory_id = "classcategory_id". $product_id; 
     
    344345        $classcat_find1 = true; 
    345346    } 
    346      
     347 
    347348    // µ¬³Ê2¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë 
    348349    if($arrProductsClass[0]['classcategory_id2'] != '0') { 
    349350        $classcat_find2 = true; 
    350351    } 
    351          
     352 
    352353    $objPage->tpl_classcat_find1[$product_id] = $classcat_find1; 
    353354    $objPage->tpl_classcat_find2[$product_id] = $classcat_find2; 
    354355    $objPage->tpl_stock_find[$product_id] = $stock_find; 
    355          
     356 
    356357    return $objPage; 
    357358} 
     
    374375function lfCheckError($id) { 
    375376    global $objPage; 
    376      
     377 
    377378    // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 
    378379    $objErr = new SC_CheckError(); 
    379      
     380 
    380381    $classcategory_id1 = "classcategory_id". $id. "_1"; 
    381382    $classcategory_id2 = "classcategory_id". $id. "_2"; 
     
    389390    } 
    390391    $objErr->doFunc(array("¸Ä¿ô", $quantity, INT_LEN), array("EXIST_CHECK", "ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    391              
     392 
    392393    return $objErr->arrErr; 
    393394} 
     
    402403        $objPage->tpl_sale_limit[$product['product_id']] = $product['sale_limit']; 
    403404    } 
    404      
     405 
    405406    return $objPage; 
    406407} 
     
    421422function lfconvertParam () { 
    422423    global $objPage; 
    423      
     424 
    424425    foreach ($objPage->arrForm as $key => $value) { 
    425426        if (preg_match('/^quantity[0-9]+/', $key)) { 
Note: See TracChangeset for help on using the changeset viewer.