📄 edition.asp
字号:
<!--#include file="conn.asp"-->
<%
action=request("action")
%>
<% if action="lookedition" then
luxian=request("luxian")
set rs=Server.Createobject("Adodb.Recordset")
sql="select zhand,shunx,leixing from jj where luxian='"&luxian&"' order by shunx"
rs.open sql,conn,1,1
set rsc=Server.Createobject("Adodb.Recordset")
sqlc="select allzhand from lx where luxian='"&luxian&"'"
rsc.open sqlc,conn,1,1
all_zhandian=rsc(0)
rsc.close
set rsc=nothing
%>
<style type="text/css">
<!--
#Layer1 {
position:fixed;
left:0px;
width:200px;
height:96px;
z-index:1;
top: 0px;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #990000;
}
-->
</style>
<table width="800" border="0" align="center">
<tr><td><br><br>
<form name="addzhandian" method="post" action="edition.asp?action=addzhandian&luxian=<%=luxian%>">
<div id="Layer1">
<table width="100%" border="1" align="center" >
<tr><td colspan="2" height="30" style="font-size:16px; color:#FFCC99; background-color:#6699FF" > 九江公交所有路线 :</td></tr><tr>
<%
set rslx=server.CreateObject("adodb.recordset")
sqllx="select luxian from lx"
rslx.open sqllx,conn,1,1
i=0
do while not rslx.eof
i=i+1
%>
<% if i=1 or i=2 then%>
<td style="border-bottom:none;" height="25;"><a title="" href="edition.asp?action=lookedition&luxian=<%=Rslx("luxian")%>"><%=rslx("luxian")%></a></td>
<%else%>
<td style="border-bottom:none; border-top:none;" height="25;"><a title="" href="edition.asp?action=lookedition&luxian=<%=Rslx("luxian")%>"><%=rslx("luxian")%></a></td>
<% end if%>
<% if i mod 2=0 then %>
</tr><tr>
<% end if%>
<% rslx.movenext
loop
rslx.close
set rslx=nothing
%>
</tr><tr>
<td colspan="2" height="25" style="font-size:16px; background-color:#6699FF; color:#FFCC99" >添加新站点:</td></tr>
<tr><td colspan="2" > 站点:<input type="text" name="zhandian" value="" size="15" / ></td></tr>
<tr><td colspan="2" style="border-bottom:none; border-top:none"> 顺序:<input type="text" name="shunx" value="" size="15" ></td></tr>
<tr><td colspan="2" align="right" style="background-color:#6699FF"><input type="submit"name="Submit" value="添加" size="25" > </td></td></tr>
</table>
</div></form>
</td><td>
<table width="560" border="1" >
<tr><td colspan="6" height="36"align="center" style="font-size:13px; background-color:#6699FF" > <span style="font-size:18px; color:#FFcc99"><%=luxian%></span> 共有 <span style="font-size:18px; color:#FF0000"><%=all_zhandian%></span> 站点 如下:</td>
</tr><tr>
<%do while not rs.eof
%>
<% if rs(2)<>"" then%>
<form name="<%=rs(1)%>" method="post" action="edition.asp?action=xiugai&luxian=<%=luxian%>"><td width="83">
<input type="text" name="leixing" value="<%=rs(2)%>" style="border:none" size="10"></td>
<td width="141"><input name="zhandian" type="text" style="border:none" value="<%=rs(0)%>" size="16" ></td>
<td width="135"><input type="text" name="shunxg" value="<%=rs(1)%>"style="border:none" size="15"> <input type="hidden" name="shunx" value="<%=rs(1)%>"></td>
<td width="42"><input type="submit" name="Submit" value="修改" style="background-color:#FFFFFF; border:none"></td></form>
<td width="42" align="center">
<a href="zdlist.asp?action=looklx&zhandian=<%=rs(0)%>"><span style="font-size:12">查看</span></a></td>
<td align="center"><a href="edition.asp?action=delzhandian&luxian=<%=luxian%>&shunx=<%=rs(1)%>"><span style="font-size:12">删除</span></a></td>
</tr><tr>
<%else%>
<form name="<%=rs(1)%>" method="post" action="edition.asp?action=xiugai&luxian=<%=luxian%>"><td style="border-top:none; border-bottom:none"><input type="text" name="leixing" value="<%=trim(rs(2))%>" style="border:none" size="10" /></td>
<td width="141"><input type="text" name="zhandian" value="<%=rs(0)%>" style="border:none" size="16"/></td>
<td width="135"><input type="text" name="shunxg" value="<%=rs(1)%>" style="border:none" size="15"><input type="hidden" name="shunx" value="<%=rs(1)%>"> </td>
<td width="42"><input type="submit" name="Submit" value="修改" style="background-color:#FFFFFF; border:none"></td></form>
<td width="42" align="center">
<a href="zdlist.asp?action=looklx&zhandian=<%=rs(0)%>"><span style="font-size:12">查看</span></a></td>
<td align="center"><a href="edition.asp?action=delzhandian&luxian=<%=luxian%>&shunx=<%=rs(1)%>""><span style="font-size:12">删除</span></a></td>
</tr><tr>
<% end if%>
<% rs.movenext
loop
%>
</table>
</td></tr></table>
<%rs.close
set rs=nothing
end if%>
<%
if action="delete" then
all_luxian=trim(request("selectluxian"))
set rs=Server.Createobject("Adodb.Recordset")
str1=split(all_luxian,",")
for k=0 to ubound(str1)
sql="delete from jj where luxian='"&trim(str1(k))&"' "
rs.open sql,conn,1,3
sql1="delete from lx where luxian='"&trim(str1(k))&"' "
rs.open sql1,conn,1,3
response.write "<li>路线"&trim(str1(k))&"删除成功!"
response.write "<meta http-equiv=refresh content=""2;URL=lxlist.asp"">"
next
rs.close
set rs=nothing
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
end if
%>
<%
if action="delzhandian" then
luxian=request("luxian")
shunx=request("shunx")
set rs=server.CreateObject("adodb.recordset")
sql="delete from jj where luxian='"&luxian&"' and shunx='"&shunx&"'"
rs.open sql,conn,1,3
rs.close
set rs=nothing
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
sqlallzhandian="update lx set allzhand=allzhand-1 where luxian='"&luxian&"'"
conn.execute(sqlallzhandian)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('删除成功!');" & Chr(13)
response.write "window.document.location.href='edition.asp?action=lookedition&luxian="&luxian&"';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<% if action="xiugai" then
luxian=trim(request("luxian"))
zhandian=trim(request("zhandian"))
shunx=trim(request("shunx"))
shunxg=trim(request("shunxg"))
leixing=trim(request("leixing"))
if zhandian="" or shunxg="" then
response.write"<SCRIPT language=JavaScript>alert('站点和站点的顺序都不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.End
end if
Set rs=Server.Createobject("Adodb.Recordset")
sql="Select * From jj where luxian='"&luxian&"'and shunx='"&shunx&"'"
rs.open sql,conn,1,3
rs("luxian")=luxian
rs("zhand")=zhandian
rs("shunx")=shunxg
rs("leixing")=leixing
rs.update
rs.close
set rs=nothing
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('修改成功!');" & Chr(13)
response.write "window.document.location.href='edition.asp?action=lookedition&luxian="&luxian&"';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<% if action="addzhandian" then
luxian=trim(request("luxian"))
zhandian=trim(request("zhandian"))
shunx=trim(request("shunx"))
leixing=trim(request("leixing"))
if zhandian="" or shunx="" then
response.write"<SCRIPT language=JavaScript>alert('站点和站点的顺序都不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.End
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from jj"
rs.open sql,conn,1,3
rs.addnew
rs("luxian")=luxian
rs("zhand")=zhandian
rs("shunx")=shunx
rs("leixing")=leixing
rs.update
rs.close
set rs=nothing
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
sqlallzhandian="update lx set allzhand=allzhand+1 where luxian='"&luxian&"'"
conn.execute(sqlallzhandian)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('添加成功!');" & Chr(13)
response.write "window.document.location.href='edition.asp?action=lookedition&luxian="&luxian&"';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<%
if action="lxmain" then
luxian=trim(request("luxian"))
luxiang=trim(request("luxiang"))
fzhandian=trim(request("fzhandian"))
ezhandian=trim(request("ezhandian"))
leixing=trim(request("leixing"))
allzhandian=trim(request("allzhandian"))
if fzhandian="" or allzhandian="" or ezhandian="" or luxiang="" or leixing="" then
response.write"<SCRIPT language=JavaScript>alert('都不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.End
end if
set rs=server.CreateObject("adodb.recordset")
sql="select luxian,fzhand,ezhand,leixing,allzhand from lx where luxian='"&luxian&"' "
rs.open sql,conn,1,3
rs("luxian")=luxiang
rs("fzhand")=fzhandian
rs("ezhand")=ezhandian
rs("leixing")=leixing
rs("allzhand")=allzhandian
rs.update
rs.close
set rs=nothing
sql="update jj set luxian='"&luxiang&"' where luxian='"&luxian&"'"
conn.execute(sql)
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('修改成功!');" & Chr(13)
response.write "window.document.location.href='lxmain.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<%
if action="addlxmain" then
luxian=trim(request("luxian"))
fzhandian=trim(request("fzhandian"))
ezhandian=trim(request("ezhandian"))
leixing=trim(request("leixing"))
allzhandian=trim(request("allzhandian"))
if fzhandian="" or allzhandian="" or ezhandian="" or luxian="" or leixing="" then
response.write"<SCRIPT language=JavaScript>alert('都不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.End
end if
set rsif=server.CreateObject("adodb.recordset")
sqlif="select * from lx where luxian='"&luxian&"' "
rsif.open sqlif,conn,1,1
if not rsif.eof then
response.write"<SCRIPT language=JavaScript>alert('该路线已经存在!');"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.End
else
rsif.close
set rsif=nothing
set rs=server.CreateObject("adodb.recordset")
sql="select * from lx "
rs.open sql,conn,1,3
rs.addnew
rs("luxian")=luxian
rs("fzhand")=fzhandian
rs("ezhand")=ezhandian
rs("leixing")=leixing
rs("allzhand")=allzhandian
rs.update
rs.close
set rs=nothing
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from jj "
rs.open sql,conn,1,3
rs.addnew
rs("luxian")=luxian
rs("zhand")=fzhandian
rs("shunx")=1
rs("leixing")=leixing
rs.update
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
sql="select * from jj "
rs.open sql,conn,1,3
rs.addnew
rs("luxian")=luxian
rs("zhand")=ezhandian
rs("shunx")=allzhandian
rs("leixing")=""
rs.update
rs.close
set rs=nothing
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('添加成功!继续添加站点 完善此路线!');" & Chr(13)
response.write "window.document.location.href='edition.asp?action=lookedition&luxian="&luxian&"';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<%
if action="editionzhandianluxian" then
zhandian=trim(request("zhandian"))
zhandiang=trim(request("zhandiang"))
if zhandiang=""then
response.write"<SCRIPT language=JavaScript>alert('要修改的站点不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.End
end if
sql="update jj set zhand='"&zhandiang&"' where zhand='"&zhandian&"'"
conn.execute(sql)
sqlf="update lx set fzhand='"&zhandiang&"' where fzhand='"&zhandian&"'"
conn.execute(sqlf)
sqle="update lx set ezhand='"&zhandiang&"' where ezhand='"&zhandian&"'"
conn.execute(eqlf)
sqldel="delete from zhand"
conn.execute(sqldel)
sqladd="insert into zhand select distinct zhand from jj"
conn.execute(sqladd)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('修改成功!');" & Chr(13)
response.write "window.document.location.href='zd_lx.asp?action=zdlooklx&zhandian="&zhandiang&"';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<% conn.close
set conn=nothing %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -