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

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

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

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update

    • Property svn:ignore set to
      .cache

      .settings

      .projectOptions
  • branches/feature-module-update/html/frontparts/bloc/best5.php

    r12157 r15078  
    77class LC_Best5Page { 
    88    function LC_Best5Page() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'best5.tpl';  // ¥á¥¤¥ó 
     9        /** 必ず変更する **/ 
     10        $this->tpl_mainpage = BLOC_PATH . 'best5.tpl';  // メイン 
    1111    } 
    1212} 
     
    1616$objSiteInfo = $objView->objSiteInfo; 
    1717 
    18 // ´ðËܾðÊó¤òÅϤ¹ 
     18// 基本情報を渡す 
    1919$objSiteInfo = new SC_SiteInfo(); 
    2020$objSubPage->arrInfo = $objSiteInfo->data; 
    2121 
    22 //¤ª¤¹¤¹¤á¾¦ÉÊɽ¼¨ 
     22//おすすめ商品表示 
    2323$objSubPage->arrBestProducts = lfGetRanking(); 
    2424 
     
    2626$objSubView->display($objSubPage->tpl_mainpage); 
    2727//----------------------------------------------------------------------------------------------------------------------------------- 
    28 //¤ª¤¹¤¹¤á¾¦Éʸ¡º÷ 
     28//おすすめ商品検索 
    2929function lfGetRanking(){ 
    3030    $objQuery = new SC_Query(); 
  • branches/feature-module-update/html/frontparts/bloc/cart.php

    r12157 r15078  
    77class LC_CartPage { 
    88    function LC_CartPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'cart.tpl';   // ¥á¥¤¥ó 
     9        /** 必ず変更する **/ 
     10        $this->tpl_mainpage = BLOC_PATH . 'cart.tpl';   // メイン 
    1111    } 
    1212} 
     
    1818 
    1919if (count($_SESSION[$objCart->key]) > 0){ 
    20     // ¥«¡¼¥È¾ðÊó¤ò¼èÆÀ 
     20    // カート情報を取得 
    2121    $arrCartList = $objCart->getCartList(); 
    2222     
    23     // ¥«¡¼¥ÈÆâ¤Î¾¦ÉʣɣİìÍ÷¤ò¼èÆÀ 
     23    // カート内の商品ID一覧を取得 
    2424    $arrAllProductID = $objCart->getAllProductID(); 
    25     // ¾¦Éʤ¬1¤Ä°Ê¾åÆþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¾¦ÉÊ̾¾Î¤ò¼èÆÀ 
     25    // 商品が1つ以上入っている場合には商品名称を取得 
    2626    if (count($arrAllProductID) > 0){ 
    2727        $objQuery = new SC_Query(); 
     
    4242        } 
    4343    } 
    44     // ŹÊÞ¾ðÊó¤Î¼èÆÀ 
     44    // 店舗情報の取得 
    4545    $arrInfo = $objSiteInfo->data; 
    46     // ¹ØÆþ¶â³Û¹ç·× 
     46    // 購入金額合計 
    4747    $ProductsTotal = $objCart->getAllProductsTotal($arrInfo); 
    4848     
    49     // ¹ç·×¸Ä¿ô 
     49    // 合計個数 
    5050    $TotalQuantity = $objCart->getTotalQuantity(); 
    5151     
    52     // Á÷ÎÁ̵ÎÁ¤Þ¤Ç¤Î¶â³Û 
     52    // 送料無料までの金額 
    5353    $arrCartList[0]['ProductsTotal'] = $ProductsTotal; 
    5454    $arrCartList[0]['TotalQuantity'] = $TotalQuantity; 
  • branches/feature-module-update/html/frontparts/bloc/category.php

    r12157 r15078  
    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 = BLOC_PATH . 'category.tpl';   // メイン 
     11    } 
    1212} 
    1313 
     
    1515$objSubView = new SC_SiteView(); 
    1616 
    17 // ÁªÂòÃæ¤Î¥«¥Æ¥´¥êID¤òȽÄꤹ¤ë 
    18 $category_id = sfGetCategoryId($_GET['product_id'], $_GET['category_id']); 
     17// 選択中のカテゴリIDを判定する 
     18$category_id = SC_Utils::sfGetCategoryId($_GET['product_id'], $_GET['category_id']); 
    1919 
    20 // ÁªÂòÃæ¤Î¥«¥Æ¥´¥êID 
     20// 選択中のカテゴリID 
    2121$objSubPage->tpl_category_id = $category_id; 
    2222$objSubPage = lfGetCatTree($category_id, true, $objSubPage); 
     
    2525$objSubView->display($objSubPage->tpl_mainpage); 
    2626//----------------------------------------------------------------------------------------------------------------------------------- 
    27 // ¥«¥Æ¥´¥ê¥Ä¥ê¡¼¤Î¼èÆÀ 
     27// カテゴリツリーの取得 
    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 = SC_Utils::sfGetParents($objQuery, 'dtb_category', 'parent_category_id', 'category_id', $parent_category_id); 
     42    $arrBrothersID = SC_Utils::sfGetBrothersArray($arrRet, 'parent_category_id', 'category_id', $arrParentID); 
     43    $arrChildrenID = SC_Utils::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-module-update/html/frontparts/bloc/login.php

    r12157 r15078  
    88    var $tpl_login_email; 
    99    function LC_LoginPage() { 
    10         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    11         $this->tpl_mainpage = BLOC_PATH . 'login.tpl';  // ¥á¥¤¥ó 
     10        /** 必ず変更する **/ 
     11        $this->tpl_mainpage = BLOC_PATH . 'login.tpl';  // メイン 
    1212        $this->tpl_login = false; 
    1313        $this->tpl_disable_logout = false; 
     
    1717$objSubPage = new LC_LoginPage(); 
    1818$objCustomer = new SC_Customer(); 
    19 // ¥¯¥Ã¥­¡¼´ÉÍý¥¯¥é¥¹ 
     19// クッキー管理クラス 
    2020$objCookie = new SC_Cookie(COOKIE_EXPIRE); 
    2121 
    22 // ¥í¥°¥¤¥óȽÄê 
     22// ログイン判定 
    2323if($objCustomer->isLoginSuccess()) { 
    2424    $objSubPage->tpl_login = true; 
     
    2727    $objSubPage->tpl_name2 = $objCustomer->getValue('name02'); 
    2828} else { 
    29     // ¥¯¥Ã¥­¡¼È½Äê 
     29    // クッキー判定 
    3030    $objSubPage->tpl_login_email = $objCookie->getCookie('login_email'); 
    3131    if($objSubPage->tpl_login_email != "") { 
     
    3333    } 
    3434     
    35     // POST¤µ¤ì¤Æ¤­¤¿ID¤¬¤¢¤ë¾ì¹ç¤ÏÍ¥À褹¤ë¡£ 
     35    // POSTされてきたIDがある場合は優先する。 
    3636    if($_POST['login_email'] != "") { 
    3737        $objSubPage->tpl_login_email = $_POST['login_email']; 
  • branches/feature-module-update/html/frontparts/bloc/news.php

    r12157 r15078  
    77class LC_NewsPage { 
    88    function LC_NewsPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'news.tpl';   // ¥á¥¤¥ó 
     9        /** 必ず変更する **/ 
     10        $this->tpl_mainpage = BLOC_PATH . 'news.tpl';   // メイン 
    1111    } 
    1212} 
     
    1515$objSubView = new SC_SiteView(); 
    1616 
    17 //¿·Ãå¾ðÊó¼èÆÀ 
     17//新着情報取得 
    1818$objSubPage->arrNews = lfGetNews(); 
    1919 
  • branches/feature-module-update/html/frontparts/bloc/search_products.php

    r12157 r15078  
    77class LC_SearchProductsPage { 
    88    function LC_SearchProductsPage() { 
    9         /** ɬ¤ºÊѹ¹¤¹¤ë **/ 
    10         $this->tpl_mainpage = BLOC_PATH . 'search_products.tpl';    // ¥á¥¤¥ó 
     9        /** 必ず変更する **/ 
     10        $this->tpl_mainpage = BLOC_PATH . 'search_products.tpl';    // メイン 
    1111    } 
    1212} 
    1313 
    1414$objSubPage = new LC_SearchProductsPage(); 
    15 $arrSearch = array();   // ¸¡º÷¹àÌÜɽ¼¨ÍÑ 
     15$arrSearch = array();   // 検索項目表示用 
    1616 
    17 // ÁªÂòÃæ¤Î¥«¥Æ¥´¥êID¤òȽÄꤹ¤ë 
     17// 選択中のカテゴリIDを判定する 
    1818$objSubPage->category_id = sfGetCategoryId($_GET['product_id'], $_GET['category_id']); 
    19 // ¥«¥Æ¥´¥ê¸¡º÷ÍÑÁªÂò¥ê¥¹¥È 
    20 $arrRet = sfGetCategoryList('', true, '¡¡'); 
     19// カテゴリ検索用選択リスト 
     20$arrRet = sfGetCategoryList('', true, ' '); 
    2121 
    2222if(is_array($arrRet)) { 
    23     // ʸ»ú¥µ¥¤¥º¤òÀ©¸Â¤¹¤ë 
     23    // 文字サイズを制限する 
    2424    foreach($arrRet as $key => $val) { 
    2525        $arrRet[$key] = sfCutString($val, SEARCH_CATEGORY_LEN); 
Note: See TracChangeset for help on using the changeset viewer.