【正文】
pid)name。=$pager))。$partmodel = Part::model()findAll()。id39。修改成功39。修改失敗39。=$parts))。if($catemodeldeletebypk($_GET[39。info39。)。圖414 文章列表界面 (2)程序?qū)崿F(xiàn)public function actionList(){ $articlemodel = Article::model()。 foreach($arts as $art){ $artame = $catemodelfindByPk($artcid)name。 }該方式為分離Model模型方式查詢所屬版塊和回帖數(shù),需要改進(jìn)的就是所有的屬性都分開,減少代碼冗余。info39。)。圖416 回帖列表界面(2)程序?qū)崿F(xiàn) 在這里只介紹一下分離model模型的方式功能代碼的實(shí)現(xiàn)。$pagerpageSize = 2。=$ments,39。 if($mentmodeldeletebypk($_GET[39。info39。本文切合該系統(tǒng)的設(shè)計(jì)背景及意義,針對(duì)校園購(gòu)物系統(tǒng)的系統(tǒng)結(jié)構(gòu)設(shè)計(jì)、開發(fā)模塊、功能設(shè)計(jì),給出了詳細(xì)的分析和描述。對(duì)于這樣的軟件開發(fā),由于時(shí)間關(guān)系,沒有很深入的進(jìn)行系統(tǒng)分析,所以在開發(fā)過程中遇到了許多棘手的問題,希望在今后的學(xué)習(xí)中,逐步的進(jìn)行改進(jìn)。[D]. 吉林大學(xué). 2012[11] 康賢昆. [J]. 微計(jì)算機(jī)信息. 2006 ,5(4):4059.。參 考 文 獻(xiàn)[1] 潘凱華,劉中華.PHP 從入門到精通(第 2 版)[M].北京:清華大學(xué)出版社,2010.[2] 劉中華,潘凱華.PHP 項(xiàng)目開發(fā)案例全程實(shí)錄(第 2 版)[M].北京:清華大學(xué)出版社,2011.[3] 王志剛,朱蕾.PHP5 應(yīng)用實(shí)例詳解:使用ZendFrameworkamp。本網(wǎng)站的功能還要在以后進(jìn)一步的修改和擴(kuò)展。))。)。下面介紹了該功能Controller層的部分代碼。 }$thisrender(mentlist,array(39。 $count = $mentmodelcount($cdb)。查詢出發(fā)表時(shí)間對(duì)前臺(tái)展示發(fā)表時(shí)間有更新作用。,39。id39。pages39。 $arts = $articlemodelfindAll($cdb)。 文章管理功能 查看文章列表查看文章列表功能模塊主要有查看該文章的信息以及作者和所屬板塊和回帖數(shù)。,39。)。])。=$data,39。info39。info39。]。id39。=$cates,39。$partmodel = Part::model()。下面部分是代碼的實(shí)現(xiàn)過程。}圖412 添加版塊界面 版塊管理本小節(jié)描述了版塊管理功能,主要是編輯版塊名稱和刪除版塊,對(duì)包含文章的版塊,要先刪除該版塊下的所有文章才能刪除該版塊。foreach($data as $part){ $parts[$partid] = $partname。cate/add39。Category39。 }圖411 刪除失敗界面 版塊管理功能 添加版塊添加版塊功能主要是為整個(gè)論壇系統(tǒng)中每個(gè)分區(qū)下添加新的版塊,每天都有新的話題,版塊也不斷地更新。 } }else{ Yii::app()usersetFlash(39。,39。 $data = Category::model()findAll(39。,array(39。))。name39。 if(!empty($_POST[39。parts39。 $count = $partmodelcount($cdb)。}圖49添加分區(qū)界面圖410分區(qū)分頁(yè)顯示界面 分區(qū)管理本小節(jié)描述了分區(qū)管理功能,主要是編輯分區(qū)名稱和刪除分區(qū),對(duì)包含版塊的分區(qū),要先刪除該分區(qū)下的版塊才能刪除分區(qū)。)。info39。點(diǎn)擊Submit按鈕,在彈出的對(duì)話框里,輸入不同的分區(qū)名稱可以在前臺(tái)顯示出剛剛添加的分區(qū),如果數(shù)據(jù)庫(kù)中已有該分區(qū),則添加分區(qū)失敗,詳細(xì)代碼如下。profilemodel39。,39。]))。face39。 $thumbsavePath($upfile,120,120,$dir,39。 if($upload){ $dir = ./assets/uploads/avar。=$datasex,39。Profile39。id39。pages39。 $total = $usermodelcount($criteria)。))。public function actionIndex(){ $usermodel = User::model()。info39。repass39。CActiveForm39。39。repass39。password39。username39。39。 } }else{ Yii::app()usersetFlash(39。,39。 $profilemodeluid = $usermodelgetPrimaryKey()。 if($usermodelvalidate()){ $usermodelpassword =md5($usermodelpassword)。public function actionAdd(){$usermodel = new User()。圖 42 系統(tǒng)首頁(yè)部分截圖圖43 系統(tǒng)登陸界面圖44 瀏覽文章界面為提升用戶體驗(yàn),發(fā)帖采用了UEditor網(wǎng)絡(luò)文本編輯器,用戶發(fā)帖界面如圖45所示。在頂級(jí)分區(qū)下模塊區(qū)可以查看對(duì)應(yīng)模塊下的文章及回帖總數(shù),及文章和回帖的最后發(fā)表時(shí)間。 imagecopyresized($i,$s,$toX,$toY,0,0,$trueW,$trueH,$sW,$sH)。 $biliW=$sW/$toW。 break。image/jpeg39。 imagefill($i,0,0,$white)。論壇系統(tǒng)中一定有搜索功能,以前的搜索大多利用Sql語句實(shí)現(xiàn),但是當(dāng)系統(tǒng)用戶特別多的時(shí)候,頻繁的進(jìn)行數(shù)據(jù)庫(kù)操作,會(huì)給數(shù)據(jù)庫(kù)服務(wù)器帶來很大的壓力,本系統(tǒng)采用Sphinx全文檢索實(shí)現(xiàn)系統(tǒng)的搜索功能[15],Sphinx單一索引最大可包含1億條記錄,(毫秒級(jí))。數(shù)據(jù)庫(kù)設(shè)計(jì)符合范式。論壇版塊表結(jié)構(gòu)設(shè)計(jì)如表34所示。回帖管理功能:管理員對(duì)前臺(tái)游客以及會(huì)員回帖進(jìn)行管理,對(duì)不符合論壇要求的回復(fù)進(jìn)行刪除。(2)瀏覽帖子功能:在頂級(jí)分區(qū)下模塊區(qū)可以查看對(duì)應(yīng)模塊下的文章及回帖總數(shù),及文章和回帖的最后發(fā)表時(shí)間。 系統(tǒng)通用性本系統(tǒng)代碼編寫嚴(yán)格符合在Linux下要求,因此在Linux下也能正常運(yùn)行,通常系統(tǒng)最后發(fā)布都要發(fā)布在Linux系統(tǒng)下[12]。瀏覽器通過Web Server 同數(shù)據(jù)庫(kù)進(jìn)行數(shù)據(jù)交互[10]。從硬件上講,計(jì)算機(jī)硬件的速度現(xiàn)在已經(jīng)不是問題,大容量高速度的硬盤十分普遍了,同時(shí)網(wǎng)絡(luò)速度的提高,這些為系統(tǒng)的運(yùn)行打下了堅(jiān)實(shí)的基礎(chǔ)。其中最主要的一個(gè)特點(diǎn)是在插件內(nèi)部既可以為編輯器注冊(cè)命令,也可以為編輯器綁定監(jiān)聽事件。Sphinx特別為一些腳本語言設(shè)計(jì)搜索API接口,如PHP,Python,Perl,Ruby等,同時(shí)為MySQL也設(shè)計(jì)了一個(gè)存儲(chǔ)引擎插件[8]。Yii采用嚴(yán)格的OOP編寫,并有著完善的庫(kù)引用以及全面的教程。Zend Studio支持PHP語法加亮顯示,支持語法自動(dòng)填充功能,支持書簽功能,支持語法自動(dòng)縮排和代碼復(fù)制功能,內(nèi)置一個(gè)強(qiáng)大的PHP代碼調(diào)試工具,支持本地和遠(yuǎn)程兩種調(diào)試模式,支持多種高級(jí)調(diào)試功能[6]。利用Sqlyog數(shù)據(jù)庫(kù)管理工具實(shí)現(xiàn)對(duì)數(shù)據(jù)庫(kù)的管理和操作。論壇系統(tǒng)的研究目標(biāo)是前臺(tái)對(duì)所有的數(shù)據(jù)進(jìn)行展示,以及利用網(wǎng)絡(luò)文本編輯器實(shí)現(xiàn)發(fā)帖和回帖。通過BBS論壇的方式,使用者可以在論壇上發(fā)布各項(xiàng)通知,可以讓用戶,游客能夠及時(shí)準(zhǔn)確的了解想要了解的動(dòng)態(tài),同時(shí)通過交流平臺(tái)能夠展示每一個(gè)用戶的各種能力,發(fā)布個(gè)人對(duì)一些事物的看法,增強(qiáng)人與人之間,團(tuán)體與團(tuán)體之間,個(gè)人與團(tuán)體之間的互動(dòng)交流。如針對(duì)網(wǎng)絡(luò)社會(huì)中的人際關(guān)系、行為方式、價(jià)值觀念和社會(huì)結(jié)構(gòu)等,對(duì)虛擬社區(qū)的自身特征及虛擬社區(qū)中的社會(huì)問題等進(jìn)行廣泛研究。多數(shù)研究者認(rèn)為,BBS論壇簡(jiǎn)單,易用,實(shí)用的特點(diǎn)日益突出,今后BBS論壇將向個(gè)性化和專業(yè)化的方向發(fā)展。BBS論壇系統(tǒng)突破了地域和時(shí)間的限制,實(shí)現(xiàn)了全球性資源共享,有助于人們學(xué)習(xí),工作,生活,同時(shí)提高了人們的交流信息、思想和解決問題的能力。它是一種交互性強(qiáng),內(nèi)容豐富而即使的Internet電子信息服務(wù)系統(tǒng)。 fulltext search。本系統(tǒng)使用Zend Studio集成開發(fā)環(huán)境編寫,并使用基于MVC模式的Yii框架技術(shù)進(jìn)行開發(fā)。 密級(jí): 基于PHP框架的社區(qū)論壇管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)Research Php BBS Forum Management System Based on Yii Framework摘 要社區(qū)論壇管理系統(tǒng)是互聯(lián)網(wǎng)上的一種電子信息服務(wù)系統(tǒng)。本文較為詳盡的闡述了主要功能模塊的實(shí)現(xiàn)過程。s BBS forum system features richer, allowing users to share between the tools and software, technical documentation and other resources. How to design the stability of the BBS system, each developer must consider the problem, a successful BBS system can greatly improve the bearing of this forum website click rate, in order to make a forum system play a greater role, the enterprise user added to the products, services, and other content are discussed, the development of enterprises has a good role in promoting.This paper introduces the background and significance of the research and the development of the domestic and foreign, and introduces the technology of the subject.. Combined with the business users basic requirements, detailed analysis and research, identify seven modules: individual user management function, the content of the Forum display function, member management and maintenance functions, partition management and maintenance functions, sector management and maintenance functions, article management function and replies management function, including the main function of the system. This paper expounds the realization of the main function modules in detail..This system uses Studio Zend integrated development environment, and uses the Yii framework technology based on MVC mode to develop. Use Sphinx fulltext search engine to achieve the article search. System foreground data using file caching and Memcache caching technology can greatly improve the user experience. Database using the Oracle Corp Mysql database, using SQLyog to achieve the database management and operation. In the premise of the object oriented programming technology, the concrete realization of the system is pleted.. The system has solved the pressure of the website under the