- Timestamp:
- 2007/09/29 22:01:49 (16 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/Smarty/templates/default/input_zip.tpl
r16044 r16174 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <html lang="ja"> 1 <!--{printXMLDeclaration}--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 2 <!--{* 4 3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. … … 6 5 * http://www.lockon.co.jp/ 7 6 *}--> 7 <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> 8 8 <head> 9 <meta http-equiv="Content-Type" content="text/html; charset=<!--{$smarty.const.CHAR_CODE}-->"> 10 <meta http-equiv="content-script-type" content="text/javascript"> 11 <meta http-equiv="content-style-type" content="text/css"> 12 <link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->user_data/css/contents.css" type="text/css" media="all" /> 13 <link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->css/common.css" type="text/css" media="all" /> 14 <link rel="stylesheet" href="<!--{$tpl_css}-->" type="text/css" media="all" /> 15 <script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/css.js"></script> 16 <script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/navi.js"></script> 17 <script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/win_op.js"></script> 18 <script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/site.js"></script> 19 <title><!--{$arrSiteInfo.shop_name}-->/住所検索</title> 9 <meta http-equiv="Content-Type" content="text/html; charset=<!--{$smarty.const.CHAR_CODE}-->" /> 10 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 11 <meta http-equiv="Content-Style-Type" content="text/css" /> 12 <link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}--><!--{$smarty.const.USER_DIR}-->css/common.css" type="text/css" media="all" /> 13 <link rel="alternate" type="application/rss+xml" title="RSS" href="<!--{$smarty.const.SITE_URL}-->/rss/index.php" /> 14 <script type="text/javascript" src="<!--{$TPL_DIR}-->js/css.js"></script> 15 <script type="text/javascript" src="<!--{$TPL_DIR}-->js/navi.js"></script> 16 <script type="text/javascript" src="<!--{$TPL_DIR}-->js/win_op.js"></script> 17 <script type="text/javascript" src="<!--{$TPL_DIR}-->js/site.js"></script> 18 <title><!--{$arrSiteInfo.shop_name|escape}-->/住所検索</title> 19 <meta name="author" content="<!--{$arrPageLayout.author|escape}-->" /> 20 <meta name="description" content="<!--{$arrPageLayout.description|escape}-->" /> 21 <meta name="keywords" content="<!--{$arrPageLayout.keyword|escape}-->" /> 20 22 </head> 21 23 22 <body bgcolor="#ffe9e6" text="#555555" link="#3a75af" vlink="#3a75af" alink="#3a75af" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="preLoadImg('<!--{$smarty.const.URL_DIR}-->'); <!--{$tpl_onload}--> <!--{$tpl_start}-->">24 <body onload="preLoadImg('<!--{$smarty.const.URL_DIR}-->'); <!--{$tpl_onload}--> <!--{$tpl_start}-->"> 23 25 <noscript> 24 <link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->css/common.css" type="text/css">26 <p>JavaScript を有効にしてご利用下さい.</p> 25 27 </noscript> 26 <div align="center">27 28 28 <!--▼CONTENTS--> 29 <table width="500" border="0" cellspacing="0" cellpadding="0" summary=" "> 30 <tr><td height="15"></td></tr> 31 <tr><td bgcolor="#ffa85c"><img src="<!--{$smarty.const.URL_DIR}-->misc/_.gif" width="1" height="5" alt=""></td></tr> 32 <tr> 33 <td bgcolor="#ffffff" align="center"> 34 <!--▼MAIN ONTENTS--> 35 <table width="460" border="0" cellspacing="0" cellpadding="0" summary=" "> 36 <tr><td height="15"></td></tr> 37 <tr> 38 <td><img src="<!--{$TPL_DIR}-->img/common/zip_title.jpg" width="460" height="40" alt="住所検索"></td> 39 </tr> 40 <tr><td height="20"></td></tr> 41 <tr> 42 <td align="center" bgcolor="#cccccc"> 43 <table width="450" border="0" cellspacing="0" cellpadding="0" summary=" "> 44 <form name="form1" id="form1" method="post" action=""> 45 <input type="hidden" name="state" value="<!--{$tpl_state}-->"> 46 <input type="hidden" name="city" value="<!--{$tpl_city}-->"> 47 <input type="hidden" name="town" value="<!--{$tpl_town}-->"> 48 <tr><td height="5"></td></tr> 49 <tr> 50 <td align="center" height="150" bgcolor="#ffffff" class="fs12"><!--{$tpl_message}--></td> 51 </tr> 52 <tr><td height="5"></td></tr> 53 </fom> 54 </table> 55 </td> 56 </tr> 57 <tr><td height="20"></td></tr> 58 <tr> 59 <td align="center"><a href="javascript:window.close()" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/b_close_on.gif','b_close');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/b_close.gif','b_close');"><img src="<!--{$TPL_DIR}-->img/common/b_close.gif" width="140" height="30" alt="閉じる" border="0" name="b_close"></a></td> 60 </tr> 61 <tr><td height="30"></td></tr> 62 </table> 63 <!--▲MAIN ONTENTS--> 64 </td> 65 </tr> 66 <tr><td bgcolor="#ffa85c"><img src="<!--{$smarty.const.URL_DIR}-->misc/_.gif" width="1" height="5" alt=""></td></tr> 67 </table> 29 <div id="zipsearchcolumn"> 30 <h2><img src="<!--{$TPL_DIR}-->img/common/zip_title.jpg" width="460" height="40" alt="住所検索" /></h2> 31 <div id="zipsearcharea"> 32 <form name="form1" id="form1" method="post" action="<!--{$smarty.const.PHP_SELF|escape}-->"> 33 <input type="hidden" name="state" value="<!--{$tpl_state}-->" /> 34 <input type="hidden" name="city" value="<!--{$tpl_city}-->" /> 35 <input type="hidden" name="town" value="<!--{$tpl_town}-->" /> 36 <div id="completebox"> 37 <p><!--{$tpl_message}--></p> 38 </div> 39 </form> 40 </div> 41 <div class="btn"><a href="javascript:window.close()" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/b_close_on.gif','b_close');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/b_close.gif','b_close');"><img src="<!--{$TPL_DIR}-->img/common/b_close.gif" width="140" height="30" alt="閉じる" border="0" name="b_close"></a></div> 68 42 <!--▲CONTENTS--> 69 </div>43 </div> 70 44 </body> 71 45 </html> -
branches/feature-module-update/html/input_zip.php
r15532 r16174 6 6 */ 7 7 8 // {{{ requires 8 9 require_once("./require.php"); 10 require_once(CLASS_PATH . "page_extends/LC_Page_InputZip_Ex.php"); 9 11 10 class LC_Page { 11 var $tpl_state; 12 var $tpl_city; 13 var $tpl_town; 14 var $tpl_onload; 15 var $tpl_message; 16 function CPage() { 17 $this->tpl_message = "住所を検索しています。"; 18 } 19 } 12 // }}} 13 // {{{ generate page 20 14 21 $conn = new SC_DBconn(ZIP_DSN); 22 $objPage = new LC_Page(); 23 $objView = new SC_SiteView(false); 24 25 // 入力エラーチェック 26 $arrErr = fnErrorCheck(); 27 28 // 入力エラーの場合は終了 29 if(count($arrErr) > 0) { 30 $objPage->tpl_start = "window.close();"; 31 } 32 33 // 郵便番号検索文作成 34 $zipcode = $_GET['zip1'].$_GET['zip2']; 35 $zipcode = mb_convert_kana($zipcode ,"n"); 36 $sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?"; 37 38 $data_list = $conn->getAll($sqlse, array($zipcode)); 39 40 // インデックスと値を反転させる。 41 $arrREV_PREF = array_flip($arrPref); 42 43 $objPage->tpl_state = $arrREV_PREF[$data_list[0]['state']]; 44 $objPage->tpl_city = $data_list[0]['city']; 45 $town = $data_list[0]['town']; 46 /* 47 総務省からダウンロードしたデータをそのままインポートすると 48 以下のような文字列が入っているので 対策する。 49 ・(1~19丁目) 50 ・以下に掲載がない場合 51 */ 52 $town = ereg_replace("(.*)$","",$town); 53 $town = ereg_replace("以下に掲載がない場合","",$town); 54 $objPage->tpl_town = $town; 55 56 // 郵便番号が発見された場合 57 if(count($data_list) > 0) { 58 $func = "fnPutAddress('" . $_GET['input1'] . "','" . $_GET['input2']. "');"; 59 $objPage->tpl_onload = "$func"; 60 $objPage->tpl_start = "window.close();"; 61 } else { 62 $objPage->tpl_message = "該当する住所が見つかりませんでした。"; 63 } 64 65 /* ページの表示 */ 66 $objView->assignobj($objPage); 67 $objView->display("input_zip.tpl"); 68 69 /* 入力エラーのチェック */ 70 function fnErrorCheck() { 71 // エラーメッセージ配列の初期化 72 $objErr = new SC_CheckError(); 73 74 // 郵便番号 75 $objErr->doFunc( array("郵便番号1",'zip1',ZIP01_LEN ) ,array( "NUM_COUNT_CHECK" ) ); 76 $objErr->doFunc( array("郵便番号2",'zip2',ZIP02_LEN ) ,array( "NUM_COUNT_CHECK" ) ); 77 78 return $objErr->arrErr; 79 } 80 15 $objPage = new LC_Page_InputZip_Ex(); 16 $objPage->init(); 17 $objPage->process(); 18 register_shutdown_function(array($objPage, "destroy")); 81 19 ?> -
branches/feature-module-update/html/user_data/templates/default/css/window.css
r15737 r16174 107 107 text-align: center; 108 108 } 109 110 /* 郵便番号検索 111 ----------------------------------------------- */ 112 div#zipsearchcolumn { 113 width: 460px; 114 margin: 15px auto 0 auto; 115 background-color: #fff; 116 border-top: 5px solid #ffa85c; 117 border-bottom: 5px solid #ffa85c; 118 } 119 120 div#zipsearchcolumn h2 { 121 width: 460px; 122 margin: 0 0 15px 0; 123 } 124 125 div#zipsearcharea { 126 width: 460px; 127 margin: 15px auto 0 auto; 128 } 129 130 div#zipsearchcolumn .btn { 131 margin: 15px 0 30px 0; 132 text-align: center; 133 } 134 135 div#zipsearcharea #completebox p{ 136 padding: 60px 5px; 137 text-align: center; 138 } 139
Note: See TracChangeset
for help on using the changeset viewer.