source: branches/comu-ver2/data/Smarty/templates/default/mypage/delivery.tpl @ 17605

Revision 17605, 3.8 KB checked in by Seasoft, 16 years ago (diff)

/index.php にリンクやリダイレクトしている箇所の「index.php」を定数化。

  • 定数「DIR_INDEX_FILE」… DirectoryIndex? の実ファイル名。現状の EC-CUBE は、「index.php」。/html/define.php で定義するが、定義が無い場合 SC_Initial::defineDirectoryIndex() で「index.php」と定義。本来は、プログラム中で実ファイルとしての index.php を指すときとは、この定数を使うのが良い気がするが、今回はそこまでは書き換えていない。
  • 定数「USE_FILENAME_DIR_INDEX」… DIR_INDEX_FILE にアクセスするときにファイル名を使用するか。/html/define.php で定義。
  • 定数「DIR_INDEX_URL」… /index.php にリンクやリダイレクトしている箇所の「index.php」部分を示す。この定数は SC_Initial::defineDirectoryIndex() で自動生成する。

・$_SERVERPHP_SELF? や自身をあらわすファイル名を利用している箇所を文字列「?」に書き換え。これにより、/ が自己URLにリンクするときに /index.php となることを防ぐ。RFC3986 を参考にする。モバイル端末がこのRFCに準拠しているのか確信が無いので、モバイルではこの変更は見送った。
・従来 / にリンクしていた箇所に、定数「DIR_INDEX_URL」を付加。漏れがあると予測される。

  • Property svn:eol-style set to LF
  • Property svn:mime-type set to text/html; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23*}-->
24<script type="text/javascript">//<![CDATA[
25
26function fnCheckAfterOpenWin(){
27    if (<!--{$tpl_linemax}--> >= <!--{$smarty.const.DELIV_ADDR_MAX}-->){
28        alert('最大登録数を超えています');
29        return false;
30    }else{
31        win02('./delivery_addr.php','new_deiv','600','640');
32    }
33}
34//]]>
35</script>
36
37<!--▼CONTENTS-->
38<div id="mypagecolumn">
39  <h2 class="title"><!--{$tpl_title|escape}--></h2>
40<!--{include file=$tpl_navi}-->
41  <div id="mycontentsarea">
42    <h3><!--{$tpl_subtitle|escape}--></h3>
43    <p>登録住所以外へのご住所へ送付される場合等にご利用いただくことができます。<br />
44     ※最大<!--{$smarty.const.DELIV_ADDR_MAX}-->件まで登録できます。</p>
45
46    <p class="addbtn">
47    <!--{if $tpl_linemax < 20}-->
48      <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win03('./delivery_addr.php','delivadd','600','640'); return false;" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/newadress_on.gif','newadress');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/newadress.gif','newadress');" target="_blank"><img src="<!--{$TPL_DIR}-->img/common/newadress.gif" width="160" height="22" alt="新しいお届け先を追加" border="0" name="newadress" /></a>
49    <!--{/if}-->
50    </p>
51
52    <!--{if $tpl_linemax > 0}-->
53    <form name="form1" method="post" action="?" >
54      <input type="hidden" name="mode" value="" />
55      <input type="hidden" name="other_deliv_id" value="" />
56      <input type="hidden" name="pageno" value="<!--{$tpl_pageno}-->" />
57
58      <table summary="お届け先">
59        <tr>
60          <th colspan="5">▼お届け先</th>
61        </tr>
62       <!--{section name=cnt loop=$arrOtherDeliv}-->
63       <!--{assign var=OtherPref value="`$arrOtherDeliv[cnt].pref`"}-->
64        <tr>
65          <td class="centertd"><!--{$smarty.section.cnt.iteration}--></td>
66          <td><label for="add<!--{$smarty.section.cnt.iteration}-->">お届け先住所</label></td>
67          <td>
68            〒<!--{$arrOtherDeliv[cnt].zip01}-->-<!--{$arrOtherDeliv[cnt].zip02}--><br />
69            <!--{$arrPref[$OtherPref]|escape}--><!--{$arrOtherDeliv[cnt].addr01|escape}--><!--{$arrOtherDeliv[cnt].addr02|escape}--><br />
70        <!--{$arrOtherDeliv[cnt].name01|escape}-->&nbsp;<!--{$arrOtherDeliv[cnt].name02|escape}-->
71          </td>
72          <td class="centertd">
73            <a href="./delivery_addr.php" onclick="win02('./delivery_addr.php?other_deliv_id=<!--{$arrOtherDeliv[cnt].other_deliv_id}-->','deliv_disp','600','640'); return false;">変更</a>
74          </td>
75          <td class="centertd">
76            <a href="<!--{$smarty.server.PHP_SELF}-->" onclick="fnModeSubmit('delete','other_deliv_id','<!--{$arrOtherDeliv[cnt].other_deliv_id}-->'); return false;">削除</a>
77          </td>
78        </tr>
79        <!--{/section}-->
80      </table>
81    </form>
82    <!--{else}-->
83    <p class="delivempty"><strong>新しいお届け先はありません。</strong></p>
84    <!--{/if}-->
85  </div>
86</div>
87<!--▲CONTENTS-->
Note: See TracBrowser for help on using the repository browser.