intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Code lập trình - Bài 9, 10, 11 & 12

Chia sẻ: Qdasdasdasd Dasdasdsd | Ngày: | Loại File: PDF | Số trang:5

168
lượt xem
40
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Tài liệu tham khảo code lập trình về Số bài viết trung bình mỗi ngày, nút music - flash

Chủ đề:
Lưu

Nội dung Text: Code lập trình - Bài 9, 10, 11 & 12

  1. Bài 9: Số bài viết trung bình mỗi ngày Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com) 1. Mở file forum_posts.asp a.1. Tìm dòng code Response.Write(vbCrLf & " " & strTxtPosts & ": " & lngAuthorNumOfPosts) a.2. Thay thế bằng Response.Write("" & strTxtPosts & ": ") %> 0 AND DateDiff("d", dtmAuthorRegistration, Now()) > 0 Then Response.Write(" [" & FormatNumber(lngAuthorNumOfPosts / DateDiff("d", dtmAuthorRegistration, Now()), 2) & " " & strTxtPostsPerDay) & "]" %>
  2. rsPostExp.CursorType = 1 'Query the database rsPostExp.Open strSQL, adoCon Do While NOT rsPostExp.EOF lngAuthorNumOfPostsExp = lngAuthorNumOfPostsExp + CLng(rsPostExp("No_of_posts")) rsPostExp.MoveNext Loop rsPostExp.Close() Set rsPostExp = Nothing b.1. Tìm dòng code Response.Write("" & strTxtPosts & ": ") %> 0 AND DateDiff("d", dtmAuthorRegistration, Now()) > 0 Then Response.Write(" [" & FormatNumber(lngAuthorNumOfPosts / DateDiff("d", dtmAuthorRegistration, Now()), 2) & " " & strTxtPostsPerDay) & "]" %> []
  3. //Add by flash, music,real, math by congmanh1981@yahoo.com function paste_embed(type){ var url = prompt("Enter url:", "http://"); if (url !="" && url !="http://" && url != null){ var emwidth = prompt("Width:", "300"); var emheight = prompt("height:", "300"); if (type == "flash") { url = "[FLASH WIDTH=" + emwidth + " HEIGHT=" + emheight + "]" + url + "[/FLASH]"; } if (type == "media") { url = "[MUSIC WIDTH=" + emwidth + " HEIGHT=" + emheight + "]" + url + "[/MUSIC]"; } FormatText("paste", url); } } 2. Mở file RTE_javascript.asp a.1. Tìm dòng code a.2. Thêm xuống dưới 3. Mở file RTE_quick_reply_toolbar_inc.asp a.1. Tìm dòng code Response.Write("');") End If a.2. Thêm xuống dưới Response.Write(vbCrLf & " document.writeln('") Response.Write("
  4. strTxtAddFlash & """ class=""WebWizRTEbutton"" onmouseover=""overIcon(this)"" onmouseout=""outIcon(this)"">") Response.Write("") Response.Write("');") 4. Mở file RTE_toolbar_inc.asp a.1. Tìm dòng code If blnOrderList OR blnUnOrderList OR blnOutdent OR blnIndent Or blnHorizontalRule Then Response.Write("');") a.2. Thêm xuống dưới Response.Write(vbCrLf & " document.writeln('") Response.Write("") Response.Write("") Response.Write("');") 5. Mở file ha_language_file_inc.asp a.1. Tìm dòng code Const strTxtExp = "Kinh nghiệm" a.2. Thêm xuống dưới Const strTxtAddFlash = "Hoạt hình Flash" Const strTxtAddMedia = "Nhạc Media" 6. Copy file music vào thư mục forum_images/mod Bài 12: Bài viết cuối theo từng Diễn đàn Tác giả: Phan Hồng Phúc (phucorcl@yahoo.com)
  5. 1. Mở file default.asp a.1. Tìm dòng code Dim intTotalViewingForum 'Holds the number of people viewing the forum, including sub forums a.2. Thêm xuống dưới Dim strSubject b.1. Tìm dòng code If lngNumberOfPosts 0 Then 'Don't disply last post details if there are none b.2. Thêm xuống dưới strSQL = "SELECT TOP 1 " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Topic_ID, "& strDbTable & "Topic.Last_Thread_ID, "& strDbTable & "Topic.Icon FROM " & strDbTable & "Topic WHERE " & strDbTable & "Topic.Forum_ID=" & intForumID & " ORDER BY " & strDbTable & "Topic.Last_Thread_ID DESC;" rsCommon.Open strSQL, adoCon If NOT rsCommon.EOF Then strSubject = "" & rsCommon("Subject") & "" else strSubject = "" End If rsCommon.Close Response.Write(strSubject & "")  
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2