<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="inc/conn.asp"-->
<%
if isnumeric(request("id"))  then
showid=request("id")
else
response.end()
end if
sql="select * from comment where id="&showid

rs.open sql,conn,1,3

if not rs.eof then

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<%=jianbook.sysinfo("keyword")%>" />
<meta name="description" content="<%=jianbook.sysinfo("dsc")%>" />
<title><%=rs("name")%>-<%=jianbook.sysinfo("title")%></title>
<link href="ui/layui/css/layui.css" rel="stylesheet" type="text/css" />
<link href="ui/images/main.css?11" rel="stylesheet" type="text/css" />
<link href="ui/skin/<%=jianbook.css%>.css" rel="stylesheet" type="text/css" />


</head>


<body style="background-color:#FFF">
<%

'''jianbook 
''' ==================================================================
''' 版权所有 http://www.9416.cn
''' ------------------------------------------------------------------
''' 此程序为免费开源版，个人可免费自由使用，不得作为商业用途，不可以修改再次发布！
''' ------------------------------------------------------------------
''' 个人使用需要保留版权，如需去除版权请联系作者购买。
''' ==================================================================
%>
<!--#include file="head.asp"-->




<div class="main">

<div class="header1">



<div class="head_show">
<div class="head_tx">
<div class="details-avatar c_tx1">
 <%jianbook.user_tx rs("uid"),rs("ip")%>
        </div>

<h1> <%=rs("name")%> <%if rs("ontop")=1 then%><div class="iconfont icon-fire ontop"></div><%end if%> </h1>  
  

</div> <%if rs("noreply")=false then%>  
<div class="f_btn3" ><a  onclick="tc('评论【<%=rs("name")%>】','lib/message.asp?upid=<%=rs("id")%>',800,400)" ><i class="layui-icon layui-icon-dialogue"></i> 评论 <%=rs("reply")%> </a></div>
<%end if%>
<div class="show_title">
 <p><%=jianbook.utype(rs("type"))%> | <%if rs("ip")<>"" then response.Write look_ip(rs("ip"))&" | " end if%><%=jianbook.formatdate(rs("intime"))%> </p>
</div>

</div>










</div>   
<div class="clear"></div>
<div class="comment">
<div class="comment_list1" >
<%if rs("class")=0 then%>
 <article ><%=jianbook.enhtml(rs("content"))%>  </article>
<%end if%>
<%if rs("class")=1 then%>

   <div  id="custom-toc-container"></div>

 <div id="editormd-view">
 
   <textarea style="display:none;"><%=rs("content")%></textarea>
 
 </div>
     <%end if%>  
   <%if rs("pic")<>"" then%>
     <div  class="c_pic" style="margin-top:10px;">
     <%
	  mpic=split(rs("pic"),",")
	  for pi=0 to ubound(mpic)
	  %>
 <a href="<%=mpic(pi)%>"  ><img src="<%=mpic(pi)%>" /></a>
    <%
	next%>
    <div class="clear"></div>
    </div>
<%end if%>

         
   <div class="c_tool1"> 
      <span class="iconfont icon-erweima tips" onclick="qrcode(<%=rs("id")%>)" tips="分享到微信"><b></b></span>
<%if jianbook.isadmin() or request.Cookies("user")("id")=rs("uid") then%> 
<%if rs("class")=0	  then%> 
<span class="layui-icon layui-icon-edit tips" onclick="tc('编辑【<%=rs("name")%>】','lib/message.asp?id=<%=rs("id")%>',800,400)" tips="编辑文章"></span> 
<%else%>
<span class="layui-icon layui-icon-edit tips" onclick="pop_up('编辑【<%=rs("name")%>】','lib/article.asp?id=<%=rs("id")%>','90%','90%')" tips="编辑文章"></span> 
<%end if%>
 
<%end if%> 

<%if jianbook.isadmin()  then%> 
<%if rs("zt")=0 and jianbook.sysinfo("audit")=1 then%>
<span class="layui-icon layui-icon-ok tips" onclick="set('zt',1,<%=rs("id")%>,'审核通过？')" tips="审核通过"></span><%end if%>
<span class="layui-icon layui-icon-flag tips" onclick="set_attr(<%=rs("id")%>,[<%=rs("ontop")%>,<%=rs("isnice")%>,<%=rs("isnote")%>])" tips="设置属性"></span>

<%
if rs("noreply")=False then%>
<span class="iconfont icon-jinzhipinglun tips" onclick="set('noreply',true,<%=rs("id")%>,'禁止评论？')" tips="禁止评论"></span>
<%else%>
<span class="iconfont icon-comments tips" onclick="set('noreply','false',<%=rs("id")%>,'恢复评论？')" tips="恢复评论"></span><%end if%>

<%if rs("slide")=1 then%>
<span class="iconfont icon-wrong tips" onclick="set('slide',0,<%=rs("id")%>,'取消幻灯片？')" tips="取消幻灯片"></span>
<%else%>
<span class="iconfont icon-success tips" onclick="set('slide',1,<%=rs("id")%>,'设置幻灯片？')" tips="设置幻灯片"></span><%end if%>

  <%if rs("file")<>"" then%>
  
 
<span  class="c_file" onclick="set_file(<%=rs("id")%>,<%=rs("jf")%>)" ><i class="iconfont icon-fujian1"></i></span>
 <%end if%>


 <%end if%>


</div>

<div class="comment_foot">

    
  <%
 if rs("file")<>"" then
suffix=Mid(rs("file"), InstrRev(rs("file"), ".") + 1)

if instr("mp4,avi,MOV",suffix)>0 then

 %>

 <a href="javascript:void(0)" class="m-video" data-src="<%=rs("file")%>"><i class="iconfont icon-play-filling"></i> 观看 </a>




  <%else
 %>
  
   

 <a href="javascript:void(0)" class="c_file" onclick="down_file(<%=rs("id")%>)"><i class="iconfont icon-fujian1"></i> 附件下载</a> <%if rs("jf")>0 then response.Write "(需"&rs("jf")&"积分)" end if%>
  
 <%end if
 end if
 %>  
    
<div class="zan">
<span class="layui-icon layui-icon-praise" onclick="zan(this,<%=rs("id")%>)"><b><%=rs("zan")%></b></span>
</div>

<%if rs("lm")<>"" then%><em class="lmtype"><a href="index.asp?lm=<%=rs("lm")%>"><i class=" layui-icon layui-icon-note"></i><%=rs("lm")%></a></em><%end if%> 
</div>
<div class="clear"></div>
       </div>
       
     

	 <div class="reply_div1" id="reply">  
         <div class="reply_title">全部评论 
		 <%if rs("noreply")=false then%>  
<div class="f_btn3" ><a  onclick="tc('评论【<%=rs("name")%>】','lib/message.asp?upid=<%=rs("id")%>',800,400)"><i class="layui-icon layui-icon-dialogue"></i> 评论 <%=rs("reply")%> </a>

</div>
<%end if%></div> 
         
       <% Sql="select * from [comment] where upid="&rs("id")&"  order by id desc"
rs1.open Sql,conn,3,1
if not rs1.eof then
do while not rs1.eof
 select case rs1("uid")
case "-1"
com_author=rs1("name")
case "0"
com_author="admin"

case else
sql="select * from [user] where id="&rs1("uid")
set rs2=conn.execute(sql)
if not rs2.eof then
com_author=rs2("username")
end if
rs2.close
end select


if rs1("class")=2 then
select case rs1("name")
case "0"
reply_author="admin"
case else
sql="select * from [user] where id="&rs1("name")
set rs2=conn.execute(sql)
if not rs2.eof then
reply_author=rs2("username")
end if
rs2.close

end select

com_title=com_author&"<b>回复</b>"&reply_author
else
com_title=com_author
end if
	
	%>
       <div class="c_show loop">
 
<div class="details-avatar ">
 <%jianbook.user_tx rs1("uid"),rs1("ip")%>
        
        </div>
         <div class="comment_list" id="show_com" >
           <ul>
             <li>
            
             <h1 class="tips" tips="回复" onclick="tc('回复【<%=com_author%>】','lib/message.asp?upid=<%=rs("id")%>&class=2&send=<%=rs1("uid")%>',800,400)"><%=com_title%> </h1>
               
             
               <h2><%=jianbook.utype(rs1("type"))%> | 
                 <%if rs1("ip")<>"" then response.Write look_ip(rs1("ip"))&" | " end if%>
                 <%=jianbook.formatdate(rs1("intime"))%></h2>
                  <%if jianbook.isadmin() or request.Cookies("user")("id")=rs1("uid")  then%>
                   <span class="layui-icon layui-icon-delete" onclick="del_reply_page(this,<%=rs1("id")%>,<%=rs1("upid")%>)" style="float: right;font-size: 20px;margin-right: 10px;"></span> <%end if%>
             </li>
             <li >
               <article ><%=jianbook.enhtml(rs1("content"))%>
                 
               </article>
             </li>
           </ul>
           <div class="clear"></div>
           
         </div>
       </div>
       <%rs1.movenext
	  loop%>
      </div>
      <%   else 
	   response.Write "<div class=no_info>暂无评论</div>"
	   end if
	
	  rs1.close
	
	  %>    
       




</div>

</div>


<div class="foot">© <%=year(now())%>　<%=jianbook.cor%></div>








<script type="text/javascript" src="ui/jquery.js"></script>
<script type="text/javascript" src="ui/layui/layui.js"></script>

<script type="text/javascript" src="ui/jq.js"></script>

<script type="text/javascript" src="ui/pc.js?11"></script>
<script type="text/javascript" src="ui/qrcode.min.js"></script>
<%if rs("class")=1 then%>
 <link rel="stylesheet" href="lib/editor/css/editormd.css" />
<script src="lib/editor/lib/marked.min.js"></script>
 <script src="lib/editor/lib/prettify.min.js"></script>
 <script src="lib/editor/lib/raphael.min.js"></script>
        <script src="lib/editor/lib/underscore.min.	js"></script>
        <script src="lib/editor/lib/sequence-diagram.min.js"></script>
        <script src="lib/editor/lib/flowchart.min.js"></script>
        <script src="lib/editor/lib/jquery.flowchart.min.js"></script>

        <script src="lib/editor/editormd.js"></script>
        <script type="text/javascript">
            $(function() {
                var testEditor
                
               testEditor = editormd.markdownToHTML("editormd-view", {
                    htmlDecode      : "style,script,iframe",  // you can filter tags decode
                    emoji           : true,
                    taskList        : true,
                    tex             : true,  // 默认不解析
                    flowChart       : true,  // 默认不解析
                    sequenceDiagram : true,  // 默认不解析
					tocContainer : "#custom-toc-container",
                 
               
                 
                });
				
				var width=document.body.clientWidth  
				var toc=$(".markdown-toc-list").html()
				console.log(width,toc)
				if (!toc){
					$("#custom-toc-container").remove()
					}
				if (width<1680){
					console.log("remove")
					$("#custom-toc-container").remove()
					
					}
				
			
				
            });
        </script>


<%end if

end if
rs.close%>

<%

jianbook.jcount(1)
%>

</body>
</html>
