<?php defined('PHPNEW_STATIC_TPL') === false && exit('PHPnew Blog');?>
{template header}
<script type="text/javascript">
var hover_cl;
$(function (){ 
    $('.attach_img img').click(function (){
        $('.order_mess img').attr('src',$(this).attr('src'));
       	$('.order_mess img').one('click',function(){//关闭弹窗
		      $("#dialog").hide();
        });
        dialog('dialog');
    })
    $('.img_default').each(function (){
        $(this).css('max-width','702px'); 
        if($(this).width() > 702)
            $(this).css('width','702px');
    })
    
    $('.attach_img').find('img').each(function (){
        $(this).css('max-width','702px');
        if($(this).width() > 702)
            $(this).css('width','702px');
    })
    
    $('.d'+$get_rand).eq(0).css('color','red');
    $('.d'+$get_rand).eq(1).show(); 
    
    $('.hover_div span').mouseover(function (){
        hover_cl = $(this).attr('class');
        hover_cl = hover_cl.replace('meun_sp ','');
        if(hover_cl){
            $('.meun_sp').css('color','');
            $(this).css('color','red');
            $('.show_list').hide();
           $('.'+hover_cl).eq(1).show(); 
        }
        
    })

    // 视频处理
    playrun(0);
    $('.t_table').css('width','100%');
    $('.attach_img').parent('a').click(function (){
        var clink = $(this).attr('href');
        if(clink.indexOf(base_url) < 0 && clink.indexOf('http') >= 0){
            return false;
        }
    })
    $('.jwplayer').each(function (){
        jwplayers($(this).attr('id'), $(this).attr('title'));
    })
}) 
function jwplayers(id,path){
  jwplayer(id).setup({
    file: path,
    width: 680,
    height: 400,
    primary: "video",
    image: "./Source/Default_data/jwplayer/Player.gif"
  });
}
function replay_dele(obj, ints){
    if (ints == 1){
        alert('回复禁止删除一天前信息');
        return false;
    }
    var tids = $(obj).attr('title');
    $.get( './index.php', {admincp:'thdele',tid:tids},function(data){
        if(data == 1){
             $('#th_'+tids).hide("slow",function(){
               $('#th_'+tids).remove();
             });
        }else{
            alert('系统无法接收指令');
        }
    })
    return false;
}

function imgerr(obj){
    $(obj).attr('src','./Data/attachments/attach.jpg');
    $(obj).attr('width',null);
    $(obj).attr('height',null);
    $(obj).attr('onerror',null);
}

var losobj,htmldata,titlestr;
function playrun(obj){
    if(obj !== 0){
        if(!$(obj).attr('title')){
            return false;
        }
    }
    if(losobj){
        $(losobj).html(htmldata);
        $(losobj).attr('title',titlestr);
    }
    if(obj == 0 && $('.play_list')){
        losobj = $('.play_list').eq(0);
        htmldata = $('.play_list').eq(0).html();
    }else{
        losobj = obj;
        htmldata = $(obj).html();
    }

    var playdata = $('.video_div').html();
    if(obj != 0){
        if($(obj).attr('title').indexOf('http')>=0){
            playdata = playdata.replace(/src\="[^ ]*"/ig,'src="'+$(obj).attr('title')+'" ');
        }else{
            // 
            playdata = playdata.replace(/VideoIDS=[^=&]*&/ig,'VideoIDS='+$(obj).attr('title')+'&');
            playdata = playdata.replace(/src\="[^ ]*"/ig,'src="http://static.youku.com/v1.0.0174/v/swf/loader.swf?VideoIDS='+$(obj).attr('title')+'&amp;embedid=&amp;isAutoPlay=true&amp;isShowRelatedVideo=false&amp;embedid=-&amp;showAd=0" ');
            playdata = playdata.replace(/isAutoPlay=false/ig,'isAutoPlay=true');
        }
    }
    
    //$(losobj).attr('title','');
    $(losobj).html(playdata);
    
}
function postToWb(){
	var _t = encodeURI(document.title);
	var _url = encodeURIComponent(document.location);
	var _appkey = encodeURI("{QQKEY}");//你从腾讯获得的appkey
	var _pic = encodeURI('{QQ_IMG}');//（例如：var _pic='图片url1|图片url2|图片url3....）
	var _site = '{URL_HOST}';//你的网站地址
	var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;
	window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
}
function dialog(container){
	showDiv($("#"+container));
	$("#shut").click(function(){//关闭弹窗
		$("#dialog").hide();
	});
}
function showDiv(obj){
 $(obj).show();
    center(obj);
 $(window).scroll(function(){
    center(obj);
 });
 $(window).resize(function(){
  center(obj);
 }); 
}

function center(obj){
     var windowWidth = document.documentElement.clientWidth;   
     var windowHeight = document.documentElement.clientHeight;   
     var popupHeight = $(obj).height();   
     var popupWidth = $(obj).width();
     $(obj).css({   
      "position": "absolute",
      'top':((windowHeight-popupHeight)/2 + $(document).scrollTop()) +'px',
      'left':(windowWidth-popupWidth)/2 +'px'
     });   
}
function next_img(obj,img_width){
    $(obj).next('.attach_img').find('img').attr('width',img_width);
    $(obj).next('.attach_img').find('img').attr('src',$(obj).next('.attach_img').find('img').attr('title'));
    $(obj).next('.attach_img').show();
    $(obj).remove();
}
var replaycount = 0;
function replay_data(obj){
    if(replaycount != 0){
        alert('请回复加载完成!');
        return false;
    }
    replaycount = 1;
    $.post( $(obj).attr('action'), $(obj).serializeArray(),function (data){
        if(data.status != 1){
            replaycount = 0;
            if(data.m){
                alert(data.m);
            }else{
                alert('系统无法识别你的操作');
                return false;
            }
            if(data.url)
                js_header(data.url);
        }else{
            $('.hidereplay').before(data.m);
            $(data.id).slideDown("slow");
            $('#elm1').val('');
            replaycount = 0;
        }
    },'json');
    return false;
}
</script>
<style type="text/css">
    .ptitle{height: 30px; line-height: 30px; font-weight: bolder; font-size: 13px; color: #353939; border-bottom: 3px solid #D8D8D8;}
    .pmess{ margin: 7px; line-height: 23px;}
    .afid:link{color: #FF8040;}
    .afid:hover{color: red;}
    
    .replay{margin: 8px; margin-left: 0;line-height:20px; border: 4px solid #D2E2EE; background-color: #FFFAF7; border-left: 1px solid #D2E2EE; border-top: 1px solid #D2E2EE; overflow: hidden;}
    .user_re{float: left; width: 20%; overflow: hidden; text-align: center}
    .user_img{margin: 6px; border: 1px solid silver; padding: 1px; margin-bottom: 0px;}
    .user_na{display: block; text-align: center; font-weight: bolder; color: #004080;}
    .replay_show{float: right;width: 80%; text-align: left;}
    .replay_meun{display: block;border-left: 1px solid #D2E2EE; background-color: #FBFBFB; color: silver; border-bottom: 1px solid #D2E2EE; text-align: right; padding-right: 5px;}
    .replay_meun a:link{color: #0080FF; margin-right: 3px;}
    .replay_mess{overflow: hidden;width: 560px; display: block; font-size:13px; margin-left:0px; margin-top: 6px; color: #3C3C3C;}
    
    .attach_img{width: auto; text-indent: 0px;text-align: left;}
    .attach_img img{ margin: 0px;text-indent: 0px;}
    #content_mess{margin: 12px; margin-top: 0px; height: auto; margin-right: 18px; line-height: 20px; min-height: 280px;}
    #content_mess .mtop{font-size:14px; line-height: 22px; color: #403F3E; width: 704px;}
    .mtop ul li{ margin-left: 40px; list-style-type:decimal-leading-zero}
    .t_table{border-collapse: collapse;}
    .t_table td{width: auto; border: 1px solid gray; padding-left: 3px;}
    .sp_r{float: right; font-size: 11px; font-weight: normal; color: white;}
    .t2{line-height: 25px; height: 25px; overflow: hidden;}
    #main_right img{vertical-align: middle;}
    .hover_th{font-size: 20px; cursor: pointer;}
    
    .notpic{background-color: #E1EEE3; border-left: 20px solid #FF8040; font-size: 11px; color: #2F2F2F; height: 20px; line-height: 20px;}
    .attach_other{overflow: hidden;display: block; line-height: 20px; overflow: hidden; padding: 6px; vertical-align: text-top; min-height: 50px; text-indent: 0px; border: 1px solid silver; background-color: #EAF4F4; margin-bottom: 3px;}
    .sourcedata{float: left;}
    .sourcedata span{color: #313131; font-size: 12px; display: block;}
    .sourcedata .otherspan{margin-left: 45px; width: 400px;}
    .sourcedata img{ vertical-align: middle;}
    .attach_other .right_attach{float: right; display: block; width: 48px; color: #FF8040; font-weight: bolder; height: 50px; line-height: 50px; text-align: center; background: url('./App/default_tpl/source/1354108575_key_0.png') no-repeat;}
    #dialog {height:auto;border:3px #84938F solid;text-align:center;display:none;position:absolute;z-index:10;background-color: #EAEFE0;}
    code{border: 2px solid #E2E2E2; background-color: #F7F9F4; width: 688px; font-size: 13px; line-height: 16px; font-family: "Courier New"; border-left: 2px solid #777BB4;  padding:6px; display: block;}
    .span_read{background-color: red; color: white; padding: 8px 8px; text-align: center; border: 1px solid red; border-top: none;}
     .video_div{margin:0; padding:0; display: none;}
     .play_list,.img_hide{border-bottom: 1px solid silver; margin-bottom: 6px; cursor: pointer;}
     .play_list img,.img_hide img{vertical-align: middle;}
     .show_list{float: left; width: 60%; display: none;}
     .meun_sp{padding: 3px 8px; color: white; margin-right: 5px;}
     .hidereplay{display: none;}
    #main_right{float: right; width: 226px; _width: 216px; overflow: hidden;}
    #main_right h3{ border-bottom: 1px solid #FF8040; height: 30px; color: #FF8040; line-height: 30px; padding-left: 3px; font-weight: bolder;}
    #main_right ul{margin-bottom: 3px;}
    #main_right .Hook{line-height: 22px;}
    #main_right .rli{line-height: 30px; border-bottom: 1px dotted #CCD6DD;}
    .cat_header_ico{margin-left: 8px; vertical-align: middle;}
    .search{padding: 4px; border: 1px solid silver;}
    .ulook{font-size: 11px; color: silver;}
</style>
<table style="width: 100%;">
    <tr>
    <td style="background: white url('./App/default_tpl/source/boxbg.jpg') repeat-y; background-position: right; vertical-align: top; width: 734px; overflow: hidden;">
    <div style="line-height: 28px; height: 28px; margin-left: 10px;"> <a href="./index.php">首页</a> &raquo; <a href="{$thread[fidlink]}">{$thread[thread_fid]}</a> &raquo; {$thread[thread_title]}</div>
<div>
    
    <h3 style="border-bottom: 1px solid silver; margin-left: 10px;font-weight: bolder; color: #FF8040; height: 30px; line-height: 30px;">
    <span class="hover_th"><a href="{$rss_url}" target="_blank"><img class="cat_header_ico" src="./App/default_tpl/source/1326165048_rss.png" /></a></span> <a href="{$thread[link]}">{$thread[thread_title]}</a> 
    <!--{if $thread[thread_state]}-->
    <img src="./Static/Images/stamp/{$thread[thread_state]}.gif" style="vertical-align: middle" />
    <!--{/if}-->
    <!--{if $th_sync}-->
        <img style="vertical-align: middle" alt="远程图片同步主题" title="远程图片同步主题" src="./Static/Images/stamp/005_sync.gif" />
    <!--{/if}-->
    </h3>
    <div style="text-align: right; height: 18px; line-height: 18px; overflow: hidden;">
        <span class="span_read" title="发表作者">{$thread[user_name]}</span>
        <span class="span_read" title="发表时间">{$thread[thread_date_read]}</span>
        <span class="span_read" title="查阅数量/附件数量">{$thread[thread_view]} / {$thread[thread_size_attch]}</span>
        <span class="span_read" style="margin-right: 8px; cursor: pointer;" onclick="window.print();">Print</span>
    </div><br />
    <div id="content_mess">
            <!--{if {$Hook_Thread_Top}}-->
            <div id="Hook_Thread_Top">{$Hook_Thread_Top}</div>
            <!--{/if}-->
        <!--{if $thread[thread_message]}-->
        <div class="mtop">
    		{$thread[thread_message]}
        </div>
        <br /><br />
        <!--{/if}-->
        <!--{if $cfg_attch_look === 1}-->
            <p style=" width: 580px; margin-top: 12px; line-height: 30px; background-color: #EFF5D8; border: 3px solid #F7BE80; {if $th_pay}border-bottom: none;{/if} color: ##2e2e2e;"> 　如果您要查看本帖保护内容 请 <a href="./index.php?user=login.html">登录</a></p>
        <!--{elseif $cfg_attch_look > 1}-->
            <p style=" width: 580px; margin-top: 12px; line-height: 30px; background-color: #EFF5D8; border: 3px solid #F7BE80; {if $th_pay}border-bottom: none;{/if} color: #2e2e2e;"> 　如果您要查看本帖隐藏内容, 请参与回复</p>
        <!--{/if}-->
        <!--{if $th_pay}-->
        <div style=" clear: both; border: 3px solid #F7BE80; width: 580px; height: 70px; background-color: #FFFEE6; overflow: hidden;">
            <div style="float: left; color: #FF8000; font-weight: bold; height: 70px; line-height: 60px; overflow: hidden;">　优惠价: <span style="font-weight: bolder; font-size: 50px; color: #0080FF;">{$th_pay}</span> <del>{$los_pay}</del>元
            </div>
            <div style="float: right;"><br /><a href="{$th_url}" target="_blank"><img style="margin-right: 12px; vertical-align: middle;" src="./Static/Images/sale_buy/btn-fastbuy.gif" /></a></div>
        </div>
        <!--{/if}-->
        <!--{if {$Hook_Thread_Bottom}}-->
            <div id="Hook_Thread_Bottom">{$Hook_Thread_Bottom}</div>
        <!--{/if}-->
        <div class="hover_div" style="margin-top: 30px; border-bottom: 1px solid silver; color: #353535; cursor: pointer; font-weight: bolder;">
        <span class="meun_sp d1" style="background-color: #0080FF;">随机</span>
        <span class="meun_sp d2" style="background-color: green;">精华</span>
		<span class="meun_sp d3" style="background-color: blue;">推荐</span>
		<span class="meun_sp d4" style="background-color: #8000FF;">热贴</span>
		</div>
        <div style="overflow: hidden; border-top: none;">
            <ul class="show_list d1">
                <!--{loop $get_thread[0] $val}-->
                <li> <span style="color: #FF8040;"> ★</span> <a href="{$val[link]}" title="{$val[thread_title2]}">{$val[thread_title]}</a></li>
                <!--{/loop}-->
            </ul>
            <ul class="show_list d2">
                <!--{loop $get_thread[2] $val}-->
                <li> <span style="color: #FF8040;"> ★</span> <a href="{$val[link]}" title="{$val[thread_title2]}">{$val[thread_title]}</a></li>
                <!--{/loop}-->
            </ul>
            <ul class="show_list d3">
                <!--{loop $get_thread[3] $val}-->
                <li> <span style="color: #FF8040;"> ★</span> <a href="{$val[link]}" title="{$val[thread_title2]}">{$val[thread_title]}</a></li>
                <!--{/loop}-->
            </ul>
            <ul class="show_list d4">
                <!--{loop $get_thread[4] $val}-->
                <li> <span style="color: #FF8040;"> ★</span> <a href="{$val[link]}" title="{$val[thread_title2]}">{$val[thread_title]}</a></li>
                <!--{/loop}-->
            </ul>
            <ul style="float: right; width: 39%; overflow: hidden;">
                <li><img style="margin: 6px; border: 1px solid silver;" src="./Static/Images/ad.jpg" /><br />
                <span style="color: #FF8040; font-weight: bolder;"><a href="http://www.fenanr.com/index/main/read/111157.html" target="_blank">PHPnew Blog 博客程序免费试用</a></span> <br />
                <span style="color: #353535;">全站伪静态 / 优秀插件接口 / 批量图文处理<br />
                RSS订阅  /  支持用户投稿  / 无限日期归档<br />
                销售,图文展示 / 日志,缓存管理 / QQ互联绑定</span>
                 </li>
            </ul>
        </div>
    </div>
    
    <div style="overflow: hidden; border-bottom: 2px solid silver; line-height: 24px; height: 24px;">
        <div style="float: left;"><a style="margin-left: 10px;" href="javascript:void(0)" onclick="postToWb();" class="tmblog"><img src="./Static/Images/b24.png" /></a> <a href="javascript:void(0);" onclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;" title="分享到QQ空间"><img src="./Static/Images/qzone.jpg" alt="分享到QQ空间" /></a></div>
        <div style="float: right; width: 60%; overflow: hidden;">
            <p style="text-align: right; padding-right: 5px;">{$thread[user_name]} 发表于 {$thread[thread_date]}　
             <!--{if $user_admin}-->
                <a href="./index.php?admincp=edit&{$read}.html">编辑</a> / 
                <a href="./index.php?admincp=edit&C{$thread[thread_strfid]}.html">发表</a>
                <!--{/if}-->
            </p>
        </div>
    </div>
</div>
<!--end -->    
 
<div style="margin-left: 10px;">
        <!--{loop $replay_array $val}-->
        <ul class="replay" id="th_{$val[thread_id]}">
            <li class="user_re">
                <img src="{$val[user_logo]}" class="user_img" />
                <span class="user_na">{$val[user_name]}</span>
                <span>积分: {$val[user_exp]}</span>
            </li>
            <li class="replay_show">
            <span class="replay_meun">　{$val[thread_date]} {if !$val[deles]}/ <a title="{$val[thread_id]}" href="javascript:void(0);" onclick="replay_dele(this, '{$val[deles]}');">DEL</a>{/if}</span>
                <span class="replay_mess">
                {$val[thread_message]}<br />
                </span>
            </li>
        </ul>
        <!--{/loop}-->
        <div class="hidereplay"></div>
        
        <!--{if $page_list}-->
        <div style="text-align: right; width: 100%; overflow: hidden;">{$page_list}</div>
        <!--{/if}--><br />
        <!--{if $no_replay == 0 && $replay_statu !== 1}-->
            <form action="./index.php?main=replay" method="post" onsubmit="return replay_data(this);" enctype="application/x-www-form-urlencoded">
            <input type="hidden" name="tid" value="{$read}" />
            <input type="hidden" name="cat" value="{$fid}" />
            <ul>
                <li>
                <textarea id="elm1" name="message" style="height: 110px; padding: 3px; color: #3C3C3C; font-size: 13px; line-height: 12pt; width: 480px; border: 2px solid silver; background-color: #F5F9FA;"></textarea><br />
                <input type="submit" style="line-height: 20px; height: 20px; padding: 0; background-color: #0080FF; color: white; border: none;" value="参与回复" /><br />
                </li>
            </ul>
            </form><br />
        <!--{/if}-->
</div>
    </td>
    
    <td id="main_right" style="vertical-align: top;">
    <ul>
        <li style="text-align: center; border: none; height: 160px; line-height: 160px;"><img title="二维码" src="./index.php?ajax=phpqrcode&big=4&tid={$read}" /></li>
    </ul>
        <!--{if $Hook_Thread_Right_1}-->
        <ul id="Hook_Thread_Right_1">
            <li class="Hook">{$Hook_Thread_Right_1}</li>
        </ul>
        <!--{/if}-->
        <div class="cat_div">
            <div style="float: left; width: 48%; overflow: hidden;">
                <div class="cat_diva" style="width: 80%; background-color: #0080FF;"><a href="./">首页</a></div>
                <div class="cat_divb" style="width: 20%;"><a href="./index.php?main=rss&index.html" target="_blank"><img style="_margin-top: 12px;" src="./App/default_tpl/source/1326165048_rss.png" /></a></div>
            </div>
            <div style="float: right; width: 48%; overflow: hidden;">
                <div class="cat_diva" style="width: 80%; background-color: #5181FD;"><a href="./index.php?main=filing.html">归档</a></div>
                <div class="cat_divb" style="width: 20%;"><a href="./index.php?main=filing.html" target="_blank"><img style="_margin-top: 12px;" src="./App/default_tpl/source/1326165048_rss.png" /></a></div>
            </div>
        </div>
        <div class="cat_div">
            <div class="cat_diva" style="width: 80%;"><input accept="accept" class="search" type="text" value="" /></div>
            <div class="cat_divb" style="width: 20%; cursor: pointer;" onclick="js_search();"><img style="_margin-top: 12px;" src="./App/default_tpl/source/search.gif" /></div>
        </div>
        <!--{loop $cat_array $key $val}-->
        <div class="cat_div">
            <div class="cat_diva"><a href="{$val[link]}">{$val[c_name]}</a></div>
            <div class="cat_divb"><a href="{$val[rss_link]}" target="_blank"><img style="_margin-top: 12px;" src="./App/default_tpl/source/1326165048_rss.png" /></a></div>
        </div>
        <!--{/loop}-->
        <div style=" clear: both;"> </div>
    
        <!--{if $Hook_Thread_Right_2}-->
        <ul id="Hook_Thread_Right_2">
            <li class="Hook">{$Hook_Thread_Right_2}</li>
        </ul>
        <!--{/if}-->
        <!--{if $history_array}-->
        <ul>
            <h3>浏览历史: </h3>
            <!--{loop $history_array $val}-->
            <li class="rli"><img class="cat_header_ico" src="./App/default_tpl/source/1326941555_clock-history.png" /> <a href="{$val[l]}" title="{$val[ts]}">{$val[t]}</a></li>
            <!--{/loop}-->
        </ul>
        <!--{/if}-->
        <!--{if $Hook_Thread_Right_3}-->
        <ul id="Hook_Thread_Right_3">
            <li class="Hook">{$Hook_Thread_Right_3}</li>
        </ul>
        <!--{/if}-->
        <!--{if $Hook_Thread_Right_4}-->
        <ul id="Hook_Thread_Right_4">
            <li class="Hook">{$Hook_Thread_Right_4}</li>
        </ul>
        <!--{/if}-->
    </td>
</tr>
</table>

<div id="dialog">
    <ul style="list-style:none; line-height: 20px; text-align: left; margin: 0; padding: 0;">
    <li style=" overflow: hidden; line-height: 18px; height: 18px;">
        <span style="display: block; margin: 3px; font-weight: bolder; float: left; width: 60%;">图片信息: </span>
        <input style="float: right; margin: 3px; cursor: pointer;" type="button" value="关闭弹出窗" id="shut" />
    </li>
    <li class="order_mess" style="margin: 3px; height: auto; text-align: center; background-color: white; overflow: hidden;"><img style="margin: 5px;" src="" /></li>
    </ul>
</div>
{template footer}