source: branches/comu-ver2/data/Smarty/templates/default/admin/mail/template_input.tpl @ 17605

Revision 17605, 3.3 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-2008 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 language="JavaScript">
25<!--
26function lfnCheckSubmit(){
27 
28  fm = document.form1;
29  var err = '';
30 
31  if ( ! fm["subject"].value ){
32    err += 'Subjectを入力して下さい。';
33  }
34  if ( ! fm["body"].value ){
35    if ( err ) err += '
36';
37    err += '本文を入力して下さい。';
38  }
39  if ( err ){
40    alert(err);
41    return false;
42  } else {
43    if(window.confirm('内容を登録しても宜しいですか')){
44      return true;
45    }else{
46      return false;
47    }
48  }
49}
50//-->
51</script>
52
53
54<form name="form1" id="form1" method="post" action="?" onSubmit="return lfnCheckSubmit();">
55<input type="hidden" name="mode" value="<!--{$mode}-->" />
56<input type="hidden" name="template_id" value="<!--{$arrForm.template_id}-->" />
57<div id="mail" class="contents-main">
58  <h2>配信内容設定:<!--{$title}--></h2>
59  <table class="form">
60    <tr>
61      <th>メール形式<span class="attention"> *</span></th>
62      <td>
63        <span <!--{if $arrErr.mail_method}--><!--{sfSetErrorStyle}--><!--{/if}-->><!--{html_radios name="mail_method" options=$arrMagazineType separator="&nbsp;" selected=$arrForm.mail_method}--></span>
64        <!--{if $arrErr.mail_method}--><br /><span class="attention"><!--{$arrErr.mail_method}--></span><!--{/if}-->
65      </td>
66    </tr>
67    <tr>
68      <th>Subject<span class="attention"> *</span></th>
69      <td>
70        <input type="text" name="subject" size="65" class="box65" <!--{if $arrErr.subject}--><!--{sfSetErrorStyle}--><!--{/if}--> value="<!--{$arrForm.subject|escape}-->" />
71        <!--{if $arrErr.subject}--><br /><span class="attention"><!--{$arrErr.subject}--></span><!--{/if}-->
72      </td>
73    </tr>
74    <tr>
75      <th>本文<span class="attention"> *</span><br />(名前差し込み時は {name} といれてください)</th>
76      <td>
77        <textarea name="body" cols="90" rows="40" class="area90" <!--{if $arrErr.body}--><!--{sfSetErrorStyle}--><!--{/if}-->><!--{$arrForm.body|escape}--></textarea>
78        <!--{if $arrErr.body}--><br /><span class="attention"><!--{$arrErr.body}--></span><!--{/if}-->
79      </td>
80    </tr>
81  </table>
82  <div class="btn">
83    <button type="submit"><span>この内容で登録する</span></button>
84    <button type="button" onclick="fnCharCount('form1','body','cnt_footer');" name="next" id="next"><span>文字数カウント</span></button>
85    <span>今までに入力したのは<input type="text" name="cnt_footer" size="4" class="box4" readonly = true style="text-align:right" />文字です。</span>
86  </div>
87</table>
88
Note: See TracBrowser for help on using the repository browser.