【正文】
...5030 引 言隨著中國加入 WTO 及全球經(jīng)濟一體化進程的加快,世界經(jīng)濟已由工業(yè)化經(jīng)濟逐步進入網(wǎng)絡(luò)信息化時代。它打破了地域限制,真正使信息得以共享,改變了人們的工作和生活方式。所謂動態(tài)內(nèi)容是由每一個用戶按照自己的需求發(fā)出請求而特殊制作的 Web 網(wǎng)頁。 新聞發(fā)布系統(tǒng)的分類1. 前臺動態(tài)顯示的新聞發(fā)布系統(tǒng)其主要特點是前臺采用編程語言動態(tài)讀取數(shù)據(jù)庫的內(nèi)容,隨時更新,該類系統(tǒng)設(shè)計簡單,適合大多數(shù)中小企業(yè)建站需要,通用性不強,一般需要量身定做,不適合大型新聞?wù)军c,當(dāng)用戶過多時,編程語言動態(tài)讀取數(shù)據(jù)庫就勢必消耗大量的服務(wù)器資源,造成系統(tǒng)運行緩慢,甚至崩潰,同時由于前臺新聞是動態(tài)從數(shù)據(jù)庫中讀取,導(dǎo)致前端用戶直接接觸到數(shù)據(jù)庫,很容易造成一些不安全的因素,例如:SQL Injection。 6. 系統(tǒng)管理員為網(wǎng)站信息管理系統(tǒng)中的最高權(quán)限(即具備從后臺輸入、修改、刪除新聞的權(quán)限),其他人員只能具備新聞查看權(quán)限7. 信息檢索模塊,可按關(guān)鍵字、標(biāo)題、作者、來源、發(fā)布時間。系統(tǒng)中設(shè)置的個人辦公管理模塊,為個人辦公提供了一個更為方便的管理平臺,大大提高個人辦公的工作效率,進而提高整個企業(yè)的辦公效率。管理新聞分類包括對新聞分類名稱作修改,也可將任一分類名刪除,刪除后其分類下的所有新聞也將被刪除。4. 用戶管理模塊:主要包括超級用戶、普通用戶兩種登錄情況。url(defaulthomepage)39。 and 密碼=39。返回/a/center end if%2,登錄處理頁面%session(userlabel)=0session(user)=guestunm=(user)pwd=(pwd)if (lb)=1 then end ifif unm and pwd then%!include file =%sql=select * from user where 用戶名=39。set user1=(sql)if not thensession(userlabel)=1session(user)=unmsession(name)=user1(真實姓名) else eter賬號或密碼錯誤br/center13 centera href=39。unmamp。進入管理頁面/abr a href=39。39。 trim((user)) amp。(pwd1)amp。(shengri)amp。(dizhi)amp。) sql center注冊成功!a href=39。amp。amp。amp。amp。amp。39。amp。amp。amp。39。3 站內(nèi)的相關(guān)推薦新聞及網(wǎng)站說明 4 主要用于把站內(nèi)所有的最新新聞例舉出來3. 每個網(wǎng)頁的代碼:!該頁面主要顯示用戶的統(tǒng)計信息和網(wǎng)站的最新動態(tài)。session(user)amp。now()amp。39。 cstr(date())20set rs2=(sql)yousuns=rs2(0)if yousuns 0 thenyousuns=0end ifif last= thenlast=0end ifsql=update firstlink set 訪問次數(shù)=39。(sql)sql=update firstlink set IP=39。(sql)sql=update firstlink set 上次訪問時間=39。(sql)%!/tdtd width=465height=300 background=image/ align=center /tdtd height=300 align=right width=300!img src=image/ border=0/img!table border=0 width=300tr background=image/ bordercolor=FFFFFFtd background=image/ width=18 height=25/tdtd width=180 height=20 background=image/ align=right font color=0 size=224 小時/font /td td width=136 height=25 background=image/ /td /tr /table table border=1 bordercolor=CCCCCC cellpadding=0 cellspacing=0 width=300 %39。order by 瀏覽次數(shù) desc 39。網(wǎng)頁39。b. 專欄網(wǎng)頁代碼. !include file=table border=1 bordercolor=4e4332 cellpadding=0 cellspacing=0 background=image\ width=992 align=left tr width=500 !圖片滾動新聞 td height=50 colspan=2 background=image\ marquee a href=img src=image\ border=0/a/imga href=img src=image\ border=0/a/imga href=img src=image\ border=0/a/img/marquee /td ! /tr tr align=top ! td width=394 height=200 align=center bordercolor=0embed src=swf\ allowfullscreen=true wmode=opaque width=250 height=200/embed /td ! td width=592 bordercolor=4e4332 bgcolor=ffffff table tr td align=leftheight=10 background=image\ font color=FFFFFF最新動態(tài)/font /td td width=30background=image\ a href=/a /td /tr tr height= td align=leftheight=290 colspan=2 % sql=select top 10 編號,標(biāo)題 from newsdata order by 發(fā)布時間 desc set rs=(sql) i=0 do while not and i10 % lia href=?id=%=trim(rs(0))%29 font size=1%=rs(1)%/font/a/li % i=i+1 loop% /td /tr tr height=1 td align=leftheight=1 bgcolor=CCCCCC/td /tr /table /td ! /trtrtd colspan=2background=image\font color=ffffff推薦/font /td/tr tr ! td align=left bordercolor=CCCCCC bgcolor=ffffff % sql=select top 30 編號,標(biāo)題,瀏覽次數(shù) from newsdata order by 瀏覽次數(shù) desc set rs=(sql) i=1 do while not and i10 % a href=?id=%=rs(0)%.font size=1%=rs(1)% %=rs(2)%/font/abr % i=i+1 loop % ! /td td align=left bordercolor=CCCCCCbgcolor=ffffff % i=1 do while not and i10 % a href=?id=%=rs(0)%.font size=1%=rs(1)% %=rs(2)%/font/abr % i=i+1 loop %! 30 /td /tr trtd colspan=2background=image\font color=ffffff最有影響力的文章/font /td/tr tr ! td align=left bordercolor=CCCCCC bgcolor=ffffff % sql=select 標(biāo)題,count(*) from pinglun group by 標(biāo)題 order by count(*) desc set rs=(sql) i=1 do while not and i10 sql=select 編號 from newsdata where 標(biāo)題=39。 (sql) end if if not then % a href=?id=%=rs1(0)%font size=2%=rs(0)% (%=rs(1)%)/font/abr % i=i+1 end if loop 39。rs(0)amp。查詢關(guān)注的分類 set rs=(sql)%%i=1do while not % a href=?id=%=rs(0)%font color=0 size=1◆%=left(rs(1),9)%/font/a font color=FF0000 size=1%=(rs(2))%/font %if i=2 then bri=0end ifi=i+1loop%/td /tr /table !end /td /tr/table!end /td/tr/table! 現(xiàn)在還沒加內(nèi)容所以代碼沒弄!26 友情鏈接區(qū)1. 友情鏈接區(qū)的運行結(jié)果 如圖 641 所示2. 網(wǎng)頁分析一般新聞網(wǎng)頁都有友情鏈接 這樣可以拉動網(wǎng)頁的流動量,所以為了該模塊的擴展。程序39。 cstr(date()) set rs=(sql)21 i=0do while not and i14% tr bordercolor=FFFFFFtdimg s