Ignore:
Timestamp:
2007/07/20 15:58:59 (16 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/basis/tradelaw.php

    r12157 r15078  
    1919        global $arrTAXRULE; 
    2020        $this->arrTAXRULE = $arrTAXRULE; 
    21         $this->tpl_subtitle = 'ÆÃÄ꾦¼è°úË¡'; 
     21        $this->tpl_subtitle = '特定商取引法'; 
    2222    } 
    2323} 
     
    2929$objQuery = new SC_Query(); 
    3030 
    31 // ǧ¾Ú²ÄÈݤÎȽÄê 
     31// 認証可否の判定 
    3232sfIsSuccess($objSess); 
    3333 
    34 // ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹ 
     34// パラメータ管理クラス 
    3535$objFormParam = new SC_FormParam(); 
    36 // ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 
     36// パラメータ情報の初期化 
    3737lfInitParam(); 
    38 // POSTÃͤμèÆÀ 
     38// POST値の取得 
    3939$objFormParam->setParam($_POST); 
    4040 
     
    4848 
    4949if($_POST['mode'] != "") { 
    50     // ÆþÎÏÃͤÎÊÑ´¹ 
     50    // 入力値の変換 
    5151    $objFormParam->convParam(); 
    5252    $objPage->arrErr = lfCheckError($arrRet); 
     
    5555        switch($_POST['mode']) { 
    5656        case 'update': 
    57             lfUpdateData(); // ´û¸ÊÔ½¸ 
     57            lfUpdateData(); // 既存編集 
    5858            break; 
    5959        case 'insert': 
    60             lfInsertData(); // ¿·µ¬ºîÀ® 
     60            lfInsertData(); // 新規作成 
    6161            break; 
    6262        default: 
    6363            break; 
    6464        } 
    65         // ºÆɽ¼¨ 
     65        // 再表示 
    6666        //sfReload(); 
    67         $objPage->tpl_onload = "window.alert('ÆÃÄ꾦¼è°úË¡¤ÎÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');"; 
     67        $objPage->tpl_onload = "window.alert('特定商取引法の登録が完了しました。');"; 
    6868    } 
    6969} else { 
    70     $arrCol = $objFormParam->getKeyList(); // ¥­¡¼Ì¾°ìÍ÷¤ò¼èÆÀ 
     70    $arrCol = $objFormParam->getKeyList(); // キー名一覧を取得 
    7171    $col    = sfGetCommaList($arrCol); 
    7272    $arrRet = $objQuery->select($col, "dtb_baseinfo"); 
    73     // DBÃͤμèÆÀ 
     73    // DB値の取得 
    7474    $objFormParam->setParam($arrRet[0]); 
    7575} 
     
    7979$objView->display(MAIN_FRAME); 
    8080//-------------------------------------------------------------------------------------------------------------------------------------- 
    81 /* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */ 
     81/* パラメータ情報の初期化 */ 
    8282function lfInitParam() { 
    8383    global $objFormParam; 
    84     $objFormParam->addParam("ÈÎÇä¶È¼Ô", "law_company", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    85     $objFormParam->addParam("±¿±ÄÀÕǤ¼Ô", "law_manager", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    86     $objFormParam->addParam("͹ÊØÈÖ¹æ1", "law_zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
    87     $objFormParam->addParam("͹ÊØÈÖ¹æ2", "law_zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
    88     $objFormParam->addParam("ÅÔÆ»Éܸ©", "law_pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
    89     $objFormParam->addParam("½»½ê1", "law_addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    90     $objFormParam->addParam("½»½ê2", "law_addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    91     $objFormParam->addParam("ÅÅÏÃÈÖ¹æ1", "law_tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    92     $objFormParam->addParam("ÅÅÏÃÈÖ¹æ2", "law_tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    93     $objFormParam->addParam("ÅÅÏÃÈÖ¹æ3", "law_tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    94     $objFormParam->addParam("FAXÈÖ¹æ1", "law_fax01", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    95     $objFormParam->addParam("FAXÈÖ¹æ2", "law_fax02", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    96     $objFormParam->addParam("FAXÈÖ¹æ3", "law_fax03", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    97     $objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹", "law_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK")); 
     84    $objFormParam->addParam("販売業者", "law_company", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     85    $objFormParam->addParam("運営責任者", "law_manager", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     86    $objFormParam->addParam("郵便番号1", "law_zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
     87    $objFormParam->addParam("郵便番号2", "law_zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
     88    $objFormParam->addParam("都道府県", "law_pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     89    $objFormParam->addParam("住所1", "law_addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     90    $objFormParam->addParam("住所2", "law_addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     91    $objFormParam->addParam("電話番号1", "law_tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     92    $objFormParam->addParam("電話番号2", "law_tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     93    $objFormParam->addParam("電話番号3", "law_tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     94    $objFormParam->addParam("FAX番号1", "law_fax01", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     95    $objFormParam->addParam("FAX番号2", "law_fax02", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     96    $objFormParam->addParam("FAX番号3", "law_fax03", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     97    $objFormParam->addParam("メールアドレス", "law_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK")); 
    9898    $objFormParam->addParam("URL", "law_url", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "URL_CHECK")); 
    99     $objFormParam->addParam("ɬÍ×ÎÁ¶â", "law_term01", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    100     $objFormParam->addParam("ÃíʸÊýË¡", "law_term02", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    101     $objFormParam->addParam("»ÙʧÊýË¡", "law_term03", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    102     $objFormParam->addParam("»Ùʧ´ü¸Â", "law_term04", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    103     $objFormParam->addParam("°ú¤­ÅϤ·»þ´ü", "law_term05", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    104     $objFormParam->addParam("ÊÖÉÊ¡¦¸ò´¹¤Ë¤Ä¤¤¤Æ", "law_term06", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     99    $objFormParam->addParam("必要料金", "law_term01", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     100    $objFormParam->addParam("注文方法", "law_term02", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     101    $objFormParam->addParam("支払方法", "law_term03", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     102    $objFormParam->addParam("支払期限", "law_term04", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     103    $objFormParam->addParam("引き渡し時期", "law_term05", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     104    $objFormParam->addParam("返品・交換について", "law_term06", MTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    105105} 
    106106 
    107107function lfUpdateData() { 
    108108    global $objFormParam; 
    109     // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 
     109    // 入力データを渡す。 
    110110    $sqlval = $objFormParam->getHashArray(); 
    111111    $sqlval['update_date'] = 'Now()'; 
    112112    $objQuery = new SC_Query(); 
    113     // UPDATE¤Î¼Â¹Ô 
     113    // UPDATEの実行 
    114114    $ret = $objQuery->update("dtb_baseinfo", $sqlval); 
    115115} 
     
    117117function lfInsertData() { 
    118118    global $objFormParam; 
    119     // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 
     119    // 入力データを渡す。 
    120120    $sqlval = $objFormParam->getHashArray(); 
    121121    $sqlval['update_date'] = 'Now()'; 
    122122    $objQuery = new SC_Query(); 
    123     // INSERT¤Î¼Â¹Ô 
     123    // INSERTの実行 
    124124    $ret = $objQuery->insert("dtb_baseinfo", $sqlval); 
    125125} 
    126126 
    127 /* ÆþÎÏÆâÍƤΥÁ¥§¥Ã¥¯ */ 
     127/* 入力内容のチェック */ 
    128128function lfCheckError() { 
    129129    global $objFormParam; 
    130     // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 
     130    // 入力データを渡す。 
    131131    $arrRet =  $objFormParam->getHashArray(); 
    132132    $objErr = new SC_CheckError($arrRet); 
    133133    $objErr->arrErr = $objFormParam->checkError(); 
    134134     
    135     // ÅÅÏÃÈÖ¹æ¥Á¥§¥Ã¥¯ 
     135    // 電話番号チェック 
    136136    $objErr->doFunc(array("TEL", "law_tel01", "law_tel02", "law_tel03", TEL_ITEM_LEN), array("TEL_CHECK")); 
    137137    $objErr->doFunc(array("FAX", "law_fax01", "law_fax02", "law_fax03", TEL_ITEM_LEN), array("TEL_CHECK")); 
    138     $objErr->doFunc(array("͹ÊØÈÖ¹æ", "law_zip01", "law_zip02"), array("ALL_EXIST_CHECK")); 
     138    $objErr->doFunc(array("郵便番号", "law_zip01", "law_zip02"), array("ALL_EXIST_CHECK")); 
    139139     
    140140    return $objErr->arrErr; 
Note: See TracChangeset for help on using the changeset viewer.