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

📄 showlog.asp

📁 blog 程序 DIV BLOG 0.6 Readme [ http://www.IamTing.com ] DIV BLOG 0.6版更新说明 =====================
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#INCLUDE FILE="conn.asp" -->
<!--#include file="ubbcode.asp" -->
<!--#include file="log_lib.asp" -->


<script>
function runEx(cod1)  {
 cod=document.all(cod1)
  var code=cod.value;
  if (code!=""){
  var newwin=window.open('','','');  
  newwin.opener = null 
  newwin.document.write(code);  
  newwin.document.close();
}
}

function check(theForm) {
	if(theForm.key.value == ""  ) {
		alert("关键词不能为空");
		return false;
	}
}

function inputs(smiley){
if(document.NewRemark.log_r_content.createTextRange){
document.NewRemark.log_r_content.focus();
document.selection.createRange().duplicate().text=smiley;
}else{
document.NewRemark.log_r_content.value+=smiley;
}
}
</script>

<%
sql="select * from moban where m_id="&m_id&""
set rs=conn.EXECUTE(sql)

if rs.eof or rs.bof then
   sql="select * from moban where m_id=1"
   set rs=conn.EXECUTE(sql)
end if

mb_code=rs("m_html")

rs.close
set rs=nothing
'=====================================写入登陆信息
checkuser()
mb_code=replace(mb_code,"$checkuser$",check_user)
'=======================================写入日历
calenda l_year,l_month,l_day
mb_code=replace(mb_code,"$calenda$",ccode)
'=======================================写入Top10
getTop()
mb_code=replace(mb_code,"$top10$",tcode)
'=======================================写入RSS
getRss()
mb_code=replace(mb_code,"$rss$",rsscode)
'=======================================写入日志信息
getloginfo()
mb_code=replace(mb_code,"$log_info$",icode)
'=======================================写入分类列表
getcatlist()
mb_code=replace(mb_code,"$log_cat_list$",lcode)
'=======================================写入搜索表单
getsearchcode()
mb_code=replace(mb_code,"$search_form$",sccode)
'=======================================写入内容


	'开始上下文翻页lncode
function Formatlogtitle(str)
if len(trim(str))>=36 then 
Formatlogtitle=left(trim(str),35)&"..." 
else 
Formatlogtitle=trim(str)
end if 
end function 
dim lastlog_id,nextlog_id,lasttitle,nexttitle,cat_select,lncode
sub getlnlog
    if cat_id<>0 then
       cat_select="and cat_id="&cat_id
    else
       cat_select=""
    end if
    sql="SELECT top 1 log_id,log_tittle FROM log where log_id>"&request("log_id")&" "&cat_select&" ORDER BY log_id ASC"
    set rs=conn.Execute(sql)
	lncode="<div id='pageupdown'><div id='TurnLeft'>"
  if not (rs.eof or rs.bof) then
    nextlog_id=rs("log_id")
    nexttitle=Formatlogtitle(rs("log_tittle"))
    lncode=lncode&"<img src='images/leftarrow.gif' id='Linkimg' alt='向左走' /> <a href='showlog.asp?log_id="&nextlog_id&"&cat_id="&cat_id&"' title='上一篇:"&nexttitle&"'>上一篇 "&nexttitle&"</a>"
  else
    nexttitle="已无日志"
  end if
    lncode=lncode&"</div>"
    rs.close

	sql="SELECT top 1 log_id,log_tittle FROM log where log_id < "&request("log_id")&" "&cat_select&" ORDER BY log_id DESC"
    rs.open sql,conn,1,1
    lncode=lncode&"<div id='TurnRight'>"
  if not (rs.eof or rs.bof) then
    lastlog_id=rs("log_id")
    lasttitle=Formatlogtitle(rs("log_tittle"))
    lncode=lncode&"<a href='showlog.asp?log_id="&lastlog_id&"&cat_id="&cat_id&"' title='下一篇:"&lasttitle&"'> 下一篇 "&lasttitle &"</a> <img src='images/rightarrow.gif' alt='向右走' />"
  else
    lasttitle="已无日志"
  end if
    lncode=lncode&"</div></div>"
    rs.close
    set rs=nothing
end sub	

'上下文翻页lncode结束


dim log_id,e_log_r_id,log_r_id,scode
sub getlogcode
log_id=replace(request("log_id"),"'","''")
if request("log_id")="" then
     scode=scode&"错误的地址"
     exit sub
end if

if request("log_r_id")<>"" then 
   e_log_r_id=replace(request("log_r_id"),"'","''")
end if
sql="SELECT * from log where log_id="&log_id&""
set ASPLOG=conn.EXECUTE(sql)
if ASPLOG.eof or ASPLOG.bof then
    scode=scode&"该篇日志文章不存在,或已被删除"
    exit sub
end if


'在网页TITLE中写入日志标题 by Poorfish
scode=scode&"<script>document.title = 'IAMTING.COM... - "&ASPLOG("log_tittle")&"'</script>"	

gethidecatid()
checkhide(ASPLOG("cat_id"))
if noneshow="true" AND not (ULogin="true" and isad<0) then

scode=scode&"<table width='100%' border='0' cellspacing='1' cellpadding='4' bgcolor='"&color1&"'><tr><td>&nbsp;<b>隐藏分类中的日志,sorry,内容不可见:)</b>"
             

⌨️ 快捷键说明

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