📄 mylink.asp
字号:
<Script language="javascript">
window.resizeTo(screen.availWidth,screen.availHeight);
</script>
<%
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Response.Write("对不起,您不是社区用户,请先注册!")
Response.End
end if%>
<!-- #include file="mylinksetup.asp" -->
<%
username=Request.Cookies("NC")
%>
<script>function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}</script>
<body background="../images/bg.gif">
<title>我的网络收藏夹</title>
<table width="700" border="0" cellspacing="0" cellpadding="0" height="352" align="center">
<tr valign="top" align="center">
<td colspan="2"> <br><br>
<%
menu=request("menu")
if menu="" then
menu="alladd"
end if
select case menu
case "alladd"
succtitle="查看文件夹"
alladd
case "looklinkadd"
succtitle="查看文件夹内容"
looklinkadd
case "addbox"
succtitle="添加文件夹!"
addbox
case "addboxok"
succtitle="成功创建文件夹!"
addboxok
case "addlink"
succtitle="添加链接!"
addlink
case "addlinkok"
succtitle="成功添加链接!"
addlinkok
case "changebox"
succtitle="修改文件夹"
changebox
case "changelink"
succtitle="修改链接"
changelink
case "changeboxok"
succtitle="成功修改文件夹"
changeboxok
case "changelinkok"
succtitle="成功修改链接"
changelinkok
case "delbox"
succtitle="删除文件夹"
delbox
case "dellink"
succtitle="删除链接"
dellink
case "daoru"
succtitle="导入文件夹"
daoru
case "looklinkadd"
succtitle="详细信息"
looklinkadd
case "lookadd"
succtitle="详细信息"
lookadd
end select
sub alladd
%>
<fieldset style="WIDTH: 650">
<legend>选择文件夹</legend><br>
<table width="600" border="0" cellspacing="0" cellpadding="0" height="22" style="FONT-SIZE: 9pt; border-collapse:collapse" bgcolor="#666699" bordercolor="#111111">
<tr align="center">
<td width="116" background="../images/tableheadbg.gif" height="22">
<b><a href=?menu=addbox><img border="0" src="images/mylink/iebox.gif" valign=absbottom><font color="#21517B"> 创建文件夹</font></a></b></td>
<td width="484" background="../images/tableheadbg.gif" height="22" align="right"><SCRIPT>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write("<font color='RED' face='Arial'>今天是 "+year+"年"+month+"月"+daym+"日</font>")
</SCRIPT> </td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" height="19">
<tr align="center">
<td width="179" height="19" bgcolor="#000000"><font color="#FFFF00">文件夹名</font></td>
<td width="347" height="19" bgcolor="#000000"><font color="#FFFF00">备注</font></td>
<td height="19" width="96" bgcolor="#000000"><font color="#FFFF00">相关操作</font></td>
</tr>
</table>
<%
rs.Open "select * from mylinkbox where username='"&username&"'",Conn,1,3
if rs.eof then
Response.Write "你现在没有创建文件夹!"
end if
while not rs.eof
%>
<table width="600" border="1" cellspacing="0" cellpadding="0" height="20" style="FONT-SIZE: 9pt; border-collapse:collapse">
<tr align="center">
<td width="179" bgcolor="#cccccc" valign="bottom"><a href=?menu=looklinkadd&id=<%=rs("id")%> alt="浏览该文件夹的详细信息">
<img border="0" src="images/mylink/iebox.gif"> <%=rs("linkbox")%></a>
</td>
<td width="350" bgcolor="#cccccc" align="left" valign="bottom"> <%=rs("intro")%>
</td>
<td width="46" bgcolor="#cccccc" valign="bottom"><a href="?menu=changebox&id=<%=rs("id")%>">
<font color="red">编辑</font></a></td>
<td width="46" bgcolor="#cccccc" valign="bottom"><a onclick=checkclick('您确定要删除?') href="?menu=delbox&id=<%=rs("id")%>">
<font color="red">删除</font></a></td>
</tr>
</table>
<%
rs.movenext
wend
%><br><br>
<table width="600" border="0" cellspacing="0" cellpadding="0" height="20">
<tr>
<td align="center">
</td>
</tr>
</table>
</fieldset>
<%
rs.close
end sub
sub addbox
%>
<fieldset style="WIDTH: 650">
<legend>创建文件夹|<a target="_self" href="mylink.asp?menu=alladd">返回文件夹列表</a></legend><br>
<table width="600" border="0" cellspacing="10" cellpadding="0" height="212">
<tr>
<td valign="top">
<form method="post" action="?menu=addboxok">
<img border="0" src="images/mylink/iebox.gif"> 文件夹名称:
<input type="text" name="linkbox" size="29"><font color="#FF0000">*</font>
<br><br>
备注:<br><textarea type="text" name="intro" cols="70" rows="6"></textarea>
<br></font><br>
<input type="submit" name="Submit" value="添加">
</form>
</td>
</tr>
</table>
</fieldset>
<%
end sub
sub changebox
rs.Open "select * from mylinkbox where id="&request("id")&"",Conn,1,3
%>
<fieldset style="WIDTH: 650">
<legend>修改文件夹|<a target="_self" href="mylink.asp?menu=alladd">返回文件夹列表</a></legend><br>
<table width="600" border="0" cellspacing="10" cellpadding="0" height="212">
<tr>
<td valign="top">
<form method="post" action="?menu=changeboxok"&username=<%=rs("username")%>>
<img border="0" src="images/mylink/iebox.gif"> 文件夹名称:
<input type="text" name="linkbox" size="29" value="<%=rs("linkbox")%>">
<font color="#FF0000">*</font>
<br><br>
备注:<br>
<textarea name="intro" cols="70" rows="6"><%=rs("intro")%></textarea>
<br><br>
<input type="hidden" name="id" value="<%=rs("id")%>">
<input type="submit" name="Submit" value="修改">
</form>
</td>
</tr>
</table>
</fieldset>
<%
end sub
sub looklinkadd
%>
<fieldset style="WIDTH: 650">
<legend>浏览文件夹|<a target="_self" href="mylink.asp?menu=alladd">返回文件夹列表</a></legend><br>
<table width="600" border="0" cellspacing="0" cellpadding="0" height="22">
<tr align="center">
<td width="116" background="../images/tableheadbg.gif"><a href=?menu=addlink&id=<%=request("id")%>>
<img border="0" src="images/mylink/ie.gif"><font color="#21517B"> 添加新链接</font></a></td>
<td width="484" background="../images/tableheadbg.gif" align="right"><SCRIPT>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write("<font color='red' face='Arial'>今天是 "+year+"年"+month+"月"+daym+"日</font>")
</SCRIPT></td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" height="20" bordercolor="#111111" bgcolor="#000000">
<td width="158" height="1" align="center" bgcolor="#000000"><font color="#FFFF00">网页</font></td>
<td width="68" height="1" align="center"><font color="#FFFF00">链接</font></td>
<td width="248" height="1" align="center"><font color="#FFFF00">备注</font></td>
<td height="1" width="72" align="center"><font color="#FFFF00">相关操作</font></td>
</tr>
</table>
<%
rs.Open "select * from mylink where username='"&username&"' and fileboxid="&request("id")&"",Conn,1,3
if rs.eof then
Response.Write "您现在没有添加网址!"
end if
while not rs.eof
%>
<table width="600" border="1" cellspacing="0" cellpadding="0" height="20" bgcolor="#cccccc" style="FONT-SIZE: 9pt; border-collapse:collapse"> <tr align="center">
<td width="158" align="left" valign="bottom"> <%=rs("linkname")%></td>
<td width="67" height="19" valign="bottom"><a target="_bank" href="<%=rs("link")%>">
<img border="0" src="images/mylink/ie.gif">打开</a></td>
<td width="250" align="left" valign="bottom"> <%=rs("beizu")%></td>
<td width="35" align="right" valign="bottom"><a href="?menu=changelink&id=<%=rs("fileboxid")%>&linkid=<%=rs("id")%>">
<font color="red">编辑</font></a></td>
<td width="35" align="right" valign="bottom"><a onclick=checkclick('您确定要删除?') href="?menu=dellink&id=<%=rs("fileboxid")%>&linkid=<%=rs("id")%>">
<font color="red">删除</font></a></td>
</tr>
</table>
<%
rs.movenext
wend
rs.close
%><br>
</fieldset><font color="#000000">
<%
end sub
sub addlink
boxid=Request("boxid")
%>
<fieldset style="WIDTH: 650">
<legend>添加链接</legend><br>
<table width="600" border="0" cellspacing="10" cellpadding="0" height="212">
<tr>
<td valign="top">
<form method="post" action="?menu=addlinkok&id=<%=request("id")%>">
<img border="0" src="images/mylink/ie.gif"> 网站名称:<input type="text" name="linkname" size="30">
<br>
<img border="0" src="images/mylink/ie.gif"> 网址(必填):<input type="text" name="link" size="50"><font color="#FF0000">*</font>
<br><br>
备注:<br><textarea name="beizu" cols="70" rows="6"></textarea>
<br> <input type="submit" name="Submit" value="添加"> <input type="button" value="返回" onclick="javascript:history.back()">
</form>
</td>
</tr>
</table>
</fieldset>
<%
end sub
sub changelink
rs.Open "select * from mylink where fileboxid="&request("id")&" and id="&request("linkid")&"",Conn,1,3
%>
<fieldset style="WIDTH: 650">
<legend>修改网址</legend><br>
<table width="600" border="0" cellspacing="10" cellpadding="0" height="212">
<tr>
<td valign="top">
<form method="post" action="?menu=changelinkok&id=<%=rs("fileboxid")%>&linkid=<%=rs("id")%>"">
<img border="0" src="images/mylink/ie.gif"> 网站名称:<input type="text" name="linkname" size="29" value="<%=rs("linkname")%>"></font>
<br>
<img border="0" src="images/mylink/ie.gif"> 网址(必填):<input type="text" name="link" size="50" value="<%=rs("link")%>" ><font color="#FF0000">*</font>
<br><br>
备注:<br><textarea name="beizu" cols="70" rows="6"><%=rs("beizu")%></textarea>
<br>
<input type="submit" name="Submit" value="修改"> <input type="button" value="返回" onclick="javascript:history.back()">
</form>
</td>
</tr>
</table>
</fieldset>
<%
end sub
sub addboxok
rs.Open "select * from mylinkbox",Conn,1,3
rs.addnew
rs("username")=username
rs("linkbox")=request("linkbox")
rs("intro")=request("intro")
rs.update
rs.close
Response.Redirect "?menu=alladd"
end sub
sub addlinkok
if len(request("beizu"))>1000 then
error2("备注的字数不能大于1000")
end if
if request("link")="" then
error2("请务必填写网址")
end if
rs.Open "select * from mylink",Conn,1,3
rs.addnew
rs("username")=username
rs("linkname")=request("linkname")
rs("link")=request("link")
rs("beizu")=request("beizu")
rs("fileboxid")=request("id")
rs.update
rs.close
Response.Redirect "?menu=alladd"
end sub
sub changeboxok
if len(request("intro"))>1000 then
error2("备注的字数不能大于1000")
end if
if request("linkbox")="" then
error2("请务必填写文件夹名称")
end if
rs.Open "select * from mylinkbox where id="&request("id")&"",Conn,1,3
rs("linkbox")=request("linkbox")
rs("intro")=request("intro")
rs.update
rs.close
Response.Redirect "?menu=alladd"
end sub
sub changelinkok
if len(request("beizu"))>1000 then
error2("备注的字数不能大于1000")
end if
if request("link")="" then
error2("请务必填写网址")
end if
rs.Open "select * from mylink where fileboxid="&request("id")&" and id="&request("linkid")&"",Conn,1,3
rs("linkname")=request("linkname")
rs("link")=request("link")
rs("beizu")=request("beizu")
rs.update
rs.close
Response.Redirect "?menu=alladd"
end sub
sub delbox
rs1.Open "select * from mylink where fileboxid="&request("id")&"",Conn,1,3
if not rs1.eof then
error2("请您先删除该文件夹里的链接!")
end if
rs1.close
rs.Open "select * from mylinkbox where id="&request("id")&"",Conn,1,3
rs.delete
rs.update
rs.close
Response.Redirect "?menu=alladd"
end sub
sub dellink
rs.Open "select * from mylink where fileboxid="&request("id")&" and id="&request("linkid")&"",Conn,1,3
rs.delete
rs.update
rs.close
Response.Redirect "?menu=alladd"
end sub
%>
<br><br>
</font>
</td>
</tr>
</table>
<%
htmlend
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -