📄 m_blog.asp
字号:
case "content"
sql="select " & sQryFields & " from oblog_log where isdel=0 and logtext like '%" & Keyword & "%' " & Z_classRole & " order by logid desc"
sGuide=sGuide & "日志内容中含有“ <font color=red>" & Keyword & "</font> ”的日志"
end select
end if
Case 11
sDate1=DeDateCode(sDate1)
sDate2=DeDateCode(sDate2)
If sDate1<>"" And sDate2<>"" Then
sql="select " & sQryFields & " from oblog_log where truetime>=" & G_Sql_d_Char & sDate1 & G_Sql_d_Char & " And truetime<=" & G_Sql_d_Char & sDate2 & G_Sql_d_Char & " and isdel=0 " & Z_classRole & " order by logid desc"
sGuide=sGuide & "实际发布时间在 <font color=red>" & sDate1 & "</font> 至 <font color=red>" & sDate2 & "</font> 的日志"
End If
case else
FoundErr=true
ErrMsg=ErrMsg & "<br><li>错误的参数!</li>"
end Select
if FoundErr=true then exit sub
if not IsObject(conn) then link_database
Set rs=Server.CreateObject("Adodb.RecordSet")
' OB_DEBUG sql,1
If Trim(Sql)="" Then
oblog.ShowMsg "请输入正确的查询条件!",""
End If
rs.Open sql,Conn,1,1
Call oblog.MakePagebar(rs,"篇日志")
end sub
sub showContent()
dim i
i=0
%>
<div id="main_body">
<ul class="main_top">
<li class="main_top_left left"><%=sGuide%></li>
<li class="main_top_right right"> </li>
</ul>
<div class="main_content_rightbg">
<div class="main_content_leftbg">
<style type="text/css">
<!--
td {padding:3px 0!important;}
-->
</style>
<form name="myform" method="Post" action="m_blog.asp" onSubmit="return confirm('确定要执行选定的操作吗?');">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" style="word-break:break-all;">
<%do while not rs.EOF %>
<tr>
<td align="center" style="background:#B3D1EA;border-bottom:1px #000 dotted;" width="30">
<input name='id' type='checkbox' onclick="unselectall()" id="id" value='<%=cstr(rs("logid"))%>'>
</td>
<td style="background:#D6EBFF;border-bottom:1px #000 dotted;"><span>[<%=oblog.GetClassName(2,0,rs("classid"))%>]</span>
<a href="../go.asp?logid=<%=rs("logid")%>" target="_blank" style="margin:0 0 0 10px;color:#333;"><%=oblog.Filt_html(RemoveHtml(rs("topic")))%></a>
</td>
<td style="background:#D6EBFF;border-bottom:1px #000 dotted;" width="290"><a href="../go.asp?userid=<%=rs("userid")%>" target="_blank"><font color=#0d4d89><%=rs("author")%></font></a> 发表于
<span style="font-family:Century Gothic,verdana,tahoma,Arial,Helvetica,sans-serif;font-size:10px;">
<%
Response.write rs("addtime") & "</span> <span style=""font-family:Century Gothic,verdana,tahoma,Arial,Helvetica,sans-serif;font-size:10px;color:#777;"">IP:" & rs("addip")
%></span>
</td>
<td style="background:#D6EBFF;border-bottom:1px #000 dotted;" width="60">
<%
select case rs("passcheck")
case 0
Response.write "<span style=""font-weight:600;color:#f30;"">等待审核</span>"
case 1
Response.write "<span style=""font-weight:600;color:#090;"">通过审核</span>"
end select
%>
</td>
<td style="background:#D6EBFF;border-bottom:1px #000 dotted;" width="108">
<%
Response.write "<a href='../admin_edit.asp?do=5&Action=modilog&logid=" & rs("logid") & "'>修改</a> "
If rs("isbest")=1 Then
Response.write "<a href='m_blog.asp?Action=best0&id=" & rs("logid") & "&douname="&rs("author")&"' onClick='return confirm(""确定要取消该日志的精华设置吗?"");'><font color=red>取精</font></a> "
Else
Response.write "<a href='m_blog.asp?Action=best1&id=" & rs("logid") & "&douname="&rs("author")&"&title="&escape(rs("topic"))&"' onClick='return confirm(""确定要设置该日志为精华吗?"");'>加精</a> "
End If
Response.write "<a href='m_blog.asp?Action=Del&id=" & rs("logid") & "&douname="&rs("author")&"' onClick='return confirm(""确定要删除此日志吗?"");'>删除</a> "
%>
</td>
</tr>
<tr>
<td align="center" valign="top"><span style="font-family:Century Gothic,verdana,tahoma,Arial,Helvetica,sans-serif;font-size:10px;font-weight:600;"><%=rs("logid")%></span></td>
<td colspan="4" valign="top" style="word-wrap: break-word; word-break: break-all;color:#555;"><%=Left(oblog.Filt_html(RemoveHtml(rs("logtext"))),200)%></td>
</tr>
<tr>
<td height="8" colspan="5"></td>
</tr>
<%
i=i+1
if i>=G_P_PerMax then exit do
rs.movenext
loop
rs.Close
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="140" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
选中本页所有日志</td>
<td> <strong>操作:</strong>
<input name="Action" type="radio" value="Del">
删除
<input name="Action" type="radio" value="pass0">
待审
<input name="Action" type="radio" value="pass1"">
审核
<input name="Action" type="radio" value="best1">
精华
<input name="Action" type="radio" value="best0">
取消精华
<input name="Action" type="radio" value="moveclass" onClick="document.myform.classid.disabled=false">
转移
<!-- <input name="Action" type="radio" value="Move" onClick="document.myform.SpecialId.disabled=false">
<select name="SpecialId" id="SpecialId" disabled>
<option value=0>取消专辑设置</option>
<%
Set rs = oblog.Execute("select specialid,s_name From oblog_Special Where isActive=1 Order By SpecialId Desc")
Do While Not rs.Eof
%>
<option value=<%=rs(0)%>><%=Left(rs(1),7)%></option>
<%
rs.Movenext
Loop
Set rs=Nothing
%>
</select>
-->
<select name="classid" id="classid" disabled>
<%=oblog.show_class("log",0,0)%>
</select>
<input type="submit" name="Submit" value="执行"> </td>
</tr>
</table>
</form>
</div>
</div>
<ul class="main_end">
<li class="main_end_left left"></li>
<li class="main_end_right right"></li>
</ul>
</div>
<%
end sub
'更新日志
Sub DoUpdatelog(ids)
Server.ScriptTimeOut = 999999999
Dim rs, blog, i
Set rs = oblog.execute("select userid,logid from oblog_log where logid in (" & ids & ")")
Set blog = New class_blog
Do While Not rs.Eof
blog.userid = rs(0)
blog.Update_index 0
blog.update_log rs(1), 0
rs.movenext
Loop
Set rs = Nothing
Set blog = Nothing
End Sub
Sub delblogs(ids)
Dim uid, delname, rst, fso, sid,i,logid,blog,cid
Set fso = Server.CreateObject(oblog.CacheCompont(1))
logid=Split(ids,",")
Set rst = Server.CreateObject("adodb.recordset")
Set blog = New class_blog
For i=0 To UBound(logid)
rst.open "select a.userid,a.logfile,a.subjectid,a.logtype,a.scores,a.isdel,b.user_dir,b.user_folder,a.classid from oblog_log a ,oblog_user b where a.userid=b.userid And logid="&logid(i),conn,1,3
If Not rst.Eof Then
uid = rst(0)
delname = OB_IIF(Trim(rst(1)),"")
sid = rst(2)
cid = rst(8)
'清理文件记录
'Call oblog.DeleteFiles(logid)
'真实域名需要重新整理文件数据
'物理文件即时删除
'If true_domain = 1 And delname <> "" Then
If InStr(delname, "archives") Then
delname = Right(delname, Len(delname) - InStrRev(delname, "archives") + 1)
Else
delname = Right(delname, Len(delname) - InStrRev(delname, "/"))
End If
delname=blogdir & rst("user_dir")& "/" & rst("user_folder")&"/"&oblog.l_ufolder&"/"&delname
'End If
If delname <> "" Then
delname=Replace(delname,"//","/")
If fso.FileExists(Server.MapPath(delname)) Then fso.DeleteFile Server.MapPath(delname)
End If
'--------------------------------------------
'更新计数器,删除积分
If rst("isdel")=1 Then
Call Tags_UserDelete(logid(i))
Call OBLOG.log_count(uid,logid(i),sid,cid,"-")
End If
'--------------------------------------------
rst.Close
blog.userid = uid
blog.Update_Subject uid
blog.Update_index 0
blog.Update_newblog (uid)
End If
Next
Set blog = Nothing
Set fso = Nothing
Set rst = Nothing
End Sub
Sub BestScore(id,iState)
Dim rs,i
Dim tid,sScore
tid=id
If iState= 1 Then
sScore=oblog.CacheScores(9)
Else
sScore=-1*Abs(oblog.CacheScores(9))
End If
If InStr(tid,",")<0 Then
Set rs = oblog.Execute ("select userid,isbest FROM oblog_log WHERE logid = " &tid)
'只处理之前未加精的
If iState= 1 Then
If rs(1)=0 Then oblog.GiveScore "" ,sScore,rs(0)
Else
If rs(1)=1 Then oblog.GiveScore "" ,sScore,rs(0)
End if
rs.close
Else
tid = Split (tid ,",")
For i = 0 To UBound(tid)
Set rs= oblog.execute ("select userid,isbest FROM oblog_log WHERE logid = " &tid(i))
If iState= 1 Then
If rs(1)=0 Then oblog.GiveScore "" ,sScore,rs(0)
Else
If rs(1)=1 Then oblog.GiveScore "" ,sScore,rs(0)
End if
rs.close
Next
End if
End Sub
Sub DelScore(id)
Dim rs,i
Dim tid,sScore
tid=id
'删除日志时,将删除该日志所获得的所有积分,并且进行积分惩罚
If InStr(tid,",")<0 Then
Set rs = oblog.Execute ("select userid,scores FROM oblog_log WHERE logid = " &tid)
sScore=-1*(rs(1)+CLng(oblog.CacheScores(4)))
If IsNull(sScore) Then sScore = -1*(CLng(oblog.CacheScores(4)))
oblog.GiveScore "",sScore,rs(0)
rs.close
Else
tid = Split (tid ,",")
For i = 0 To UBound(tid)
Set rs= oblog.execute ("select userid,scores FROM oblog_log WHERE logid = " &tid(i))
sScore=-1*(rs(1)+CLng(oblog.CacheScores(4)))
If IsNull(sScore) Then sScore = -1*(CLng(oblog.CacheScores(4)))
oblog.GiveScore "",sScore,rs(0)
rs.close
Next
End if
End Sub
Set oblog = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -