<!--<?php
include_once PrintEot('m_appleft');
print <<<EOT
-->
<!--
EOT;
if(!$db_toolbar && $pwForumList){print <<<EOT
-->
<div id="menu_forumlist" style="display:none;">
	<div class="sbar-box-a" style="width:700px;">
		<div class="sbar-title" style="cursor:pointer" onclick="try{pw_bottom.hiddenTab();read.close();}catch(e){read.close();}">
				<span class="menu-hidden aimg">隐藏</span>
				<span id="title_forumlist" class="b">快速浏览</span>
		</div>
		<div class="sbar-box-b">
			<div class="forum-list-popout">
<!--
EOT;
foreach($pwForumList as $key=>$value){print <<<EOT
-->
			<dl class="cc">
				<dt><a href="index.php?cateid=$key" target="_blank">$value[name]</a></dt>
				<dd class="cc">
<!--
EOT;
foreach($value['child'] as $k=>$v){print <<<EOT
-->
					<a href="thread.php?fid=$k" target="_blank" onclick="return pwForumList(true,gIsPost,$k,'',true);"><span>$v</span></a>
<!--
EOT;
}print <<<EOT
-->
				</dd>
			</dl>
<!--
EOT;
}print <<<EOT
-->
			</div>
		</div>
	</div>
</div>
<!--
EOT;
}print <<<EOT
-->
<div id="content" class="fr">
    <div id="content_main" class="fl">
    	<table width="100%">
        <tr class="vt"><td height="800">
        <div class="p15">
			<dl class="p-update cc">
                <dt>
                	<a href="u.php"><img src="$faceurl" height="120" width="120" /></a>
                	<p><a href="profile.php?action=modify&info_type=face" target="_blank">更换头像</a>
                    <a href="profile.php?action=modify" target="_blank">更新资料</a></p>
                </dt>
                <dd>
                    <div class="cc"><h2>$windid</h2><a href="javascript:;" onclick="return pwForumList(false,true,null,this);" style="cursor:pointer;">站点发贴</a><a href="{$basename}q=photos&a=upload">发照片</a><a href="{$basename}q=share">分享东东</a></div>
                    <div class="o_bubble_a">
                    	<b class="o_bubble_a_top"></b>
                    	<div class="o_bubble_a_bg cc">
                        <form method="post" action="{$basename}q=write&do=post" onsubmit="submitwrite(this);return false;">
                        <textarea id="writetext" name="text" onblur="changeWriteBox(false);" onfocus="changeWriteBox(true);">{$winddb[honor]}</textarea>
                        <div id="writebutton"><input type="button" value="发表" class="record_btn" id="write_button" onclick="submitwrite(this.form)" /></div>
<!--
EOT;
if ($_G['allowhonor']) {print <<<EOT
-->
                        <span class="fr gray">
                        <input id="writetosign" type="checkbox" name="tosign" value="1" checked="checked" />同步个性签名</span>
<!--
EOT;
}print <<<EOT
-->
						</form>
                		</div>
                    </div>
                </dd>
            </dl>
<script type="text/javascript">
var honor = '$winddb[honor]';
function changeWriteBox(isFocus){
	writeText = getObj('writetext').value;
	if (isFocus) {
		if (honor == writeText||'想说点什么?' == writeText) {
			getObj('writetext').value = '';
		}
	} else {
		if ('' == writeText) {
			getObj('writetext').value = honor||'想说点什么?';
		}
	}
}
function write_quickpost(event){
    if((event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83)){
        getObj('write_button').click();
    }
}
</script>
<!--
EOT;
if ($friend_new_topic) {print <<<EOT
-->
			<div class="title_one mt10 cc" style="padding:4px 10px 2px;">
            	<span class="fl tab_friends">好友论坛最新主题</span>
            </div>
            <div class="forum-new">
                <table width="100%">
<!--
EOT;
foreach ($friend_new_topic as $key =>$value){print <<<EOT
-->
                             <tr>
                             <td><a href="read.php?tid=$value[tid]" target="_blank">$value[subject]</a></td>
                             <td width="16"><img src="$value[faceurl]" class="img-20" align="absmiddle" /></td>
                             <td style="width:8em"><a href="u.php?uid=$value[authorid]">$value[author]</a></td>
                             <td width="80"><span class="f10 gray" title="$value[postdate]">$value[posttime]</span></td>
                             </tr>
<!--
EOT;
}print <<<EOT
-->
                </table>
            </div>
<!--
EOT;
}print <<<EOT
-->
			<div class="title_one mt10 cc" style="padding:4px 0 4px 10px;">
            	<span class="fl tab_friends">好友动态</span>
                <ul class="fl o_tab_a">
                	<li id="home_default"><a href="{$basename}q=home" hidefocus="true"><i>所有动态</i></a></li>
                    <li id="home_write"><a href="{$basename}q=home&f_type=write" hidefocus="true"><i>记录</i></a></li>
<!--
EOT;
if($db_dopen){print <<<EOT
-->
                    <li id="home_diary"><a href="{$basename}q=home&f_type=diary" hidefocus="true"><i>日志</i></a></li>
<!--
EOT;
}if($db_phopen){print <<<EOT
-->
                    <li id="home_photo"><a href="{$basename}q=home&f_type=photo" hidefocus="true"><i>相册</i></a></li>
<!--
EOT;
}if($db_share_open){print <<<EOT
-->
                    <li id="home_share"><a href="{$basename}q=home&f_type=share" hidefocus="true"><i>分享</i></a></li>
<!--
EOT;
}if($db_groups_open){print <<<EOT
-->
                    <li id="home_colony"><a href="{$basename}q=home&f_type=colony" hidefocus="true"><i>群组</i></a></li>
<!--
EOT;
}print <<<EOT
-->
                    <li id="home_post"><a href="{$basename}q=home&f_type=post" hidefocus="true"><i>帖子</i></a></li>
                    <li id="home_friend"><a href="{$basename}q=home&f_type=friend" hidefocus="true"><i>结交动态</i></a></li>
                    <li class="edit"><a href="javascript:;" hidefocus="true" id="feedsetting" onclick="sendmsg('mode.php?m=o&q=ajax&a=feedsetting','',this.id)" title="设置特定好友显示动态信息"><i><img src="images/apps/tab_edit.png" alt="设置" /></i></a></li>
                </ul>
            </div>

        <div class="dynamic">
            <div class="dynamic-bg">
                <div class="dynamic-dl" style="min-height:225px;">
<!--
EOT;
if (!empty($feeds)) {
foreach ($feeds as $day => $feed) {
print <<<EOT
-->
                <div class="dynamic-h cc b" style="margin:5px 10px;"><div></div><span>$day</span></div>
                                <div class="dynamic dynamic-home">
<!--
EOT;
foreach ($feed as $key => $value) {
print <<<EOT
-->
                    <dl class="cc">
                        <dt>
                            <img src="$value[faceurl]" class="img-20" />
                         </dt>
                         <dd class="dd30">
                            <a href="u.php?uid=$value[uid]">$value[username]</a>&nbsp;$value[descrip]
<!--
EOT;
if (checkCommType($value[type]) && $value[typeid]>0) {
print <<<EOT
-->
                                <div id="com_{$value[type]}_{$value[typeid]}"><P><a style="cursor: pointer;" onclick="javascript:showCommList('$value[type]','$value[typeid]','com_{$value[type]}_{$value[typeid]}',this)">回复</a></p></div>
<!--
EOT;
}print <<<EOT
-->
                         </dd>
                    </dl>
<!--
EOT;
}print <<<EOT
-->
</div>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript" src="js/app_comment.js"></script>
<!--
EOT;
} else { print <<<EOT
-->
                    <div class="p10">暂时没有好友动态</div>
<!--
EOT;
}print <<<EOT
-->
<div class="c"></div>
                </div>
            </div>
                        <div class="c"></div>
        </div>
<script language="JavaScript">
setCurrent('home_$f_type','home_default','current');
function submitwrite(o) {
    if (getObj('writetext').value == '' || getObj('writetext').value == '想说点什么?') {
        showDialog('error','记录内容必须在3～255个字节之间');
        return false;
    }
    ajax.submit(o);
    var writebutton = getObj('writebutton');
    writebutton.style.display = 'none';
    return true;
}
var charset = '$db_charset';
initCheckTextNum('writetext','writetext_warn',255);
</script>
		</div>
		</td></tr>
        </table>
    </div>
    <div id="sidebar" class="sidebar fr">
        <div class="p10">

<!--
EOT;
if ($notify_message_num || $private_message_num) {print <<<EOT
-->
            <h2 class="b">通知</h2>
            <div class="o_hr"></div>
            <ul class="lh24 mb10 pl10">
<!--
EOT;
if ($private_message_num){print <<<EOT
-->
                <li><a href="message.php?type=newmsg" target="_blank">{$private_message_num}条个人消息</a></li>
<!--
EOT;
}if($notify_message_num){print <<<EOT
-->
                <li><a href="message.php?type=newmsg" target="_blank">{$notify_message_num}条系统消息</a></li>
<!--
EOT;
}print <<<EOT
-->
            </ul>
<!--
EOT;
}if (!empty($mfriends)) {
print <<<EOT
-->
           <h2 class="b">好友生日</h2>
           <div class="o_hr"></div>
<!--
EOT;
if($friendbith){
foreach($friendbith as $value){
$genderdb = array('祝福他','祝福他','祝福她');
print <<<EOT
-->
                <div class="cc mb10">
                        <img src="$value[face]" class="img-50 fl mr10" />
                        <p>
                                <a title="$value[title]" href="u.php?uid=$value[uid]">$value[username]</a><br />
                             ($value[month]-$value[day]生日)<br />
                                <a href="javascript:;" id="message_birth" onclick="sendmsg('pw_ajax.php?action=msg&touid=$value[uid]&type=birth','','message_birth')">{$genderdb[$value[gender]]}</a> <a href="javascript:;" id="message" onclick="sendmsg('pw_ajax.php?action=msg&touid=$value[uid]','','message')">发短消息</a>
                        </p>
                </div>
<!--
EOT;
}}else{
print <<<EOT
-->
				<p class="p10">最近没有好友生日</p>
<!--
EOT;
}
}if (!empty($mfriends)) {print <<<EOT
-->
			<h2 class="b">可能认识</h2>
            <div class="o_hr"></div>
			<div class="o-list-img">
				<ul class="cc">
<!--
EOT;
foreach ($mfriends as $value) {
if ($value[uid] == $winduid) continue;
print <<<EOT
-->
					<li>
                       	<a title="$value[title]" href="u.php?uid=$value[uid]"><img src="$value[face]" class="img-50 userCard" id="card_sf_{$value[uid]}_{$value[uid]}" /></a><p><img id="add_$value[uid]" onclick="sendmsg('pw_ajax.php?action=addfriend&touid=$value[uid]','',this.id)" style="cursor: pointer;" title="加为好友" src="$pwModeImg/operation/add.png" /><a title="$value[username]" href="u.php?uid=$value[uid]">$value[sub_username]</a></p>
        			</li>
<!--
EOT;
}print<<<EOT
-->
				</ul>
<script language="JavaScript">window.onReady(userCard.init);</script>
            </div>

<!--
EOT;
}print <<<EOT
-->
			<h2 class="b">社区热门</h2>
            <div class="o_hr"></div>
            <div style="padding:0 10px;">
			<ul class="list-img cc">
<!--#foreach ($hotforum as $value) {#-->
				<li><span class="fr">{$value[addition][article]}</span><a href="$value[url]" target="_blank">$value[title]</a></li>
<!--#}#-->
			</ul>
            </div>
        </div>
    </div>
</div>
<!--
EOT;
?>-->