www.gusucode.com > 盐城分类信息网asp源码程序 > comlink.asp
<% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %><!--#include file="inc/conn.asp"--> <!--#include file=usercookies.asp--> <!--#include file="inc/inc.asp"--> <LINK href="images/at_news.css" type=text/css rel=stylesheet> <% 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"> <title><%=title%>-会员管理中心-修改资料</title> <style type="text/css"> <!-- .td1 {border-bottom:1px solid #AA0604; height:31; border-left-width:1px; border-right-width:1px; background-image:url(img/titlebg1.jpg);} .td4 {border-bottom:1px solid #999999; height:25; background-color:#C1FFC1; border-left-width:1px; border-right-width:1px; border-top-width:1px} --> </style> </head> <% dim 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"> <%call t()%> <div align="center"> <table width="956" id="table1" bgcolor="#FFFFFF" style="border-right:1px solid #999999; border-top:1px solid #999999;border-left:1px solid #999999;border-bottom:1px solid #999999; padding:1px; border-top-width:1px; border-bottom-width:1px" cellspacing="0" cellpadding="0"><tr> <td width="160" height="25" class=td1> <p align="center">会员管理系统</td> <td width="4" height="250" rowspan="2"> </td> <td height="25" class=td1> <p align="center">会员管理中心</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 class=input type="text" name="web" size="30" maxlength="10"> *</p> <p style="line-height: 220%; margin-top: 0; margin-bottom: 0"> 网站/店铺地址:<input class=input type="text" name="url" size="30" value="http://"> *</p> <p style="line-height: 220%; margin-top: 0; margin-bottom: 0"> 网站/店铺简介:<input class=input type="text" name="webabout" size="36" maxlength="30"> *</p> <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="td4">选择</td> <td width="27%" height="24" class="td4"> 网站名称</td> <td width="29%" height="24" class="td4"> <p align="center">网站地址</td> <td width="32%" height="24" class="td4"> </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 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="395" colspan="3"> <p align="left"> <input onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有<input class=input onclick=javascript:showoperatealert(1) type="submit" value="删除" name="B2"></td> <td height="25" width="200"> <p align="center"> </td> </tr> <tr> <td height="25" width="151" align="center"> 共有 <font color="#CC5200"><%=Allrecord%></font> 条记录</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> " response.write "<font color=""#808080"">上一页</font> " else response.write "<a href=?page=1&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">首页</a> " response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">上一页</a> " end if if Allpage-ThisPage<1 then response.write "<font color=""#808080"">下一页</font> " response.write "<font color=""#808080"">尾页</font> " else response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">下一页</a> " response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&"&t2="&trim(request("t2"))&"&t3="&trim(request("t3"))&"&cnmai="&cnmai&">尾页</a> " end if %></td> </tr> <tr> <td height="1" width="595" 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> </table> </div><table border="0" width="88%" id="table2" style="border-collapse: collapse"> <tr> <td><!--#include file="foot.asp"--></td> </tr> </table> </body> </html><%end if%><% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %>