Changeset 15707
- Timestamp:
- 2007/09/14 13:16:29 (17 years ago)
- Location:
- branches/feature-templates/html/frontparts/bloc
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-templates/html/frontparts/bloc/best5.php
r11837 r15707 6 6 */ 7 7 class LC_Best5Page { 8 9 10 $this->tpl_mainpage = BLOC_PATH . 'best5.tpl'; // ¥á¥¤¥ó11 8 function LC_Best5Page() { 9 /** ɬ¤ºÊѹ¹¤¹¤ë **/ 10 $this->tpl_mainpage = 'include/bloc/best5.tpl'; // ¥á¥¤¥ó 11 } 12 12 } 13 13 14 14 $objSubPage = new LC_Best5Page(); 15 $objSubView = new SC_SiteView(); 16 $objSiteInfo = $objView->objSiteInfo; 15 $objSubView = new SC_UserView(USER_PATH); 17 16 18 17 // ´ðËܾðÊó¤òÅϤ¹ … … 28 27 //¤ª¤¹¤¹¤á¾¦Éʸ¡º÷ 29 28 function lfGetRanking(){ 30 31 32 33 34 35 36 37 38 39 40 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; 41 40 } 42 41 -
branches/feature-templates/html/frontparts/bloc/cart.php
r256 r15707 6 6 */ 7 7 class LC_CartPage { 8 9 10 $this->tpl_mainpage = BLOC_PATH . 'cart.tpl'; // ¥á¥¤¥ó11 8 function LC_CartPage() { 9 /** ɬ¤ºÊѹ¹¤¹¤ë **/ 10 $this->tpl_mainpage = 'include/bloc/cart.tpl'; // ¥á¥¤¥ó 11 } 12 12 } 13 13 14 14 $objSubPage = new LC_CartPage(); 15 $objSubView = new SC_ SiteView();15 $objSubView = new SC_UserView(USER_PATH); 16 16 $objCart = new SC_CartSession(); 17 17 $objSiteInfo = new SC_SiteInfo; 18 18 19 19 if (count($_SESSION[$objCart->key]) > 0){ 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 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; 60 60 } 61 61 -
branches/feature-templates/html/frontparts/bloc/category.php
r17 r15707 6 6 */ 7 7 class LC_CatPage { 8 9 10 $this->tpl_mainpage = BLOC_PATH . 'category.tpl'; // ¥á¥¤¥ó11 8 function LC_CatPage() { 9 /** ɬ¤ºÊѹ¹¤¹¤ë **/ 10 $this->tpl_mainpage = 'include/bloc/category.tpl'; // ¥á¥¤¥ó 11 } 12 12 } 13 13 14 14 $objSubPage = new LC_CatPage(); 15 $objSubView = new SC_ SiteView();15 $objSubView = new SC_UserView(USER_PATH); 16 16 17 17 // ÁªÂòÃæ¤Î¥«¥Æ¥´¥êID¤òȽÄꤹ¤ë … … 27 27 // ¥«¥Æ¥´¥ê¥Ä¥ê¡¼¤Î¼èÆÀ 28 28 function lfGetCatTree($parent_category_id, $count_check = false, $objSubPage) { 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 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; 60 60 } 61 61 ?> -
branches/feature-templates/html/frontparts/bloc/login.php
r17 r15707 6 6 */ 7 7 class LC_LoginPage { 8 9 10 11 $this->tpl_mainpage = BLOC_PATH . 'login.tpl'; // ¥á¥¤¥ó12 13 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 } 15 15 } 16 16 … … 22 22 // ¥í¥°¥¤¥óȽÄê 23 23 if($objCustomer->isLoginSuccess()) { 24 25 26 27 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'); 28 28 } else { 29 30 31 32 33 34 35 36 37 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 } 39 39 } 40 40 41 41 $objSubPage->tpl_disable_logout = lfCheckDisableLogout(); 42 $objSubView = new SC_ SiteView();42 $objSubView = new SC_UserView(USER_PATH); 43 43 $objSubView->assignobj($objSubPage); 44 44 $objSubView->display($objSubPage->tpl_mainpage); 45 45 //----------------------------------------------------------------------------------------------------------------------------------- 46 46 function lfCheckDisableLogout() { 47 48 49 50 51 52 53 54 55 56 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; 57 57 } 58 58 ?> -
branches/feature-templates/html/frontparts/bloc/news.php
r11910 r15707 6 6 */ 7 7 class LC_NewsPage { 8 9 10 $this->tpl_mainpage = BLOC_PATH . 'news.tpl'; // ¥á¥¤¥ó11 8 function LC_NewsPage() { 9 /** ɬ¤ºÊѹ¹¤¹¤ë **/ 10 $this->tpl_mainpage = 'include/bloc/news.tpl'; // ¥á¥¤¥ó 11 } 12 12 } 13 13 14 14 $objSubPage = new LC_NewsPage(); 15 $objSubView = new SC_ SiteView();15 $objSubView = new SC_UserView(USER_PATH); 16 16 17 17 //¿·Ãå¾ðÊó¼èÆÀ … … 22 22 //----------------------------------------------------------------------------------------------------------------------------------- 23 23 function lfGetNews(){ 24 25 26 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; 28 28 } 29 29 ?> -
branches/feature-templates/html/frontparts/bloc/search_products.php
r17 r15707 6 6 */ 7 7 class LC_SearchProductsPage { 8 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 } 12 12 } 13 13 … … 21 21 22 22 if(is_array($arrRet)) { 23 24 25 26 23 // ʸ»ú¥µ¥¤¥º¤òÀ©¸Â¤¹¤ë 24 foreach($arrRet as $key => $val) { 25 $arrRet[$key] = sfCutString($val, SEARCH_CATEGORY_LEN); 26 } 27 27 } 28 28 $objSubPage->arrCatList = $arrRet; 29 29 30 $objSubView = new SC_ SiteView();30 $objSubView = new SC_UserView(USER_PATH); 31 31 $objSubView->assignobj($objSubPage); 32 32 $objSubView->display($objSubPage->tpl_mainpage);
Note: See TracChangeset
for help on using the changeset viewer.