排序方式解决“上下主题”问题(二)
2001-09-11 10:23:03 来源:WEB开发网核心提示:发言:add_massege.asp部分,未经优化整理<body bgcolor="#C8C8E6"><script language="VBScript"> Sub GoBack()form1.btn1.value="返回"histo
发言: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>
------------部分,未经优化整理------------
<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>
- ››解决flash 中无法导出swf文件的方法
- ››解决"ios模拟器未能安装此应用程序"办法...
- ››解决jquery easyui easyloader加载外部js文件失败...
- ››解决无法使用Android SDK Manager下载SDK开发包的...
- ››解决网页内容无法复制
- ››解决Android手机在开发调试时logcat不显示输出信息...
- ››解决Windows 8操作系统假死的方法
- ››解决ubuntu 不识别 android 设备 方法
- ››解决ubuntu server sudo出现sudo:must be setuid ...
- ››解决数据库 Table 'content_tags' is mar...
- ››解决FF浏览器和IE下载文件乱码问题
- ››解决Firefox/Opera 不支持 onselectstart事件
更多精彩
赞助商链接