Ignore:
Timestamp:
2007/03/22 16:40:42 (19 years ago)
Author:
inoue
Message:

プロトタイプ

File:
1 edited

Legend:

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

    r11941 r11949  
    4949sfIsSuccess($objSess); 
    5050 
    51 // ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¾ðÊó¤Î¥«¥é¥à¤Î¼èÆÀ 
    52 $select="trackback_id, tra.product_id, tra.blog_name, tra.title, tra.url, "; 
    53 $select.="tra.excerpt, tra.status, tra.create_date, tra.update_date, pro.name"; 
    54 $from = "dtb_trackback AS tra LEFT JOIN dtb_products AS pro ON tra.product_id = pro.product_id "; 
     51// ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¾ðÊó¤Î¥«¥é¥à¤Î¼èÆÀ(view¤È¤Î·ë¹ç¤Î¤¿¤á¡¢¥Æ¡¼¥Ö¥ë¤òA¤ÈÄêµÁ¤·¤Æ¤ª¤¯) 
     52$select = "A.trackback_id, A.product_id, A.blog_name, A.title, A.url, "; 
     53$select .= "A.excerpt, A.status, A.create_date, A.update_date, B.name"; 
     54$from = "dtb_trackback AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id "; 
    5555 
    5656// ¸¡º÷¥ï¡¼¥É¤Î°ú¤­·Ñ¤® 
     
    6363// ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¤Îºï½ü 
    6464if ($_POST['mode'] == "delete") { 
    65     $objQuery->exec("UPDATE dtb_trackback SET del_flg = 1 WHERE trackback_id=?", array($_POST['trackback_id'])); 
     65    $objQuery->exec("UPDATE dtb_trackback SET del_flg = 1 WHERE trackback_id = ?", array($_POST['trackback_id'])); 
    6666} 
    6767     
     
    6969     
    7070    //ºï½ü¤µ¤ì¤Æ¤¤¤Ê¤¤¾¦Éʤò¸¡º÷ 
    71     $where="tra.del_flg = 0 AND pro.del_flg = 0"; 
     71    $where="A.del_flg = 0 AND B.del_flg = 0"; 
    7272    $objPage->arrForm = $_POST; 
    7373 
     
    8989                    $val = ereg_replace(" ", "%", $val); 
    9090                    $val = ereg_replace("¡¡", "%", $val); 
    91                     $where.= " AND tra.blog_name ILIKE ? "; 
     91                    $where.= " AND A.blog_name ILIKE ? "; 
    9292                    $arrval[] = "%$val%"; 
    9393                    break; 
     
    9696                    $val = ereg_replace(" ", "%", $val); 
    9797                    $val = ereg_replace("¡¡", "%", $val); 
    98                     $where.= " AND tra.title ILIKE ? "; 
     98                    $where.= " AND A.title ILIKE ? "; 
    9999                    $arrval[] = "%$val%"; 
    100100                    break; 
     
    103103                    $val = ereg_replace(" ", "%", $val); 
    104104                    $val = ereg_replace("¡¡", "%", $val); 
    105                     $where.= " AND tra.url ILIKE ? "; 
     105                    $where.= " AND A.url ILIKE ? "; 
    106106                    $arrval[] = "%$val%"; 
    107107                    break; 
     
    109109                case 'search_status': 
    110110                    if (isset($_POST['search_status'])) { 
    111                         $where.= " AND tra.status = ? "; 
     111                        $where.= " AND A.status = ? "; 
    112112                        $arrval[] = $val; 
    113113                    } 
     
    117117                    $val = ereg_replace(" ", "%", $val); 
    118118                    $val = ereg_replace("¡¡", "%", $val); 
    119                     $where.= " AND pro.name ILIKE ? "; 
     119                    $where.= " AND B.name ILIKE ? "; 
    120120                    $arrval[] = "%$val%"; 
    121121                    break; 
     
    124124                    $val = ereg_replace(" ", "%", $val); 
    125125                    $val = ereg_replace("¡¡", "%", $val); 
    126                     $where.= " AND pro.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? )"; 
     126                    $where.= " AND B.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? )"; 
    127127                    $arrval[] = "%$val%"; 
    128128                    break; 
     
    131131                    if (isset($_POST['search_startyear']) && isset($_POST['search_startmonth']) && isset($_POST['search_startday'])) { 
    132132                        $date = sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']); 
    133                         $where.= " AND tra.create_date >= ? "; 
     133                        $where.= " AND A.create_date >= ? "; 
    134134                        $arrval[] = $date; 
    135135                    } 
     
    142142                        $end_date = date("Y/m/d",strtotime("1 day" ,strtotime($date))); 
    143143                         
    144                         $where.= " AND tra.create_date <= cast('$end_date' as date) "; 
     144                        $where.= " AND A.create_date <= cast('$end_date' as date) "; 
    145145                    } 
    146146                    break; 
     
    151151    } 
    152152     
    153     $order = "tra.create_date DESC"; 
     153    $order = "A.create_date DESC"; 
    154154     
    155155    // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý 
     
    182182    if ($_POST['mode'] == 'csv'){ 
    183183        // ¥ª¥×¥·¥ç¥ó¤Î»ØÄê 
    184         $option = "ORDER BY trackback_id"; 
     184        $option = "ORDER BY A.trackback_id"; 
    185185        // CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤ÎºîÀ® 
    186         $head = sfGetCSVList($arrREVIEW_CVSTITLE); 
    187         $data = lfGetReviewCSV($where, '', $arrval); 
     186        $head = sfGetCSVList($arrTRACKBACK_CVSTITLE); 
     187        $data = lfGetTrackbackCSV($where, '', $arrval); 
    188188        // CSV¤òÁ÷¿®¤¹¤ë¡£ 
    189189        sfCSVDownload($head.$data); 
Note: See TracChangeset for help on using the changeset viewer.