Ignore:
Timestamp:
2007/07/20 15:58:59 (17 years ago)
Author:
nanasess
Message:

r15064 から svn cp
とりあえず暫定コミット.

  • UTF-8 に変更
  • slib.php, glib.php のクラス化
  • LC_Page の抽象化(一部)
Location:
branches/feature-module-update
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update

    • Property svn:ignore set to
      .cache

      .settings

      .projectOptions
  • branches/feature-module-update/html/admin/contents/campaign_create_tag.php

    r12157 r15078  
    1414        $this->tpl_mainpage = 'contents/campaign_create_tag.tpl'; 
    1515        $this->tpl_mainno = 'create'; 
    16         $this->tpl_subtitle = '¾¦ÉÊÀßÄê'; 
     16        $this->tpl_subtitle = '商品設定'; 
    1717        /* 
    18          session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç 
    19          ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìɽ¼¨¤òÍÞÀ©¤¹¤ë¡£ 
    20          private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£ 
     18         session_start時のno-cacheヘッダーを抑制することで 
     19         「戻る」ボタン使用時の有効期限切れ表示を抑制する。 
     20         private-no-expire:クライアントのキャッシュを許可する。 
    2121        */ 
    2222        session_cache_limiter('private-no-expire');      
     
    2929$objQuery = new SC_Query(); 
    3030 
    31 // ǧ¾Ú²ÄÈݤÎȽÄê 
     31// 認証可否の判定 
    3232sfIsSuccess($objSess); 
    3333 
    3434switch($_POST['mode']) { 
    3535 
    36 // ¾¦Éʸ¡º÷ 
     36// 商品検索 
    3737case  'search': 
    38     // POSTÃͤΰú¤­·Ñ¤® 
     38    // POST値の引き継ぎ 
    3939    $objPage->arrForm = $_POST; 
    40     // ÆþÎÏʸ»ú¤Î¶¯À©ÊÑ´¹ 
     40    // 入力文字の強制変換 
    4141    lfConvertParam(); 
    4242     
    4343    $where = "del_flg = 0"; 
    4444     
    45     // where¶çÀ¸À® 
     45    // where句生成 
    4646    foreach ($objPage->arrForm as $key => $val) { 
    4747        if($val == "") { 
     
    5555                break; 
    5656            case 'search_category_id': 
    57                 // »Ò¥«¥Æ¥´¥êID¤Î¼èÆÀ 
     57                // 子カテゴリIDの取得 
    5858                $arrRet = sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 
    5959                $tmp_where = ""; 
     
    8282    $order = "update_date DESC, product_id DESC "; 
    8383     
    84     // Æɤ߹þ¤àÎó¤È¥Æ¡¼¥Ö¥ë¤Î»ØÄê 
     84    // 読み込む列とテーブルの指定 
    8585    $col = "product_id, name, category_id, main_list_image, status, product_code, price01, stock, stock_unlimited"; 
    8686    $from = "vw_products_nonclass AS noncls "; 
    8787 
    88     // ¹Ô¿ô¤Î¼èÆÀ 
     88    // 行数の取得 
    8989    $linemax = $objQuery->count("dtb_products", $where, $arrval); 
    90     $objPage->tpl_linemax = $linemax;               // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ 
     90    $objPage->tpl_linemax = $linemax;               // 何件が該当しました。表示用 
    9191     
    92     // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý 
     92    // ページ送りの処理 
    9393    if(is_numeric($_POST['search_page_max'])) {  
    9494        $page_max = $_POST['search_page_max']; 
     
    9797    } 
    9898     
    99     // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ 
     99    // ページ送りの取得 
    100100    $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX); 
    101     $objPage->tpl_strnavi = $objNavi->strnavi;      // ɽ¼¨Ê¸»úÎó 
     101    $objPage->tpl_strnavi = $objNavi->strnavi;      // 表示文字列 
    102102    $startno = $objNavi->start_row; 
    103103     
    104     // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) 
     104    // 取得範囲の指定(開始行番号、行数のセット) 
    105105    if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); 
    106     // ɽ¼¨½ç½ø 
     106    // 表示順序 
    107107    $objQuery->setorder($order); 
    108108     
    109     // view¤â¹Ê¹þ¤ß¤ò¤«¤±¤ë(mysqlÍÑ) 
     109    // viewも絞込みをかける(mysql用) 
    110110    sfViewWhere("&&noncls_where&&", $where, $arrval, $objQuery->order . " " .  $objQuery->setlimitoffset($page_max, $startno, true)); 
    111111     
    112     // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
     112    // 検索結果の取得 
    113113    $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    114114    break; 
    115115     
    116 // ¥¿¥°É½¼¨ 
     116// タグ表示 
    117117case 'view': 
    118118 
    119     // ¥¿¥°¤òÀ¸À® 
     119    // タグを生成 
    120120    $create_tag = lfGetCreateTag($_POST['product_id']); 
    121121    $objPage->tpl_create_tag = $create_tag; 
     
    123123} 
    124124 
    125 // ¥«¥Æ¥´¥ê¼èÆÀ 
     125// カテゴリ取得 
    126126$objPage->arrCatList = sfGetCategoryList(); 
    127127 
    128 //----¡¡¥Ú¡¼¥¸É½¼¨ 
     128//---- ページ表示 
    129129$objView->assignobj($objPage); 
    130130$objView->display($objPage->tpl_mainpage); 
     
    132132//--------------------------------------------------------------------------------------------------------------------------------------------------------- 
    133133 
    134 /* ¼èÆÀʸ»úÎó¤ÎÊÑ´¹ */ 
     134/* 取得文字列の変換 */ 
    135135function lfConvertParam() { 
    136136    global $objPage; 
    137137    /* 
    138      *  ʸ»úÎó¤ÎÊÑ´¹ 
    139      *  K :  ¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹ 
    140      *  C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹ 
    141      *  V :  ÂùÅÀÉÕ¤­¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹   
    142      *  n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)¡×¤ËÊÑ´¹ 
     138     *  文字列の変換 
     139     *  K :  「半角(ハンカク)片仮名」を「全角片仮名」に変換 
     140     *  C :  「全角ひら仮名」を「全角かた仮名」に変換 
     141     *  V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します  
     142     *  n :  「全角」数字を「半角(ハンカク)」に変換 
    143143     */ 
    144144    $arrConvList['search_name'] = "KVa"; 
    145145    $arrConvList['search_product_code'] = "KVa"; 
    146146     
    147     // ʸ»úÊÑ´¹ 
     147    // 文字変換 
    148148    foreach ($arrConvList as $key => $val) { 
    149         // POST¤µ¤ì¤Æ¤­¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£ 
     149        // POSTされてきた値のみ変換する。 
    150150        if(isset($objPage->arrForm[$key])) { 
    151151            $objPage->arrForm[$key] = mb_convert_kana($objPage->arrForm[$key] ,$val); 
     
    154154} 
    155155 
    156 /* ¥¿¥°¤òÀ¸À® */ 
     156/* タグを生成 */ 
    157157function lfGetCreateTag($product_id) { 
    158158     
    159159    global $objQuery; 
    160160     
    161     // ½ñ¤­¹þ¤ß¥¿¥° 
     161    // 書き込みタグ 
    162162    $read_file = file_get_contents(CAMPAIGN_BLOC_PATH . "cart_tag.tpl"); 
    163163    $read_file = ereg_replace("<{assign_product_id}>", $product_id, $read_file); 
    164     // ¥«¡¼¥È¥¿¥°ÊݸÍÑ¥Õ¥¡¥¤¥ëºîÀ® 
    165     $create_tag .= "<!--{* ¢§¾¦ÉÊID$product_id *}-->\n"; 
     164    // カートタグ保存用ファイル作成 
     165    $create_tag .= "<!--{* ▼商品ID$product_id *}-->\n"; 
    166166    $create_tag .= $read_file; 
    167167     
Note: See TracChangeset for help on using the changeset viewer.