<!--#include file="upload.inc"--> 
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../inc/base64.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="loginisok.asp"-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>保存信息 - <%=Dream_SiteTitle%></title>
<meta name="keywords" content="<%=Dream_SiteKeywords%>" />
<meta name="description" content="<%=Dream_SiteDescription%>" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
<meta name="format-detection" content="telephone=no" />
</head>
<body>
<%


action=request("action")
if action="addinfo" or action="editinfo"  then

if request.form("p_area")="请选择" then
Response.Write("<script language=""JavaScript"">alert(""错误提示：请先选择地区！！"");history.go(-1);</script>")
response.end
end if

if request.form("p_theme")="请选择" then
Response.Write("<script language=""JavaScript"">alert(""错误提示：请先选择分类！！"");history.go(-1);</script>")
response.end
end if

if request.form("p_title")="" then
Response.Write("<script language=""JavaScript"">alert(""错误提示：标题不能为空！！"");history.go(-1);</script>")
response.end
end if

if request.form("picurl")<>"" then
picurl=GetAllImgSrc_Info(request.form("picurl"))
else
picurl=""
end if


Set rs = Server.CreateObject("ADODB.Recordset")
if action="editinfo" then
sql="select * from Dream_Menpiao where id="&request.form("id")
rs.open sql,conn,1,3
rs("Dream_DefaultPicUrl")=replace(picurl,"../","")
rs("Dream_Title")=request.form("p_title")
rs("Dream_Content")=request.form("p_content")
rs("Dream_Content3")=request.form("p_content3")
rs("Dream_Content4")=request.form("p_content4")
rs("Dream_MapUrl")=request.form("p_mapurl")
rs("Dream_Area")=request.form("p_area")
rs("Dream_QQ")=request.form("p_qq")
rs("Dream_Theme")=request.form("p_theme")
rs("Dream_Address")=request.form("p_address")
rs("Dream_TitleCon")=request.form("p_titlecon")
rs("Dream_Bus")=request.form("p_bus")
rs("Dream_Phone")=request.form("p_phone")
if Dream_IdentityOK="通过验证" then
rs("Dream_IsOK")=true
else
rs("Dream_IsOK")=false
end if
rs("Dream_UserID")=Dream_UserName
else
sql="select * from Dream_Menpiao"
rs.open sql,conn,1,3
rs.addnew
rs("Dream_DefaultPicUrl")=replace(picurl,"../","")
rs("Dream_Title")=request.form("p_title")
rs("Dream_Content")=request.form("p_content")
rs("Dream_Content3")=request.form("p_content3")
rs("Dream_Content4")=request.form("p_content4")
rs("Dream_MapUrl")=request.form("p_mapurl")
rs("Dream_Area")=request.form("p_area")
rs("Dream_QQ")=request.form("p_qq")
rs("Dream_Theme")=request.form("p_theme")
rs("Dream_Address")=request.form("p_address")
rs("Dream_TitleCon")=request.form("p_titlecon")
rs("Dream_Bus")=request.form("p_bus")
rs("Dream_Phone")=request.form("p_phone")
if Dream_IdentityOK="通过验证" then
rs("Dream_IsOK")=true
else
rs("Dream_IsOK")=false
end if
rs("Dream_UpdateTime")=now()
rs("Dream_UserID")=Dream_UserName
end if
rs.update
rs.close
set rs=nothing
end if
session("imgurlstr")=""
if action="editinfo" then
Response.Write("<script language=""JavaScript"">alert(""提示：信息修改成功！！"");this.location.href='listinfo.asp';</script>")
else
Response.Write("<script language=""JavaScript"">alert(""提示：信息发布成功！！"");this.location.href='addinfo.asp';</script>")
end if
response.end
%>
</body>
</html>
