📄 listcomp.asp
字号:
<head>
<LINK href="style.css" rel=stylesheet>
<!--#include file="db.asp"-->
<!--#include file="session.asp"-->
</head>
<body topMargin=0 marginheight="0" leftMargin=0 vlink="#000000">
<table border="0" width="100%" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF">
<tr>
<td width="100%">
<table border="0" width="100%" bordercolorlight="#000000" cellspacing="0" cellpadding="4" bordercolordark="#FFFFFF">
<%
sql="Select * From cp order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%><tr>
<td><%if rs.eof and rs.bof then%>暂时还没有公司记录<%else
do while not rs.eof%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td> 公司名称:<%=rs("comp")%>
| <%x=request("x")
w=request("w")
sid=request("sid")
sid0=rs("id")
ad=request("ad")
if w="on" and sid=""&sid0&"" then%><a href="listcomp.asp?id=<%=rs("id")%>" target=_self>隐藏详细情况</a> | <a href="listcomp.asp?x=on&sid=<%=rs("id")%>" target=_self>修改</a> | <a href="addrdel.asp?sort=comp&id=<%=rs("id")%>" target=_self>删除</a> |<hr width="80%" size="1" align="left"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><br> 地址:<%=rs("addr")%><br> 邮编:<%=rs("yb")%><br> 总机:<%=rs("zj")%><br> 传真:<%=rs("cz")%><br> </td>
</tr>
<tr>
<td><hr width="80%" size="1" align="left"></td>
</tr>
<%elseif x="on" and sid=""&sid0&"" then%>
<a href="listcomp.asp?w=on&sid=<%=rs("id")%>" target=_self>
查看详细情况</a> | <a href="listcomp.asp?x=on&sid=<%=rs("id")%>" target=_self>修改</a> | <a href="addrdel.asp?sort=comp&id=<%=rs("id")%>" target=_self>删除</a> |<hr width="80%" size="1" align="left">
<tr><form action=listcomp.asp?ad=ecmp&id=<%=rs("id")%> target=_self>
<td bgcolor="#C0C0C0"><input type="hidden" name="id" value="<%=rs("id")%>"><input type="hidden" name="ad" value="ecomp">
<br> 名称:<input type="text" name="comp" size="50" style="font-size: 9pt" value="<%=rs("comp")%>"><br> 地址:<input type="text" name="addr" size="50" style="font-size: 9pt" value="<%=rs("addr")%>"><br> 邮编:<input type="text" name="yb" size="20" style="font-size: 9pt" value="<%=rs("yb")%>"><br> 总机:<input type="text" name="zj" size="20" style="font-size: 9pt" value="<%=rs("zj")%>"><br> 传真:<input type="text" name="cz" size="20" style="font-size: 9pt" value="<%=rs("cz")%>"><br> <input type="submit" value="修 改" style="font-size: 9pt"> <input type="reset" value="取 消" style="font-size: 9pt"><br> </td>
</form></tr>
<tr>
<td><hr width="80%" size="1" align="left"></td>
</tr><%else%>
<a href="listcomp.asp?w=on&sid=<%=rs("id")%>" target=_self>
查看详细情况</a> | <a href="listcomp.asp?x=on&sid=<%=rs("id")%>" target=_self>修改</a> | <a href="addrdel.asp?sort=comp&id=<%=rs("id")%>" target=_self>删除</a> |<hr width="80%" size="1" align="left">
<%
id=request("id")
if ad="ecomp" and id=""&sid0&"" then
addr=request("addr")
yb=request("yb")
zj=request("zj")
cz=request("cz")
comp=request("comp")
if addr="" then
addr="-"
end if
if yb="" then
yb="-"
end if
if zj="" then
zj="-"
end if
if cz="" then
cz="-"
end if
if comp="" then
comp="-"
end if
strSql = "update cp set addr='"&addr&"',yb='"&yb&"',zj='"&cz&"',cz='"&cz&"',comp='"&comp&"' where id="& id
conn.Execute strSql%> <tr>
<td bgcolor="#C0C0C0"><font color=red>修改成功!</font></td>
</tr>
<tr>
<td><hr width="80%" size="1" align="left"></td>
</tr><%end if
end if%>
</table><%rs.movenext
loop
rs.close
set rs=nothing
end if%>
</td>
</tr>
</table>
</table>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -