bnbweb/back/templates/news_info.htm

126 lines
4.3 KiB
HTML
Raw Permalink Normal View History

2022-11-14 15:49:28 +00:00
<!-- $Id: goods_info.htm 17126 2010-04-23 10:30:26Z liuhui $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js"}
<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<script charset="utf-8" src="../includes/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="../includes/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
editor = K.create('#editor_id');
});
</script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
{if $warning}
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
<li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >{$warning}</li>
</ul>
{/if}
<!-- start goods form -->
<div class="tab-div">
<!-- tab body -->
<div id="tabbody-div">
<form enctype="multipart/form-data" action="" method="post" name="theForm" >
<table width="90%" id="web-table" align="center" class="goods_info">
<tr>
<td>文章標題</td>
<td><input type="text" name="subject" value="{$news.subject}" size="50" />
{$lang.require_field}</td>
</tr>
<tr>
<td>文章內容</td>
<td><textarea id="editor_id" name="content" style="width:100%;height:300px;">
{$news.content}
</textarea>
</td>
</tr>
<tr>
<td>上傳新聞圖</td>
<td>
<input type="file" name="image" size="35" />
{if $news.image}
<a href="news.php?act=show_image&img_url={$news.image}" target="_blank">
<img src="../{$news.image}" width="100" />
<img src="images/yes.gif" border="0" />
</a>
{else}
<img src="images/no.gif" />
{/if}
</td>
</tr>
<tr>
<td>
開始日期
</td>
<td>
<input name="start_time" type="text" id="start_time" size="22" value='{$news.start_time}' readonly="readonly" />
<input name="selbtn1" type="button" id="selbtn1" onclick="return showCalendar('start_time', '%Y-%m-%d', false, false, 'selbtn1');" value="{$lang.btn_select}" class="button"/>
</td>
</tr>
<tr>
<td>結束日期</td>
<td>
<input name="end_time" type="text" id="end_time" size="22" value='{$news.end_time}' readonly="readonly" />
<input name="selbtn2" type="button" id="selbtn2" onclick="return showCalendar('end_time', '%Y-%m-%d', false, false, 'selbtn2');" value="{$lang.btn_select}" class="button"/> </td>
</tr>
</table>
<div class="button-div">
<input type="hidden" name="id" value="{$news.id}" />
<input type="button" value="{$lang.button_submit}" class="button" onclick="validate('{$news.id}')" />
<input type="reset" value="{$lang.button_reset}" class="button" />
</div>
<input type="hidden" name="act" value="{$form_act}" />
</form>
</div>
</div>
<!-- end goods form -->
{insert_scripts files="validator.js"}
<script language="JavaScript">
{literal}
onload = function()
{
// handlePromote(document.forms['theForm'].elements['is_promote'].checked);
if (document.forms['theForm'].elements['auto_thumb'])
{
handleAutoThumb(document.forms['theForm'].elements['auto_thumb'].checked);
}
document.forms['theForm'].reset();
}
function validate(id)
{
var validator = new Validator('theForm');
editor.sync();
// validator.required('domain', '網址不能為空');
// validator.required('cname', '名稱不能為空');
if(validator.passed())
{
document.forms['theForm'].submit();
}
}
function searchGoods(szObject, catId, brandId, keyword)
{
var filters = new Object;
filters.cat_id = elements[catId].value;
filters.brand_id = elements[brandId].value;
filters.keyword = Utils.trim(elements[keyword].value);
filters.exclude = document.forms['theForm'].elements['goods_id'].value;
szObject.loadOptions('get_goods_list', filters);
}
{/literal}
</script>
{include file="pagefooter.htm"}