📄 xinxi.asp
字号:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<link rel="stylesheet" type="text/css" href="../1.CSS">
<body topmargin="0" leftmargin="0">
<script>
function loadThreadFollow(t_id,b_id){
var targetImg =eval("document.all.followImg" + t_id);
var targetDiv =eval("document.all.follow" + t_id);
if ("object"==typeof(targetImg)){
if (targetDiv.style.display!='block'){
targetDiv.style.display="block";
}else{
targetDiv.style.display="none";
}
}
}
</script>
<SCRIPT language=JavaScript>
function showoperatealert(id)
{
if (id==1)
{
{
thisForm.target='_self';
thisForm.action="xinxi_yz.asp";
thisForm.submit();
}
}
if (id==2)
{
{
thisForm.target='_self';
thisForm.action="2.asp";
thisForm.submit();
}
}
}
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>
<%dim ptotale,x
'总页数
x=trim(request.querystring("page1"))
if x<>"" then
page2=cint(x)
else
page2=1
end if%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="30">
<tr>
<td width="100%" height="24" colspan="6"> </td>
</tr>
<FORM name=thisForm action="" method=POST>
<tr>
<td width="5%" height="24" align="center" bgcolor="#3EC5E1" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#666666">选择</td>
<td width="49%" height="24" bgcolor="#3EC5E1" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#666666">标题</td>
<td width="9%" height="24" bgcolor="#3EC5E1" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#666666">
<p align="center">姓名</td>
<td width="15%" height="24" bgcolor="#3EC5E1" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#666666">
<p align="center">日期</td>
<td width="5%" height="24" bgcolor="#3EC5E1" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#666666">
<p align="center">验证</td>
<td width="11%" height="24" bgcolor="#3EC5E1" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#666666"> </td>
</tr>
<%
dim rs,sql,k,mypage,mydel,mywhere
k=1
dim y,name,stype,endtime,startime,paixu,ydesc,mydesc,timetype
name=trim(request("name"))
stype=trim(request("stype"))
startime=trim(request("startime"))
endtime=trim(request("endtime"))
paixu=request("paixu")
mypage=trim(request("mypagt"))
mydel=trim(request("mydel"))
timetype=trim(request("timetype"))
if stype="" then
stype="name"
end if
set rs = Server.CreateObject("ADODB.RecordSet")
if startime="" or endtime="" then
mywhere=" where "&stype&" like '%"&name&"%'"
else
startime=cdate(startime)
endtime=cdate(endtime)
mywhere=" where "&stype&" like '%"&name&"%' and "&timetype&"<='"&endtime&"' and '"&startime&"'<="&timetype
end if
sql="select id,username,biaoti,leixing,jiage,name,fbsj,yz from [xinxi]"+mywhere+" order by fbsj desc"
response.write sql&mypage
'response.end
if mydel="删除" then
conn.execute("delete from [xinxi]"+mywhere)
response.write "<script>alert('删除成功');location.href='?';</script>"
response.end
end if
rs.open sql,conn,3,3
'sql="select id,username,biaoti,leixing,jiage,name,fbsj,yz from [xinxi] order by b desc"
'rs.open sql,conn,1,1
dim rec,page1,page2
dim typeid
dim mpage
if mypage<>"" then
mpage=cint(mypage)
else
mpage=90
end if
'每页12条记录
rs.pagesize=mpage
rs.absolutepage=page2
ptotale=rs.pagecount
do while not rs.eof and k<mpage+1
%>
<tr>
<td width="5%" height="24" align="center" bgcolor="#F3F3F3" style="border-top-style: solid; border-top-width: 1">
<INPUT type=checkbox value="<%=rs("id")%>" name=selectedid></td>
<td width="49%" height="24" bgcolor="#F3F3F3" style="border-top-style: solid; border-top-width: 1"><%=rs("biaoti")%></td>
<td width="9%" height="24" align="center" bgcolor="#F3F3F3" style="border-top-style: solid; border-top-width: 1"><%=rs("name")%></td>
<td width="15%" height="24" align="center" bgcolor="#F3F3F3" style="border-top-style: solid; border-top-width: 1"><%=rs("fbsj")%></td>
<td width="5%" height="24" align="center" bgcolor="#F3F3F3" style="border-top-style: solid; border-top-width: 1"><%if rs("yz")=1 then%>√<%else%><font color="#FF0000">ⅹ</font><%end if%></td>
<td width="11%" height="24" bgcolor="#F3F3F3" style="border-top-style: solid; border-top-width: 1">
<p align="center"><span id="followImg<%=k%>" style="CURSOR: hand" onclick="loadThreadFollow(<%=k%>,5)">操作</span></td>
</tr>
<tr style="display:none" id="follow<%=k%>">
<td width="100%" height="24" colspan="6" style="border-bottom-style: solid; border-bottom-width: 1">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="80%" height="100%">
<tr>
<td width="15%">删除该信息</td>
<td width="15%">删除所有回复</td>
<td width="14%">编辑该信息</td>
<td width="14%"><a href="#" ONCLICK="window.open('xinximail.asp?id=<%=rs("id")%>','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=355,height=328,left=300,top=100')">发送邮件</a></td>
<td width="14%"> </td>
<td width="14%"> </td>
<td width="14%"><%if rs("yz")=0 then%><a href="xinxi_yz.asp?selectedid=<%=rs("id")%>">通过验证</a><%end if%></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<%
k=k+1
rs.movenext
loop
//总页数
x=trim(request.querystring("page1"))
if x<>"" then
page2=cint(x)
else
page2=1
end if
rs.pagesize=mpage
rs.absolutepage=page2
ptotale=rs.pagecount
%>
<tr>
<td width="100%" height="24" colspan="6" style="border-top-style: solid; border-top-width: 1">
<p align="right"><INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有记录</td>
</tr>
<tr>
<td width="100%" height="24" colspan="6" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#999999">
<p align="center"><img style="CURSOR: hand" onclick=javascript:showoperatealert(1) border="0" src="img/ershou_2.gif">
<img style="CURSOR: hand" onclick=javascript:showoperatealert(2) border="0" src="img/ershou_1.gif"></td>
</tr>
</form>
<tr>
<td width="100%" height="24" colspan="6" style="border-top-style: solid; border-top-width: 1"> </td>
</tr>
</table>
<table width="920" border="1" cellpadding="0" cellspacing="0" align="center">
<tr>
<td bgcolor="#C0C0C0" width="762" color="ffffff" bordercolor="#000000">
<%
if page2= 1 then
response.write "前页"
else
y=page2-1
response.write "<a href='xinxi.asp?page1="&y&"&name="&name&"&stype="&stype&"&endtime="&endtime&"&startime="&startime&"&paixu="&paixu&"&ydesc="&mydesc&"&timetype="&timetype&"' class='p'>前一页</a>"
end if
response.write " "
if page2=ptotale then
response.write "下页"
else
y=page2+1
response.write "<a class=p href=xinxi.asp?page1="&y&"&name="&name&"&stype="&stype&"&endtime="&endtime&"&startime="&startime&"&paixu="&paixu&"&ydesc="&mydesc&"&timetype="&timetype&">下一页</a>"
end if
response.write " "
response.write page2
response.write "/"
response.write ptotale
%> 符合条件的记录数:<%=rs.recordcount%>
</td>
</tr><form method="get" action="xinxi.asp">
<tr>
<td bgcolor="#C0C0C0" width="100%" color="ffffff" bordercolor="#000000">
<select name="stype" class=an style="width: 76; height: 16" size="1">
<option value="name">姓名</option>
<option value="biaoti">标题</option>
<option value="memo">内容</option>
<option value="diqu">地区</option>
</select><input type="text" name="name" size="12" class=an style="width: 66; height: 16"><input type="hidden" name="paixu" size="10" class=an value=<%=paixu%>><input type="hidden" name="ydesc" size="10" class=an value=<%=mydesc%>><select name="timetype" class=an style="width: 76; height: 16" size="1">
<option value="fbsj">发表时间</option>
</select><input type="text" name="startime" size="10" class=an style="width: 52; height: 16">--><input type="text" name="endtime" size="10" class=an style="width: 57; height: 16">跳转页数:<input type="text" name="page1" size="12" class=an style="width: 24; height: 15">每页记录数:<input type="text" name="mypage" size="12" class=an style="width: 24; height: 15">
<input type="submit" name="submit" value="确定" class=an><input type="submit" name="mydel" value="删除" class=an>
</td>
</tr></form>
</table>
<%rs.close
set rs=nothing
closedb
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -