<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
<!--#include file="../../conn/md5.asp"-->
<!--#include file="../../conn/headpage.asp"-->
 <%
if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
if session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
action=request("action")
if action="add" then
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * From snsn_shoucang",conn,1,3
rs.addnew
rs("webname")=nosql(request("webname"))
rs("url")=nosql(request("url"))
rs("sm")=nosql(request("sm"))
rs("u_id")=session("id")
rs("xs")=nosql(request("xs"))
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('添加成功，正在返回！');"
response.write"this.location.href='shoucang.asp';</SCRIPT>"
response.end
elseif action="save" then
id=nosql(request("id"))
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * From snsn_shoucang where id="&id,conn,1,1
if rs.eof and rs.bof then 
response.write "<script language='javascript'>"
response.write "alert('对不起，没有您要查询的信息！');"
response.write"this.location.href='shoucang.asp';</SCRIPT>"
response.end
else 
webname=rs("webname")
url=rs("url")
sm=rs("sm")
xs=rs("xs")
end if
rs.close
set rs=nothing
elseif action="edit" then
if isChkInteger(request("id")) then
id=request("id")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作，正在返回！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * From snsn_shoucang where id="&id,conn,1,3
if rs.eof and rs.bof then 
response.write "<script language='javascript'>"
response.write "alert('对不起，没有您要查询的信息！');"
response.write"this.location.href='shoucang.asp';</SCRIPT>"
response.end
else 
rs("webname")=nosql(request("webname"))
rs("url")=nosql(request("url"))
rs("sm")=nosql(request("sm"))
rs("u_id")=session("id")
rs("xs")=nosql(request("xs"))
rs.update
end if
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('修改成功，正在返回！');"
response.write"this.location.href='shoucang.asp';</SCRIPT>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>交易助手管理操作平台_<%=webname%></title>
<link rel="stylesheet" href="/css.css" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<body><!--#include file="../../top.asp"-->
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td width="970"><table width="970"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="10"><img src="/img/m_left.gif" width="10" height="20"></td>
          <td width="950" bgcolor="#FFFFFF"></td>
          <td width="10"><img src="/img/m_right.gif" width="10" height="20"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="188" colspan="3"><table width="950"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="1" bgcolor="efefef"></td>
                <td width="200" height="77" valign="top"><!--#include file="../left.asp"--></td>
                <td width="1" bgcolor="efefef"></td>
                <td valign="top"><table width="90%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="25">&nbsp;<a href="shoucang_add.asp">我要添加收藏记录</a></td>
                  </tr>
                </table>
                  <CENTER>
                    <Form name="search" method="POST" action="shoucang_add.asp?action=<%if request("action")="save" then%>edit&id=<%=id%><%else%>add<%end if%>">
                      <table width="90%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#BBD7FF">
                        <tr>
                          <td bgcolor="#e8f4ff">添加收藏</td>
                        </tr>
                        <tr>
                          <td bgcolor="#FFFFFF">收藏名称：
                              <input name="webname" type="text" class="wenbenkuang" id="webname" value="<%=webname%>" size="45"></td>
                        </tr>
                        <tr>
                          <td bgcolor="#FFFFFF">收藏地址：
                              <input name="url" type="text" class="wenbenkuang" id="url" value="<%=url%>" size="45">
          如外部地址，请加上HTTP://</td>
                        </tr>
                        <tr>
                          <td bgcolor="#FFFFFF">收藏说明：
                              <textarea name="sm" cols="80" rows="6" class="wenbenkuang" id="sm"><%=sm%></textarea></td>
                        </tr>
                        <tr>
                          <td bgcolor="#FFFFFF"><input name="Submit" type="submit" class="go-wenbenkuang" value="提交">
                              <input name="Submit2" type="reset" class="go-wenbenkuang" value="重置">
                              <input name="xs" type="radio" value="0" <%if xs=0 or xs="" then%>checked<%end if%>>
          对外公开
          <input type="radio" name="xs" value="1" <%if xs=1 then%>checked<%end if%>>
          不对外公开</td>
                        </tr>
                      </table>
                    </form>
                  </center>
                  <center>
                  </center>
                </td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td valign="top"><img src="/img/index_img.jpg" width="10"></td>
  </tr>
</table>
<!--#include file="../../end.asp"-->
</body>
</html>
