- Timestamp:
- 2006/11/16 17:15:53 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/html/admin/contents/recommend.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/admin/contents/recommend.php
r5934 r8386 19 19 20 20 $conn = new SC_DBConn(); 21 $objQuery = new SC_Query(); 21 22 $objPage = new LC_Page(); 22 23 $objView = new SC_AdminView(); … … 55 56 $objPage->arrForm['create_date'] = "NOW()"; 56 57 57 $objQuery = new SC_Query();58 58 $objQuery->insert("dtb_best_products", $objPage->arrForm ); 59 // $conn->autoExecute("dtb_best_products", $objPage->arrForm );60 59 } 61 60 … … 66 65 $conn->query($sql, array($_POST['category_id'] ,$_POST['rank'])); 67 66 68 }69 70 // ¥«¥Æ¥´¥êID¼èÆÀ ̵¤¤¤È¤¤Ï¥È¥Ã¥×¥Ú¡¼¥¸71 if ( sfCheckNumLength($_POST['category_id']) ){72 $objPage->category_id = $_POST['category_id'];73 } else {74 $objPage->category_id = 0;75 }76 77 // ´û¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ëÆâÍÆ¤ò¼èÆÀ¤¹¤ë78 $sql = "SELECT B.name, B.main_list_image, A.* FROM dtb_best_products as A INNER JOIN dtb_products as B USING (product_id)79 WHERE A.category_id = ? AND A.del_flg = 0 ORDER BY rank";80 $arrItems = $conn->getAll($sql, array($objPage->category_id));81 foreach( $arrItems as $data ){82 $objPage->arrItems[$data['rank']] = $data;83 67 } 84 68 … … 97 81 } 98 82 83 // ¥ª¥¹¥¹¥á¾¦ÉʼèÆÀ 84 lfGetRecommentdProduct(); 85 99 86 //³Æ¥Ú¡¼¥¸¶¦ÄÌ 100 87 $objPage->cnt_question = 6; 101 88 $objPage->arrActive = $arrActive; 102 89 $objPage->arrQuestion = $arrQuestion; 103 104 // ¥«¥Æ¥´¥ê¼èÆÀ105 $objPage->arrCatList = sfGetCategoryList("level = 1");106 90 107 91 //----¡¡¥Ú¡¼¥¸É½¼¨ … … 140 124 } 141 125 126 /* ¾¦ÉʤΰìÍ÷¤ò¼èÆÀ */ 127 function lfGetRecommentdProduct() { 128 129 global $objQuery; 130 global $objPage; 131 132 // ´û¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ëÆâÍÆ¤ò¼èÆÀ¤¹¤ë 133 $sql = "SELECT B.name, B.main_list_image, A.* FROM dtb_best_products as A INNER JOIN dtb_products as B USING (product_id) 134 WHERE A.del_flg = 0 ORDER BY rank"; 135 $arrItems = $objQuery->getAll($sql, array($objPage->category_id)); 136 foreach( $arrItems as $data ){ 137 $objPage->arrItems[$data['rank']] = $data; 138 } 139 } 142 140 ?>
Note: See TracChangeset
for help on using the changeset viewer.
