source: branches/comu-ver2/data/Smarty/templates/default/admin/contents/csv_sql.tpl @ 17351

Revision 17351, 4.8 KB checked in by pineray, 16 years ago (diff)
  • 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 type="text/javascript">
25<!--
26// リストボックスのサイズ変更
27function ChangeSize(button, TextArea, Max, Min, row_tmp){
28  if(TextArea.rows <= Min){
29    TextArea.rows=Max; button.value="小さくする"; row_tmp.value=Max;
30  }else{
31    TextArea.rows =Min; button.value="大きくする"; row_tmp.value=Min;
32  }
33}
34
35// SQL確認画面起動
36function doPreview(){
37  document.form1.mode.value="preview"
38  document.form1.target = "_blank";
39  document.form1.submit();
40}
41
42// formのターゲットを自分に戻す
43function fnTargetSelf(){
44  document.form1.target = "_self";
45}
46
47//-->
48</script>
49
50
51<form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->">
52<input type="hidden" name="mode" value="confirm" />
53<input type="hidden" name="sql_id" value="<!--{$sql_id}-->" />
54<input type="hidden" name="csv_output_id" value="" />
55<input type="hidden" name="selectTable" value="" />
56<div id="admin-contents" class="contents-main">
57  <h2>SQL一覧</h2>
58
59  <!--{if $arrSqlList}-->
60  <table id="contents-csv-sqllist" class="list center">
61    <!--{ foreach key=key item=item from=$arrSqlList }-->
62    <tr style="background-color:<!--{if $item.sql_id == $sql_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->;">
63      <td>
64        <a href="<!--{$smarty.server.PHP_SELF|escape}-->?sql_id=<!--{$item.sql_id}-->" ><!--{$item.sql_name}--></a>
65      </td>
66      <td>
67        <div class="btn">
68          <button type='button' name='csv' onclick="fnTargetSelf(); fnFormModeSubmit('form1','csv_output','csv_output_id',<!--{$item.sql_id}-->);"><span>CSV出力</span></button>
69          <button type='button' name='del' onclick="fnTargetSelf(); fnFormModeSubmit('form1','delete','sql_id',<!--{$item.sql_id}-->);"><span>削除</span></button>
70        </div>
71      </td>
72    </tr>
73    <!--{ /foreach }-->
74  </table>
75  <!--{/if}-->
76
77  <div class="btn">
78    <button type='button' name='subm' onclick="fnTargetSelf(); fnFormModeSubmit('form1','new_page','','');"><span>新規SQL作成</span></button>
79  </div>
80
81
82  <h2>SQL設定</h2>
83  <table id="contents-csv-sqlset" class="form">
84    <tr>
85      <th>名称<span class="attention"> *</span></th>
86      <td>
87        <span class="attention"><!--{$arrErr.sql_name}--></span>
88        <input type="text" name="sql_name" value="<!--{$arrSqlData.sql_name|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" style="<!--{if $arrErr.name != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->" size="60" class="box60" />
89        <span class="attention"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span>
90      </td>
91    </tr>
92    <tr>
93      <th align="center">SQL文<br />(SELECTは記述しないでください。)<span class="attention"> *</span></td>
94      <td align="left">
95        <span class="attention"><!--{$arrErr.csv_sql}--></span>
96        <div>
97          <textarea name="csv_sql" cols=75 rows=30 align="left" wrap=off style="<!--{if $arrErr.csv_sql != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->"><!--{$arrSqlData.csv_sql}--></textarea>
98        </div>
99      </td>
100    </tr>
101  </table>
102
103  <div class="btn">
104    <button type="submit" name="subm" onClick="mode.value='confirm'; fnTargetSelf();"><span>実行する</span></button>
105    <button type="submit" name="subm" onClick="doPreview(); return false;"><span>確認ページへ</span></button>
106  </div>
107
108
109  <div id="contents-csv-sqltbl">
110    <h3>テーブル一覧</h3>
111    <select name="arrTableList[]" size="20" style="width:325px; height:300px;" onChange="mode.value=''; selectTable.value=this.value; submit();" onDblClick="csv_sql.value = csv_sql.value +' , ' + this.value;">
112      <!--{html_options options=$arrTableList selected=$selectTable}-->
113    </select>
114  </div>
115  <div id="contents-csv-sqlcol">
116    <h3>項目一覧</h3>
117    <select name="arrColList[]" size="20" style="width:325px; height:300px;" onDblClick="csv_sql.value = csv_sql.value +' , ' + this.value;">
118      <!--{html_options options=$arrColList}-->
119    </select>
120  </div>
121
122</div>
123</form>
124
125
126</script>
Note: See TracBrowser for help on using the repository browser.