{#include file="sys/admin_header.htm"#}
<script type="text/javascript"> 
$(document).ready(function()
{
	$("#check").click(function () {	
	$("#submitbox").hide();
	$("#hide").show();	
	});
	$(".again_send").click(function(){
		$(this).html('发送中...');
		$(this).css('color','red');
		$id=$(this).attr('id');
		window.location.href='?act=again_send&id='+$id;
	})
});
</script>
<div class="admin_main_nr_dbox">
 <div class="pagetit">
	<div class="ptit"> {#$pageheader#}</div>
  <div class="clear"></div>
</div>
 
		  <div class="toptit">发送短信</div>
    <span id="submitbox">
		<form action="?act=sms_send" method="post"   name="form" id="form">
		<input name="uid" type="hidden"  id="uid" value="{#$smarty.get.uid#}" /></td>
		{#$inputtoken#}
		<table width="90%" border="0" cellspacing="10" cellpadding="1" style=" margin-bottom:3px;">
          <tr>
            <td width="100" align="right">接收手机:</td>
            <td>
			   <input name="mobile" type="text" class="input_text_400"   value="{#$smarty.get.mobile#}" />
			       </td>
          </tr>
		  <tr>
            <td width="100" align="right">发送内容:</td>
            <td>
			  <textarea name="txt" class="input_text_400" style="height:80px;"></textarea>
			  <span class="admin_note">内容超过70个字符将自动截取</span>		    </td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td>
			<input name="url" type="hidden" value="{#$url#}" />
			
			<input name="check" type="submit" class="admin_submit" id="check"    value="立即发送" /></td>
          </tr>
        </table>
	    </form>
		{#if $smslog#}	
	 <div class="toptit">邮件发送记录</div>
	<form action="?act=del" method="post"   name="form1" id="form1">
    <table width="100%" border="0" cellpadding="0" cellspacing="0"  id="list" class="link_lan">
    <tr>
      <td  width="120" class="admin_list_tit admin_list_first">
     <label id="chkAll"><input type="checkbox" name="" title="全选/反选" id="chk"/>类型</label>	 </td>
	  <td class="admin_list_tit" width="13%">手机号</td>
	  <td  class="admin_list_tit">短信内容</td>
      <td width="110"  align="center"  class="admin_list_tit">添加时间</td>	  
      <td width="110"  align="center"  class="admin_list_tit">发送时间</td>
      <td width="10%" align="center"  class="admin_list_tit">操作</td>
    </tr>
	{#foreach from=$smslog item=list#}
	 <tr>
      <td   class="admin_list admin_list_first">
     <input type="checkbox" name="id[]"  value="{#$list.s_id#}"/>
	 {#if $list.s_type=="0"#}<span style="color:#FF6600">等待发送</span>{#/if#}
	 {#if $list.s_type=="1"#}<span style="color: #009900">发送成功</span>{#/if#}
	 {#if $list.s_type=="2"#}<span style="color: #666666">发送失败</span>{#/if#}
	  </td>
	  <td  class="admin_list">
	  {#$list.s_mobile#}
	  </td>
      <td   class="admin_list vtip" title="{#$list.s_body|nl2br#}" >
	   {#$list.s_body_#}
	  </td>
      <td align="center"  class="admin_list">
	  {#$list.s_addtime|date_format:"%Y-%m-%d"#}
		</td>	  
      <td align="center"  class="admin_list">
	  
	  {#if $list.s_sendtime=="0"#}
		----
		{#else#}
	{#$list.s_sendtime|date_format:"%Y-%m-%d"#}
		{#/if#}
	  </td>
      <td align="center"  class="admin_list">
	  <a href="javascript:void()" class="again_send" id="{#$list.s_id#}">重新发送</a>
	</td>
	</tr>
	{#/foreach#}
  </table>
	<table width="100%" border="0" cellspacing="10"  class="admin_list_btm" >
		<tr>
            <td height="30" width="110" align="right" >&nbsp;</td>
            <td height="30"  >
              <input type="submit" name="submit22" type="button" class="admin_submit submitdel"    value="删除所选" />
           </td>
          </tr>
	  </table>
	</form>
<div class="page link_bk" style="height:20px">{#$page#}</div>
 {#/if#}  </span>
<div id="hide" style="display: none; color: #009900; padding-left:30px; padding-bottom:80px;">
 正在发送.......<br />
<br />
</div>
</div>
{#include file="sys/admin_footer.htm"#}
</body>
</html>