📄 syscode_blog.asp
字号:
End IF
rs.open sql,conn,1,1
if not rs.eof then
Dim blog_Nums,MultiPages,i
blogperpage=10
rs.PageSize=blogperpage
rs.AbsolutePage=CurPage
blog_Nums=rs.RecordCount
MultiPages="<div style=""margin-top:10px;"" align=""center"">"&MultiPage(blog_Nums,blogperpage,CurPage,Url_Add)&"</div>"
IF tag<>empty then
Response.Write("<table border='0' width='99%' align='center' style='border:1px dashed #B7B7B7;margin-bottom:10px;'><tr><td>共有 "&totalcs&" 篇日志使用了该 TAG <B><font color=red>"&tag&"</font></B> <img alt='点击弹开所有Tags列表' onclick='opencat(Tags_open)' style='CURSOR: hand' src='img/info.gif' hspace='0' align='absmiddle'></td></tr></table>")
Response.Write("<table border='0' width='99%' align='center' style='border:1px dashed #B7B7B7;margin-bottom:10px;' id='Tags_open' style='display: none'><tr><td>")
Dim TagsNum,Ti
TagsNum=Ubound(Arr_Tags,2)
For Ti=0 To TagsNum
Response.Write("<a href=""blog.asp?tags="&Server.URLEncode(Arr_Tags(1,Ti))&""">"&Arr_Tags(1,Ti)&"</a>("&Arr_Tags(2,Ti)&") | ")
Next
Set TagsNum=Nothing
Response.Write("</td></tr></table>")
End IF
IF request("Search_keyword")<>empty then
Response.Write("<table border='0' width='99%' align='center' style='border:1px dashed #B7B7B7;margin-bottom:10px;'><tr><td>共找到 "&totalcs&" 篇日志 "&Search_class&" 包含关键字<B> <font color=red>"&blog_SearchContent&"</font></B></td></tr></table>")
End IF
Do Until Rs.EOF OR i=blogperpage
weblog_ID=rs("blog_ID")
weblog_IsShow=rs("blog_IsShow")
weblog_Author=rs("blog_Author")
weblog_IsTop=rs("blog_IsTop")
weblog_IsBest=rs("blog_IsBest")
weblog_Weather=Split(rs("blog_Weather"),"|")
weblog_Intro=Replace(rs("blog_Intro"),"''","'")
If IsInteger(sCat_ID)=False Then
weblog_ShowURL="<a href=""showblog.asp?blog_id="&weblog_ID&""">"
Else
weblog_ShowURL="<a href=""showblog.asp?blog_id="&weblog_ID&"&cat_id="&sCat_ID&""">"
End If
%>
<table border="0" width="99%" align="center" cellpadding="0" cellspacing="0" class="b1" style="border-collapse: collapse;word-break:break-all;table-layout:fixed;text-align:left;display:block;padding:5px 10px;">
<%If weblog_IsShow=True or (checkmember=true and Hx66_name=weblog_Author) OR SupAdmin=true Then%>
<tr<%If weblog_IsTop=True Then%> onclick='opencat(top_open_<%=i%>)' style='CURSOR: hand'<%End If%>>
<td height="26" class="a1" width="65%"><img src="img/blog/<%=weblog_Weather(0)%>.gif" alt="<%=weblog_Weather(1)%>" align="absmiddle"> <%=weblog_ShowURL%><strong><%=rs("blog_Title")%></strong></a><%If weblog_IsShow = False Then%>(隐)<%End If%></td><td height="26" class="a1" align="right">[<%=datevalue(rs("blog_PostTime"))%> | <a href="<%=rs("blog_FromURL")%>" target="_blank"><%=rs("blog_From")%></a>]<%If weblog_IsTop=True Then%><img src="img/blog/istop.gif" alt="置顶日志" align="absmiddle"><%End If%><%If weblog_IsBest=True Then%> <img src="img/blog/isbest.gif" alt="精华日志" align="absmiddle"><%End If%></td>
</tr>
<tr<%If weblog_IsTop=True Then%> id='top_open_<%=i%>' style='display: none'<%End If%>>
<td colspan=2>
<DIV style="margin-top:2px;margin-bottom:15px;"><%=Ubbcode(weblog_Intro,rs("blog_DisSM"),rs("blog_DisUBB"),rs("blog_DisIMG"),rs("blog_AutoURL"),rs("blog_AutoKEY"))%></DIV>
<%if ShowTag(weblog_ID,"Show")<>empty then
Response.Write ("<DIV>"&ShowTag(weblog_ID,"Show")&"</DIV>")
end if%>
<%If HtmlEncode(rs("blog_Content"))<>weblog_Intro Then%>
<DIV><%=weblog_ShowURL%><img src="img/blog/icon_readmore.gif" align="absmiddle" border="0"> 全文阅读……</a></DIV><%End If%>
<div align="right">发布:<%=weblog_Author%> | 分类:<a href="blog.asp?cat_id=<%=rs("blog_CateID")%>"><%=rs("cate_Name")%></a> | <a href="showblog.asp?blog_id=<%=weblog_ID%>#comment">评论:<%=rs("blog_CommNums")%></a> | <a href="blog_tb.asp?blogID=<%=weblog_ID%>">引用:<%=rs("blog_QuoteNums")%></a> | 查看:<%=rs("blog_ViewNums")%></div></TD>
</tr>
<%Else
Response.Write("<tr><td height=""26"" class=""a1""><strong>隐藏日志……</strong></TD></TR>")
End If%>
</table>
<div style="margin-top:8px;"></div>
<%
i=i+1
rs.movenext
loop
else
Response.Write("<div align=""center"" class=""a1"" style=""height:26px"">抱歉,没有找到"&blog_Search&"相关日志!</div>")
end if
Response.Write(MultiPages)
rs.close
set rs=nothing
end sub
select case request.QueryString("action")
case "addblog"
call blog_add()
case "editblog"
call blog_edit()
case "addcomm"
call blog_comm()
case "delcomm"
call blog_delcomm()
end select
sub blog_put()
IF checkmember<>true Then
Response.Write "<Script Language=JavaScript>alert('对不起,你没有发表日志权限!');javascript :history.back();</Script>"
Response.End
end if
%>
<script language="JavaScript" src="inc/ubbcode.js"></script>
<table bgcolor="#ffffff" borderColor="#f0f0f0" Border="1" Cellspacing="0" Cellpadding="5" width="98%" align="Center" style="border-collapse: collapse">
<form name="FrontPage_Form1" method="post" action="?action=addblog" id="bnews">
<tr>
<td width="12%" align="right">标题:</td>
<td width="88%"><input name="alog_Title" type="text" id="alog_Title" size="50" class="input">
<select name="alog_Weather" id="alog_Weather" onChange="document.images['show_Weather'].src='img/blog/'+options[selectedIndex].value.split('|')[0]+'.gif';" size="1" class="input">
<option value="0|未知" selected>天气</option>
<option value="1|晴天">晴天</option>
<option value="2|多云">多云</option>
<option value="3|雨天">雨天</option>
<option value="4|刮风">刮风</option>
<option value="5|雪天">雪天</option>
<option value="6|彩虹">彩虹</option>
<option value="7|露水">露水</option>
</select> <img id="show_Weather" src="img/blog/0.gif" align="absmiddle"> </td>
</tr>
<tr>
<td align="right">分类:</td>
<td><select name="alog_CateID" id="alog_CateID" class="input">
<%Dim Cat_Nums,Cat_NumI
Cat_Nums=Ubound(Arr_Cat,2)
For Cat_NumI=0 To Cat_Nums
Response.Write("<option value='"&Arr_Cat(0,Cat_NumI)&"'>"&Arr_Cat(1,Cat_NumI)&"</option>")
Next%></select></td>
</tr>
<tr>
<td align="right">属性:</td>
<td><input name="alog_IsShow" type="radio" value="0" checked>公开日志
<input name="alog_IsShow" type="radio" value="1">隐藏日志 ||
<input name="alog_IsTop" type="checkbox" id="alog_IsTop" value="1">置顶日志
<input name="alog_IsBest" type="checkbox" id="alog_IsBest" value="1">精华日志
<input name="alog_DisComment" type="checkbox" id="alog_DisComment" value="1">禁止评论</td>
</tr>
<tr>
<td align="right">来源:</td>
<td><input name="alog_From" type="text" id="alog_From" value="本站原创" size="12" class="input"> <b>地址:
<input name="alog_FromURL" type="text" id="alog_FromURL" value="<%=weburl%>" size="38" class="input"></td>
</tr>
<script language=javascript>
function Hx_accept(addaccept)
{
if (addaccept!="")
{ document.bnews.alog_Tags.value=addaccept; }
}
</script>
<tr>
<td align="right">TAGs:</td>
<td><input name="alog_Tags" type="text" id="alog_Tags" size="30" class="input">
<% dim rs_key,sql_key
set rs_key=Server.CreateObject("ADODB.RecordSet")
sql_key="SELECT * FROM b_tags order by tagid desc"
rs_key.open sql_key,conn,1,1%>
<select name="rs_key" id="rs_key" onchange="javascript:Hx_accept(this.options[this.selectedIndex].value);" class="input">
<%if rs_key.bof and rs_key.eof then
response.Write("<option value='HxBLOG'>没有TAGs</option>")
else
response.Write (" <option value=''>选择已有TAG</option>")
do Until rs_key.eof
response.Write (" <option value="&rs_key(1)&">"&rs_key(1)&"</option>")
rs_key.movenext
loop
end if%></select> 多个Tag 用 | 分隔</td>
</tr>
<tr>
<td align="right" valign="top">内容:</td>
<td>
<table width="98%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<input name="alog_DisSM" type="checkbox" id="alog_DisSM" value="1">禁止表情
<input name="alog_DisUBB" type="checkbox" id="alog_DisUBB" value="1">禁止UBB
<input name="alog_DisIMG" type="checkbox" id="alog_DisIMG" value="1">禁止图片
<input name="alog_AutoURL" type="checkbox" id="alog_AutoURL" value="1" checked>识别链接
<input name="alog_AutoKEY" type="checkbox" id="alog_AutoKEY" value="1">识别关键字</td>
</tr>
<tr>
<td width="100%"><!--#include file="ubbget.asp" --></td>
</tr>
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><textarea name="message" style="width:100%" rows="12" wrap="VIRTUAL" id="Content" onSelect="javascript: storeCaret(this);" onClick="javascript: storeCaret(this);" onKeyDown="javascript: ctlent();" onKeyUp="javascript: storeCaret(this);" class="input"></textarea></td>
</tr>
</table></td></tr>
<tr>
<td align="right">表情:<img alt='点击弹开所有表情图' onclick='opencat(Emot_open)' style='CURSOR: hand' src='img/info.gif' hspace='0' align='absmiddle'></td>
<td width="500" id='Emot_open' style='display: none' bgcolor="#FFFFFF">
<%Dim emot_Nums,emot_i
emot_Nums=Ubound(Arr_Emot,2)
TempVar=""
For emot_i=0 To emot_Nums
Response.Write(TempVar&"<img style=""cursor:hand;"" onclick=""AddText('"&Arr_Emot(2,emot_i)&"');"" src=""img/blog/emot/"&Arr_Emot(1,emot_i)&""">")
TempVar=" "
Next%></td>
</tr>
<tr>
<td align="right">附件:</td>
<td><iframe border="0" frameBorder="0" frameSpacing="0" height="23" marginHeight="0" marginWidth="0" noResize scrolling="no" width="100%" vspale="0" src="blog_upload.asp"></iframe></td>
</tr>
<tr>
<td align="right">引用:</td>
<td><input name="alog_Quote" type="text" id="log_Quote" size="75" class="input">
<br>要引用另一用户的网络日志项,输入以上网络日志项的引用通告 URL。用 | 分隔多个地址</td>
</tr>
<tr align="center">
<td colspan="2">
<input name="PostBlog" type="hidden" value="ok">
<input name="topicsubmit" type="submit" value="提交日志" onClick="this.disabled=true;document.bnews.submit();" class="input">
<input name="Reset" type="reset" id="Reset" value="重置日志" class="input"> [可按 Ctrl+Enter 发布] </td>
</tr>
</form>
</table>
<BR>
<%
end sub
sub blog_add()
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据请不要乱改参数!');this.location.href='http://www.ynsky.com.cn/';</script>")
response.end
end if
IF checkmember<>true or request.Form("PostBlog")<>"ok" Then
Response.Write "<Script Language=JavaScript>alert('对不起,你没有发表日志权限!');javascript :history.back();</Script>"
Response.End
end if
IF trim(Request.Form("message"))=Empty OR trim(Request.Form("alog_Title"))=Empty OR trim(Request.Form("alog_CateID"))=Empty Then
Response.Write "<Script Language=JavaScript>alert('对不起,日志标题、分类和内容不能为空!');javascript :history.back();</Script>"
Response.End
Else
dim ablog_Title,ablog_Content,ablog_From,ablog_FromURL,ablog_CateID2,ablog_Intro,ablog_Quote,ablog_DisSM,ablog_DisUBB,ablog_DisIMG,ablog_AutoURL,ablog_IsShow,ablog_AutoKEY,ablog_IsTop,ablog_IsBest,ablog_DisComment,ablog_Weather
ablog_Title=CheckStr(Request.Form("alog_Title"))
ablog_Content=CheckStr(Request.Form("message"))
If InStr(ablog_Content,"[#seperator#]")>0 Then
ablog_Intro=HTMLEncode(Left(ablog_Content,InStr(ablog_Content,"[#seperator#]")-1))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -