⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_blog.asp

📁 是个不错的文件代码,希望大家好好用,
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		show=show&"<ul><li><a href="""&blogurl&"user_index.asp?url=user_friends.asp?action=add$friendname="&user_username&""" target=""_blank"">加为好友</a></li><li><a href=""javascript:openScript('"&blogurl&"user_pm.asp?action=send&incept="&user_username&"',450,400)"">发送短信</a></li></ul>"
		show=show&"<ul><li>日志:"&user_log_count&"</li>"&vbcrlf
		show=show&"<li>评论:"&user_comment_count&"</li></ul>"&vbcrlf
		show=show&"<ul><li>留言:"&user_message_count&"</li>"&vbcrlf
		show=show&"<li>访问:<span id=""site_count""></span><Script src="""&blogurl&"count.asp?action=site&id="&user_id&"""></Script></li></ul>"&vbcrlf		
		if showpwblog or showpwlog then m_info=show
		savefile user_path,"\inc\show_info.htm",show
	end sub

	public sub update_placard(userid)
		dim show
		show=filtskinpath(filt_inc(user_placard))
		if showpwblog or showpwlog then m_placard=show
		savefile user_path,"\inc\show_placard.htm",show
	end sub

	public sub update_links(userid)
		dim show
		set rs=oblog.execute("select * from oblog_friendurl where userid="&userid&" order by ordernum asc")
		while not rs.eof
			if rs("urltype")=0 then
				show=show&"<li><a href='"&rs("url")&"' target='_blank'>"&rs("urlname")&"</a></li>"
			else
				show=show&"<li><a href='"&rs("url")&"' target='_blank'><img src='"&rs("logo")&"'></a></li>"
			end if
			rs.movenext
		wend 
		show=show&user_links&vbcrlf
		show=filtskinpath(filt_inc(show))
		if showpwblog or showpwlog then m_links=show
		savefile user_path,"\inc\show_links.htm",show
	end sub

	public sub update_newblog(userid)
		dim n,show
		n=Int(user_shownewlog_num)
		set rs=oblog.execute("select top "&n&" topic,addtime,logfile from [oblog_log] where userid="&userid&" and isdraft=0 and passcheck=1 and isdel=0 order by addtime desc")
		if not rs.eof then show="<ul>"& vbcrlf
		while not rs.eof 
			show=show&"<li><a href="""&log_truepath&rs(2)&""" title=""发表于"&rs(1)&""">"&oblog.filt_html(left(rs(0),18))&"</a></li>"&vbcrlf
			rs.movenext
			if rs.eof then show=show&"</ul>"& vbcrlf
		wend
		if showpwblog or showpwlog then m_newblog=show
		savefile user_path,"\inc\show_newblog.htm",show
	end sub

	Public Sub Update_newmessage(userid)
		Dim n, show, userdir, ustr
		n = CLng(user_shownewmessage_num)
		show = "<ul><li><a href="""&user_truepath&"message." & f_ext & "#cmt""><strong>签写留言</strong></a></li>"
		Set rs = oblog.Execute("select top " & n & " user_dir,messagetopic,oblog_message.addtime,message_user,messageid,messagefile from oblog_user,oblog_message where oblog_message.userid=" & userid & " and oblog_user.userid=oblog_message.userid and oblog_message.istate= 1 order by messageid desc")
		While Not rs.EOF
			ustr = user_truepath&"message." & f_ext & "#" & rs("messageid")
			show = show & "<li><a href=""" & ustr & """ title=""" & oblog.filt_html(rs("message_user")) & "发表于" & rs("addtime") & """ >" & oblog.filt_html(Left(rs("messagetopic"), 18)) & "</a></li>" & vbCrLf
			rs.movenext
		Wend
		show = show & "</ul>" & vbCrLf
		if showpwblog or showpwlog then m_newmessage=show : exit sub
		savefile user_path, "\inc\show_newmessage.htm", show
	End Sub

	public sub update_mygroups(userid)
		dim show
		set rs=oblog.execute("select top 6 a.t_name,a.teamid,a.t_ico from oblog_team a,oblog_teamusers  b where a.teamid=b.teamid and a.istate=3 and (b.state=3 or b.state=5 ) and userid ="&userid)
		while not rs.eof 
			show=show&"<li><a href=" &blogurl & "group.asp?gid="&rs(1)&" target=""_blank""><img src=""" & blogurl & rs(2) & """ class=""group_logo"" /><br />"&oblog.filt_html(left(rs(0),18))&"</a></li>"&vbcrlf
			rs.movenext
		wend
		if showpwblog or showpwlog then 
			m_mygroups=show
		else
			savefile user_path,"\inc\show_mygroups.htm",show
		end if
	end sub

	public sub update_friends(userid)
		dim show
		set rs=oblog.execute("select top 6 a.username,a.nickname,a.user_icon1,a.userid from oblog_user a,oblog_friend  b where a.userid=b.friendid and b.userid ="&userid&" and b.isblack=0 order by b.id desc")
		while not rs.eof 
			show=show&"<li><a href=" &blogurl & "go.asp?userid="&rs(3)&" target=_blank><img src=""" & blogurl & OB_IIF(rs(2),"images/ico_default.gif") & """ class=""ob_face"" /><br />"&OB_IIF(rs(1),rs(0))&"</a></li>"&vbcrlf
			rs.movenext
		wend
		if showpwblog or showpwlog then 
			m_friends=show
		else
			savefile user_path,"\inc\show_myfriend.htm",show
		end if
	end sub

	public sub update_comment(userid)
		dim n,show
		n=Int(user_shownewcomment_num)
		set rs=oblog.execute("select top "&n&" oblog_comment.commenttopic,oblog_comment.addtime,oblog_comment.comment_user,oblog_comment.commentid,oblog_log.logfile from oblog_log,oblog_comment where oblog_comment.mainid=oblog_log.logid and oblog_comment.istate= 1 and oblog_comment.userid="&userid&" and oblog_log.isdel=0 and oblog_comment.isdel=0 order by commentid desc")
		if not rs.eof then show="<ul>"& vbcrlf
		while not rs.eof 
			show=show&"<li><a href="""&log_truepath&rs("logfile")&"#"&rs("commentid")&""" title="""&oblog.filt_html(rs("comment_user"))&"发表于"&rs("addtime")&""">"&oblog.filt_html(left(rs("commenttopic"),18))&"</a></li>"& vbcrlf
			rs.movenext
			if rs.eof then show=show&"</ul>"& vbcrlf
		wend
		if showpwblog or showpwlog then m_comment=show
		savefile user_path,"\inc\show_comment.htm",show
	end sub

	'生成用户的日志分类
	Public Sub Update_Subject(userid)
		Dim n, show
		show = "<ul>" & vbCrLf & "<li><a href=""" & user_truepath&"index." & f_ext & """ title=""首页"">首页</a>"
		'show = show & "<li><a href=""" & blogdir & "user_index.asp"" target=""blank"">管理</a></li>"
		 show = show & vbCrLf & " <a href="""&user_truepath&"cmd." & f_ext &"?uid="&user_id&"&do=album"" title=""相册"">相册</a> "
		 show = show & vbCrLf & " <a href="""&user_truepath&"cmd."&f_ext&"?uid=" & user_id &"&do=tags"" title=""标签"">标签</a>"
		show=show&"</li>"
		Set rs = oblog.Execute("select Subjectid,SubjectName,Subjectlognum from oBlog_Subject where  userid=" & userid & " and Subjecttype=0 order by ordernum")
		While Not rs.EOF
			show = show & "<li><a href=""" & user_truepath & "cmd."&f_ext&"?do=blogs&id=" & rs("Subjectid") & "&uid="&user_id&""" title=""" & oblog.filt_html(rs("SubjectName")) & """>" & oblog.filt_html(rs("SubjectName")) & "(" & rs("Subjectlognum") & ")" & "</a></li>" & vbCrLf
			rs.movenext
		Wend
		show = show & "</ul>" & vbCrLf
		'show1 = Replace(show, "<div id=""subject"">", "<div id=""subject_l"">")
		if showpwblog or showpwlog then m_subject=show:m_subject_l=show : exit sub
		savefile user_path, "\inc\show_subject.htm", show
		'使用一个文件,用不同的div id控制格式savefile user_path, "\inc\show_subject_l.htm", show1
	End Sub

	Public Sub Update_calendar(logid)
		Dim c_year, c_year1,c_month, c_day, logdate, today, tomonth, toyear, sql, s, count, b, c
		Dim thismonth, thisdate, thisyear, startspace, NextMonth, NextYear, PreMonth, PreYear, linkTrue
		Dim linkdays, selectdate, linkcount, ccode
		Dim CommondFile
		CommondFile= user_truepath&"cmd."&f_ext&"?uid="&user_id&"&do=month&month="
		ReDim linkdays(2, 0)
		Set rs = oblog.Execute("select addtime from oBlog_log where isdel=0 and oBlog_log.logid=" & Int(logid))
		If rs.EOF Then Exit Sub
		selectdate = rs(0)
		c_year = CInt(Year(selectdate))
		c_month = CInt(Month(selectdate))
		c_day = CInt(Day(selectdate))
		logdate = c_year & "-" & c_month
		If is_sqldata Then
			Dim cmd, rs
			Set cmd = Server.CreateObject("ADODB.Command")
			Set cmd.ActiveConnection = conn
			cmd.CommandText = "ob_calendar"
			cmd.CommandType = 4
			cmd("@logdate") = logdate
			cmd("@userid") = user_id
			Set rs = cmd.Execute
			Set cmd = Nothing
		  Else
			sql = "SELECT addtime,logfile from oBlog_log WHERE datediff('n','" & logdate & "',addtime)>0 and isdel=0  and userid=" & user_id
			Set rs = oblog.Execute(sql)
		End If
		Dim theday
		theday = 0

		Do While Not rs.EOF
			If Day(rs("addtime")) <> theday Then
				theday = Day(rs("addtime"))
				ReDim Preserve linkdays(2, linkcount)
				linkdays(0, linkcount) = Month(rs("addtime"))
				linkdays(1, linkcount) = Day(rs("addtime"))
				'linkdays(2, linkcount) = blogdir & rs("logfile")
				linkdays(2, linkcount)=user_truepath&"cmd."&f_ext&"?uid="&user_id&"&do=day&day=" & CStr(CDate(Year(rs("addtime")) & "-" & Month(rs("addtime")) & "-" & Day(rs("addtime"))))
				linkcount = linkcount + 1
			End If
			rs.movenext
		Loop
		Set rs = Nothing
		Dim mdays(12)
		mdays(0) = ""
		mdays(1) = 31
		mdays(2) = 28
		mdays(3) = 31
		mdays(4) = 30
		mdays(5) = 31
		mdays(6) = 30
		mdays(7) = 31
		mdays(8) = 31
		mdays(9) = 30
		mdays(10) = 31
		mdays(11) = 30
		mdays(12) = 31
		'今天的年月日
		today = Day(ServerDate(Now()))
		tomonth = Month(ServerDate(Now()))
		toyear = Year(ServerDate(Now()))
		'指定的年月日及星期
		thismonth = c_month
		thisdate = c_day
		thisyear = c_year
		If IsDate("February 29, " & thisyear) Then mdays(2) = 29
		'确定日历1号的星期
		startspace = Weekday(thismonth & "-1-" & thisyear) - 1
		NextMonth = c_month + 1
		NextYear = c_year+1
		If NextMonth > 12 Then
			NextMonth = 1
			NextYear = NextYear + 1
		End If
		PreMonth = c_month - 1
		'PreYear = c_year-1
		PreYear = c_year
		If PreMonth < 1 Then
			PreMonth = 12
			PreYear = PreYear - 1
		End If
		ccode = "<table width='100%' class=""year_"&thisyear&" month_"&thismonth&""">" & vbCrLf
		ccode = ccode & "<thead>" & vbCrLf
		'ccode = ccode & "<caption>" & mName(thismonth) & thisyear & "</caption><tr>" & vbCrLf
		ccode = ccode & "<caption><a href="""& CommondFile & ((c_year-1) & Right("0" & c_month,2)) &""" title=""上一年""><span class=""arrow"">&lt;&lt;</span></a>&nbsp;&nbsp;<a href=""" & CommondFile & PreYear& Right("0" & preMonth,2)&""" title=""上一月""><span class=""arrow"">&lt;</span></a>&nbsp;"& toyear &"<a href=""" & CommondFile & Year(ServerDate(Date)) & Right("0" & Month(ServerDate(Date)),2) & """ title=""返回当月""> - </a>"& c_month&"&nbsp;<a href="""& CommondFile & c_year& Right("0" & NextMonth,2) &""" title=""下一月""><span class=""arrow"">&gt;</span></a>&nbsp;&nbsp;<a href=""" & CommondFile & NextYear & Right("0" & c_month,2) &""" title=""下一年""><span class=""arrow"">&gt;&gt;</span></a></caption>" & vbCrLf
		'ccode = ccode & "<caption><a href=""" & CommondFile & c_year& Right("0" & preMonth,2)&""" title=""上一月""><span class=""arrow""><</span></a> "& toyear &"  <a href=""" & CommondFile & Year(ServerDate(Date)) & Right("0" & Month(ServerDate(Date)),2) & """ title=""返回当月"">-</a> "& c_month&" <a href="""& CommondFile & c_year& Right("0" & NextMonth,2) &""" title=""下一月""><span class=""arrow"">></span></a></caption>" & vbCrLf
		ccode = ccode & "<tr class=""week"">" & vbCrLf
		ccode = ccode & "<th class=""sun"">日</th>" & vbCrLf
		ccode = ccode & "<th class=""mon"">一</th>" & vbCrLf
		ccode = ccode & "<th class=""Tue"">二</th>" & vbCrLf
		ccode = ccode & "<th class=""Wen"">三</th>" & vbCrLf
		ccode = ccode & "<th class=""Thu"">四</th>" & vbCrLf
		ccode = ccode & "<th class=""Fri"">五</th>" & vbCrLf
		ccode = ccode & "<th class=""Sat"">六</th>" & vbCrLf
		ccode = ccode & "</tr>" & vbCrLf
		ccode = ccode & "</thead>" & vbCrLf
		ccode = ccode & "<tbody>" & vbCrLf
		ccode = ccode & "<tr>" & vbCrLf
		For s = 0 To startspace - 1
			ccode = ccode & "<td align=""center""></td>" & vbCrLf
		Next
		count = 1
		While count <= mdays(thismonth)
			For b = startspace To 6
				ccode = ccode & "<td align=""center"""
				If count=thisdate+1 Then 
					ccode = ccode & " class=""today"" title=""今天"""
				End if
				ccode = ccode & ">"
				linkTrue = "False"
				For c = 0 To UBound(linkdays, 2)
					If linkdays(0, c) <> "" Then

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -