📄 txlwh.asp
字号:
<!--#include file="top.asp"-->
<%
txlfl=trim(request("txlfl"))
name=trim(request("name"))
tel=trim(request("tel"))
txlfl=trim(request("txlfl"))
cha=request("cha")
if request("Submit")="删 除" then
SQL = "delete FROM es_smstxl where id in("&request("id")&")"
msg="删除成功"
End if
if request("submit")="删 除" or request("submit")="开通" or request("submit")="关闭" then
Set RS=Server.CreateObject("Adodb.Recordset")
rs.open SQL,conn,1,3
response.write "<Script language=javascript>alert('"&msg&"');location='txlwh.asp'</script>"
rs.close
set rs=nothing
end if
if request("action")="add" then
if txlfl="" then
response.write "<script>alert('对不起,组名不能为空!');history.go(-1);</Script>"
Response.End
elseif name="" then
response.write "<script>alert('对不起,姓名不能为空!');history.go(-1);</Script>"
Response.End
elseif tel="" then
response.write "<script>alert('对不起,电话不能为空!');history.go(-1);</Script>"
Response.End
end if
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from es_smstxl"
rs.open sql,conn,1,3
rs.AddNew
rs("es_sort")=txlfl
rs("es_id")=session("id")
rs("es_name")=name
rs("es_tel")=tel
rs.Update
rs.Close
set rs=nothing
Response.Redirect "txlwh.asp"
end if
%>
<%usertopview%>
<table cellSpacing="0" cellPadding="0" width="760" height="100%" border="0" bgcolor="#ffffff">
<script>
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
</script>
<tr>
<td width="160" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="600" align="left" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是:管理中心 > 通讯录维护</td></tr>
<tr>
<td>
<!--####################################-->
</td>
</tr>
</table>
<table border="0" width="100%">
<form name="from1" method="post" action="txlwh.asp?action=add"> <tr>
<td>添加:<select name="txlfl">
<option value="" selected>请选择组</option>
<%
sql="select * from es_smstxlfl where es_id="&session("id")&" order by es_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("id")%>"><%=rs("es_sort")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<p>姓名:<input type="text" name="name" size="20" maxlength="6"><br>电话:<input name="tel" type="text" size="20" maxlength="15" onpropertychange="if(/\D/g.test(value))value=value.replace(/\D/g,'')" style="ime-mode:disabled" ondragenter="return false"><input type="submit" value="添加" name="B1"></p>
</form>
</td>
</tr>
</table>
<table width="90%" style="border:1px #cccccc solid;">
<tr>
<td>
<div align="center">
<table width="600" cellpadding="0" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<form name="from1" method="post" action="txlwh.asp?word=<%=request("word")%>">
<tr align=center bgcolor=#efefef height=25>
<%
if txlfl="" then
sql="select * from es_smstxl where es_id="&session("id")&" order by es_date desc"
else
sql="select * from es_smstxl where es_id="&session("id")&" and es_sort="&txlfl&" order by es_date desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "暂无内容"
else
'分页的实现
listnum=30
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
<td width="29" height=25>编号</td>
<td width="102" height="25">姓名</td>
<td width="89" height="25" align="left">电话</td>
<td width="90" height="25" align="left">分组名称</td>
<td width="253" height="25" align="left">添加时间</td>
<td width="37" height="25" align="left">选择</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1
page=request("page")
if page="" then page=1
%>
<tr align=center height=22>
<td><%=n%></td>
<td align="left"><a href="smsmt.asp?phone=<%=rs("es_tel")%>"><%=rs("es_name")%></a></td>
<td align="left" width="89"><font color="#0000FF"><a href="smsmt.asp?phone=<%=rs("es_tel")%>"><%=rs("es_tel")%></a></font></td>
<%
if rs("es_id")=0 then
user="系统平台"
else
set rs1=server.createobject("adodb.recordset")
sql1="select * from es_smstxlfl where id="&rs("es_sort")
rs1.open sql1,conn,1,1
sort=rs1("es_sort")
rs1.close
end if%>
<td align="left" width="90" title="点击按组显示"> <a href="txlwh.asp?txlfl=<%=rs("es_sort")%>"><%=sort%></a></td>
<td align="left" width="253"> <%=rs("es_date")%></td>
<td align="left" width="37"><input type="checkbox" name="ID" value="<%=rs("id")%>" style="border:0"></td>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop%>
<tr>
<%filename="txlwh.asp?word="&request("word")&""%>
<td colspan=6 height=20 align=right bgcolor=#cccccc><%=Rs.recordcount%> 个记录 <%=listnum%> 个
记录/页 共 <%=Rs.pagecount%> 页
<% if page=1 then %>
<%else%>
<a href=<%=filename%>><strong>|<<</strong></a>
<a href=<%=filename%>&page=<%=page-1%>><strong><<</strong></a>
<a href=<%=filename%>&page=<%=page-1%>><b>[<%=page-1%>]</b></a>
<%end if%><% if Rs.pagecount=1 then %><%else%><b>[<%=page%>]</b><%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=<%=filename%>&page=<%=page+1%>><b>[<%=page+1%>]</b></a>
<a href=<%=filename%>&page=<%=page+1%>><strong>>></strong></a>
<a href=<%=filename%>&page=<%=Rs.pagecount%>><strong>>>|</strong></a>
<%end if%> <input name="chkall" type="checkbox" id="chkall" value="select" onclick="CheckAll(this.form)" style="border:0">全选<input type="submit" name="Submit" value="删 除"> </td>
<%end if%></tr>
</form>
</table> </div>
</td>
</tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<!--====== bottom ========-->
<!--====== bottom ========-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:0px #cccccc solid;">
<tr>
<td width="30%" align="right" valign="middle"><img src="../images/index_04.gif" alt=""></td>
<td width="70%" align="left"><%=citybottom%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -