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/products/product_select.php

    r12157 r15078  
    1515        $this->tpl_subnavi = ''; 
    1616        $this->tpl_subno = ""; 
    17         $this->tpl_subtitle = '¾¦ÉÊÁªÂò'; 
     17        $this->tpl_subtitle = '商品選択'; 
    1818    } 
    1919} 
     
    2424$objSess = new SC_Session(); 
    2525 
    26 // ǧ¾Ú²ÄÈݤÎȽÄê 
     26// 認証可否の判定 
    2727sfIsSuccess($objSess); 
    2828 
    2929if ($_POST['mode'] == "search") { 
    3030     
    31     // POSTÃͤΰú¤­·Ñ¤® 
     31    // POST値の引き継ぎ 
    3232    $objPage->arrForm = $_POST; 
    33     // ÆþÎÏʸ»ú¤Î¶¯À©ÊÑ´¹ 
     33    // 入力文字の強制変換 
    3434    lfConvertParam(); 
    3535     
    3636    $where = "del_flg = 0"; 
    3737     
    38     /* ÆþÎÏ¥¨¥é¡¼¤Ê¤· */ 
     38    /* 入力エラーなし */ 
    3939    foreach ($objPage->arrForm as $key => $val) { 
    4040        if($val == "") { 
     
    4848                break; 
    4949            case 'search_category_id': 
    50                 // »Ò¥«¥Æ¥´¥êID¤Î¼èÆÀ 
     50                // 子カテゴリIDの取得 
    5151                $arrRet = sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 
    5252                $tmp_where = ""; 
     
    7272    $order = "update_date DESC, product_id DESC "; 
    7373     
    74     // Æɤ߹þ¤àÎó¤È¥Æ¡¼¥Ö¥ë¤Î»ØÄê 
     74    // 読み込む列とテーブルの指定 
    7575    $col = "product_id, name, category_id, main_list_image, status, product_code, price01, stock, stock_unlimited"; 
    7676    $from = "vw_products_nonclass AS noncls "; 
    7777         
    7878    $objQuery = new SC_Query(); 
    79     // ¹Ô¿ô¤Î¼èÆÀ 
     79    // 行数の取得 
    8080    $linemax = $objQuery->count("dtb_products", $where, $arrval); 
    81     $objPage->tpl_linemax = $linemax;               // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ 
     81    $objPage->tpl_linemax = $linemax;               // 何件が該当しました。表示用 
    8282     
    83     // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý 
     83    // ページ送りの処理 
    8484    if(is_numeric($_POST['search_page_max'])) {  
    8585        $page_max = $_POST['search_page_max']; 
     
    8888    } 
    8989     
    90     // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ 
     90    // ページ送りの取得 
    9191    $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX); 
    92     $objPage->tpl_strnavi = $objNavi->strnavi;      // ɽ¼¨Ê¸»úÎó 
     92    $objPage->tpl_strnavi = $objNavi->strnavi;      // 表示文字列 
    9393    $startno = $objNavi->start_row; 
    9494     
    95     // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) 
     95    // 取得範囲の指定(開始行番号、行数のセット) 
    9696    if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); 
    97     // ɽ¼¨½ç½ø 
     97    // 表示順序 
    9898    $objQuery->setorder($order); 
    9999     
    100     // view¤â¹Ê¹þ¤ß¤ò¤«¤±¤ë(mysqlÍÑ) 
     100    // viewも絞込みをかける(mysql用) 
    101101    sfViewWhere("&&noncls_where&&", $where, $arrval, $objQuery->order . " " .  $objQuery->setlimitoffset($page_max, $startno, true)); 
    102102     
    103     // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
     103    // 検索結果の取得 
    104104    $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    105105         
    106106} 
    107107 
    108 // ¥«¥Æ¥´¥ê¼èÆÀ 
     108// カテゴリ取得 
    109109$objPage->arrCatList = sfGetCategoryList(); 
    110110 
     
    114114 
    115115 
    116 //----¡¡¥Ú¡¼¥¸É½¼¨ 
     116//---- ページ表示 
    117117$objView->assignobj($objPage); 
    118118$objView->display($objPage->tpl_mainpage); 
     
    125125//--------------------------------------------------------------------------------------------------------------------------------------------------------- 
    126126 
    127 /* ¼èÆÀʸ»úÎó¤ÎÊÑ´¹ */ 
     127/* 取得文字列の変換 */ 
    128128function lfConvertParam() { 
    129129    global $objPage; 
    130130    /* 
    131      *  ʸ»úÎó¤ÎÊÑ´¹ 
    132      *  K :  ¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹ 
    133      *  C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹ 
    134      *  V :  ÂùÅÀÉÕ¤­¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹   
    135      *  n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)¡×¤ËÊÑ´¹ 
     131     *  文字列の変換 
     132     *  K :  「半角(ハンカク)片仮名」を「全角片仮名」に変換 
     133     *  C :  「全角ひら仮名」を「全角かた仮名」に変換 
     134     *  V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します  
     135     *  n :  「全角」数字を「半角(ハンカク)」に変換 
    136136     */ 
    137137    $arrConvList['search_name'] = "KVa"; 
    138138    $arrConvList['search_product_code'] = "KVa"; 
    139139     
    140     // ʸ»úÊÑ´¹ 
     140    // 文字変換 
    141141    foreach ($arrConvList as $key => $val) { 
    142         // POST¤µ¤ì¤Æ¤­¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£ 
     142        // POSTされてきた値のみ変換する。 
    143143        if(isset($objPage->arrForm[$key])) { 
    144144            $objPage->arrForm[$key] = mb_convert_kana($objPage->arrForm[$key] ,$val); 
Note: See TracChangeset for help on using the changeset viewer.