<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Admin.Sms.UI_List"  CodePage="65001" PathLevel="1" PageFileFlag="SMS_List" PageFileTitle="手机短信" DataBindingType="1" PageFlagId="1" intPageSize="15" %>

<%@ Register TagPrefix="Site" TagName="Menu" Src="../WUC/Site_Menu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "手机短信" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs" PathLevel="1" />
<Site:Menu id="menu_headcss" runat="server" Flag="HeadCss" PathLevel="1" />



<script>


//编辑
function Edit_Info(id)
{

//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="update.aspx?IsAdd=1";
var _data = {"id":id};	
if(id>0)Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:查看","");	
else Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:编辑","SaveSub");	
//将本行设置为选中颜色
SetActive(id);

}


//删除
function Del_Info(id)
{
//弹出框ID,标题，内容，删除程序执行路径，参数表
var _url =  "update.aspx?IsAdd=3";
var _data ={"id":id};
Common.ConfirmDelete2 ("POST",_url,_data,"<%=PageFileFlag%>","删除确认","");
SetActive(id);
}

function ReSendSms(id)
{
////弹出框ID，标题，显示内容，OK操作，取消操作
	Common.Confirm("SMS_List_confirm","发送确认","您是否确认重发该条短信？",function(){ReSendSms2(id);},null);	
}
function ReSendSms2(id)
{
	jQuery.ajax({
			async:false,//同步访问
			cache: false,type: "POST",
			url: "UPDATE.ASPX?ISADD=21",data:{"ID":id},
			success: function(msg){ 			
				if(msg>0 ){Alert("短信重发成功.",1);}
				else if(msg==-1000){Alert("该会员发送短信量超过系统限定数量，本次短信发送取消。");}
				else if(msg==-1001){Alert("该短信已发送成功，不必重复发送，本次短信发送取消。");}
				else	{Alert("短信重发失败"+msg,5);	}	

			}
			,error:function(msg){
				Alert("平台故障，短信重发失败"+msg,5);

			}			
		});

}
//11:43 2010-9-29
$(document).ready(function(){
//	client_SetPageNo(<%=intPageNo%>);//记录页码
});


</script>


</head>
<body>

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  />
<div class1="wrap" id="wrap">
	<Site:Menu id="Wuc_LeftMenu" runat="server" Flag="LeftMenu" PageFileFlag="Menu_A_800_801" PathLevel="1" />	
	<div class1="mainbox" class="MainBox W1100 ">
		<div class="PGTitle LH30  ">
			<div class="W200 FL MGL10 FWB FS12"><%=PageFileTitle%></div>
			<div class="ChileMenu1 FL FS12">
			</div>
			<div class="Clear"></div>
		</div>
		<div class="ContBox MGT10 " >

<table class="Table FS12 ">

<tr style="height:30px;	font-weight: bold;">
<TH style="width:30px">序号</TH>
<TH style="width:120px">手机</TH>
<TH >短信</TH>
<TH style="width:80px">重发</TH>
<TH style="width:100px">状态</TH>
<TH style="width:80px">操作</TH>
</tr>

<asp:Repeater id="rpList" runat="server">
<ItemTemplate>

<tr id="tr_<%#Eval("id")%>">
		<td><%#Eval("id")%></TD>
		<TD ><%#Eval("UserPhoneNo")%></td>
		<td><%#Eval("SmsContent")%></td>
		<td><A onclick="ReSendSms('<%#Eval("id")%>');" >重发</A>	</td>
		<td ><%#Eval("SendState").Equals(1)?"<font color='green'>已发送</font>":"<font color='red'>未发送</font>"%></td>
		<td>
			<A onclick="Edit_Info('<%#Eval("id")%>');" >查看</A>
			
			
			
			<A onclick="Del_Info('<%#Eval("id")%>');" >删除</A>
			
		</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>

		</div>
		<div class="ContBox" >
			<div class="page" style="margin-left:-13px;"><%=strPageInfo%>  -  <a href="#"onclick="Edit_Info();return false;"  class="A_Add">添加</a> 
			</div>
		</div>
	</div>
</div>


<div class="clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />
</body>
</html>

