全部程序内容如下:
<%@ language = VBScript %>
<%Response.Buffer = true%>
<!--#include file="../include/dbConn.asp"-->
<html>
<body>
<script type="text/javascript">
function printPage()
{
if(window.print)
{agree = confirm('Would you like to print a copy of this Form for your reference ?')
}
if (agree)
{
window.print();
}
else
{
return false;}
}
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<form>
<br>
<div align=center><h2>Password reset</h2>
<%
if request("Submit") = "Submit" then
sqlUpdate = "select * from verify WHERE tcacno = "& request("btptcacno")&" order by tcacno"
set rs = conn.execute(sqlUpdate)
if rs.eof = true then
Response.write("<b><font color = 'blue'>**No records found**</font></b>")
else
%>
<div align =center>
<table width="98%" border="1" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="#006699">
<td width="14%">
<div align="center"><b><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif">S/N</font></b></div>
</td>
<td width="20%">
<div align="center"><b><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif">TC/Account</font></b></div>
</td>
<td width="25%">
<div align="center"><b><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif">NRIC</font></b></div>
</td>
</tr>
<%
while not rs.eof
count = count + 1
if (count Mod 2 = 0) then
color1 = "B0C8D4"
else
color1 = "E1F5FF"
end if
'valeme = cdbl(rs("wpacam")) + valeme
%>
<tr bgcolor=<%=color1%>>
<td width="14%" height="19"><center><font size="2" face="Arial, Helvetica, sans-serif"><%Response.write(count)%></font></center></td>
<td width="20%" height="19"><center><font size="2" face="Arial, Helvetica, sans-serif"><%Response.write(rs(0))%></font></center></td>
<td width="25%" height="19"><center><font size="2" face="Arial, Helvetica, sans-serif"><%Response.write(rs(1))%></font></center></td>
<input type="hidden" name="btptcacno" value= <%=trim(rs(0))%>>
</td>
</tr>
<%
rs.movenext
wend
%>
<input type="hidden" name="count" value= <%=count%>>
<tr bgcolor=<%=color1%>>
<td width="14%" height="19"><font size="2" face="Arial, Helvetica, sans-serif"> </font></td>
<td width="20%" height="19" ><font size="2" face="Arial, Helvetica, sans-serif"> </font></td>
<td width="25%" height="19"><font size="2" face="Arial, Helvetica, sans-serif"> </td>
</tr>
</table></div>
<center><input type="button" name="Back" value="Back" onClick="MM_goToURL('parent','monthlyTrans.asp');return document.MM_returnValue">
<input type="button" name="print" value="Print" onClick="return printPage();"><input type="submit" name="resetpwd" value="1"></center>
<%end if%>
<%else%>
<%if request("resetpwd") = "1" then
sqlUpdate = "Update verify set passwd='password' WHERE tcacno = '"& request("btptcacno")&"'"
set rs= conn.execute(sqlUpdate)
Response.write("<b><font color = 'blue'>**Password reseted**</font></b>")
end if%>
<table width="80%" border="0" align="center">
<tr>
<td colspan="2">
<div align="center">
Enter TC NO : <input type="text" name="btptcacno">
<input type="submit" name="Submit" value="Submit">
<input type="button" name="Back" value="Back" onClick="MM_goToURL('parent','Selection.html');return document.MM_returnValue">
</div>
</td>
</tr>
</table>
<%end if%>
<br><br>
<div align=center><br>
<br>
<br>
</div>
</form>
</body>
</html>