⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comlink.asp

📁 二手书籍系统
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file=usercookies.asp-->
<!--#include file="config.asp"-->
<!--#include file=inc/err.asp-->
<%
dim rs,sql,id,i,str2
if trim(request("linkdel"))="1" then
id=trim(request("selectedid"))
if trim(id)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('没有选择记录!');" & "history.back()" & "</script>"
response.end
end if
str2=split(id,",")
set rs=server.createobject("adodb.recordset")
for i=0 to ubound(str2)
sql="select * from [comlink] where id="&cstr(str2(i))
rs.open sql,conn,1,1
'On Error Resume Next
rs.close
sql="delete from [comlink] where id="&cstr(str2(i))
rs.open sql,conn,1,3
next
response.write "<script language=JavaScript>" & chr(13) & "alert('删除链接成功!')</script>"
response.write "<meta http-equiv=refresh content=""1;URL=comlink.asp"">"
response.end
rs.close
set rs=nothing
closedb
else
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="供求信息,二手网,二手商品,电子商务,供求网站,免费发布供求信息,商业信息,贸易网,求购,求购信息,出售,供应,供求信息网,招商投资 生活服务 家电家居  旅游出行 招聘求职  房产信息 
建材装饰 烟酒副食 电脑网络  餐饮酒店  医药保健  农林牧渔  安全防护  包装纸张 办公文教  电子通讯  
纺织皮革  服装服饰  工业机械 仪器仪表 交通运输 车及配件 工艺礼品 文化艺术 冶金矿产 出版印刷 能源动力 环境保护 
化工行业 玩具体育 园林绿化 广告服务 商务服务 分类广告 搜索引擎 企业行业黄页 分类信息网 集市">

<title>会员管理中心-店铺友情连接-<%=title%></title>
</head>
<%
dim username,add,comgg
add=Request.form("add")
username=request.cookies("cnmai")("username")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [com] where username='"&username&"'" 
rs.open sql,conn,1,1
if rs.eof then
response.write "<br>"
response.write "<li>参数错误!"
response.end
end if
%>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.thisForm1.web.value.length<1)
	{
	    alert("网站名称不能为空!");
	    return false;
	}
	if(document.thisForm1.url.value.length<1)
	{
	    alert("网站地址不能为空!");
	    return false;
	}
			if(document.thisForm1.webabout.value.length<1)
	{
	    alert("网站简介不能为空!");
	    return false;
	}
	


}

//-->
</SCRIPT>
<script>
function loadThreadFollow(t_id,b_id){
	var targetImg =eval("document.all.followImg" + t_id);
	var targetDiv =eval("document.all.follow" + t_id);
	
	if ("object"==typeof(targetImg)){
		if (targetDiv.style.display!='block'){
			targetDiv.style.display="block";
			
		}else{
			targetDiv.style.display="none";
		}
	}
}
</script>
<SCRIPT language=JavaScript>
function showoperatealert(id)
{
		if (id==1)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="link_del.asp";
			thisForm.submit();
		}
		}
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall' )
       e.checked = form.chkall.checked;
    }
  }
//-->
</SCRIPT>
<body topmargin="0">
<!--#include file="topcnmai.asp"-->
<div align="center">
<table border="0" width="755" id="table1" bgcolor="#FFFFFF" style="border-left: 1px solid #999999; border-right: 1px solid #999999; padding: 1px; border-top-width:1px; border-bottom-width:1px" cellspacing="0" cellpadding="0">
<tr>
<td width="150" height="25" class=td4_muen>
<p align="center">会员管理系统</td>

<td height="25" class=td2_muen>
<p align="center"><font color=white>会员管理中心-友情链接管理</font></td>
</tr>
<tr>
<td bgcolor="#F6F6F6" valign="top"><!--#include file=com_userleft.asp--></td>
<td valign="top" bgcolor="#F6F6F6">
<%if add="" then %>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table2">
<tr>
<td width="18%"> </td>
<td width="82%">
<form method="POST" name="thisForm1" action="comlink.asp" style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<p style="line-height: 220%; margin-top: 0; margin-bottom: 0">
网站/店铺名称:<input type="text" name="web" size="30" maxlength="10"> *</p>
<p style="line-height: 220%; margin-top: 0; margin-bottom: 0">
网站/店铺地址:<input type="text" name="url" size="30" value="http://"> *</p>
<p style="line-height: 220%; margin-top: 0; margin-bottom: 0">
网站/店铺简介:<input type="text" name="webabout" size="36" maxlength="30"> *</p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input border="0" onclick="javascript:return CheckForm();" type="submit" value="添加新链接" name="add">
</form></td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" height="1" bordercolor="#808000">
<FORM name=thisForm action="" method=POST>
<%
dim k,cnmai
dim ThisPage,Pagesize,Allrecord,Allpage
k=1
set rs = Server.CreateObject("ADODB.RecordSet")
cnmai=trim(request("cnmai"))
sql="select * from [comlink] where username='"&username&"' order by jrsj desc" 
rs.open sql,conn,1,1
if rs.eof then
response.write "<li>没有链接记录"
end if
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
rs.Pagesize=10
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
%>
<tr>
<td width="8%" height="24" align="center" class="td_muen"><font color=white>选择</font></td>
<td width="27%" height="24" class="td_muen">
<font color=white>网站名称</font></td>
<td width="29%" height="24" class="td_muen">
<p align="center"><font color=white>网站地址</font></td>
<td width="32%" height="24" class="td_muen"> </td>
</tr>
<%
dim uid
do while not rs.eof
uid=rs("id")
%>

<tr>
<td width="8%" height="24" align="center" style="border-bottom:1px solid #CCCCCC; border-top-width: 1px; border-left-width:1px; border-right-width:1px">
<INPUT type=checkbox value="<%=uid%>" name=selectedid></td>
<td width="27%" height="24" style="border-bottom:1px solid #CCCCCC; border-top-width: 1px; border-left-width:1px; border-right-width:1px"><a target="_blank" href=<%=rs("url")%>><%=rs("web")%></a></td>
<td width="29%" height="24" align="center" style="border-bottom:1px solid #CCCCCC; border-top-width: 1px; border-left-width:1px; border-right-width:1px"><a target="_blank" href=<%=rs("url")%>><%=rs("url")%></td>
<td width="32%" height="24" style="border-bottom:1px solid #CCCCCC; border-top-width: 1px; border-left-width:1px; border-right-width:1px">
<p align="center"><a target="_blank" href="link_e.asp?selectedid=<%=uid%>">修改</a> | <a href="comlink.asp?selectedid=<%=uid%>&linkdel=1">删除该链接</a></td>
</tr>
<%
k=k+1
rs.movenext
if k>=Pagesize then exit do
loop
rs.close
set rs=nothing
closedb
%>
<tr>
<td width="100%" height="1" colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
<tr> 

<td height="25" width="200">
<p align="center">
 </td>
</tr>
<tr> 
<td height="25" width="151" align="center">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td height="25" width="126" align="center">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td height="25" width="118" align="center">
现在是第 
<font color="#CC5200"><%=ThisPage%></font> 页</td>
<td height="25" width="200" align="center">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">尾页</a>&nbsp;"     
end if
%></td>
</tr>
<tr> 
<td height="1" width="590" colspan="4">
<p align="right"></td>
</tr>
</table>
</td>
</tr>
<%else 
set rs=server.createobject("adodb.recordset")
sql = "select * from comlink"
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("web")=trim(request("web"))
rs("url")=trim(request("url"))
rs("webabout")=trim(request("webabout"))
rs("jrsj")=now()
rs.update
rs.close
set rs=nothing
closedb
response.write "<li>恭喜你,链接添加成功!!"
response.write "<meta http-equiv=refresh content=""1;URL=comlink.asp"">"
end if%> 
</form>
</table></td>
</tr>
</table>

</td>
</tr>
<tr>
<td  colspan="3"><!--#include file="endcnmai.asp"--></td>
</tr>
</table>
</div>
</body>
</html><%end if%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -