<html><head></head><body bgcolor="#708EDF"></body></html>
<!--#include virtual="/conn.asp"-->
<!--#include virtual="/function/fd_function.asp"-->
<!--#include virtual="/db.asp"-->
<% 
set cn=fd_cn(cn)

mmc_title=trim(T(request.Form("mmc_title")))
mmc_url=T(request.Form("mmc_url"))
mmc_content=T(request.Form("mmc_content"))
if mmc_content="" then
Response.write "<script language=javascript>alert('请填写新闻内容！');history.back();</script>"
response.end()
end if
mmc_adduser=session("admin")


if T(request.QueryString("action"))="add" then            '商品添加-------------------------------

sql="select * from chinammc_news"
set rs=fd_rs(cn,sql)
rs.addnew
rs("mmc_title")=mmc_title
rs("mmc_content")=mmc_content
rs("mmc_adduser")=mmc_adduser
rs("mmc_url")=mmc_url
rs("mmc_adddate")=date()
rs.update

fd_free(rs)

Response.write "<script language=javascript>alert('添加成功！');"
Response.write "window.location='news_list.asp';</script>"
response.end

end if                                               '======商品添加完毕===========

if T(request.QueryString("action"))="edit" then         '=========商品修改======================

pro_id=T(request.Form("pro_id"))

sql="select * from chinammc_news where mmc_id="&pro_id&""
set rs=fd_rs(cn,sql)

rs("mmc_title")=mmc_title
rs("mmc_url")=mmc_url
rs("mmc_content")=mmc_content
rs("mmc_adduser")=mmc_adduser
rs.update

fd_free(rs)

Response.write "<script language=javascript>alert('修改成功！');"
Response.write "window.location='news_list.asp';</script>"
response.end

end if                                                


fd_free(cn)
%>