<!--#include file="inc/conn.asp"-->
<!--#include file="usercookies.asp"-->
<!--#include file="inc/jle_sub.asp"-->
<!--#include file="inc/function.asp"-->
<%dim sc
sc=Request("sc")%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-会员管理中心-信息管理</title>
<link rel="icon" href="<%=web%>/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<%=web%>/favicon.ico" type="image/x-icon" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<SCRIPT language=JavaScript>
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;
    }
  }
 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>
<body>
<%call top()%><div id="Fmain">


<div id="Uleft">
  <div id=FFTit class=F12bold>会员管理中心</div><div id=FFContent><div Class='FFdiv'>
  <!--#include file=shop_userleft.asp-->
  </div></div></div>
<div id="Uright"> 
  <div id=FFTit class=F12bold>回复信息/友情链接管理</div><div id=FFContent><div Class='FFdiv'>
<%if request("gl")="link" then%> <%
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 [jle_shop_link] where id="&cstr(str2(i))
rs.open sql,conn,1,1
'On Error Resume Next
rs.close
sql="delete from [jle_shop_link] 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=shop_reply.asp?gl=link"">"
response.end
rs.close
set rs=nothing
closedb
end if



dim add,comgg
add=Request("add")
username=request.cookies("jle")("username")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [jle_shop] where username='"&username&"'" 
rs.open sql,conn,1,1
if rs.eof then
response.write "<br>"
response.write "<li>参数错误！"
response.end
end if
if add="ok123" then
set rs=server.createobject("adodb.recordset")
sql = "select * from jle_shop_link"
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("web")=HtmlEncode(trim(request("web")))
rs("url")=HtmlEncode(trim(request("url")))
rs("webabout")=HtmlEncode(trim(request("webabout")))
rs("jrsj")=now()
rs.update
response.write "<li>恭喜你，链接添加成功！！"
response.write "<meta http-equiv=refresh content=""1;URL=shop_reply.asp?gl=link"">"
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 language=JavaScript>
function showoperatealert(id)
{
		if (id==1)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="shop_reply.asp?gl=link&linkdel=1";
			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>
<table  width="100%" cellspacing="0" cellpadding="0"><tr><td width="18%">　</td><td width="82%"><%if request("edit")="1" then
id=trim(request("selectedid"))
set rs=server.createobject("adodb.recordset")
sql = "select * from jle_shop_link  where id="&id&""
rs.open sql,conn,1,3
if  request("editok")="1" then
rs("web")=HtmlEncode(trim(request("web")))
rs("url")=HtmlEncode(trim(request("url")))
rs("webabout")=HtmlEncode(trim(request("webabout")))
rs.update
response.write "<li>修改成功！！"
'response.write "<meta http-equiv=refresh content=""1;URL=shop_reply.asp?gl=link"">"
end if
%> <form method="POST" name="thisForm1" action="?gl=link&edit=1&editok=1&selectedid=<%=rs("id")%>" 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" value="<%=rs("web")%>"> *</p><p style="line-height: 220%; margin-top: 0; margin-bottom: 0">网站/店铺地址:<input type="text" name="url" size="30" value="<%=rs("url")%>"> *</p><p style="line-height: 220%; margin-top: 0; margin-bottom: 0">网站/店铺简介:<input type="text" name="webabout" size="36" maxlength="30" value="<%=rs("webabout")%>"> *</p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input border="0" onClick="javascript:return CheckForm();" type="submit" value="确认修改" name="add"> </form><%
'rs close
'set rs=nothing
else%> <form method="POST" name="thisForm1" action="?gl=link&add=ok123" style="line-height: 45px; 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="添加新链接"> </form><%end if%> </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,jle
k=1
set rs = Server.CreateObject("ADODB.RecordSet")
jle=trim(request("jle"))
sql="select * from [jle_shop_link] 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 height="25" align="center" class="userbg">选择</td><td class="userbg">网站名称</td><td class="userbg"><p align="center">网站地址</td><td class="userbg">　</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 #cad9ea; 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 #cad9ea; 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 #cad9ea; 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 #cad9ea; border-top-width: 1px; border-left-width:1px; border-right-width:1px"><p align="center"><a  href="shop_reply.asp?gl=link&selectedid=<%=uid%>&edit=1">修改</a> | <a href="shop_reply.asp?gl=link&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 cellpadding="0" cellspacing="0" width="100%"><tr><td height="25" width="395" colspan="3"><p align="left">　<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有<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" class="userbg">共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td><td height="25" width="126" align="center" class="userbg">共 <font color="#CC5200"><%=Allpage%></font> 页</td><td height="25" width="118" align="center" class="userbg">现在是第 <font color="#CC5200"><%=ThisPage%></font> 页</td><td height="25" width="200" align="center" class="userbg"><%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?gl=link&page=1>首页</a>&nbsp;"
response.write "<a href=?gl=link&page="&ThisPage-1&">上一页</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=?gl=link&page="&(ThisPage+1)&">下一页</a>&nbsp;"   
response.write "<a href=?gl=link&page="&Allpage&">尾页</a>&nbsp;"     
end if
%></td></tr><tr><td height="1" width="595" colspan="4"><p align="right"></td></tr></table></td></tr><%'end if%> </form></table></td></tr></table>
<%'end if%> <%else%> 
<table class="td" cellpadding="0" width="100%">

<%
if sc<>"" then 
username=request.cookies("jle")("username")
'if trim(request("sc"))="ok" then
id=trim(request("selectedid"))
if trim(id)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('没有选择记录！');" & "history.back()" & "</script>"
end if
str2=split(id,",")
for i=0 to ubound(str2)
set rs=server.createobject("adodb.recordset")
sql="delete from [shop_reply] where id="&cstr(str2(i))
rs.open sql,conn,1,3
next
response.write "<script language=JavaScript>" & chr(13) & "alert('删除信息成功！');" & "window.location='shop_reply.asp'" & "</script>"
rs.close
set rs=nothing
closedb
'end if
else%> <FORM name=thisForm action="?" method=POST><tr><td align="center" class="userbg" width="40">编号</td><td align="center" class="userbg"  width="411">回复内容</td><td align="center" class="userbg" width="80">留言类型</td><td align="center" class="userbg" width="80">回复者</td><td align="center" class="userbg" width="80">回复时间</td><td align="center" class="userbg" width="40"><span style="text-decoration: none">删除</span></td>
	<td align="center" class="userbg" width="40">选择</td></tr><%
i=0
ii=1
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
username=request.cookies("jle")("username")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [shop_reply] where sjname='"&username&"' order by hfsj desc" 
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td></td><td><li>没有记录</td></tr>"
else
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
do while not rs.eof
b=trim(rs("b"))
bb=len(b)
id=rs("id")
username=rs("username")
%> <tr><td align="center" height="40" style="border-bottom:1px #cad9ea dotted"><%=i+1%> </td>
<td id="ff" height="40" style="border-bottom:1px #cad9ea dotted;width:410px;word-wrap:break-word">
<script type="text/javascript">
/* <![CDATA[ */
function toBreakWord(intLen){
var obj=document.getElementById("ff");
var strContent=obj.innerHTML; 
var strTemp="";
while(strContent.length>intLen){
strTemp+=strContent.substr(0,intLen)+"&#10;"; 
strContent=strContent.substr(intLen,strContent.length); 
}
strTemp+="&#10;"+strContent;
obj.innerHTML=strTemp;
}
if(document.getElementById && !document.all) toBreakWord(30)
/* ]]> */
</script>
<%=rs("neirong")%></td>
<td  align="center" height="40" style="border-bottom:1px #cad9ea dotted"><%if rs("hflx")=1 then%>信息留言<%else%><a target="_blank" href="show_shop.asp?m=<%=rs("xxusername")%>">网站评论</a><%end if%> 　</td><td align="center" height="40" style="border-bottom:1px #cad9ea dotted"><%if username<>"" then%><a target="_blank" href=shop/sp2.asp?m=<%=username%>><%=username%><%else%>匿名<%end if%></td><td align="center" height="40" style="border-bottom:1px #cad9ea dotted"><%=datevalue(rs("hfsj"))%></td><td align="center" height="40" style="border-bottom:1px #cad9ea dotted"><a href="?selectedid=<%=id%>&sc=ok"><font color="#FF0000">删除</font></a></td><td align="center" height="40" style="border-bottom:1px #cad9ea dotted"><input type="checkbox" name="selectedid" value="<%=id%>"></td></tr><%
i=i+1
rs.movenext
if i>=Pagesize then exit do
loop
end if
%> <tr><td  height="25" colspan="7"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="49">
  <tr><td height="25"><p align="center">　</td><td height="25"><p align="center">　</td><td height="25"><p align="right">　</td><td height="25"><p align="center"><INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有记录 <input onclick=javascript:showoperatealert(1) type="submit" value="删除" name="sc"></td></tr><tr><td height="25" align="center" class="userbg">共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td><td height="25" align="center" class="userbg">共 <font color="#CC5200"><%=Allpage%></font> 页</td><td height="25" align="center" class="userbg">现在是第 <font color="#CC5200"><%=ThisPage%></font> 页</td><td height="25" align="center" class="userbg"><%
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>首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&">上一页</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)&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&">尾页</a>&nbsp;"     
end if
%></td></tr></table></td></tr></form><%end if%> </table><%end if%>   </div></div></div>
 <br style="clear:both;" />

</div>
</div>

<%
call bottom()
%>


</body>
</html>
<%
rs.close
set rs=nothing
%>