<!--#include file="conn.asp"-->
<!--#include file="inc/class_sys.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/class_blog.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>引用通告</title>
<style type="text/css">
<!--
@charset "gb2312";
* {margin: 0;padding: 0;border: 0;}
body {
color: #444;
background: #fff;
text-align: left;
margin: 0;
font-family: 'Century Gothic', Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 150%;

}
.content {
padding:0px 100px 0px 100px;

}
.content_body {
border-left: 1px #694659 solid;
border-right: 1px #694659 solid;
border-bottom: 1px #694659 solid;
background: #fff;
padding:0px;
}
.content_body h1 {
font-size:14px;
padding:6px 0px 0px 20px;
color:#f30;
font-weight:400;
}
.content_top {
padding:6px 0px 0px 15px;
width:100%;
height:30px;
background: url("images/yinyongmenu.png") no-repeat top right;
color:#fff;
font-size:14px;
font-weight:bold;
border-left: 1px #694659 solid;
border-right: 1px #694659 solid;
}
#list {
background: url("images/menubgline.png");
}
#list h1 {
padding:8px 6px 8px 6px;
font-size:14px;
color:#333;
font-weight:600;
}
#list .list_edit a {
color:#099;
font-weight:bold;
text-decoration: none;
}
#list .list_edit a:hover {
color:#f90;
font-weight:bold;
text-decoration: underline;
word-spacing:15px;
}
#list ul {
padding:1px 0px 3px 15px ;
}
-->
</style>
</head>
<body>
<div class="content">
  	<div class="content_top">
		  	<div class="side_d1 side11"></div>
		    <div class="side_d2 side21"></div>
			引用通告
	</div>
	
    <div class="content_body">
<%
dim oblog,logid
set oblog=new class_sys
oblog.start
If Application(cache_name_user&"_systemenmod")<>"" Then
	Dim enStr
	enStr=Application(cache_name_user&"_systemenmod")
	enStr=Split(enStr,",")
	If enStr(3)="1" Then	response.write("系统临时禁止使用引用通告功能!"):Response.End
End if
	logid=Int(request("id"))
	typetb()
	Set oblog=Nothing
%>
	</div>
	
    <div class="content_bot">
		  	<div class="side_e1 side12"></div>
   			<div class="side_e2 side22"></div>
 	</div>
	
  </div>
</body>
</html>
<script>
function copyurl(){
		var threadtitle="";
		if(copyclip(threadtitle)){ 
//			document.getElementById('hint4copy').style.display='';
		}
	}
	
	function copyclip(meintext)
    {
     if (window.clipboardData){
	 if (window.clipboardData.setData("Text", meintext)){
			alert('复制成功');
			return true;
	   }
	   else {
			alert('复制失败\n请允许网页访问"剪切板"');
			return false;
		}
      }else if (window.netscape) { 
       try{
       	netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
       } catch (e) {
          alert("被浏览器拒绝！\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'");
		  return false;
       }

       var clip = Components.classes['@mozilla.org/widget/clipboard;1']
                     .createInstance(Components.interfaces.nsIClipboard);
       if (!clip) return false;
       

       var trans = Components.classes['@mozilla.org/widget/transferable;1']
                      .createInstance(Components.interfaces.nsITransferable);
       if (!trans) return false;
       
       trans.addDataFlavor('text/unicode');
       
       var str = new Object();
       var len = new Object();
       
       var str = Components.classes["@mozilla.org/supports-string;1"]
                    .createInstance(Components.interfaces.nsISupportsString);
       
       var copytext=meintext;
       
       str.data=copytext;
       
       trans.setTransferData("text/unicode",str,copytext.length*2);
       
       var clipid=Components.interfaces.nsIClipboard;
       
       if (!clip) return false;
       
       clip.setData(trans,null,clipid.kGlobalClipboard);
       
       }
	   alert('复制成功');
       return true;
    }

</script>
<%

sub typetb()
Dim i,tburl,TBcode,nTime
Dim rs
tburl=oblog.CacheConfig(3)&"tb.asp?id="&logid
'将授权码保存至数据库
Set rs = oblog.Execute ("SELECT TBcode FROM oblog_log WHERE logid = "&logid)
If Not rs.EOF Then 
	TBcode = rs(0)
Else 
	Response.Write "日志不存在"
End if
'TBcode = Application(oblog.Cache_Name & "_TBcode"&logid)
If TBcode = "" Or IsNull(TBcode) Then 
'	Application(oblog.Cache_Name & "_TBcode"&logid) = GetDateCode(2) & RndPassword(12)
	TBcode = GetDateCode(2) & RndPassword(12)
	oblog.Execute ("UPDATE oblog_log SET TBcode = '" &TBcode& "' WHERE logid = "&logid)
Else 
	'nTime = oblog.CacheConfig(64)
	'If nTime < 30 Or nTime > 1440 Then nTime = 30
	 nTime = 30
	If DateDiff("n", DeDateCode(Left(TBcode, 12)), Now) > nTime Then
'		Application(oblog.Cache_Name & "_TBcode"&logid) = GetDateCode(2) & RndPassword(12)
		TBcode = GetDateCode(Now(),2) & RndPassword(12)
		oblog.Execute ("UPDATE oblog_log SET TBcode = '" &TBcode& "' WHERE logid = "&logid)
	End If
End If
tburl = tburl & "&TBcode="&TBcode
%>
<h1>本文引用地址：<%=tburl%> <input type="button" onclick="copyclip('<%=tburl%>');" value="复制"></h1>
<%
set rs = oblog.Execute("select * from oblog_trackback where logid="&logid&" order by id desc")
if rs.eof then
%>
<ul class="list_edit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该日志没有被引用。</ul>
<%else%>
<h1>该日志有如下引用</h1>
<div id="list">
<%
	i = 1
	while not rs.eof
	%>
	<h1>&nbsp;&nbsp;  第<%=i%>条:<%="被"&rs("tbuser")&"在"&rs("addtime")&"引用"%></h1>
	<ul class="list_edit">引用标题：<%=oblog.filt_html(rs("topic"))%></ul>
	<ul class="list_edit">引用地址：<a href="<%=rs("url")%>" target="_blank"><%=rs("url")%></a></ul>
      <%
		i = i+1
		rs.movenext
	wend
	set rs=nothing
%>
</div>
<%	
	end if
end sub
%>