<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->
<!--{if $a == "run"}-->
<div class="oemarry_layout">
  <div class="oe_top_nav"><i></i>系统设置->参数选项</div>
  <div class="oe_content">
	
	<form id="serform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
	<div class="oe_txtwrap">
	  参数名：<input type="text" name="sname" id="sname" class="input-150" value="<!--{$sname}-->" />&nbsp;
	  参数值：<input type="text" name="svalue" id="svalue" class="input-150" value="<!--{$svalue}-->" />&nbsp;
	  &nbsp;&nbsp;&nbsp;<input type="submit" name="btn_search" id="btn_search" class="button_2" value="搜索" />
	</div>
	</form>

    
    <table class="oe_table_list table_cs">
	  <tr>
	    <th width="15%">参数名</th>
		<th width="15%">描述</th>
		<th>参数值</th>
		<th width="10%">操作</th>
	  </tr>
	  <!--{if empty($item)}-->
	  <tr>
	    <td class="text_center" colspan="4">No data!</td>
	  </tr>
	  <!--{else}-->
	  <!--{foreach $item as $volist}-->
	  <tr>
	    <td><!--{$volist.itemname}--></td>
		<td><!--{$volist.memo}--></td>
		<td><!--{$volist.itemvalue}--></td>
		<td class="text_center">
		 <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.itemname}-->&<!--{$comeurl}-->" class="oe_ico_blue">编辑</a>
		</td>
	  </tr>
	  <!--{/foreach}-->
	  <!--{/if}-->
	</table>

	<div class="oe_page_box"><!--{$showpage}--></div>

  </div>
</div>
<!--{/if}-->


<!--{if $a == 'edit'}-->
<div class="oemarry_layout">
  <div class="oe_top_nav">
	<i></i>系统设置->参数选项->编辑
	<span><a href="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->">&lt;&lt;返回列表</a></span>
  </div>
  <div class="oe_content">
    <h6>编辑参数</h6>
	<form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" method="post" />
	<input type="hidden" name="a" id="a" value="saveedit" />
	<input type="hidden" name="id" id="id" value="<!--{$id}-->" />
    <table class="oe_table_wrap">
	  <tr>
	    <th width="15%">参数名：<span class="f_red"></span></th>
		<td width="85%"><!--{$item.itemname}--></td>
	  </tr>
	  <tr>
	    <th>参数描述：</th>
		<td><input type="text" name="memo" id="memo" class="input-b" value="<!--{$item.memo}-->" /></td>
	  </tr>
	  <tr>
	    <th>参数值：<span class="f_red">*</span></th>
		<td>
		<textarea name="itemvalue" id="itemvalue" style="width:50%;height:60px;"><!--{$item.itemvalue}--></textarea>
		<br />
		多个值用英文|隔开，格式为：数值#描述
		</td>
	  </tr>
	  <tr>
	    <td></td>
		<td><input type="button" id="btn_save" class="button_2" value="编辑保存" /> </td>
	  </tr>
	</table>
	</form>
  </div>
</div>
<!--{/if}-->

<script type="text/javascript">
$(function(){
	$("#btn_save").bind("click", function(){ //添加保存
		if ($("#itemvalue").val().length == 0) {
			ToastShow("参数值不能为空", "itemvalue");
			return false;
		}
		$("#myform").submit();
	});
});
</script>
</body>
</html>