<!--<?php
include_once PrintEot('m_header');
include_once PrintEot('user_space');
print <<<EOT
-->
<div id="content" class="fr">
	<div style="padding-top:10px;">
        <div class="cc p-info">
            <h1><strong class="f24 blue"><a href="u.php?uid=$u">$username</a></strong> <span class="f24 gray">/</span> <span class="red b f16">日志</span> <span class="gray">( {$count}篇 )</span></h1>
        </div>
        <div class="breadCrumb">
        <a href="u.php?uid=$u" class="gray">&laquo;返回首页继续浏览</a>
        </div>
    </div>
    <div id="content_main" class="fl" style="overflow:hidden;">
    <table width="100%">
    	<tr><td height="600" style="padding-bottom:20px;vertical-align:top;">
    	<div style="padding:5px 15px;w">
<!--
EOT;
$privacy = array('全站可见','仅好友可见','仅自己可见');
if(!$did){print<<<EOT
-->
            <ul class="user_diary_list">
<!--
EOT;
if($sum){
foreach($diarydb as $value){
$typename = !$value[dtid] ?  '默认分类' : $diarytype[$value[dtid]][name];
$title = '所属:'.$value[username].'&nbsp;'.$value[title];
$descrip = $value[subject];
print <<<EOT
-->
                <li id="diary_{$value[did]}">
                
<!--
EOT;
if($db_share_open && !$shareGM){print<<<EOT
-->
                <span class="fr"><a class="a-reply" href="javascript:;" onclick="sendmsg('operate.php?action=share&ajax=1&type=diary&id=$value[did]','',this.id);">分享<span>+</span></a></span>
<!--
EOT;
}print <<<EOT
-->
                <a href="{$basename}did=$value[did]" class="f14 b">{$value[subject]}</a>
                <p class="gray"><span>发表于：$value[postdate]</span><span>评论：$value[c_num]</span><span>浏览：$value[r_num]</span></p>
                <p class="f14 mt10" style="line-height:1.5" id="img-width">
                $value[content]
<!--
EOT;
if($value['pic']){
foreach($value['pic'] as $pic){
if($pic){print <<<EOT
-->
                    <div class="f12" id="att_$pic[aid]" style="width:650px;overflow:hidden;margin:5px 0px 5px 0;">
<!--
EOT;
if($pic['desc']){print <<<EOT
-->
                        描述:$pic[desc]<br />
<!--
EOT;
}print <<<EOT
-->
                        图片: $pic[img]
                    </div>
<!--
EOT;
}}}print <<<EOT
-->
                </p>
                <p class="mt10 gray">
<!--
EOT;
if($groupid==3){print <<<EOT
-->
                <span class="del fr" style="cursor:pointer;" onclick="pwConfirm('是否确认删除',this,function(){delDiary('$value[did]','$u','1')})">删除</span> 
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
!$value[dtid] && $value[dtid] = '-1';
print <<<EOT
-->
                    <span>分类： <a href="{$basename}dtid=$value[dtid]">{$typename}</a></span>
<!--
EOT;
if($u==$winduid && $a!='friend'){
print <<<EOT
-->
                    <span>{$privacy[$value[privacy]]}</span>
<!--
EOT;
}print <<<EOT
-->
                </p>
                </li>
<!--
EOT;
}}else{print <<<EOT
-->
                <li>好友最近没有日志</li>
<!--
EOT;
}print <<<EOT
-->
            </ul>
            <div class="mt10">$pages</div>
<!--
EOT;
}elseif(is_numeric($did)){
$typename = !$rt[dtid] ?  '默认分类' : $diarytype[$diary[dtid]][name];
$copy = $diary[copyurl] ? '转载于' : '发表于';
$title = '所属:'.$diary[username].'&nbsp;'.$diary[title];
$descrip = $diary[subject];
print <<<EOT
-->
			<div id="diary_{$diary[did]}">
            <h1 class="b red f24 mt10" style="line-height:1.5">{$diary[subject]}</h1>
            <div style="background:#f7f7f7;border-top:1px solid #e4e4e4;padding:5px 10px;line-height:1.8;">
<!--
EOT;
if($db_share_open && !$shareGM){print<<<EOT
-->
            <span class="fr"><a class="a-reply" href="javascript:;" onclick="sendmsg('operate.php?action=share&ajax=1&type=diary&id=$did','',this.id);">分享<span>+</span></a></span>
<!--
EOT;
}print <<<EOT
-->
            
            <span class="gray"><span class="f10 mr10">{$author}{$copy}$diary[postdate]</span> <span class="mr10">评论：$diary[c_num]</span><span class="mr10">浏览：$diary[r_num]</span></span>

<!--
EOT;
if($winduid==$u || $groupid==3){print <<<EOT
-->

         <span class="del" style="cursor:pointer;" onclick="pwConfirm('确认删除？',this,function(){delDiary('$diary[did]','$u','1')})">删除</span>
<!--
EOT;
}print <<<EOT
-->
            <p>

<!--
EOT;
if($diary[ifcopy] && $u != $winduid){print <<<EOT
-->
    <a style="cursor: pointer;" class="fr" title="转载" href="{$basename}a=copydiary&did=$diary[did]" onclick="return ajaxurl(this);">转载</a>
<script language="JavaScript">
function ajaxurl(o) {
read.obj = o;
ajax.send(o.href,'',ajax.get);
return false;
}
</script>
<!--
EOT;
}if($_G['allowreport']){print <<<EOT
-->
<a style="cursor: pointer;" class="fr" onclick="sendmsg('pw_ajax.php?action=report&type=diary&tid=$did&pid=$u','',this.id);" id="report_diary">举报</a>
<!--
EOT;
}
!$rt[dtid] && $diary[dtid] = '-1';
print <<<EOT
-->
        <span class="mr10">分类：<a href="{$basename}dtid=$diary[dtid]">{$typename}</a></span>
<!--
EOT;
if($u==$winduid){
print <<<EOT
-->
        <span>{$privacy[$diary[privacy]]}</span>
        
<!--
EOT;
}print <<<EOT
-->
</p>
			</div>
			<table width="100%">
            <tr><td class="vt" height="200">
            <p style="line-height:2;font-size:14px;padding:20px 0;" id="img-width">
<!--
EOT;
if($diary[copyurl]){print <<<EOT
-->
    <div style="margin-left:15px;">转载自:<a href="u.php?uid=$diary[copyuid]" target="_blank" style="color:#2484C7">$diary[copyer]</a> <a href="$diary[url]" target="_blank">$diary[url]</a></div><br />
<!--
EOT;
}print <<<EOT
-->
            $diary[content]
<!--
EOT;
if($diary['pic']){
foreach($diary['pic'] as $pic){
if($pic){print <<<EOT
-->
            <div class="f12" id="att_$pic[aid]" style="width:450px;overflow:hidden;margin:5px 0px 5px 0;">
<!--
EOT;
if($pic['desc']){print <<<EOT
-->
                描述:$pic[desc]<br />
<!--
EOT;
}print <<<EOT
-->
                图片:$pic[img]
<!--
EOT;
if($pic['dfadmin']){print <<<EOT
-->
                [<a style="cursor:pointer" onclick="delatt('$diary[pid]','$pic[aid]');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
            </div>
<!--
EOT;
}}}print <<<EOT
-->
            </p>
            </td></tr></table>
            <div class="c"></div>
            <div class="cc mt10">
<!-- 
EOT;
$rateSets = unserialize($db_ratepower);
if($rateSets[2] && isset($db_hackdb['rate'])){
print <<<EOT
-->						
            <link rel="stylesheet" type="text/css" href="hack/rate/images/rate.css" />
            <script language="JavaScript" src="js/rate_ajax.js"></script>
            <script language="javascript">
            window.onload = function() {
                rate.getVote("vote_box","{$db_bbsurl}/hack.php?H_name=rate&action=ajax","elementid=vote_box&typeid=2&objectid={$did}&authorid={$u}");
            };
            </script>						
            <div id="vote_box" class="mt10"></div>
<!-- 
EOT;
}
print <<<EOT
-->
			<div class="mt10">
            <a style="cursor: pointer;" class="fl" title="下一篇" href="{$basename}a=next&did=$diary[did]" onclick="return ajaxpage(this.href,'next','$u','$space');">下一篇</a>
            <a style="cursor: pointer;" class="fr" title="上一篇"href="{$basename}a=pre&did=$diary[did]" onclick="return ajaxpage(this.href,'pre','$u','$space');">上一篇</a>
            </div>
            </div>
<!--
EOT;
require_once PrintEot('m_comment');print <<<EOT
-->
        	</div>
<!--
EOT;
}print <<<EOT
-->
		</div>
        </td></tr>
    </table>
	</div>
    <div id="sidebar" class="fr">
    	<div style="padding:15px 10px;line-height:2.2;">
        <h2 class="b">日志分类</h2>
        <ul id="dt_ul">
            <li id="dt_all"><a href="{$basename}">全部日志</a> ({$count})</li>
<!--
EOT;
foreach($diarytype as $value){
print <<<EOT
-->
            <li id="dt_{$value[dtid]}"> 
                <a href="{$basename}dtid={$value[dtid]}">$value[name]</a> ({$value[num]})
            </li>
<!--
EOT;
}print <<<EOT
-->
            <li id="dt_null"><a href="{$basename}dtid=-1">默认分类</a> ({$other})</li>
        </ul>
<!--
EOT;
if($u==$winduid){print <<<EOT
-->
<div class="private"><img src="$pwModeImg/icon/key.png" align="absmiddle" /> <a href="{$basename}a=privacy">私密日志</a> $dnum </div>
<!--
EOT;
}print <<<EOT
-->
<script language="javascript">
setCurrent('dt_$dtype','dt_all','current');
</script>	
    </div>
</div>
<script language="JavaScript" src="apps/$appdir/js/diarytype.js"></script>
<script language="JavaScript" src="js/app_comment.js"></script>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript" src="js/core/space.js"></SCRIPT>	
<script language="javascript">
// JavaScript Document
var imgMaxWidth=640; //控制内容中图片大小
var content = document.getElementById("img-width");
M_DIARY_CTRL="ctrl+鼠标滚轮缩放";

</script>
</div>
<!--
EOT;
?>-->