Changeset 12851


Ignore:
Timestamp:
2007/05/15 21:23:44 (15 years ago)
Author:
nakanishi
Message:

ローカル関数群追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/mobile/nonmember/deliv.php

    r12850 r12851  
    7373    } 
    7474         } 
     75          
     76         function lfRegistData($uniqid) { 
     77    global $objFormParam; 
     78    $arrRet = $objFormParam->getHashArray(); 
     79    $sqlval = $objFormParam->getDbArray(); 
     80     
     81    // ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ® 
     82    $sqlval['order_temp_id'] = $uniqid; 
     83    $sqlval['order_birth'] = sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']); 
     84    $sqlval['update_date'] = 'Now()'; 
     85    $sqlval['customer_id'] = '0'; 
     86    $sqlval['order_name01'] = $objPage->arrAddr[0]['name01']; 
     87           
     88    // ´û¸¥Ç¡¼¥¿¤Î¥Á¥§¥Ã¥¯ 
     89    $objQuery = new SC_Query(); 
     90    $where = "order_temp_id = ?"; 
     91    $cnt = $objQuery->count("dtb_order_temp", $where, array($uniqid)); 
     92    // ´û¸¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç 
     93    if ($cnt == 0) { 
     94        $sqlval['create_date'] = 'Now()'; 
     95        $objQuery->insert("dtb_order_temp", $sqlval); 
     96    } else { 
     97        $objQuery->update("dtb_order_temp", $sqlval, $where, array($uniqid)); 
     98    } 
     99} 
     100 
     101//ÆþÎϤµ¤ì¤¿¾ðÊó¤ò¥Ç¡¼¥¿¥Ù¡¼¥¹dtb_order_temp¤Ë³ÊǼ¤¹¤ë 
     102function lfRegistDataTemp($uniqid,$array) { 
     103    global $objFormParam; 
     104    $arrRet = $objFormParam->getHashArray(); 
     105    $sqlval = $objFormParam->getDbArray(); 
     106         
     107    // ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ® 
     108    $sqlval['order_temp_id'] = $uniqid; 
     109    $sqlval['order_birth'] = sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']); 
     110    $sqlval['update_date'] = 'Now()'; 
     111    $sqlval['customer_id'] = '0'; 
     112     
     113    $sqlval['order_name01'] = $array['name01']; 
     114    $sqlval['order_name02'] = $array['name02']; 
     115    $sqlval['order_kana01'] = $array['kana01']; 
     116    $sqlval['order_kana02'] = $array['kana02']; 
     117    $sqlval['order_zip01'] = $array['zip01']; 
     118    $sqlval['order_zip02'] = $array['zip02']; 
     119    $sqlval['order_pref'] = $array['pref']; 
     120    $sqlval['order_addr01'] = $array['addr01']; 
     121    $sqlval['order_addr02'] = $array['addr02']; 
     122    $sqlval['order_tel01'] = $array['tel01']; 
     123    $sqlval['order_tel02'] = $array['tel02']; 
     124    $sqlval['order_tel03'] = $array['tel03']; 
     125    $sqlval['order_email'] = $array['email']; 
     126    $sqlval['order_sex'] = $array['sex']; 
     127           
     128    // ´û¸¥Ç¡¼¥¿¤Î¥Á¥§¥Ã¥¯ 
     129    $objQuery = new SC_Query(); 
     130    $where = "order_temp_id = ?"; 
     131    $cnt = $objQuery->count("dtb_order_temp", $where, array($uniqid)); 
     132    // ´û¸¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç 
     133    if ($cnt == 0) { 
     134        $sqlval['create_date'] = 'Now()'; 
     135        $objQuery->insert("dtb_order_temp", $sqlval); 
     136    } else { 
     137        $objQuery->update("dtb_order_temp", $sqlval, $where, array($uniqid)); 
     138    } 
     139} 
     140 
     141/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */ 
     142function lfInitParam() { 
     143    global $objFormParam; 
     144    $objFormParam->addParam("¤ªÌ¾Á°¡ÊÀ«¡Ë", "order_name01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     145    $objFormParam->addParam("¤ªÌ¾Á°¡Ê̾¡Ë", "order_name02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     146    $objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", "order_kana01", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     147    $objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", "order_kana02", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     148    $objFormParam->addParam("͹ÊØÈÖ¹æ1", "order_zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
     149    $objFormParam->addParam("͹ÊØÈÖ¹æ2", "order_zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
     150    $objFormParam->addParam("ÅÔÆ»Éܸ©", "order_pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     151    $objFormParam->addParam("½»½ê1", "order_addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     152    $objFormParam->addParam("½»½ê2", "order_addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     153    $objFormParam->addParam("ÅÅÏÃÈÖ¹æ1", "order_tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     154    $objFormParam->addParam("ÅÅÏÃÈÖ¹æ2", "order_tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     155    $objFormParam->addParam("ÅÅÏÃÈÖ¹æ3", "order_tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     156    $objFormParam->addParam("FAXÈÖ¹æ1", "order_fax01", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     157    $objFormParam->addParam("FAXÈÖ¹æ2", "order_fax02", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     158    $objFormParam->addParam("FAXÈÖ¹æ3", "order_fax03", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     159    $objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹", "order_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "NO_SPTAB", "MAX_LENGTH_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK")); 
     160    $objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹¡Ê³Îǧ¡Ë", "order_email_check", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "NO_SPTAB", "MAX_LENGTH_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK"), "", false); 
     161    $objFormParam->addParam("ǯ", "year", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false); 
     162    $objFormParam->addParam("·î", "month", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false); 
     163    $objFormParam->addParam("Æü", "day", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false); 
     164    $objFormParam->addParam("À­ÊÌ", "order_sex", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     165    $objFormParam->addParam("¿¦¶È", "order_job", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     166    $objFormParam->addParam("Ê̤ΤªÆϤ±Àè", "deliv_check", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     167    $objFormParam->addParam("¤ªÌ¾Á°¡ÊÀ«¡Ë", "deliv_name01", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     168    $objFormParam->addParam("¤ªÌ¾Á°¡Ê̾¡Ë", "deliv_name02", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     169    $objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", "deliv_kana01", STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     170    $objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", "deliv_kana02", STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     171    $objFormParam->addParam("͹ÊØÈÖ¹æ1", "deliv_zip01", ZIP01_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK")); 
     172    $objFormParam->addParam("͹ÊØÈÖ¹æ2", "deliv_zip02", ZIP02_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK")); 
     173    $objFormParam->addParam("ÅÔÆ»Éܸ©", "deliv_pref", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     174    $objFormParam->addParam("½»½ê1", "deliv_addr01", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     175    $objFormParam->addParam("½»½ê2", "deliv_addr02", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     176    $objFormParam->addParam("ÅÅÏÃÈÖ¹æ1", "deliv_tel01", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     177    $objFormParam->addParam("ÅÅÏÃÈÖ¹æ2", "deliv_tel02", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     178    $objFormParam->addParam("ÅÅÏÃÈÖ¹æ3", "deliv_tel03", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     179    $objFormParam->addParam("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", "mail_flag", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     180} 
     181 
     182/* DB¤Ø¥Ç¡¼¥¿¤ÎÅÐÏ¿ */ 
     183 
     184/* ÆþÎÏÆâÍƤΥÁ¥§¥Ã¥¯ */ 
     185function lfCheckError() { 
     186    global $objFormParam; 
     187    // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 
     188    $arrRet =  $objFormParam->getHashArray(); 
     189    $objErr = new SC_CheckError($arrRet); 
     190    $objErr->arrErr = $objFormParam->checkError(); 
     191         
     192    // Ê̤ΤªÆϤ±Àè¥Á¥§¥Ã¥¯ 
     193    if($_POST['deliv_check'] == "1") {  
     194        $objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", "deliv_name01"), array("EXIST_CHECK")); 
     195        $objErr->doFunc(array("¤ªÌ¾Á°¡Ê̾¡Ë", "deliv_name02"), array("EXIST_CHECK")); 
     196        $objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", "deliv_kana01"), array("EXIST_CHECK")); 
     197        $objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", "deliv_kana02"), array("EXIST_CHECK")); 
     198        $objErr->doFunc(array("͹ÊØÈÖ¹æ1", "deliv_zip01"), array("EXIST_CHECK")); 
     199        $objErr->doFunc(array("͹ÊØÈÖ¹æ2", "deliv_zip02"), array("EXIST_CHECK")); 
     200        $objErr->doFunc(array("ÅÔÆ»Éܸ©", "deliv_pref"), array("EXIST_CHECK")); 
     201        $objErr->doFunc(array("½»½ê1", "deliv_addr01"), array("EXIST_CHECK")); 
     202        $objErr->doFunc(array("½»½ê2", "deliv_addr02"), array("EXIST_CHECK")); 
     203        $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ1", "deliv_tel01"), array("EXIST_CHECK")); 
     204        $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ2", "deliv_tel02"), array("EXIST_CHECK")); 
     205        $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ3", "deliv_tel03"), array("EXIST_CHECK")); 
     206    } 
     207     
     208    // Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯ 
     209    $objErr->doFunc(array("TEL", "order_tel01", "order_tel02", "order_tel03", TEL_ITEM_LEN), array("TEL_CHECK")); 
     210    $objErr->doFunc(array("FAX", "order_fax01", "order_fax02", "order_fax03", TEL_ITEM_LEN), array("TEL_CHECK")); 
     211    $objErr->doFunc(array("͹ÊØÈÖ¹æ", "order_zip01", "order_zip02"), array("ALL_EXIST_CHECK")); 
     212    $objErr->doFunc(array("TEL", "deliv_tel01", "deliv_tel02", "deliv_tel03", TEL_ITEM_LEN), array("TEL_CHECK")); 
     213    $objErr->doFunc(array("FAX", "deliv_fax01", "deliv_fax02", "deliv_fax03", TEL_ITEM_LEN), array("TEL_CHECK")); 
     214    $objErr->doFunc(array("͹ÊØÈÖ¹æ", "deliv_zip01", "deliv_zip02"), array("ALL_EXIST_CHECK")); 
     215    $objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("CHECK_DATE")); 
     216    $objErr->doFunc(array("¥á¡¼¥ë¥¢¥É¥ì¥¹", "¥á¡¼¥ë¥¢¥É¥ì¥¹¡Ê³Îǧ¡Ë", "order_email", "order_email_check"), array("EQUAL_CHECK")); 
     217     
     218    // ¤¹¤Ç¤Ë¥á¥ë¥Þ¥¬¥Æ¡¼¥Ö¥ë¤Ë²ñ°÷¤È¤·¤Æ¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¾ì¹ç 
     219    if(sfCheckCustomerMailMaga($arrRet['order_email'])) { 
     220        $objErr->arrErr['order_email'] = "¤³¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ï¤¹¤Ç¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£<br>"; 
     221    } 
     222         
     223    return $objErr->arrErr; 
     224} 
     225 
     226// ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Î¤ªÆϤ±Àè¤ò¥³¥Ô¡¼¤¹¤ë 
     227function lfCopyDeliv($uniqid, $arrData) { 
     228    $objQuery = new SC_Query(); 
     229     
     230    // Ê̤ΤªÆϤ±Àè¤ò»ØÄꤷ¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ÇÛÁ÷Àè¤ËÅÐÏ¿½»½ê¤ò¥³¥Ô¡¼¤¹¤ë¡£ 
     231    if($arrData["deliv_check"] != "1") { 
     232        $sqlval['deliv_name01'] = $arrData['order_name01']; 
     233        $sqlval['deliv_name02'] = $arrData['order_name02']; 
     234        $sqlval['deliv_kana01'] = $arrData['order_kana01']; 
     235        $sqlval['deliv_kana02'] = $arrData['order_kana02']; 
     236        $sqlval['deliv_pref'] = $arrData['order_pref']; 
     237        $sqlval['deliv_zip01'] = $arrData['order_zip01']; 
     238        $sqlval['deliv_zip02'] = $arrData['order_zip02']; 
     239        $sqlval['deliv_addr01'] = $arrData['order_addr01']; 
     240        $sqlval['deliv_addr02'] = $arrData['order_addr02']; 
     241        $sqlval['deliv_tel01'] = $arrData['order_tel01']; 
     242        $sqlval['deliv_tel02'] = $arrData['order_tel02']; 
     243        $sqlval['deliv_tel03'] = $arrData['order_tel03']; 
     244        $where = "order_temp_id = ?"; 
     245        $objQuery->update("dtb_order_temp", $sqlval, $where, array($uniqid)); 
     246    } 
     247} 
     248 
     249//-----------------------------NONMEMBER´Ø¿ô·²¢§------------------------------------------------------------------ 
     250//----¡¡¼èÆÀʸ»úÎó¤ÎÊÑ´¹ 
     251function lfConvertParam($array, $arrRegistColumn) { 
     252    /* 
     253     *  ʸ»úÎó¤ÎÊÑ´¹ 
     254     *  K :  ¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹ 
     255     *  C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹ 
     256     *  V :  ÂùÅÀÉÕ¤­¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹  
     257     *  n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)¡×¤ËÊÑ´¹ 
     258     *  a :  Á´³Ñ±Ñ¿ô»ú¤òȾ³Ñ±Ñ¿ô»ú¤ËÊÑ´¹¤¹¤ë 
     259     */ 
     260    // ¥«¥é¥à̾¤È¥³¥ó¥Ð¡¼¥È¾ðÊó 
     261    foreach ($arrRegistColumn as $data) { 
     262        $arrConvList[ $data["column"] ] = $data["convert"]; 
     263    } 
     264    // ʸ»úÊÑ´¹ 
     265    foreach ($arrConvList as $key => $val) { 
     266        // POST¤µ¤ì¤Æ¤­¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£ 
     267        if(strlen(($array[$key])) > 0) { 
     268            $array[$key] = mb_convert_kana($array[$key] ,$val); 
     269        } 
     270    } 
     271    return $array; 
     272} 
     273 
     274//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 
     275function lfErrorCheck1($array) { 
     276 
     277    global $objConn; 
     278    $objErr = new SC_CheckError($array); 
     279     
     280    $objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK")); 
     281    $objErr->doFunc(array("¤ªÌ¾Á°¡Ê̾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK")); 
     282    $objErr->doFunc(array("¤ªÌ¾Á°¡Ê¥«¥Ê/À«¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK")); 
     283    $objErr->doFunc(array("¤ªÌ¾Á°¡Ê¥«¥Ê/̾¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK")); 
     284    $objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹', "email", MTEXT_LEN) ,array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK")); 
     285 
     286    return $objErr->arrErr; 
     287} 
     288 
     289//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 
     290function lfErrorCheck2($array) { 
     291 
     292    global $objConn, $objDate; 
     293    $objErr = new SC_CheckError($array); 
     294     
     295    $objErr->doFunc(array("͹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK")); 
     296    $objErr->doFunc(array("͹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));  
     297    $objErr->doFunc(array("͹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK")); 
     298 
     299    $objErr->doFunc(array("À­ÊÌ", "sex") ,array("SELECT_CHECK", "NUM_CHECK"));  
     300    $objErr->doFunc(array("À¸Ç¯·îÆü (ǯ)", "year", 4), array("EXIST_CHECK", "SPTAB_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
     301    if (!isset($objErr->arrErr['year'])) { 
     302        $objErr->doFunc(array("À¸Ç¯·îÆü (ǯ)", "year", $objDate->getStartYear()), array("MIN_CHECK")); 
     303        $objErr->doFunc(array("À¸Ç¯·îÆü (ǯ)", "year", $objDate->getEndYear()), array("MAX_CHECK")); 
     304    } 
     305    $objErr->doFunc(array("À¸Ç¯·îÆü (·îÆü)", "month", "day"), array("SELECT_CHECK")); 
     306    if (!isset($objErr->arrErr['year']) && !isset($objErr->arrErr['month']) && !isset($objErr->arrErr['day'])) { 
     307        $objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("CHECK_DATE")); 
     308    } 
     309     
     310    return $objErr->arrErr; 
     311} 
     312 
     313 
     314//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 
     315function lfErrorCheck3($array) { 
     316 
     317    global $objConn; 
     318    $objErr = new SC_CheckError($array); 
     319     
     320    $objErr->doFunc(array("ÅÔÆ»Éܸ©", 'pref'), array("SELECT_CHECK","NUM_CHECK")); 
     321    $objErr->doFunc(array("»Ô¶èĮ¼", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK")); 
     322    $objErr->doFunc(array("ÈÖÃÏ", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK")); 
     323    $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK" )); 
     324    $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK" )); 
     325    $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK" )); 
     326    $objErr->doFunc(array("ÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03",TEL_ITEM_LEN) ,array("TEL_CHECK")); 
     327     
     328    return $objErr->arrErr; 
     329} 
     330 
     331// ͹ÊØÈֹ椫¤é½»½ê¤Î¼èÆÀ 
     332function lfGetAddress($zipcode) { 
     333    global $arrPref; 
     334 
     335    $conn = new SC_DBconn(ZIP_DSN); 
     336 
     337    // ͹ÊØÈֹ渡º÷ʸºîÀ® 
     338    $zipcode = mb_convert_kana($zipcode ,"n"); 
     339    $sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?"; 
     340 
     341    $data_list = $conn->getAll($sqlse, array($zipcode)); 
     342 
     343    // ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÈÃͤòȿž¤µ¤»¤ë¡£ 
     344    $arrREV_PREF = array_flip($arrPref); 
     345 
     346    /* 
     347        Áí̳¾Ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Ç¡¼¥¿¤ò¤½¤Î¤Þ¤Þ¥¤¥ó¥Ý¡¼¥È¤¹¤ë¤È 
     348        °Ê²¼¤Î¤è¤¦¤Êʸ»úÎó¤¬Æþ¤Ã¤Æ¤¤¤ë¤Î¤Ç   Âкö¤¹¤ë¡£ 
     349        ¡¦¡Ê£±¡¦£±£¹ÃúÌÜ¡Ë 
     350        ¡¦°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç 
     351    */ 
     352    $town =  $data_list[0]['town']; 
     353    $town = ereg_replace("¡Ê.*¡Ë$","",$town); 
     354    $town = ereg_replace("°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç","",$town); 
     355    $data_list[0]['town'] = $town; 
     356    $data_list[0]['state'] = $arrREV_PREF[$data_list[0]['state']]; 
     357 
     358    return $data_list; 
     359} 
     360//NONMEMBER_´Ø¿ô·²--------------------------------------------------------------------------------------- 
    75361?> 
     362          
     363?> 
Note: See TracChangeset for help on using the changeset viewer.