freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于ssh的個人信息博客網(wǎng)站的設(shè)計與實現(xiàn)--畢業(yè)設(shè)計(編輯修改稿)

2024-12-29 00:23 本頁面
 

【文章內(nèi)容簡介】 分類導(dǎo)航條主要通過訪問 Action 來實現(xiàn)超鏈接。 登錄進入博客后首頁如 圖 45 所示 : 圖 45 個人主頁 個人資料修改頁面 如 圖 46 所示 : 圖 46 會員資料修改 登錄后,用戶可以查看日志及日志評論、刪除日志、寫日志、發(fā)表新日志時可以選擇或添加日志類型,選擇是否對外公開。 頁面設(shè)計效果如圖 4 4 49 所示 : 11 圖 47 日志管理 圖 48 發(fā)表日志 關(guān)鍵程序代碼如下: public ActionForward doWriteEssay(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { User loginedUser = (User) ().getAttribute( loginedUser)。 Essay essay = new Essay()。 ((title))。 ((contents))。 EssayType essayType = ((request .getParameter(typeId)))。 (essayType)。 (((selfish)))。 12 ((0))。 (new Date())。 (loginedUser)。 (essay)。 (?operate=toMyEssay)。 return null。 } 圖 49 日志 頁面 相冊功能模塊的實現(xiàn) 登錄后,用戶可以查看圖片、刪除圖片、上傳圖片、上傳圖片時可以選擇或創(chuàng)建新相冊,選擇是否對外公開。頁面設(shè)計效果如圖 4 411 所示: 圖 410 相冊管理 13 圖 411 上傳圖片 關(guān)鍵程序代碼如下: public ActionForward doAddAlbum(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { (GBK)。 PrintWriter printWriter = ()。 User loginedUser = (User) ().getAttribute( loginedUser)。 UploadForm myForm = (UploadForm) form。 FormFile myFile = ()。 long typeId = ()。 int selfish = ()。 AlbumType albumType = (typeId)。 if (myFile != null) { String type = ()。 if ((image/pjpeg) || (image/gif) || (image/jpg) || (image/png) || (image/bmp)) { try { if (().length 10 * 1024 * 1024) { (文件大?。? 14 + ().length + byte)。 (文件大于 10M)。 printWriter .println(scriptalert(39。上傳文件大于 10M,上傳失敗39。)。(1)。/script)。 return null。 } String dir = (true).getServletContext() .getRealPath(/upload)。 File file1 = new File(dir + / + ())。 File file2 = new File(file1 + / + ())。 if (!()) { ()。 } if (!()) { ()。 } FileOutputStream fos = new FileOutputStream(file2 + / + ())。 (())。 ()。 ()。 } catch (Exception e) { ()。 printWriter .println(scriptalert(39。 上 傳 文 件 錯 誤 , 上 傳 失 敗39。)。(1)。/script)。 return null。 } Album album = new Album()。 15 (albumType)。 (())。 (selfish)。 (loginedUser)。 (album)。 (?operate=toMyAlbum)。 return null。 } else { printWriter .println(scriptalert(39。 你上傳文件類型不合法 ,上傳失敗39。)。(1)。/script)。 return null。 } } return null。 } 文件功能模塊的實現(xiàn) 登錄后,用 戶可以查看文件詳細(xì)信息、刪除文件、上傳文件、下載文件、上傳文件時可以添加文件描述。頁面設(shè)計效果如圖 41 41 414 所示: 圖 412 文件管理 16 圖 413 文件上傳 關(guān)鍵程序代碼如下: public ActionForward doAddFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { (GBK)。 PrintWriter printWriter = ()。 User loginedUser = (User) ().getAttribute( loginedUser)。 UploadForm myForm = (UploadForm) form。 FormFile myFile = ()。 String describle = ()。 FileType usefulTyle = null。 if (myFile != null) { String type = ()。 if ((audio/mpeg)) { usefulTyle = (FileType) (name, mp3).get(0)。 } if ((application/msword)) { usefulTyle = (FileType) (name, doc).get(0)。 } 17 if ((text/plain)) { usefulTyle = (FileType) (name, txt).get(0)。 } if ((application/octetstream)) { usefulTyle = (FileType) (name, rar).get(0)。 } if ((application/pdf)) { usefulTyle = (FileType) (name, pdf).get(0)。 } if (usefulTyle != null) { try { String dir = (true).getServletContext() .getRealPath(/upload)。 File file1 = new File(dir + / + ())。 File file2 = new File(file1 + / + ())。 if (!()) { ()。 } if (!()) { ()。 } FileOutputStream fos = new FileOutputStream(file2 + / + ())。 (())。 ()。 ()。 } catch (Exception e) { 18 ()。 printWriter .println(scriptalert(39。 上 傳 文 件 錯 誤 , 上 傳 失 敗39。)。(1)。/script)。 return null。 } file = new ()。 (())。 (usefulTyle)。 (describle)。 ((0))。 (new Date())。 (loginedUser)。 (file)。 (?operate=toMyFiles)。 return null。 } else { printWriter .println(scriptalert(39。 你上傳文件類型不合法 ,上傳失敗39。)。(1)。/script)。 return null。 } } return null。 } 19 圖 414 文件下載 關(guān)鍵程序代碼如下: public ActionForward download(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { String id = (id)。 downFile = () (Long .parseLong(id))。 String path = 。 PrintWriter out = null。 (GBK)。 User loginedUser = (User) ().getAttribute( loginedUser)。 User hostUser = null。 if (loginedUser == null) { hostUser = (User) ().getAttribute(hostUser)。 String enteredId = (String) ().getAttribute( entere
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1