Data | database | network | display
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Historical News </title>
<script language= "JavaScript" >
<!--
function Checkall (form) {
for (Var i=0;i<document.checkboxform1.length;i++) {
var e = document.checkboxform1[i];
if (e.name!= ' chkall ') e.checked = form.chkall.checked;
}
}
Check to see if a record is selected
function CheckBox1 (form)
{
var thelength;
var i,j;
Thelength = Form.id.length;
i = 0;
j = 0;
while (I<thelength) {
if (form.id[i].checked)
j + +;
i + +;
}
if (j==0 &&!form.id.checked) {
Alert ("Please select Delete record First");
return false;
}
return true;
}
triggered when you click the Delete button
Function del (form)
{
if (!checkbox1 (form)) {
return false;
}
Else
if (Confirm (' you sure you want to delete these records ')) {
window.location.href= "DELETEMESSAGE.ASP?PAGE=<%=CLNG (page)%>"}
}
-->
</SCRIPT>
<body>
<br><br><%
Set Conn=server.createobject ("Adodb.connection")
Provider = "Provider=Microsoft.Jet.OLEDB.4.0;"
DBPath = "Data source=" & Server.MapPath ("Webuser.mdb")
Conn. Open Provider & DBPath
Username=session ("username")
If username<> "" Then
Sql= "SELECT * from talks where Fromname= '" & username & "' or Toname= '" & username & "' ORDER BY adddate Desc "
Set rs = Server.CreateObject ("ADODB.") Recordset ")
Rs.Open sql,conn,3,3
Rs.pagesize=15
Page = CLng (Request ("Page")
If Page < 1 Then page = 1
If Page > Rs. PageCount Then Page = Rs. PageCount
%>
<table border= "0" cellspacing= "0" width=590 cellpadding= "0" Align=center height= ">"
<tr>
<TD width= "100%" height= "><font size=" 2 > View my History message (<b><font color= "#FF0000" > Chat records save only one week of content. Please back up your own </font></b>) </font></td>
</tr>
<% if rs.eof or Rs.bof then%>
<tr>
<TD width= "100%" height= "><font color=" #FF0000 "no record of your history, hurry up and exchange </font>!!! </td>
</tr>
<% Else%>
<tr>
<TD width= "100%" align= "Center" >
<form action=history.asp name=f1>
<% If Page <> 1 Then%>
<a href=history.asp? Page=1> first Page </A>