<!--{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="sshopname" id="sshopname" class="input-150" value="<!--{$sshopname}-->" />&nbsp;
	  内容：<input type="text" name="scontent" id="scontent" class="input-150" value="<!--{$scontent}-->" />&nbsp;
	  状态：
	  <select name="sflag" id="sflag">
	  <option value=""></option>
	  <option value="1"<!--{if $sflag == '1'}--> selected<!--{/if}-->>待审核</option>
	  <option value="2"<!--{if $sflag == '2'}--> selected<!--{/if}-->>通过</option>
	  </select>
	  &nbsp;&nbsp;<input type="submit" name="btn_search" id="btn_search" class="button_2" value="搜索" />
	</div>
	</form>

    <div class="oe_tools_bar clearfix">
      <a class="icon-checkbox-unchecked" href="javascript:;" id="selAll" onclick="oemarrySelectAll(this, 'selall');">全选/反选</a>
      <a class="icon-remove-2" onclick="oemarryDialogFormDel('myform');">删除</a>
    </div>
    
	<form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&a=del" method="post">
    <table class="oe_table_list table_cs">
	  <tr>
	    <th width="7%">ID</th>
		<th width="15%">店铺</th>
		<th width="8%">留言人</th>
		<th width="10%">联系电话</th>
		<th width="9%">留言时间</th>
		<th width="5%">状态</th>
		<th width="9%">商家回复时间</th>
		<th>留言内容</th>
		<th width="10%">操作</th>
	  </tr>
	  <!--{if empty($words)}-->
	  <tr>
	    <td class="text_center" colspan="9">没有符合条件的信息！</td>
	  </tr>
	  <!--{else}-->
	  <!--{foreach $words as $volist}-->
	  <tr>
	    <td class="text_center"><input type="checkbox" name="id[]" id="id[]" class="selall" value="<!--{$volist.wordid}-->" /><!--{$volist.wordid}--></td>
		<td><!--{$volist.shopname}--></td>
		<td><!--{$volist.contname}--></td>
		<td><!--{$volist.contmobile}--></td>
		<td class="text_center"><!--{$volist.addtime|date_format:"%Y-%m-%d"}--><br /><!--{$volist.addtime|date_format:"%H:%M:%S"}--></td>
		<td class="text_center">
		<!--{if $volist.flag=='1'}-->
			<input type="hidden" id="attr_flag<!--{$volist.wordid}-->" value="flagclose" />
			<img id="flag<!--{$volist.wordid}-->" src="<!--{$urlpath}-->tpl/static/images/img_open.gif" onClick="oemarryUpdateFlag('flag', '<!--{$volist.wordid}-->');" style="cursor:pointer;">	
		<!--{else}-->
			<input type="hidden" id="attr_flag<!--{$volist.wordid}-->" value="flagopen" />
			<img id="flag<!--{$volist.wordid}-->" src="<!--{$urlpath}-->tpl/static/images/img_close.gif" onClick="oemarryUpdateFlag('flag', '<!--{$volist.wordid}-->');" style="cursor:pointer;">
		<!--{/if}-->
		</td>
		<td class="text_center">
		  <!--{if $volist.replytime > 0}-->
		  <!--{$volist.replytime|date_format:"%Y-%m-%d"}--><br /><!--{$volist.replytime|date_format:"%H:%M:%S"}-->
		  <!--{else}-->
		  ~~
		  <!--{/if}-->
		</td>
		<td><!--{$volist.words|filterhtml:40}-->...</td>
		<td class="text_center">
		 <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.wordid}-->&<!--{$comeurl}-->" class="oe_ico_blue">编辑</a>
		 <a href="javascript:;" onclick="oemarryDialogUrlDel('<!--{$oefile}-->&c=<!--{$c}-->&a=del&id[]=<!--{$volist.wordid}-->&<!--{$comeurl}-->');" class="oe_ico_red">删除</a>
		</td>
	  </tr>
	  <!--{/foreach}-->
	  <!--{/if}-->
	</table>
	</form>

	<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%"><!--{$words.shopname}--></td>
	  </tr>
	  <tr>
	    <th>留言时间：<span class="f_red"></span> </th>
		<td><!--{$words.addtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
	  </tr>
	  <tr>
	    <th>留言人：<span class="f_red"></span></th>
		<td><input type="text" name="contname" id="contname" class="input-150" value="<!--{$words.contname}-->" /></td>
	  </tr>
	  <tr>
	    <th>联系电话：<span class="f_red"></span></th>
		<td><input type="text" name="contmobile" id="contmobile" class="input-150" value="<!--{$words.contmobile}-->" /></td>
	  </tr>
	  <tr>
	    <th>留言内容：<span class="f_red">*</span> </th>
		<td><textarea name="words" id="words" style="width:60%;height:100px;overflow:auto;"><!--{$words.words}--></textarea></td>
	  </tr>
	  <tr>
	    <th>商家回复：<span class="f_red"></span> </th>
		<td><textarea name="reply" id="reply" style="width:60%;height:100px;overflow:auto;"><!--{$words.reply}--></textarea></td>
	  </tr>
	  <tr>
	    <th>回复时间：<span class="f_red"></span> </th>
		<td>
		<input type="text" name="replytime" id="replytime" class="input-150" readonly="only" value="<!--{if $words.replytime > 0}--><!--{$words.replytime|date_format:"%Y-%m-%d %H:%M:%S"}--><!--{/if}-->" />
		<script>
		laydate({
			elem: '#replytime',
			format: 'YYYY-MM-DD hh:mm:ss',
			istime: true,
			choose: function(datas){ //选择日期完毕的回调
			}
		});
		</script>
		</td>
	  </tr>
	  
	  <tr>
	    <td></td>
		<td> <input type="button" id="btn_save" class="button_2" value="编辑保存" /> </td>
	  </tr>
	</table>
	</form>
  </div>
</div>
<script type="text/javascript">
$(function(){
	$("#btn_save").bind("click", function(){
		if ($("#words").val().length == 0) {
			ToastShow("留言内容不能为空", "words");
			return false;
		}
		$("#myform").submit();
	});
});
</script>
<!--{/if}-->
</body>
</html>