【正文】
d)))If ytss_use And ytss_Pword Then sSql = select * from admin where tuz_super=39。后臺管理系統(tǒng)需要進(jìn)行身份驗(yàn)證,只有憑管理用戶和密碼才能登錄后臺。因此,通過程序控制,讓后臺在實(shí)現(xiàn)網(wǎng)站信息管理的同時(shí),簡單易用,符合人性化理念。要運(yùn)用后臺管理系統(tǒng),把管理網(wǎng)站變成一件輕而易舉的事,任何一個(gè)有計(jì)算機(jī)基礎(chǔ)的人都可以對網(wǎng)站內(nèi)容進(jìn)行調(diào)整、編輯和管理,而不需要網(wǎng)站方面的專業(yè)知識。 簽寫留言程序設(shè)計(jì)首先建立簽寫留言頁面如圖51所示圖 51 留言系統(tǒng)前臺鑒寫留言頁面結(jié)構(gòu)添加留言相關(guān)代碼如下:Set rs = () select * from guestbook,conn,1,3 rs(chenghu ) =trim(txtname) rs(myface ) =trim(txttitle) rs(homepage ) =trim(txt)rs(qq ) =trim(txt) rs(contenttitle ) =trim(txttitle) rs(content ) =trim(txt) rs(emot ) =invert2(txtarea) rs(recontent ) = rs(ip) =txtip set rs=nothing 查看程序設(shè)計(jì)建立留言顯示頁面如圖52所示:圖 51 留言系統(tǒng)前臺查看留言頁面結(jié)構(gòu)然后編寫查看留言相關(guān)代碼:%set rs=()sql=select * from guestbook order by id desc sql,conn,1,1if then(暫無信息)()end ifnumber=10 39。cint(id) sql,conn,3,3if or then (該新聞不存在)()end ifhit=rs(hit)%信息標(biāo)題:%=rs(title)%發(fā)布時(shí)間:%=rs(newstime)%信息內(nèi)容:%=rs(content)%實(shí)現(xiàn)效果圖如下: 留言板塊程序設(shè)計(jì)留言板塊的功能主要是提交留言數(shù)據(jù)并顯示。/td/tr/tableif theni=i+1exit forend ifnext%實(shí)現(xiàn)效果圖如下: 信息顯示頁程序設(shè)計(jì)%sql=update news1 set hit=hit+1 where id= amp。 border=0end if /a/tdtd amp。 …end ifif date()rs(newstime)+2 then img src=39。 39。 rs(newstime)amp。 rs(title) amp。 title=39。 target=39。 rs(id) amp。a href=39。 width=39。/tdtd style=39。1539。98%39。 order by id DESCend if sql,conn,1,1if then 暫無相關(guān)信息elsenumber=20 39。 and erid= amp。 order by id DESCelseer=oksql=select * from news1 where yiid= amp。 var focus_width=480 var focus_height=232 var text_height=18 var swf_height = focus_height+text_height var pics=imgUrl1+|+imgUrl2 var links=imgLink1+|+imgLink2 var texts=imgtext1+|+imgtext2 /script 信息標(biāo)題頁程序設(shè)計(jì)%set rs=()if trim(request(erid))= thensql=select * from news1 where yiid= amp。imgUrl2=images/。high(this) onMouseOut=low(this) height=180src=../dongimg/ width=200border=0/a/div/td /tr/tbody /tr/tbody/table/td/divSCRIPTvar speed=20=function Marquee1(){if(=0)=else{++}}var MyMar1=setInterval(Marquee1,speed)=function() {clearInterval(MyMar1)}=function() {MyMar1=setInterval(Marquee1,speed)}/SCRIPT(三)特效變換圖片相關(guān)代碼script type=text/javascriptimgUrl1=images/。 HEIGHT:180px align=lefttable border=0 align=center cellpadding=0 cellspacing=0 cellspace=0tbody tr td id=tpgd1 valign=toptable cellspacing=0 cellpadding=0 width=100% align=center border=0tbody trtd height=180div align=centera title=圖片說明 href=../webs/?id=3target=_blankimg onMouseOver==39。 border=0end if(顯示相關(guān)信息) /a/td/tr/tableloop(循環(huán)執(zhí)行)set rs=nothingend subcall readnews(yiid=12 and erid=11) %(二)特效滾動圖片區(qū)域相關(guān)代碼div id=tpgd style=OVERFLOW:hidden。 …end ifif date()rs(newstime)+2 then img src=39。(此段為點(diǎn)擊轉(zhuǎn)到詳細(xì)頁面設(shè)置)39。 ] amp。 [ amp。amp。_blank39。 39。?id= amp。borderbottom: 1px dotted cccccc39。trtd width=39。cellSpacing=0 cellPadding=0 border=0 style=39。 order by id desc sql,conn,1,1(此段為打開數(shù)據(jù)庫表)do while not table width=39。相關(guān)代碼如下:% sub readnews(string)set rs=()sql=select top 5 * from news1 where amp。 網(wǎng)站首頁程序設(shè)計(jì)網(wǎng)站首頁為一個(gè)網(wǎng)站的面子,不但要美觀,還要有各種特效,信息排版等。網(wǎng)站首頁菜單調(diào)用相關(guān)程序如下:tr td a href=◆本院首頁/a/td%set rst=()sql=select * from yikind where show=true order by yiorder sql,conn,1,1(打開數(shù)據(jù)庫)do while not %tda href=?yiid=%=rst(yiid)%◆%=rst(yiname)%/a/td%loop% /tr實(shí)現(xiàn)效果如下: 前臺顯示程序設(shè)計(jì)前臺程序的任務(wù)是把數(shù)據(jù)庫中的文章信息提取出來,顯示到相應(yīng)的欄目下,是直接在前臺頁面中編寫程序代碼來實(shí)現(xiàn)的。% 動態(tài)菜單設(shè)計(jì)網(wǎng)站動態(tài)菜單實(shí)現(xiàn)是先在數(shù)據(jù)庫中建立兩個(gè)儲存菜單的表yikind(存儲一級欄目菜單信息)、erkind(存儲二級欄目菜單信息),然后通過后臺菜單管理把需要的菜單添加到數(shù)據(jù)庫中,菜單管理還包含修改、刪除、菜單順序和菜單是否顯示設(shè)置等功能。%dim connset conn=() DBQ=+(../Data/)+。數(shù)據(jù)庫調(diào)用代碼為:!include file=../ 。圖 41數(shù)據(jù)庫設(shè)計(jì)示意圖建立數(shù)據(jù)表相關(guān)信息如下: 表1:Admin(存儲用戶信息)字段名數(shù)據(jù)類型字段大小備注ytssid自動編號長整型用戶自編號,主鍵tuz_supe文本50用戶名tuz_super_pas文本50密碼Admin_type文本50用戶級別表2:news1(存儲綜合信息)字段名數(shù)據(jù)類型字段大小備注id自動編號長整型信息自編號,主鍵yiid數(shù)字長整型一級菜單自編號erid數(shù)字長整型二級菜單自編號title文本50信息標(biāo)題newstime日期/時(shí)間日期文章發(fā)布時(shí)間content備注長整型文章內(nèi)容hit數(shù)字長整型文章瀏覽次數(shù)shoupic文本50圖片連接表3:yikind(存儲一級欄目菜單信息)字段名數(shù)據(jù)類型字段大小備注yiid自動編號長整型一級菜單自編號,主鍵yiname文本50一級菜單內(nèi)容show是/否1是否啟用菜單yiorder文本50一級菜單順序表4:erkind(存儲二級欄目菜單信息)字段名數(shù)據(jù)類型字段大小備注erid自動編號長整型二級菜單自編號,主鍵yiid數(shù)字長整型一級菜單自編號ername文本50二級菜單內(nèi)容show是/否1