Changeset 8386 for temp


Ignore:
Timestamp:
2006/11/16 17:15:53 (20 years ago)
Author:
uehara
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/contents/recommend.php

    r5934 r8386  
    1919 
    2020$conn = new SC_DBConn(); 
     21$objQuery = new SC_Query(); 
    2122$objPage = new LC_Page(); 
    2223$objView = new SC_AdminView(); 
     
    5556        $objPage->arrForm['create_date'] = "NOW()"; 
    5657         
    57         $objQuery = new SC_Query(); 
    5858        $objQuery->insert("dtb_best_products", $objPage->arrForm ); 
    59 //      $conn->autoExecute("dtb_best_products", $objPage->arrForm ); 
    6059    }    
    6160 
     
    6665    $conn->query($sql, array($_POST['category_id'] ,$_POST['rank'])); 
    6766     
    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; 
    8367} 
    8468 
     
    9781} 
    9882 
     83// ¥ª¥¹¥¹¥á¾¦ÉʼèÆÀ 
     84lfGetRecommentdProduct(); 
     85 
    9986//³Æ¥Ú¡¼¥¸¶¦ÄÌ 
    10087$objPage->cnt_question = 6; 
    10188$objPage->arrActive = $arrActive; 
    10289$objPage->arrQuestion = $arrQuestion; 
    103  
    104 // ¥«¥Æ¥´¥ê¼èÆÀ 
    105 $objPage->arrCatList = sfGetCategoryList("level = 1"); 
    10690 
    10791//----¡¡¥Ú¡¼¥¸É½¼¨ 
     
    140124} 
    141125 
     126/* ¾¦ÉʤΰìÍ÷¤ò¼èÆÀ */ 
     127function 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} 
    142140?> 
Note: See TracChangeset for help on using the changeset viewer.