您现在的位置: 军旅同心 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 文章正文
排序方式解决“上下主题”问题(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 13:38:25
发言:add_massege.asp

------------部分,未经优化整理------------

<body bgcolor="#C8C8E6">
<script language="VBScript">
Sub GoBack()
form1.btn1.value="返回"
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"只有会员才能使用此项功能,请您注册或登录! <p>"
Response.Write"<a href=main1.htm>回上页</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"请填写你的名字/密码~ <p>"
%>
<form name=form1>
<input type="button" name="btn1" value="返回" onClick="GoBack">
</form>
<%
Response.End
End If
If name<>name1 Or psw<>psw1 Then
Response.Write"<font size=5 color=blue><center>"
Response.Write"<br>"
Response.Write"<br>"
Response.Write"您的名字/密码有错误,请仔细填写!~ <p>"
%>
<form name=form1>
<input type="button" name="btn1" value="返回" 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"请填写您的发言主题~ <p>"
%>
<form name=form1>
<input type="button" name="btn1" value="返回" 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)};dbq="& DBPath
Set RS = conn.Execute("Select A_ID,A_OrderID From MASSEGE")
DO While 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)};dbq="& 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))
%>
<%=Chr(a)%>11<%=Chr(b)%>22<%=Chr(c)%>33<%=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")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};dbq="& DBPath
SQLcmd = "Insert Into MASSEGE(A_OrderID,A_Level,A_Name,A_NID,A_Work,A_Add,A_Mail,A_Subject,A_Text,A_IP,A_Time)Values('"&qqq&"','"&level&"','"&name&"','"&eee&"','"&work&"','"&add&"','"&mail&"','"&subject&"','"&text&"','"&ip&"','"&now&"')"
conn.Execute SQLcmd
conn.Close
Response.Redirect"succ.htm"
%>
</body>



 
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 管理登录 |