<!--#include file="main.asp"-->
<%if request("action")="save" then
dlxf_sortid=request("dlxf_sortid")
dlxf_name=request("dlxf_name")
dlxf_collection=request("dlxf_collection")

if left(dlxf_collection,7)<>"http://" or len(dlxf_collection)<10 then
errstyle="·对不起，请填写正确收藏地址！"
scripterr
end if

set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_collection where dlxf_yp_id="& session("id")
rs.open sql,conn,1,3
if userflag22<>0 then
if rs.recordcount >= cint(userflag22) then
errstyle="·您是"&dlxf_user_flagdj&"，只能上传最多 "&userflag22&" 个收藏地址！"
scripterr
end if
else
errstyle="·对不起，此功能已对"&vipshow&"关闭！"
scripterr
end if

rs.addnew
rs("dlxf_sortid")=dlxf_sortid
rs("dlxf_name")=dlxf_name
rs("dlxf_collection")=dlxf_collection
rs("dlxf_yp_id")=session("id")
rs.update
rs.close
set rs=nothing

response.write "<script>alert('操作成功，谢谢您的参与！');window.close();</Script>"
Response.End 

end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
.inp{color:white;
background:FF7900;
border-top:#FCFF00 1px solid;
border-left:#FCFF00 1px solid;
border-bottom:#AA1000 1px solid;
border-right:#AA1000 1px solid
}
</style>
<title>加入收藏 - <%=citytitle%></title>
<body bgcolor="menu" onkeydown='if((event.ctrlKey)||(event.keyCode==116)){event.keyCode=0;return false}' style="border:0;margin:5">

<table width="100%" height=100% border="0" cellspacing="0" cellpadding="0">
<tr><td align=center>
<%
if userflag26=0 or userflag22=0 or userflag9=0 or dlxf_user_vip=1 or session("id")="" then
response.write "<script>alert('操作出错，下面是产生错误的可能原因：\n\n·您未登录或还没有注册！\n\n·您不允许使用此功能！');window.close();</Script>"
Response.End 
end if

tit=request("tit")
page=request("page")
if tit<>"" or page<>"" then%>
<!--======================-->
<table width="100%" border="0" cellspacing="0" cellpadding="5" align=center>
<form name="addform" method="post" action="collection.asp?action=save" onSubmit="return checkdata()">
<tr><td><select name="dlxf_sortid">
<option value=0 selected>不分类</option>
<%set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_collection_sort where dlxf_yp_id="&session("id")&" order by dlxf_date desc"
rs.open sql,conn,1,1
do while not rs.eof%>
<option value=<%=rs("dlxf_id")%>><%=rs("dlxf_collection_sort")%></option>
<%rs.movenext
loop
rs.close
set rs=nothing%></select>　<a href=# onclick="javascript:window.open('user/my_collection_sort.asp','_blank','');window.close()" class=red>新增分类</a>　<a href=user/my_collection.asp class=red target=_blank>我的收藏</a></td></tr>
<tr><td>标题 <input name="dlxf_name" type="text" size="30" maxlength="50" value="<%=tit%>"></td></tr>
<tr><td>地址 <input name="dlxf_collection" type="text" size="40" maxlength="50" value="<%=application("cityurl")&page%>"></td></tr>
<tr><td><input type="submit" name="Submit" value=" 添 加 " class=inp>　<input type="button" onclick="window.close()" name="Submit" value=" 关 闭 " class=inp></td></tr>
</form>
</table>
<!--======================-->
<%end if%>	
</td></tr>
</table>

