📄 man_url.asp
字号:
<%
if session("username")="" or session("usertype")="" then
response.Write"<script>"
response.Write"parent.location.href='default.asp';"
response.Write"</script>"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("act")="add" then
set rsd=server.CreateObject("adodb.recordset")
dsql="select * from net_url order by id desc"
rsd.open dsql,conn,3,2
rsd.addnew
rsd("title")=request("title")
rsd("urlfile")=request("urlfile")
rsd.update
rsd.close
response.Redirect("man_url.asp")
response.End()
end if
%>
<%
if request("act")="edit" then
set rst=server.CreateObject("adodb.recordset")
strsql="select * from net_url where id="&request("id")&""
rst.open strsql,conn,3,2
rst("title")=request("title")
rst("urlfile")=request("urlfile")
rst.update
rst.close
response.Redirect("man_url.asp")
response.End()
end if
%>
<%
if request("act")="del" then
conn.execute "delete * from net_url where id="&request("id")&""
response.Redirect("man_url.asp")
response.End()
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>友情链接管理</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width=99% align=center border=0>
<TR>
<TD height="25" style="HEIGHT: 16px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="77%"><SPAN class=heading>查看友情链接</SPAN></td>
</tr>
</table></TD>
</TR>
<TR>
<TD height=12 colSpan=2><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="#CCCCCC" height="1"></td>
</tr>
</table></td>
</tr>
</table></TD>
</TR>
<TR>
<TD colSpan=2 vAlign=top> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="52" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#CCCCCC"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from net_url order by id asc"
rs.open sql,conn,1,1
if rs.eof then
response.Write("<tr>")
response.Write("</td>")
response.Write("<div align='center'>暂时没有内容!</div>")
response.Write("</td>")
response.Write("</tr>")
rs.close
else
i=1
do while not rs.eof
%>
<form action="man_url.asp?act=edit&id=<%=rs("id")%>" name="post<%=i%>" id="post<%=i%>" method="post">
<tr>
<td width="12%" height="25" bgcolor="#FFFFFF">
<div align="center">
<p>网站名称:</p>
</div></td>
<td width="20%" bgcolor="#FFFFFF"><div align="center">
<input name="title" type="text" class="input_main" value="<%=rs("title")%>" size="18">
</div></td>
<td width="12%" align="center" bgcolor="#FFFFFF">网站地址:</td>
<td width="30%" align="center" bgcolor="#FFFFFF"><input name="urlfile" type="text" id="urlfile" value="<%=rs("urlfile")%>" class="input_main" size="30"></td>
<td width="15%" bgcolor="#FFFFFF"><div align="center">
<input type="submit" name="Submit" value="修 改" class="sub" style="width:35px">
<input type="button" name="del" value="删 除" class="sub" style="width:35px" onClick="javascript:window.location.href='man_url.asp?id=<%=rs("id")%>&act=del';">
</div></td>
</tr>
</form>
<%
i=i+1
rs.movenext
if rs.eof then exit do
loop
rs.close
end if
%>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25"><div align="left"><font color="#7BA428"> </font>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><font color="#0066CC">*</font>添加网站链接</td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#CCCCCC"><table width="100%" border="0" cellpadding="0" cellspacing="1">
<form name="addclass" id="addclass" method="post" action="man_url.asp?act=add">
<tr>
<td width="12%" height="25" bgcolor="#FFFFFF">
<div align="center">网站名称:</div></td>
<td width="20%" bgcolor="#FFFFFF">
<div align="center">
<input name="title" type="text" class="input_main" id="title" value="<%=rs("title")%>" size="18">
</div></td>
<td width="12%" bgcolor="#FFFFFF">
<div align="center">网站地址:</div></td>
<td width="30%" bgcolor="#FFFFFF">
<div align="center">
<input name="urlfile" type="text" id="urlfile3" value="<%=rs("urlfile")%>" class="input_main" size="30">
</div></td>
<td width="15%" bgcolor="#FFFFFF">
<div align="center">
<input type="submit" name="Submit2" value="提交" class="sub" onClick="return subclick();">
</div></td>
</tr>
</form>
</table></td>
</tr>
</table></td>
</tr>
</table>
<font color="#7BA428"><br>
</font></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></TD>
</TR>
</TABLE>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -