土
土土
Unregistered / Unconfirmed
GUEST, unregistred user!
set upload=new upload_5xSoft ''建立上传对象
edit_type=upload.form("info_action") '编辑类型
infoid=cint(upload.form("infoid"))
station=upload.form("station")
infotitle=upload.form("title")
infocontent=upload.form("content")
%>
<%
if edit_type="add_new" then
'当添加新信息时
str1="insert into info(station,infotitle,infocontent,issuedate) values('" &
station &
"','"&infotitle&"','"&infocontent&"',"&now()&")"
Application.Lock
conn.Execute(str1)
Application.UnLock
'Response.Write session("current_newsort")
title_str="添 加 信 息"
msg_str="<b><font color=red>添加成功!</font></b><br><br>"
msg_str=msg_str &
"<a href='list_info.asp'>浏览信息</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='add_info.asp'>继续添加信息</a>"
return_to_add
else
if edit_type="edit" then
'当修改信息时
info_id=upload.form("infoid") '取得要修改的新闻ID号
str1="UPDATE info SET "
str1=str1 &
"station='" &
station &
"',"
str1=str1 &
"infotitle='" &
infotitle &
"',"
str1=str1 &
"infocontent='" &
infocontent &
"'"
str1=str1 &
" where infoid=" &
info_id
Application.Lock
conn.Execute(str1)
Application.UnLock
edit_type=upload.form("info_action") '编辑类型
infoid=cint(upload.form("infoid"))
station=upload.form("station")
infotitle=upload.form("title")
infocontent=upload.form("content")
%>
<%
if edit_type="add_new" then
'当添加新信息时
str1="insert into info(station,infotitle,infocontent,issuedate) values('" &
station &
"','"&infotitle&"','"&infocontent&"',"&now()&")"
Application.Lock
conn.Execute(str1)
Application.UnLock
'Response.Write session("current_newsort")
title_str="添 加 信 息"
msg_str="<b><font color=red>添加成功!</font></b><br><br>"
msg_str=msg_str &
"<a href='list_info.asp'>浏览信息</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='add_info.asp'>继续添加信息</a>"
return_to_add
else
if edit_type="edit" then
'当修改信息时
info_id=upload.form("infoid") '取得要修改的新闻ID号
str1="UPDATE info SET "
str1=str1 &
"station='" &
station &
"',"
str1=str1 &
"infotitle='" &
infotitle &
"',"
str1=str1 &
"infocontent='" &
infocontent &
"'"
str1=str1 &
" where infoid=" &
info_id
Application.Lock
conn.Execute(str1)
Application.UnLock