asp 後台批量管理程式

2022-05-27 09:03:09 字數 2360 閱讀 3712

asp程式(2009-05-02 12:10:19)

**▼標籤:

分類:程式設計

全選:批量刪除

action=request.form("action")

if action="del" then

delnum=request("num")

if delnum="" or isnull(delnum) then

response.write ""

response.end

end if

conn.execute("delete from guestbook where id in ("&delnum&")")

response.write ""

response.end

conn.close

set conn=nothing

end if

%>

當前記錄集不支援書籤。這可能是提供程式或選定的游標型別的限制

可能是因為:set rs=conn.execute("select * from kuan_type where kuanid like '%"&aboutid&"%' order by id desc")

要改成:set rs=server.createobject("adodb.recordset")

sql="select * from kuan_type where kuanid like '%"&aboutid&"%' order by id desc"

rs.open sql,conn,1,1

分頁跳轉頁

">

">

const maxperpage=5

dim totalput  

dim currentpage

dim totalpages

dim j

dim sql

if not isempty(request("page")) then

currentpage=cint(request("page"))

else

currentpage=1

end if

set rs=server.createobject("adodb.recordset")

rs.open "select * from book order by id desc",conn,1,1

if err.number<>0 then

response.write "資料庫中無資料"

end if

if rs.eof and rs.bof then

response.write "您還沒有新增新聞!

"else

totalput=rs.recordcount

if currentpage<1 then

currentpage=1

end if

if (currentpage-1)*maxperpage>totalput then

if (totalput mod maxperpage)=0 then

currentpage= totalput \ maxperpage

else

currentpage= totalput \ maxperpage + 1

end if

end if

if currentpage=1 then

showcontent

showpage totalput,maxperpage,"0001.asp"

else

if (currentpage-1)*maxperpage

尾頁" 

end if 

response.write "頁次:

"¤tpage&"

/"&n&"頁 " 

response.write "共有"&totalnumber&"條新聞 "

response.write "轉到:

" response.write " " 

end function 

%>

if request.form("update")="soedit" then

set rs2=server.createobject("adodb.recordset")

sql2="select * from book where id="&request.querystring("id")

rs2.open sql2,conn,1,3

rs2("dantime")=request("dantime")

rs2.update

rs2.close

set rs2=nothing

response.write ""

end if

%>

RPM套件管理程式

一 定義 rpm redhat package management 是以一種資料庫記錄的方式將所需要的套件安裝到linux主機的一套管理程式。它的特點是將要安裝的套件先編譯並打包,通過包裝好的套件中預設的資料庫記錄,記錄這個套件在安裝的時候需要依賴屬性模組。在安裝的時候,rpm會先根據套間裡的記錄...

linux 桌面管理程式

gome 2 kde 3 xmonade 在ubuntu下安裝這些 非常簡單,只需要 sudo apt get install 命令就可以完成 解除安裝以gnome為例 ctrl alt f1 f6,抑或進入恢復模式 黑屏情況下顯示卡出現問題只能在無圖形化介面下進行操作 sudo apt get r...

日誌管理程式rsyslog

0 emerg 系統不可用 1 alert 特別留意的報警資訊.2 crit 非常嚴重的狀況 3 err 錯誤資訊.4 warning 警告資訊 5 notice 稍微需要注意的資訊.6 info 正常資訊 7 debug 除錯資訊,開發人員使用.用來分個服務和日誌級別 任何服務,或者任何級別 表示...