Network Pager database version displays historical messages history.asp

Source: Internet
Author: User
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=&LT;%=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>
&LT;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>
&LT;TD width= "100%" height= "><font color=" #FF0000 "no record of your history, hurry up and exchange </font>!!! </td>
</tr>
<% Else%>

<tr>
&LT;TD width= "100%" align= "Center" >
<form action=history.asp name=f1>
<% If Page <> 1 Then%>
<a href=history.asp? Page=1> first Page </A>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.