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"> |
---|
25 | <!-- |
---|
26 | |
---|
27 | function func_regist(url) { |
---|
28 | res = confirm('この内容で<!--{if $edit_mode eq "on"}-->編集<!--{else}-->登録<!--{/if}-->しても宜しいですか?'); |
---|
29 | if(res == true) { |
---|
30 | document.form1.mode.value = 'regist'; |
---|
31 | document.form1.submit(); |
---|
32 | return false; |
---|
33 | } |
---|
34 | return false; |
---|
35 | } |
---|
36 | |
---|
37 | function func_edit(news_id) { |
---|
38 | document.form1.mode.value = "search"; |
---|
39 | document.form1.news_id.value = news_id; |
---|
40 | document.form1.submit(); |
---|
41 | } |
---|
42 | |
---|
43 | function func_del(news_id) { |
---|
44 | res = confirm('この新着情報を削除しても宜しいですか?'); |
---|
45 | if(res == true) { |
---|
46 | document.form1.mode.value = "delete"; |
---|
47 | document.form1.news_id.value = news_id; |
---|
48 | document.form1.submit(); |
---|
49 | } |
---|
50 | return false; |
---|
51 | } |
---|
52 | |
---|
53 | function func_rankMove(term,news_id) { |
---|
54 | document.form1.mode.value = "move"; |
---|
55 | document.form1.news_id.value = news_id; |
---|
56 | document.form1.term.value = term; |
---|
57 | document.form1.submit(); |
---|
58 | } |
---|
59 | |
---|
60 | function moving(news_id,rank, max_rank) { |
---|
61 | |
---|
62 | var val; |
---|
63 | var ml; |
---|
64 | var len; |
---|
65 | |
---|
66 | ml = document.move; |
---|
67 | len = document.move.elements.length; |
---|
68 | j = 0; |
---|
69 | for( var i = 0 ; i < len ; i++) { |
---|
70 | if ( ml.elements[i].name == 'position' && ml.elements[i].value != "" ) { |
---|
71 | val = ml.elements[i].value; |
---|
72 | j ++; |
---|
73 | } |
---|
74 | } |
---|
75 | |
---|
76 | if ( j > 1) { |
---|
77 | alert( '移動順位は1つだけ入力してください。' ); |
---|
78 | return false; |
---|
79 | } else if( ! val ) { |
---|
80 | alert( '移動順位を入力してください。' ); |
---|
81 | return false; |
---|
82 | } else if( val.length > 4){ |
---|
83 | alert( '移動順位は4桁以内で入力してください。' ); |
---|
84 | return false; |
---|
85 | } else if( val.match(/[0-9]+/g) != val){ |
---|
86 | alert( '移動順位は数字で入力してください。' ); |
---|
87 | return false; |
---|
88 | } else if( val == rank ){ |
---|
89 | alert( '移動させる番号が重複しています。' ); |
---|
90 | return false; |
---|
91 | } else if( val == 0 ){ |
---|
92 | alert( '移動順位は0以上で入力してください。' ); |
---|
93 | return false; |
---|
94 | } else if( val > max_rank ){ |
---|
95 | alert( '入力された順位は、登録数の最大値を超えています。' ); |
---|
96 | return false; |
---|
97 | } else { |
---|
98 | ml.moveposition.value = val; |
---|
99 | ml.rank.value = rank; |
---|
100 | ml.news_id.value = news_id; |
---|
101 | ml.submit(); |
---|
102 | return false; |
---|
103 | } |
---|
104 | } |
---|
105 | |
---|
106 | //--> |
---|
107 | </script> |
---|
108 | |
---|
109 | <!--★★メインコンテンツ★★--> |
---|
110 | <table width="878" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
111 | <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> |
---|
112 | <input type="hidden" name="mode" value=""> |
---|
113 | <input type="hidden" name="news_id" value="<!--{$news_id|escape}-->"> |
---|
114 | <input type="hidden" name="term" value=""> |
---|
115 | <tr valign="top"> |
---|
116 | <td background="<!--{$TPL_DIR}-->img/contents/navi_bg.gif" height="402"> |
---|
117 | <!--▼SUB NAVI--> |
---|
118 | <!--{include file=$tpl_subnavi}--> |
---|
119 | <!--▲SUB NAVI--> |
---|
120 | </td> |
---|
121 | <td class="mainbg"> |
---|
122 | <!--▼登録テーブルここから--> |
---|
123 | <table width="737" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
124 | <!--メインエリア--> |
---|
125 | <tr> |
---|
126 | <td align="center"> |
---|
127 | <table width="706" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
128 | |
---|
129 | <tr><td height="14"></td></tr> |
---|
130 | <tr> |
---|
131 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_top.jpg" width="706" height="14" alt=""></td> |
---|
132 | </tr> |
---|
133 | <tr> |
---|
134 | <td background="<!--{$TPL_DIR}-->img/contents/main_left.jpg"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="14" height="1" alt=""></td> |
---|
135 | <td bgcolor="#cccccc"> |
---|
136 | <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
137 | <tr> |
---|
138 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_top.gif" width="678" height="7" alt=""></td> |
---|
139 | </tr> |
---|
140 | <tr> |
---|
141 | <td background="<!--{$TPL_DIR}-->img/contents/contents_title_left_bg.gif"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_left.gif" width="22" height="12" alt=""></td> |
---|
142 | <td bgcolor="#636469" width="638" class="fs14n"><span class="white"><!--コンテンツタイトル-->新規登録</span></td> |
---|
143 | <td background="<!--{$TPL_DIR}-->img/contents/contents_title_right_bg.gif"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="18" height="1" alt=""></td> |
---|
144 | </tr> |
---|
145 | <tr> |
---|
146 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_bottom.gif" width="678" height="7" alt=""></td> |
---|
147 | </tr> |
---|
148 | <tr> |
---|
149 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_bar.jpg" width="678" height="10" alt=""></td> |
---|
150 | </tr> |
---|
151 | </table> |
---|
152 | |
---|
153 | <!--▼登録テーブルここから--> |
---|
154 | <table width="678" border="0" cellspacing="1" cellpadding="8" summary=" "> |
---|
155 | <thead> |
---|
156 | <tr class="fs12n"> |
---|
157 | <td bgcolor="#f2f1ec" width="78">日付<span class="red"> *</span></td> |
---|
158 | <td bgcolor="#ffffff" width="600"><span class="red"><!--{$arrErr.year}--><!--{$arrErr.month}--><!--{$arrErr.day}--></span> |
---|
159 | <select name="year" <!--{if $arrErr.year}-->style="background-color:<!--{$smarty.const.ERR_COLOR|escape}-->"<!--{/if}-->> |
---|
160 | <option value="" selected>----</option> |
---|
161 | <!--{html_options options=$arrYear selected=$selected_year}--> |
---|
162 | </select>年 |
---|
163 | <select name="month" <!--{if $arrErr.month}-->style="background-color:<!--{$smarty.const.ERR_COLOR|escape}-->"<!--{/if}-->> |
---|
164 | <option value="" selected>--</option> |
---|
165 | <!--{html_options options=$arrMonth selected=$selected_month}--> |
---|
166 | </select>月 |
---|
167 | <select name="day" <!--{if $arrErr.day}-->style="background-color:<!--{$smarty.const.ERR_COLOR|escape}-->"<!--{/if}-->> |
---|
168 | <option value="" selected>--</option> |
---|
169 | <!--{html_options options=$arrDay selected=$selected_day}--> |
---|
170 | </select>日 |
---|
171 | </td> |
---|
172 | </tr> |
---|
173 | <tr> |
---|
174 | <td bgcolor="#f2f1ec" width="" class="fs12n">タイトル<span class="red"> *</span></td> |
---|
175 | <td bgcolor="#ffffff" width="" class="fs12n"><!--{if $arrErr.news_title}--><span class="red"><!--{$arrErr.news_title}--></span><!--{/if}--> |
---|
176 | <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|escape}-->"<!--{/if}-->><!--{$news_title|escape}--></textarea><br/><span class="red"> (上限<!--{$smarty.const.MTEXT_LEN}-->文字)</span> |
---|
177 | </td> |
---|
178 | </tr> |
---|
179 | </thead> |
---|
180 | <tfoot> |
---|
181 | <tr> |
---|
182 | <td bgcolor="#f2f1ec" width="38" class="fs12n">URL</td> |
---|
183 | <td bgcolor="#ffffff" width="600" class="fs12n"><span class="red"><!--{$arrErr.news_url}--></span><input type="text" name="news_url" size="60" class="box60" value="<!--{$news_url|escape}-->" <!--{if $arrErr.news_url}-->style="background-color:<!--{$smarty.const.ERR_COLOR|escape}-->"<!--{/if}--> maxlength="<!--{$smarty.const.URL_LEN}-->"/><span class="red"> (上限<!--{$smarty.const.URL_LEN}-->文字)</span> |
---|
184 | </td> |
---|
185 | </tr> |
---|
186 | <tr class="fs12n"> |
---|
187 | <td bgcolor="#f2f1ec" width="78">リンク</td> |
---|
188 | <td bgcolor="#ffffff" width="600"><input type="checkbox" name="link_method" value="2" <!--{if $link_method eq 2}--> checked <!--{/if}--> >別ウィンドウで開く</td> |
---|
189 | </tr> |
---|
190 | <tr> |
---|
191 | <td bgcolor="#f2f1ec" width="38" class="fs12n">本文作成</td> |
---|
192 | <td bgcolor="#ffffff" width="600" class="fs12n"><!--{if $arrErr.news_comment}--><span class="red"><!--{$arrErr.news_comment}--></span><!--{/if}--><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|escape}--><!--{/if}-->"><!--{$news_comment|escape}--></textarea><br/><span class="red"> (上限3000文字)</span> |
---|
193 | </td> |
---|
194 | </tr> |
---|
195 | </tfoot> |
---|
196 | </table> |
---|
197 | <!--▲登録テーブルここまで--> |
---|
198 | |
---|
199 | <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
200 | <tr> |
---|
201 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td> |
---|
202 | <td><img src="<!--{$TPL_DIR}-->img/contents/tbl_top.gif" width="676" height="7" alt=""></td> |
---|
203 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td> |
---|
204 | </tr> |
---|
205 | <tr> |
---|
206 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td> |
---|
207 | <td bgcolor="#e9e7de" align="center"> |
---|
208 | <table border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
209 | <tr> |
---|
210 | <td><input type="image" onMouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/contents/btn_regist_on.jpg',this)" onMouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/contents/btn_regist.jpg',this)" src="<!--{$TPL_DIR}-->img/contents/btn_regist.jpg" width="123" height="24" alt="この内容で登録する" border="0" name="subm" onclick="return func_regist();"></td> |
---|
211 | </tr> |
---|
212 | </table> |
---|
213 | </td> |
---|
214 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td> |
---|
215 | </tr> |
---|
216 | <tr> |
---|
217 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/tbl_bottom.gif" width="678" height="8" alt=""></td> |
---|
218 | </tr> |
---|
219 | </form> |
---|
220 | </table> |
---|
221 | |
---|
222 | <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
223 | <tr><td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_bar.jpg" width="678" height="10" alt=""></td></tr> |
---|
224 | </table> |
---|
225 | |
---|
226 | <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
227 | <tr> |
---|
228 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_top.gif" width="678" height="7" alt=""></td> |
---|
229 | </tr> |
---|
230 | <tr> |
---|
231 | <td background="<!--{$TPL_DIR}-->img/contents/contents_title_left_bg.gif"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_left.gif" width="22" height="12" alt=""></td> |
---|
232 | <td bgcolor="#636469" width="638" class="fs14n"><span class="white"><!--コンテンツタイトル-->登録済み新着情報</span></td> |
---|
233 | <td background="<!--{$TPL_DIR}-->img/contents/contents_title_right_bg.gif"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="18" height="1" alt=""></td> |
---|
234 | </tr> |
---|
235 | <tr> |
---|
236 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_bottom.gif" width="678" height="7" alt=""></td> |
---|
237 | </tr> |
---|
238 | <tr> |
---|
239 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_bar.jpg" width="678" height="10" alt=""></td> |
---|
240 | </tr> |
---|
241 | </table> |
---|
242 | |
---|
243 | <!--▼一覧表示エリアここから--> |
---|
244 | <table width="678" border="0" cellspacing="1" cellpadding="8" summary=" "> |
---|
245 | <form name="move" id="move" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> |
---|
246 | <input type="hidden" name="mode" value="moveRankSet"> |
---|
247 | <input type="hidden" name="term" value="setposition"> |
---|
248 | <input type="hidden" name="news_id" value=""> |
---|
249 | <input type="hidden" name="moveposition" value=""> |
---|
250 | <input type="hidden" name="rank" value=""> |
---|
251 | <tr bgcolor="#f2f1ec" align="center" class="fs12n"> |
---|
252 | <td width="30">順位</td> |
---|
253 | <td width="76">日付</td> |
---|
254 | <td width="269">タイトル</td> |
---|
255 | <td width="50">編集</td> |
---|
256 | <td width="50">削除</td> |
---|
257 | <td width="100">移動</td> |
---|
258 | </tr> |
---|
259 | <!--{if $arrErr.moveposition}--> |
---|
260 | <tr bgcolor="#ffffff" class="fs12n"><td bgcolor="#ffffff" colspan="6"><span class="red"><!--{$arrErr.moveposition}--></span></td></tr> |
---|
261 | <!--{/if}--> |
---|
262 | <!--{section name=data loop=$list_data}--> |
---|
263 | <tr bgcolor="<!--{if $list_data[data].news_id eq $news_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->" class="fs12"> |
---|
264 | <!--{assign var=db_rank value="`$list_data[data].rank`"}--> |
---|
265 | <!--{assign var=rank value="`$line_max-$db_rank+1`"}--> |
---|
266 | <td width="" align="center"><!--{$rank}--></td> |
---|
267 | <td width="" align="center"><!--{$list_data[data].cast_news_date|date_format:"%Y/%m/%d"}--></td> |
---|
268 | <td width=""> |
---|
269 | <!--{if $list_data[data].link_method eq 1 && $list_data[data].news_url != ""}--><a href="<!--{$list_data[data].news_url}-->" ><!--{$list_data[data].news_title|escape|nl2br}--></a> |
---|
270 | <!--{elseif $list_data[data].link_method eq 1 && $list_data[data].news_url == ""}--><!--{$list_data[data].news_title|escape|nl2br}--> |
---|
271 | <!--{elseif $list_data[data].link_method eq 2 && $list_data[data].news_url != ""}--><a href="<!--{$list_data[data].news_url}-->" target="_blank" ><!--{$list_data[data].news_title|escape|nl2br}--></a> |
---|
272 | <!--{else}--><!--{$list_data[data].news_title|escape|nl2br}--> |
---|
273 | <!--{/if}--> |
---|
274 | </td> |
---|
275 | <td width="" align="center"><a href="#" onclick="return func_edit('<!--{$list_data[data].news_id|escape}-->');">編集</a></td> |
---|
276 | <td width="" align="center"><a href="#" onclick="return func_del('<!--{$list_data[data].news_id|escape}-->');">削除</a></td> |
---|
277 | <td width="" align="center"> |
---|
278 | <!--{if count($list_data) != 1}--> |
---|
279 | <input type="text" name="pos-<!--{$list_data[data].news_id}-->" size="3" class="box3" />番目へ<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnFormModeSubmit('move', 'moveRankSet','news_id', '<!--{$list_data[data].news_id}-->'); return false;">移動</a><br /> |
---|
280 | <!--{/if}--> |
---|
281 | <!--{if $list_data[data].rank ne $max_rank}--><a href="#" onclick="return func_rankMove('up', '<!--{$list_data[data].news_id|escape}-->', '<!--{$max_rank|escape}-->');">上へ</a><!--{/if}--> <!--{if $list_data[data].rank ne 1}--><a href="#" onclick="return func_rankMove('down', '<!--{$list_data[data].news_id|escape}-->', '<!--{$max_rank|escape}-->');">下へ</a><!--{/if}--> |
---|
282 | </td> |
---|
283 | </tr> |
---|
284 | <!--{sectionelse}--> |
---|
285 | <tr bgcolor="#ffffff" class="fs12n"> |
---|
286 | <td colspan="6">現在データはありません。</td> |
---|
287 | </tr> |
---|
288 | <!--{/section}--> |
---|
289 | </form> |
---|
290 | </table> |
---|
291 | <!--▲一覧表示エリアここまで--> |
---|
292 | |
---|
293 | </td> |
---|
294 | <td background="<!--{$TPL_DIR}-->img/contents/main_right.jpg"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="14" height="1" alt=""></td> |
---|
295 | </tr> |
---|
296 | <tr> |
---|
297 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_bottom.jpg" width="706" height="14" alt=""></td> |
---|
298 | </tr> |
---|
299 | <tr><td height="30"></td></tr> |
---|
300 | </table> |
---|
301 | </td> |
---|
302 | </tr> |
---|
303 | <!--メインエリア--> |
---|
304 | </table> |
---|
305 | <!--▲登録テーブルここまで--> |
---|
306 | </td> |
---|
307 | </tr> |
---|
308 | </table> |
---|
309 | <!--★★メインコンテンツ★★--> |
---|