Changeset 354 for branches/dev


Ignore:
Timestamp:
2007/02/22 18:53:06 (19 years ago)
Author:
kakinaka
Message:
 
Location:
branches/dev/html
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/admin/products/review_edit.php

    r304 r354  
    5757//¾¦Éʤ´¤È¤Î¥ì¥Ó¥å¡¼É½¼¨¿ô¼èÆÀ 
    5858$count = $objQuery->count("dtb_review", "del_flg=0 AND status=1 AND product_id=?", array($objPage->arrReview['product_id'])); 
    59 //¥ì¥Ó¥å¡¼É½¼¨¿ô¤¬ÀßÄêÃͰʾå¤Î¾ì¹ç 
    60 if ($count >= REVIEW_REGIST_MAX){ 
    61     //ɽ¼¨¤ÏÁªÂò¤Ç¤­¤Ê¤¤ 
    62     $objPage->tpl_status_change = false; 
    63 }else{ 
    64     //ξÊýÁªÂò²Äǽ 
    65     $objPage->tpl_status_change = true; 
    66 } 
    67                      
     59//ξÊýÁªÂò²Äǽ 
     60$objPage->tpl_status_change = true; 
     61 
    6862switch($_POST['mode']) { 
    6963//ÅÐÏ¿ 
     
    7266    $arrReview = lfConvertParam($_POST, $arrRegistColumn); 
    7367    $objPage->arrErr = lfCheckError($arrReview); 
    74     //Èóɽ¼¨¤«¤éɽ¼¨¤Ë¥¹¥Æ¡¼¥¿¥¹¤òÀÚ¤êÂØ¤¨¤Æ¡¢¾¦Éʤ´¤È¤Îɽ¼¨¥ì¥Ó¥å¡¼¿ô¤¬ÀßÄêÃͤòͤ¨¤Æ¤¤¤ë¤È¤­ 
    75     if ($arrReview['pre_status'] == '2' && $arrReview['status'] == '1' && $count >= REVIEW_REGIST_MAX){ 
    76         $objPage->arrErr['status'] = '¢¨ ¥ì¥Ó¥å¡¼É½¼¨¿ô¤Ï5·ï¤Þ¤Ç¤Ç¤¹¡£'; 
     68    //¥¨¥é¡¼Ìµ¤· 
     69    if (!$objPage->arrErr){ 
     70        //¥ì¥Ó¥å¡¼¾ðÊó¤ÎÊÔ½¸ÅÐÏ¿ 
     71        lfRegistReviewData($arrReview, $arrRegistColumn); 
    7772        $objPage->arrReview = $arrReview; 
    78     } else { 
    79         //¥¨¥é¡¼Ìµ¤· 
    80         if (!$objPage->arrErr){ 
    81             //¥ì¥Ó¥å¡¼¾ðÊó¤ÎÊÔ½¸ÅÐÏ¿ 
    82             lfRegistReviewData($arrReview, $arrRegistColumn); 
    83             $objPage->arrReview = $arrReview; 
    84             $objPage->tpl_onload = "confirm('ÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');"; 
    85         } 
     73        $objPage->tpl_onload = "confirm('ÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');"; 
    8674    } 
    8775    break; 
  • branches/dev/html/products/detail.php

    r17 r354  
    421421    $col = "create_date, reviewer_url, reviewer_name, recommend_level, title, comment"; 
    422422    $from = "dtb_review"; 
    423     $where = "del_flg = 0 AND status = 1 AND product_id = ? "; 
     423    $where = "del_flg = 0 AND status = 1 AND product_id = ? ORDER BY create_date DESC LIMIT " . REVIEW_REGIST_MAX; 
    424424    $arrval[] = $id; 
    425425    $arrReview = $objQuery->select($col, $from, $where, $arrval); 
Note: See TracChangeset for help on using the changeset viewer.