1 | <!--{* |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2013 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 | |
---|
25 | <script type="text/javascript"> |
---|
26 | <!-- |
---|
27 | |
---|
28 | function func_regist(url) { |
---|
29 | res = confirm('この内容で<!--{if $edit_mode eq "on"}-->編集<!--{else}-->登録<!--{/if}-->しても宜しいですか?'); |
---|
30 | if(res == true) { |
---|
31 | document.form1.mode.value = 'regist'; |
---|
32 | document.form1.submit(); |
---|
33 | return false; |
---|
34 | } |
---|
35 | return false; |
---|
36 | } |
---|
37 | |
---|
38 | function func_edit(news_id) { |
---|
39 | document.form1.mode.value = "search"; |
---|
40 | document.form1.news_id.value = news_id; |
---|
41 | document.form1.submit(); |
---|
42 | return false; |
---|
43 | } |
---|
44 | |
---|
45 | function func_del(news_id) { |
---|
46 | res = confirm('この新着情報を削除しても宜しいですか?'); |
---|
47 | if(res == true) { |
---|
48 | document.form1.mode.value = "delete"; |
---|
49 | document.form1.news_id.value = news_id; |
---|
50 | document.form1.submit(); |
---|
51 | } |
---|
52 | return false; |
---|
53 | } |
---|
54 | |
---|
55 | function func_rankMove(term,news_id) { |
---|
56 | document.form1.mode.value = "move"; |
---|
57 | document.form1.news_id.value = news_id; |
---|
58 | document.form1.term.value = term; |
---|
59 | document.form1.submit(); |
---|
60 | return false; |
---|
61 | } |
---|
62 | |
---|
63 | --> |
---|
64 | </script> |
---|
65 | |
---|
66 | |
---|
67 | <div id="admin-contents" class="contents-main"> |
---|
68 | <form name="form1" id="form1" method="post" action="?"> |
---|
69 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
70 | <input type="hidden" name="mode" value="" /> |
---|
71 | <input type="hidden" name="news_id" value="<!--{$arrForm.news_id|h}-->" /> |
---|
72 | <input type="hidden" name="term" value="" /> |
---|
73 | <!--{* ▼登録テーブルここから *}--> |
---|
74 | <table> |
---|
75 | <tr> |
---|
76 | <th>日付<span class="attention"> *</span></th> |
---|
77 | <td> |
---|
78 | <!--{if $arrErr.year || $arrErr.month || $arrErr.day}--><span class="attention"><!--{$arrErr.year}--><!--{$arrErr.month}--><!--{$arrErr.day}--></span><!--{/if}--> |
---|
79 | <select name="year" <!--{if $arrErr.year || $arrErr.month || $arrErr.day }-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->> |
---|
80 | <option value="" selected="selected">----</option> |
---|
81 | <!--{html_options options=$arrYear selected=$arrForm.year}--> |
---|
82 | </select>年 |
---|
83 | <select name="month" <!--{if $arrErr.year || $arrErr.month || $arrErr.day}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->> |
---|
84 | <option value="" selected="selected">--</option> |
---|
85 | <!--{html_options options=$arrMonth selected=$arrForm.month}--> |
---|
86 | </select>月 |
---|
87 | <select name="day" <!--{if $arrErr.year || $arrErr.month || $arrErr.day}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->> |
---|
88 | <option value="" selected="selected">--</option> |
---|
89 | <!--{html_options options=$arrDay selected=$arrForm.day}--> |
---|
90 | </select>日 |
---|
91 | </td> |
---|
92 | </tr> |
---|
93 | <tr> |
---|
94 | <th>タイトル<span class="attention"> *</span></th> |
---|
95 | <td> |
---|
96 | <!--{if $arrErr.news_title}--><span class="attention"><!--{$arrErr.news_title}--></span><!--{/if}--> |
---|
97 | <textarea name="news_title" cols="60" rows="8" class="area60" maxlength="<!--{$smarty.const.MTEXT_LEN}-->" <!--{if $arrErr.news_title}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->><!--{"\n"}--><!--{$arrForm.news_title|h}--></textarea><br /> |
---|
98 | <span class="attention"> (上限<!--{$smarty.const.MTEXT_LEN}-->文字)</span> |
---|
99 | </td> |
---|
100 | </tr> |
---|
101 | <tr> |
---|
102 | <th>URL</th> |
---|
103 | <td> |
---|
104 | <span class="attention"><!--{$arrErr.news_url}--></span> |
---|
105 | <input type="text" name="news_url" size="60" class="box60" value="<!--{$arrForm.news_url|h}-->" <!--{if $arrErr.news_url}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> maxlength="<!--{$smarty.const.URL_LEN}-->" /> |
---|
106 | <span class="attention"> (上限<!--{$smarty.const.URL_LEN}-->文字)</span> |
---|
107 | </td> |
---|
108 | </tr> |
---|
109 | <tr> |
---|
110 | <th>リンク</th> |
---|
111 | <td><label><input type="checkbox" name="link_method" value="2" <!--{if $arrForm.link_method eq 2}--> checked <!--{/if}--> /> 別ウィンドウで開く</label></td> |
---|
112 | </tr> |
---|
113 | <tr> |
---|
114 | <th>本文作成</th> |
---|
115 | <td> |
---|
116 | <!--{if $arrErr.news_comment}--><span class="attention"><!--{$arrErr.news_comment}--></span><!--{/if}--> |
---|
117 | <textarea name="news_comment" cols="60" rows="8" wrap="soft" class="area60" maxlength="<!--{$smarty.const.LTEXT_LEN}-->" style="background-color:<!--{if $arrErr.news_comment}--><!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->"><!--{"\n"}--><!--{$arrForm.news_comment|h}--></textarea><br /> |
---|
118 | <span class="attention"> (上限3000文字)</span> |
---|
119 | </td> |
---|
120 | </tr> |
---|
121 | </table> |
---|
122 | <!--{* ▲登録テーブルここまで *}--> |
---|
123 | |
---|
124 | <div class="btn-area"> |
---|
125 | <ul> |
---|
126 | <li><a class="btn-action" href="javascript:;" onclick="return func_regist();"><span class="btn-next">この内容で登録する</span></a></li> |
---|
127 | </ul> |
---|
128 | </div> |
---|
129 | </form> |
---|
130 | |
---|
131 | <h2>新着情報一覧</h2> |
---|
132 | <!--{if $arrErr.moveposition}--> |
---|
133 | <p><span class="attention"><!--{$arrErr.moveposition}--></span></p> |
---|
134 | <!--{/if}--> |
---|
135 | <!--{* ▼一覧表示エリアここから *}--> |
---|
136 | <form name="move" id="move" method="post" action="?"> |
---|
137 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
138 | <input type="hidden" name="mode" value="moveRankSet" /> |
---|
139 | <input type="hidden" name="term" value="setposition" /> |
---|
140 | <input type="hidden" name="news_id" value="" /> |
---|
141 | <input type="hidden" name="moveposition" value="" /> |
---|
142 | <input type="hidden" name="rank" value="" /> |
---|
143 | <table class="list"> |
---|
144 | <col width="5%" /> |
---|
145 | <col width="15%" /> |
---|
146 | <col width="45%" /> |
---|
147 | <col width="5%" /> |
---|
148 | <col width="5%" /> |
---|
149 | <col width="25%" /> |
---|
150 | <tr> |
---|
151 | <th>順位</th> |
---|
152 | <th>日付</th> |
---|
153 | <th>タイトル</th> |
---|
154 | <th class="edit">編集</th> |
---|
155 | <th class="delete">削除</th> |
---|
156 | <th>移動</th> |
---|
157 | </tr> |
---|
158 | <!--{section name=data loop=$arrNews}--> |
---|
159 | <tr style="background:<!--{if $arrNews[data].news_id != $tpl_news_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->;" class="center"> |
---|
160 | <!--{assign var=db_rank value="`$arrNews[data].rank`"}--> |
---|
161 | <td><!--{math equation="$line_max - $db_rank + 1"}--></td> |
---|
162 | <td><!--{$arrNews[data].cast_news_date|date_format:"%Y/%m/%d"}--></td> |
---|
163 | <td class="left"> |
---|
164 | <!--{if $arrNews[data].link_method eq 1 && $arrNews[data].news_url != ""}--><a href="<!--{$arrNews[data].news_url|h}-->" ><!--{$arrNews[data].news_title|h|nl2br}--></a> |
---|
165 | <!--{elseif $arrNews[data].link_method eq 1 && $arrNews[data].news_url == ""}--><!--{$arrNews[data].news_title|h|nl2br}--> |
---|
166 | <!--{elseif $arrNews[data].link_method eq 2 && $arrNews[data].news_url != ""}--><a href="<!--{$arrNews[data].news_url|h}-->" target="_blank" ><!--{$arrNews[data].news_title|h|nl2br}--></a> |
---|
167 | <!--{else}--><!--{$arrNews[data].news_title|h|nl2br}--> |
---|
168 | <!--{/if}--> |
---|
169 | </td> |
---|
170 | <td> |
---|
171 | <!--{if $arrNews[data].news_id != $tpl_news_id}--> |
---|
172 | <a href="#" onclick="return func_edit('<!--{$arrNews[data].news_id|h}-->');">編集</a> |
---|
173 | <!--{else}--> |
---|
174 | 編集中 |
---|
175 | <!--{/if}--> |
---|
176 | </td> |
---|
177 | <td><a href="#" onclick="return func_del('<!--{$arrNews[data].news_id|h}-->');">削除</a></td> |
---|
178 | <td> |
---|
179 | <!--{if count($arrNews) != 1}--> |
---|
180 | <input type="text" name="pos-<!--{$arrNews[data].news_id|h}-->" size="3" class="box3" />番目へ<a href="?" onclick="fnFormModeSubmit('move', 'moveRankSet','news_id', '<!--{$arrNews[data].news_id|h}-->'); return false;">移動</a><br /> |
---|
181 | <!--{/if}--> |
---|
182 | <!--{if $arrNews[data].rank ne $max_rank}--><a href="#" onclick="return func_rankMove('up', '<!--{$arrNews[data].news_id|h}-->', '<!--{$max_rank|h}-->');">上へ</a><!--{/if}--> <!--{if $arrNews[data].rank ne 1}--><a href="#" onclick="return func_rankMove('down', '<!--{$arrNews[data].news_id|h}-->', '<!--{$max_rank|h}-->');">下へ</a><!--{/if}--> |
---|
183 | </td> |
---|
184 | </tr> |
---|
185 | <!--{sectionelse}--> |
---|
186 | <tr class="center"> |
---|
187 | <td colspan="6">現在データはありません。</td> |
---|
188 | </tr> |
---|
189 | <!--{/section}--> |
---|
190 | </table> |
---|
191 | </form> |
---|
192 | <!--{* ▲一覧表示エリアここまで *}--> |
---|
193 | |
---|
194 | </div> |
---|