<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%If shopnet("abc")="" then%>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
<body onLoad="show(dz1),show(dz2)"><%ElseIf shopnet("abc")="ping" then%><body onLoad="show(c961),show(c962)"><%ElseIf shopnet("abc")="faq" then%><body onLoad="show(d71),show(d72)"><%ElseIf shopnet("abc")="guestbook" then%><body onLoad="show(c951),show(c952)"><%End if%>
<!--#include file="top.asp"-->
<html><head>
<meta http-equiv=Content-Type content='text/html; charset=gb2312'>
<link href="/include/css.css" rel="stylesheet" type="text/css">
<title><%=my_name%>-----会员中心</title></head>
<TABLE cellSpacing=0 cellPadding=0 width=762 align=center border=0>

<%hy "login.asp"
left_open="shop"
'//是否已开店铺
set yz = conn.execute("select id,zt,name from shop where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"'")
if yz.eof then
Response.redirect "note.asp?errid=0"
Response.end
else
'userid=yz(0)
username=yz(2)
Select case yz(1)
case "4"
Response.redirect "note.asp?errid=2"
Response.end
case "3"
Response.redirect "note.asp?errid=3"
Response.end
End Select
end if
yz.close:set yz=nothing%>

<!--#include file="../include/page.asp"-->
<table width="762" border="0" align="center" cellpadding="2" cellspacing="0" style='BORDER-COLLAPSE: collapse;MARGIN: 3px'>
  <tr> 
    <td height="22" colspan="2">您的位置： <A href="../index.asp">首页</A> &gt;&gt; <a href="index.asp">会员中心</a>&nbsp;</td>
  </tr>
  <tr> 
    <td width="180" valign="top">
<!--#include file="left.asp"-->
    </td>
<td width="582" height="280" valign="top">
<%Select case request("abc")
case "hf"
if request("add")="yes" then
Select case request("lx")
case "ping"
conn.execute("Update pinglun set hf='"&left(shopnet("hf"),500)&"' where userid="&myuserid&" and id="&shopnet("id")&"")
case "guestbook"
conn.execute("Update shopguestbook set hf='"&left(shopnet("hf"),500)&"' where userid="&myuserid&" and id="&shopnet("id")&"")
End Select
Response.redirect "?abc="&request("lx")&""
end if%>

<%case "guestbook"%>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="4" bgcolor="1E88C1"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>

      
<%case "ping"%>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="4" bgcolor="1E88C1"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>


<%case "faq_x"
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from user_kefu where id="&shopnet("id")
rs.open sql,conn,1,3
'判断时间限制
if datediff("n",rs("sj"),now())>=30 then
if request("dz")<>"" or not(isnumeric(request("dz"))) then
rs("dz")=1
else
rs("dz")=0
end if
else
rs("bt")=shopnet("bt")
rs("nr")=shopnet("nr")
if request("dz")<>"" or not(isnumeric(request("dz"))) then
rs("dz")=1
else
rs("dz")=0
end if
end if
'判断结束开绐更新
rs.update
rs.close
set rs=nothing
Response.Write("<script>alert(""修改成功"");location.href=""?abc=faq&page="&request("page")&""";</script>")
case "faq_add"
if request("add")="yes" and request("bt")<>"" and request("nr")<>"" then
if shopnet("dz")<>"" then
dz=1
else
dz=0
end if
conn.execute("Insert into user_kefu(bt,nr,dz,userid)values('"&shopnet("bt")&"','"&shopnet("nr")&"',"&dz&","&myuserid&")")
Response.Write("<script>alert(""添加成功"");location.href=""?abc=faq"";</script>")
Response.end
end if%>
<%case "faq"
if request("del")="yes" then
conn.execute("Delete * from user_kefu where userid="&myuserid&" and id="&shopnet("id")&"")
end if%>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="4" bgcolor="1E88C1"></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="5"></td>
    </tr>
  </table>

<%case "add"
If request("add")="yes" and shopnet("SL_name")<>"" and shopnet("SL_url")<>"" Then
conn.execute("Insert into ShopLink(SL_name,SL_url,shopid)values('"&shopnet("SL_name")&"','"&shopnet("SL_url")&"',"&myuserid&")")
Response.Write("<script>alert(""添加成功"");location.href=""?"";</script>")
end if%>
<script language="javascript">
function jc(aa){		 
if(aa.SL_name.value==''){			
alert("对不起,您必须输入链接名称!");
return false;}
if(aa.SL_name.value.length>100){			
alert("对不起,连接名称不能超过100字!");
return false;}
if(aa.SL_url.value==''){
alert("对不起,链接地址不能为空!");
return false;}
if(aa.SL_url.value.length>100){			
alert("对不起,链接地址不能超过100字!");
return false;}
}
</script>
<form action="?abc=add&add=yes" method="post" name="form" id="form" onSubmit="javascript:return jc(this)">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td><table border="0" align="left" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1"><IMG SRC="../images/mytaobaobj1_3.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
            <td width="120" align="center" background="../images/mytaobaobj1_4.gif">添加链接<font color="#FFFFFF" span class="C">&nbsp;</font></td>
            <td width="1"><IMG SRC="../images/mytaobaobj1_6.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
          </tr>
        </table>
          <table border="0" align="left" cellpadding="0" cellspacing="0">
            <tr>
              <td width="1"><IMG SRC="../images/mytaobaobj1_8.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
              <td width="120" align="center" background="../images/mytaobaobj1_9.gif"><font color="#FF0000"><span class="C"><a href="?">管理链接</a></span></font></td>
              <td width="1"><IMG SRC="../images/mytaobaobj1_11.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
            </tr>
        </table></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="4" bgcolor="1E88C1"></td>
    </tr>
  </table>
  <br>
  <table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#efefef">
    
    <tr valign="middle" bgcolor="#f1f1f1">
      <td height="21" colspan="2" align="center" background="../image/bk.gif">&nbsp;</td>
      </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="99" height="25" align="center" bgcolor="#FFFFFF">链接名称</td>
      <td width="339" height="25" bgcolor="#FFFFFF"> <input name="SL_name" type="text" class="wenbenkuang" id="SL_name" size="67" maxlength="100"></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="99" height="25" align="center" bgcolor="#FFFFFF">链接地址</td>
      <td width="339" height="25" bgcolor="#FFFFFF"> <input name="SL_url" type="text" class="wenbenkuang" id="SL_url" size="67" maxlength="100"></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" colspan="2" align="center" bgcolor="#FFFFFF"> <input type="submit" value="Ok,确定" class="go-wenbenkuang"> 
        <input type="reset" value="No,取消" class="go-wenbenkuang">      </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1">
      <td height="21" colspan="2" align="center" background="../image/bk1.gif">&nbsp;</td>
    </tr>
  </table>
</form>
<%case else
if request("del")="yes" then
conn.execute("Delete * from ShopLink where shopid="&myuserid&" and SL_id="&shopnet("SL_id")&"")
end if%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table border="0" align="left" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1"><IMG SRC="../images/mytaobaobj1_3.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
        <td width="120" align="center" background="../images/mytaobaobj1_4.gif">友情链接<font color="#FFFFFF" span class="C">&nbsp;</font></td>
        <td width="1"><IMG SRC="../images/mytaobaobj1_6.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
      </tr>
    </table>
        <table border="0" align="left" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1"><IMG SRC="../images/mytaobaobj1_8.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
            <td width="120" align="center" background="../images/mytaobaobj1_9.gif"><font color="#FF0000"><span class="C"><a href="?abc=add">添加链接</a></span></font></td>
            <td width="1"><IMG SRC="../images/mytaobaobj1_11.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
          </tr>
        </table>
      <table border="0" align="left" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1"><IMG SRC="../images/mytaobaobj1_8.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
            <td width="120" align="center" background="../images/mytaobaobj1_9.gif"><font color="#FF0000"><span class="C"><a href="?">管理链接</a></span></font></td>
            <td width="1"><IMG SRC="../images/mytaobaobj1_11.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
          </tr>
      </table></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="4" bgcolor="1E88C1"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table><br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#efefef">
  
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="50" height="21" align="center" background="../image/bk.gif">ID</td>
      <td height="21" align="center" background="../image/bk.gif">链 接 名 称</td>
      <td width="120" height="21" align="center" background="../image/bk.gif">添加时间</td>
          
      <td width="50" height="21" align="center" background="../image/bk.gif">删 除</td>
    </tr>
<%Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * From ShopLink where shopid="&myuserid&" Order By SL_id DESC"
rs.open sql,conn,3,1

page1("15")

  if rs.eof then
  response.write "<tr><td colspan=4 align=center bgcolor=white height=21 valgin=bottom >您的店铺没有友情链接！</td></tr>"
  else	


i=1
do while not rs.eof and i<=rs.pagesize%>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="50" height="25" align="center" bgcolor="#FFFFFF"><%=rs("SL_id")%></a></td>
      <td height="25" bgcolor="#FFFFFF"><a href="<%=rs("SL_url")%>" target="_blank"><%=rs("SL_name")%></a> </td>
      <td width="120" align="center" bgcolor="#FFFFFF"><%=rs("SL_time")%></td>
      
    <td width="50" height="25" align="center" bgcolor="#FFFFFF"> <a href="?SL_id=<%=rs("SL_id")%>&del=yes">删除</a></td>
    </tr>
<%i=i+1
rs.MoveNext                                              
loop%>
    <tr align="center" valign="middle" bgcolor="#f1f1f1"> 
      <td height="21" colspan="5" background="../image/bk1.gif">
<%page2("")
rs.close:set rs=nothing
end if 
%></td>
    </tr>
  </table>
<%End Select%>
</td>
  </tr>
</table>
<!--#include file="../bottom.asp"-->
