Sort by resolving the "top to Bottom" issue (ii)

Source: Internet
Author: User
Tags chr sort
Solve | sort | problem: add_massege.asp

------------part, without optimal finishing------------

<body bgcolor= "#C8C8E6" >
<script language= "VBScript" >
Sub GoBack ()
Form1.btn1.value= "Back"
History.go (-1)
End Sub
</Script>
<%
Name1=session ("Uname")
If name1= "" Then
Response.Write "<font size=3 color=blue><center>"
Response.Write "<br>"
Response.Write "<br>"
Response.Write "Only members can use this feature, please register or login!" <p> "
Response.Write "<a href=main1.htm> back on page </a>"
Response.End
End If
Psw1=session ("UPSW")
Orderid=request ("Txtorderid")
Face=request ("R1")
Level=request ("Txtlevel")
Name=request ("Txtname")
Psw=request ("TXTPSW")
Work=session ("Uwork")
Add=session ("Uadd")
Eee=session ("Unid")
Mail=request ("Txtmail")
Subject=request ("Txtsubject")
Ip=request.servervariables ("REMOTE_ADDR")
If name = "" OR PSW = "" Then
Response.Write "<font size=5 color=blue><center>"
Response.Write "<br>"
Response.Write "<br>"
Response.Write "Please fill in your name/password ~ <p>"
%>
<form name=form1>
<input type= "button" Name= "Btn1" value= "return" onclick= "GoBack" >
</form>
<%
Response.End
End If
If name<>name1 Or PSW&LT;&GT;PSW1 Then
Response.Write "<font size=5 color=blue><center>"
Response.Write "<br>"
Response.Write "<br>"
Response.Write "Your name/password has errors, please carefully fill in!" ~ <p> "
%>
<form name=form1>
<input type= "button" Name= "Btn1" value= "return" onclick= "GoBack" >
</form>
<%
Response.End
End If
If subject= "" Then
Response.Write "<font size=5 color=blue><center>"
Response.Write "<br>"
Response.Write "<br>"
Response.Write "Please fill in your speech theme ~ <p>"
%>
<form name=form1>
<input type= "button" Name= "Btn1" value= "return" onclick= "GoBack" >
</form>
<%
Response.End
End If
IF orderid<> "" Then
J=len (OrderID)
Mmm=left (orderid,j-1)
Set conn = Server.CreateObject ("ADODB. Connection ")
Dbpath=server.mappath (".. /fpdb/massege.mdb ")
Conn. Open "Driver={microsoft Access Driver (*.mdb)};d bq=" & DBPath
Set RS = conn. Execute ("Select A_id,a_orderid from Massege")
Do but not RS. Eof
Nnn=rs ("A_orderid")
If Left (nnn,j-1) =mmm Then
AAA=ASC (Mid (nnn,j,1))
If aaa=122 Then
qqq=mmm+ "a" + "Z"
Else
QQQ=MMM+CHR (aaa+1) + "Z"
End If
End If
Rs. MoveNext
Loop
Rs. Close
Conn. Close
Else
Set myconn = Server.CreateObject ("ADODB. Connection ")
Dbpath=server.mappath (".. /fpdb/massege.mdb ")
MyConn. Open "Driver={microsoft Access Driver (*.mdb)};d bq=" & DBPath
Sqlcmd1= "SELECT * from massege Where a_level = ' 0 ' ORDER by a_id DESC"
Set RS = myconn. Execute (SQLCMD1)
Nnn=rs ("A_orderid")
A=ASC (Left (nnn,1))
B=ASC (Mid (nnn,2,1))
C=ASC (Mid (nnn,3,1))
D=ASC (Mid (nnn,4,1))
E=ASC (Mid (nnn,5,1))
F=ASC (Mid (nnn,6,1))
%>
&LT;%=CHR (a)%>11<%=chr (b)%&GT;22&LT;%=CHR (c)%&GT;33&LT;%=CHR (d)%>44<%=chr (e)%>55<%=chr (f) >66
<%
If f<122 Then
QQQ=CHR (a) +chr (b) +CHR (c) +CHR (d) +chr (e) +chr (f+1) + "Z"
%>
<%=qqq%>77
<%
Else
If e<122 Then
QQQ=CHR (a) +chr (b) +CHR (c) +CHR (d) +chr (e+1) + "AZ"
%>
<%=qqq%>88
<%
Else
If d<122 Then
QQQ=CHR (a) +chr (b) +CHR (c) +CHR (d+1) + "Aaz"
%>
<%=qqq%>99
<%
End If
End If
End If
Rs. Close
MyConn. Close
End If
Text=server.htmlencode (Request ("Txttext"))
%>
<%=text%>
<%on Error Resume Next
Set conn = Server.CreateObject ("ADODB. Connection ")
Dbpath=server.mappath (".. /fpdb/massege.mdb ")
Con



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.