Changeset 15707


Ignore:
Timestamp:
2007/09/14 13:16:29 (17 years ago)
Author:
adachi
Message:

$objViewに渡すtplファイルのパスを相対パスへ変更

Location:
branches/feature-templates/html/frontparts/bloc
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-templates/html/frontparts/bloc/best5.php

    r11837 r15707  
    66 */ 
    77class LC_Best5Page { 
    8     function LC_Best5Page() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'best5.tpl';  // ¥á¥¤¥ó 
    11     } 
     8    function LC_Best5Page() { 
     9        /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
     10        $this->tpl_mainpage = 'include/bloc/best5.tpl'; // ¥á¥¤¥ó 
     11    } 
    1212} 
    1313 
    1414$objSubPage = new LC_Best5Page(); 
    15 $objSubView = new SC_SiteView(); 
    16 $objSiteInfo = $objView->objSiteInfo; 
     15$objSubView = new SC_UserView(USER_PATH); 
    1716 
    1817// ´ðËܾðÊó¤òÅϤ¹ 
     
    2827//¤ª¤¹¤¹¤á¾¦Éʸ¡º÷ 
    2928function lfGetRanking(){ 
    30     $objQuery = new SC_Query(); 
    31      
    32     $col = "A.*, name, price02_min, price01_min, main_list_image "; 
    33     $from = "dtb_best_products AS A INNER JOIN vw_products_allclass AS allcls using(product_id)"; 
    34     $where = "status = 1"; 
    35     $order = "rank"; 
    36     $objQuery->setorder($order); 
    37      
    38     $arrBestProducts = $objQuery->select($col, $from, $where); 
    39          
    40     return $arrBestProducts; 
     29    $objQuery = new SC_Query(); 
     30 
     31    $col = "A.*, name, price02_min, price01_min, main_list_image "; 
     32    $from = "dtb_best_products AS A INNER JOIN vw_products_allclass AS allcls using(product_id)"; 
     33    $where = "status = 1"; 
     34    $order = "rank"; 
     35    $objQuery->setorder($order); 
     36 
     37    $arrBestProducts = $objQuery->select($col, $from, $where); 
     38 
     39    return $arrBestProducts; 
    4140} 
    4241 
  • branches/feature-templates/html/frontparts/bloc/cart.php

    r256 r15707  
    66 */ 
    77class LC_CartPage { 
    8     function LC_CartPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'cart.tpl';   // ¥á¥¤¥ó 
    11     } 
     8    function LC_CartPage() { 
     9        /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
     10        $this->tpl_mainpage = 'include/bloc/cart.tpl';  // ¥á¥¤¥ó 
     11    } 
    1212} 
    1313 
    1414$objSubPage = new LC_CartPage(); 
    15 $objSubView = new SC_SiteView(); 
     15$objSubView = new SC_UserView(USER_PATH); 
    1616$objCart = new SC_CartSession(); 
    1717$objSiteInfo = new SC_SiteInfo; 
    1818 
    1919if (count($_SESSION[$objCart->key]) > 0){ 
    20     // ¥«¡¼¥È¾ðÊó¤ò¼èÆÀ 
    21     $arrCartList = $objCart->getCartList(); 
    22      
    23     // ¥«¡¼¥ÈÆâ¤Î¾¦ÉʣɣİìÍ÷¤ò¼èÆÀ 
    24     $arrAllProductID = $objCart->getAllProductID(); 
    25     // ¾¦Éʤ¬1¤Ä°Ê¾åÆþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¾¦ÉÊ̾¾Î¤ò¼èÆÀ 
    26     if (count($arrAllProductID) > 0){ 
    27         $objQuery = new SC_Query(); 
    28         $arrVal = array(); 
    29         $sql = ""; 
    30         $sql = "SELECT name FROM dtb_products WHERE product_id IN ( ?"; 
    31         $arrVal = array($arrAllProductID[0]); 
    32         for($i = 1 ; $i < count($arrAllProductID) ; $i++){ 
    33             $sql.= " ,? "; 
    34             array_push($arrVal, $arrAllProductID[$i]); 
    35         } 
    36         $sql.= " )"; 
    37          
    38         $arrProduct_name = $objQuery->getAll($sql, $arrVal); 
    39          
    40         foreach($arrProduct_name as $key => $val){ 
    41             $arrCartList[$key]['product_name'] = $val['name']; 
    42         } 
    43     } 
    44     // ŹÊÞ¾ðÊó¤Î¼èÆÀ 
    45     $arrInfo = $objSiteInfo->data; 
    46     // ¹ØÆþ¶â³Û¹ç·× 
    47     $ProductsTotal = $objCart->getAllProductsTotal($arrInfo); 
    48      
    49     // ¹ç·×¸Ä¿ô 
    50     $TotalQuantity = $objCart->getTotalQuantity(); 
    51      
    52     // Á÷ÎÁ̵ÎÁ¤Þ¤Ç¤Î¶â³Û 
    53     $arrCartList[0]['ProductsTotal'] = $ProductsTotal; 
    54     $arrCartList[0]['TotalQuantity'] = $TotalQuantity; 
    55     $deliv_free = $arrInfo['free_rule'] - $ProductsTotal; 
    56     $arrCartList[0]['free_rule'] = $arrInfo['free_rule']; 
    57     $arrCartList[0]['deliv_free'] = $deliv_free; 
    58      
    59     $objSubPage->arrCartList = $arrCartList; 
     20    // ¥«¡¼¥È¾ðÊó¤ò¼èÆÀ 
     21    $arrCartList = $objCart->getCartList(); 
     22 
     23    // ¥«¡¼¥ÈÆâ¤Î¾¦ÉʣɣİìÍ÷¤ò¼èÆÀ 
     24    $arrAllProductID = $objCart->getAllProductID(); 
     25    // ¾¦Éʤ¬1¤Ä°Ê¾åÆþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¾¦ÉÊ̾¾Î¤ò¼èÆÀ 
     26    if (count($arrAllProductID) > 0){ 
     27        $objQuery = new SC_Query(); 
     28        $arrVal = array(); 
     29        $sql = ""; 
     30        $sql = "SELECT name FROM dtb_products WHERE product_id IN ( ?"; 
     31        $arrVal = array($arrAllProductID[0]); 
     32        for($i = 1 ; $i < count($arrAllProductID) ; $i++){ 
     33            $sql.= " ,? "; 
     34            array_push($arrVal, $arrAllProductID[$i]); 
     35        } 
     36        $sql.= " )"; 
     37 
     38        $arrProduct_name = $objQuery->getAll($sql, $arrVal); 
     39 
     40        foreach($arrProduct_name as $key => $val){ 
     41            $arrCartList[$key]['product_name'] = $val['name']; 
     42        } 
     43    } 
     44    // ŹÊÞ¾ðÊó¤Î¼èÆÀ 
     45    $arrInfo = $objSiteInfo->data; 
     46    // ¹ØÆþ¶â³Û¹ç·× 
     47    $ProductsTotal = $objCart->getAllProductsTotal($arrInfo); 
     48 
     49    // ¹ç·×¸Ä¿ô 
     50    $TotalQuantity = $objCart->getTotalQuantity(); 
     51 
     52    // Á÷ÎÁ̵ÎÁ¤Þ¤Ç¤Î¶â³Û 
     53    $arrCartList[0]['ProductsTotal'] = $ProductsTotal; 
     54    $arrCartList[0]['TotalQuantity'] = $TotalQuantity; 
     55    $deliv_free = $arrInfo['free_rule'] - $ProductsTotal; 
     56    $arrCartList[0]['free_rule'] = $arrInfo['free_rule']; 
     57    $arrCartList[0]['deliv_free'] = $deliv_free; 
     58 
     59    $objSubPage->arrCartList = $arrCartList; 
    6060} 
    6161 
  • branches/feature-templates/html/frontparts/bloc/category.php

    r17 r15707  
    66 */ 
    77class LC_CatPage { 
    8     function LC_CatPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'category.tpl';   // ¥á¥¤¥ó 
    11     } 
     8    function LC_CatPage() { 
     9        /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
     10        $this->tpl_mainpage = 'include/bloc/category.tpl';  // ¥á¥¤¥ó 
     11    } 
    1212} 
    1313 
    1414$objSubPage = new LC_CatPage(); 
    15 $objSubView = new SC_SiteView(); 
     15$objSubView = new SC_UserView(USER_PATH); 
    1616 
    1717// ÁªÂòÃæ¤Î¥«¥Æ¥´¥êID¤òȽÄꤹ¤ë 
     
    2727// ¥«¥Æ¥´¥ê¥Ä¥ê¡¼¤Î¼èÆÀ 
    2828function lfGetCatTree($parent_category_id, $count_check = false, $objSubPage) { 
    29     $objQuery = new SC_Query(); 
    30     $col = "*"; 
    31     $from = "dtb_category left join dtb_category_total_count using (category_id)"; 
    32     // ÅÐÏ¿¾¦ÉÊ¿ô¤Î¥Á¥§¥Ã¥¯ 
    33     if($count_check) { 
    34         $where = "del_flg = 0 AND product_count > 0"; 
    35     } else { 
    36         $where = "del_flg = 0"; 
    37     } 
    38     $objQuery->setoption("ORDER BY rank DESC"); 
    39     $arrRet = $objQuery->select($col, $from, $where); 
    40      
    41     $arrParentID = sfGetParents($objQuery, 'dtb_category', 'parent_category_id', 'category_id', $parent_category_id); 
    42     $arrBrothersID = sfGetBrothersArray($arrRet, 'parent_category_id', 'category_id', $arrParentID); 
    43     $arrChildrenID = sfGetUnderChildrenArray($arrRet, 'parent_category_id', 'category_id', $parent_category_id); 
    44      
    45     $objSubPage->root_parent_id = $arrParentID[0]; 
    46      
    47     $arrDispID = array_merge($arrBrothersID, $arrChildrenID); 
    48      
    49     foreach($arrRet as $key => $array) { 
    50         foreach($arrDispID as $val) { 
    51             if($array['category_id'] == $val) { 
    52                 $arrRet[$key]['display'] = 1; 
    53                 break; 
    54             } 
    55         } 
    56     } 
    57      
    58     $objSubPage->arrTree = $arrRet; 
    59     return $objSubPage; 
     29    $objQuery = new SC_Query(); 
     30    $col = "*"; 
     31    $from = "dtb_category left join dtb_category_total_count using (category_id)"; 
     32    // ÅÐÏ¿¾¦ÉÊ¿ô¤Î¥Á¥§¥Ã¥¯ 
     33    if($count_check) { 
     34        $where = "del_flg = 0 AND product_count > 0"; 
     35    } else { 
     36        $where = "del_flg = 0"; 
     37    } 
     38    $objQuery->setoption("ORDER BY rank DESC"); 
     39    $arrRet = $objQuery->select($col, $from, $where); 
     40 
     41    $arrParentID = sfGetParents($objQuery, 'dtb_category', 'parent_category_id', 'category_id', $parent_category_id); 
     42    $arrBrothersID = sfGetBrothersArray($arrRet, 'parent_category_id', 'category_id', $arrParentID); 
     43    $arrChildrenID = sfGetUnderChildrenArray($arrRet, 'parent_category_id', 'category_id', $parent_category_id); 
     44 
     45    $objSubPage->root_parent_id = $arrParentID[0]; 
     46 
     47    $arrDispID = array_merge($arrBrothersID, $arrChildrenID); 
     48 
     49    foreach($arrRet as $key => $array) { 
     50        foreach($arrDispID as $val) { 
     51            if($array['category_id'] == $val) { 
     52                $arrRet[$key]['display'] = 1; 
     53                break; 
     54            } 
     55        } 
     56    } 
     57 
     58    $objSubPage->arrTree = $arrRet; 
     59    return $objSubPage; 
    6060} 
    6161?> 
  • branches/feature-templates/html/frontparts/bloc/login.php

    r17 r15707  
    66 */ 
    77class LC_LoginPage { 
    8     var $tpl_login_email; 
    9     function LC_LoginPage() { 
    10         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    11         $this->tpl_mainpage = BLOC_PATH . 'login.tpl';  // ¥á¥¤¥ó 
    12         $this->tpl_login = false; 
    13         $this->tpl_disable_logout = false; 
    14     } 
     8    var $tpl_login_email; 
     9    function LC_LoginPage() { 
     10        /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
     11        $this->tpl_mainpage = 'include/bloc/login.tpl'; // ¥á¥¤¥ó 
     12        $this->tpl_login = false; 
     13        $this->tpl_disable_logout = false; 
     14    } 
    1515} 
    1616 
     
    2222// ¥í¥°¥¤¥óȽÄê 
    2323if($objCustomer->isLoginSuccess()) { 
    24     $objSubPage->tpl_login = true; 
    25     $objSubPage->tpl_user_point = $objCustomer->getValue('point'); 
    26     $objSubPage->tpl_name1 = $objCustomer->getValue('name01'); 
    27     $objSubPage->tpl_name2 = $objCustomer->getValue('name02'); 
     24    $objSubPage->tpl_login = true; 
     25    $objSubPage->tpl_user_point = $objCustomer->getValue('point'); 
     26    $objSubPage->tpl_name1 = $objCustomer->getValue('name01'); 
     27    $objSubPage->tpl_name2 = $objCustomer->getValue('name02'); 
    2828} else { 
    29     // ¥¯¥Ã¥­¡¼È½Äê 
    30     $objSubPage->tpl_login_email = $objCookie->getCookie('login_email'); 
    31     if($objSubPage->tpl_login_email != "") { 
    32         $objSubPage->tpl_login_memory = "1"; 
    33     } 
    34      
    35     // POST¤µ¤ì¤Æ¤­¤¿ID¤¬¤¢¤ë¾ì¹ç¤ÏÍ¥À褹¤ë¡£ 
    36     if($_POST['login_email'] != "") { 
    37         $objSubPage->tpl_login_email = $_POST['login_email']; 
    38     } 
     29    // ¥¯¥Ã¥­¡¼È½Äê 
     30    $objSubPage->tpl_login_email = $objCookie->getCookie('login_email'); 
     31    if($objSubPage->tpl_login_email != "") { 
     32        $objSubPage->tpl_login_memory = "1"; 
     33    } 
     34 
     35    // POST¤µ¤ì¤Æ¤­¤¿ID¤¬¤¢¤ë¾ì¹ç¤ÏÍ¥À褹¤ë¡£ 
     36    if($_POST['login_email'] != "") { 
     37        $objSubPage->tpl_login_email = $_POST['login_email']; 
     38    } 
    3939} 
    4040 
    4141$objSubPage->tpl_disable_logout = lfCheckDisableLogout(); 
    42 $objSubView = new SC_SiteView(); 
     42$objSubView = new SC_UserView(USER_PATH); 
    4343$objSubView->assignobj($objSubPage); 
    4444$objSubView->display($objSubPage->tpl_mainpage); 
    4545//----------------------------------------------------------------------------------------------------------------------------------- 
    4646function lfCheckDisableLogout() { 
    47     global $arrDISABLE_LOGOUT; 
    48      
    49     $nowpage = $_SERVER['PHP_SELF']; 
    50      
    51     foreach($arrDISABLE_LOGOUT as $val) { 
    52         if($nowpage == $val) { 
    53             return true; 
    54         } 
    55     } 
    56     return false; 
     47    global $arrDISABLE_LOGOUT; 
     48 
     49    $nowpage = $_SERVER['PHP_SELF']; 
     50 
     51    foreach($arrDISABLE_LOGOUT as $val) { 
     52        if($nowpage == $val) { 
     53            return true; 
     54        } 
     55     } 
     56    return false; 
    5757} 
    5858?> 
  • branches/feature-templates/html/frontparts/bloc/news.php

    r11910 r15707  
    66 */ 
    77class LC_NewsPage { 
    8     function LC_NewsPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'news.tpl';   // ¥á¥¤¥ó 
    11     } 
     8    function LC_NewsPage() { 
     9        /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
     10        $this->tpl_mainpage = 'include/bloc/news.tpl';  // ¥á¥¤¥ó 
     11    } 
    1212} 
    1313 
    1414$objSubPage = new LC_NewsPage(); 
    15 $objSubView = new SC_SiteView(); 
     15$objSubView = new SC_UserView(USER_PATH); 
    1616 
    1717//¿·Ãå¾ðÊó¼èÆÀ 
     
    2222//----------------------------------------------------------------------------------------------------------------------------------- 
    2323function lfGetNews(){ 
    24     $conn = new SC_DBConn(); 
    25     $sql = "SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC"; 
    26     $list_data = $conn->getAll($sql); 
    27     return $list_data;   
     24    $conn = new SC_DBConn(); 
     25    $sql = "SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC"; 
     26    $list_data = $conn->getAll($sql); 
     27    return $list_data; 
    2828} 
    2929?> 
  • branches/feature-templates/html/frontparts/bloc/search_products.php

    r17 r15707  
    66 */ 
    77class LC_SearchProductsPage { 
    8     function LC_SearchProductsPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'search_products.tpl';    // ¥á¥¤¥ó 
    11     } 
     8    function LC_SearchProductsPage() { 
     9        /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
     10        $this->tpl_mainpage = 'include/bloc/search_products.tpl';   // ¥á¥¤¥ó 
     11    } 
    1212} 
    1313 
     
    2121 
    2222if(is_array($arrRet)) { 
    23     // ʸ»ú¥µ¥¤¥º¤òÀ©¸Â¤¹¤ë 
    24     foreach($arrRet as $key => $val) { 
    25         $arrRet[$key] = sfCutString($val, SEARCH_CATEGORY_LEN); 
    26     } 
     23    // ʸ»ú¥µ¥¤¥º¤òÀ©¸Â¤¹¤ë 
     24    foreach($arrRet as $key => $val) { 
     25        $arrRet[$key] = sfCutString($val, SEARCH_CATEGORY_LEN); 
     26    } 
    2727} 
    2828$objSubPage->arrCatList = $arrRet; 
    2929 
    30 $objSubView = new SC_SiteView(); 
     30$objSubView = new SC_UserView(USER_PATH); 
    3131$objSubView->assignobj($objSubPage); 
    3232$objSubView->display($objSubPage->tpl_mainpage); 
Note: See TracChangeset for help on using the changeset viewer.