?? admin_achieve2.asp
字號(hào):
<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="format.asp"-->
<!--#include file="error.asp"-->
<!--#include file="body/incjs.asp"-->
<!--#include file="body/adminmenu.asp"-->
<!--#include file="body/UBBshow.asp"-->
<!--#include file="body/UBB_achieve.asp"-->
<!--#include file="body/adminachieve2_body.asp"-->
<!--#include file="body/foot.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
founderr=true
errmsg=errmsg+"<br>"+"<li>你尚未登錄,或者超時(shí)了!請(qǐng)<a href='admin.asp'>重新登錄</a>!"
call diserror()
response.end
else
if request.form("MM_insert") then
if request.Form("action")="newachieve" then
sql="select * from achieve"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
dim title,achievefrom,keyword,content
achievefrom=trim(replace(request.form("achieve_from"),"'",""))
title=trim(replace(request.form("achieve_title"),"'",""))
keyword=trim(replace(request.form("achieve_keyword"),"'",""))
content=trim(replace(request.form("achieve_content"),"'",""))
if achievefrom="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫教學(xué)成果的來源!"
else
rs("achieve_from")=achievefrom
end if
if title="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的標(biāo)題!"
else
rs("achieve_title")=title
end if
if keyword="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的關(guān)鍵字!"
else
rs("achieve_keyword")=keyword
end if
if content="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的內(nèi)容!"
else
rs("achieve_content")=content
end if
if founderr then
call diserror()
response.end
else
rs.update
rs.close
set rs=nothing
sql="update allcount set achievecount = achievecount + 1"
conn.execute(sql)
closedatabase
response.redirect "admin_achieve1.asp"
end if
end if
if request.Form("action")="editachieve" then
if request.Form("id")="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須指定操作的對(duì)象!"
else
if not isInteger(request.form("id")) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的文章id參數(shù)。"
end if
end if
if founderr then
call diserror()
response.End
end if
sql="select * from achieve where achieve_id="&cint(request.Form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
achievefrom=trim(replace(request.form("achieve_from"),"'",""))
title=trim(replace(request.form("achieve_title"),"'",""))
keyword=trim(replace(request.form("achieve_keyword"),"'",""))
content=trim(replace(request.form("achieve_content"),"'",""))
if achievefrom="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的來源!"
else
rs("achieve_from")=achievefrom
end if
if title="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的標(biāo)題!"
else
rs("achieve_title")=title
end if
if keyword="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的關(guān)鍵字!"
else
rs("achieve_keyword")=keyword
end if
if content="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須填寫文章的內(nèi)容!"
else
rs("achieve_content")=content
end if
if founderr then
call diserror()
response.end
else
rs.update
rs.close
set rs=nothing
response.redirect "admin_achieve1.asp"
end if
end if
if request.Form("action")="delachieve" then
if request.Form("id")="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須指定操作的對(duì)象!"
else
if not isInteger(request.form("id")) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的文章id參數(shù)。"
end if
end if
if founderr then
call diserror()
response.End
end if
sql="select * from achieve where achieve_id="&cint(request.Form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.delete
rs.close
set rs=nothing
sql="update allcount set achievecount = achievecount - 1"
conn.execute(sql)
closedatabase
response.redirect "admin_achieve1.asp"
end if
end if
call adminachieve2_body()
call endpage()
end if
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -