<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div class="infobox pr cc">
    <div class="p10">
		<table border="0" class="vt" cellpadding="0" cellspacing="0">
            <tr>
                <td width="65"><a href="{$basename}q=user&u=$u"><img src="$faceimg" class="portrait-m"/></a></td>
                <td>
                    <p class="pd8">
                        <span class="b f14 pdr">{$username}</span>
                        <a href="{$basename}q=user&u=$u">返回首页</a>
                    </p>
                    <div class="tabA" style="position:absolute;bottom:-1px;padding-left:0;width:600px;">
                        <ul>
<!--
EOT;
if($u==$winduid){
$b = $a;
$a == 'edit' && $b = 'write';
print <<<EOT
-->
                            <li id="a_friend"><a href="{$thisbase}a=friend">好友日志</a></li>
                            <li id="a_my"><a href="{$thisbase}">我的日志</a></li>
                            <li id="a_write"><a href="{$thisbase}a=write">写日志</a></li>
<script language="JavaScript">
setCurrent('a_$b','a_my','current');
</script>
<!--
EOT;
}else{
$friendHeaderGuide = creatFriendsHeader($u);
print <<<EOT
-->
	$friendHeaderGuide
<!--
EOT;
}print <<<EOT
-->
						</ul>
                	</div>
            	</td>
			</tr>
		</table>
    </div>
</div>
<!--
EOT;
if (empty($a) || $a == 'privacy') {print <<<EOT
-->
<div class="wrapB cc mt8">
<div class="c"></div>
<div class="contentC cc fl">
<!--
EOT;
$privacy = array('全站用户可见','仅好友可见','仅自己可见');
if(!$did){
if($sum){print <<<EOT
-->
	<div class="boxA mb8" style="padding:5px 10px;"><img src="$imgpath/$stylepath/infobox-edit.gif" align="absmiddle" />&nbsp;共&nbsp;{$sum}&nbsp;条日志</div>
	<div class="list-dlA list-dlA-A" style="overflow:hidden">
<!--
EOT;
foreach($diarydb as $value){
$typename = !$value[dtid] ?  '默认分类' : $diarytype[$value[dtid]][name];
$title = '所属：'.$value[username].'&nbsp;'.$value[title];
$descrip = $value[subject];
print <<<EOT
-->
		<dl class="cc" id="diary_{$value[did]}">
			<dd class="title2">
				<div class="boxE pdtb3 cc">
					<span class="fr"><a class="a-reply" style="margin-right:5px" href="#" onclick="shareOtherType('share_diary_{$value[did]}');return false;">分享<span>+</span></a></span>
					<span style="margin-left:15px;">发表于$value[postdate]</span>
<!--
EOT;
if($u==$winduid){print <<<EOT
-->
					 &nbsp;|&nbsp;<a style="cursor: pointer;" title="编辑" href="{$thisbase}a=edit&did=$value[did]">编辑</a>
<!--
EOT;
}if($u==$winduid || $groupid==3){print <<<EOT
-->
						<span class="gray o-del" style="cursor:pointer;" onclick="pwConfirm('是否确认删除',this,function(){delDiary('$value[did]','$u')})">删除</span> 
<!--
EOT;
}print <<<EOT
-->
				</div>
				<div id="share_diary_$value[did]" style="display:none">
					<div style="width:450px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
								<div class="fl threadlist" style="padding-left:10px;">
								<a href="javascript:;" class="current b">分享</a>
								<a href="#" onclick="shareOtherType('recommend_diary_{$value[did]}');return false;">推荐</a>
								</div>
							</div>
						</div>
						<ul class="nemu-list cc mb8">
							<li>
								<div>摘要：</div>
								<div class="exp bgB" style="line-height:1.8">
								分享了一篇日志：<b>$value[subject]</b><br />
								所属：$username
								</div>
							</li>
						</ul>
						<div class="c"></div>
						<ul class="nemu-list cc">
							<li>
								<div>描述：</div>
								<textarea style="width:98%;height:60px;"></textarea>
							</li>
						</ul>
						<div class="menu-bt tac">
							<input class="bt3" type="button" value="提 交" style="width:80px;" onclick="postShareOtherType('diary','$value[did]');">&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/>
						</div>
					</div>
				</div>
				<div id="recommend_diary_$value[did]" style="display:none">
					<form method="post" action="mode.php?m=o&q=share&see=recommend&ajax=1" onsubmit="return false;">
					<input type="hidden" name="step" value="2" />
					<div style="width:450px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
								<div class="fl threadlist" style="padding-left:10px;">
								<a href="javascript:;" onclick="shareOtherType('share_diary_{$value[did]}');return false;">分享</a>
								<a href="#" class="current b">推荐</a>
								</div>
							</div>
						</div>
					<div style="padding:5px 20px 0;">
					<table width="100%" cellspacing="0">
						<tr>
							<td width="24%" align="center">推荐方式：</td>
							<td>短消息推荐</td>
						</tr>
						<tr>
							<td align="center">对方姓名：</td>
							<td><input type="text" class="input" name="sendtoname" size="25" value="" /></td>
						</tr>
						<tr>
							<td align="center">标题：</td>
							<td><input type="text" class="input" name="subject" size="44" value="{$windid} 给您$atc_name" /></td>
						</tr>
						<tr><td align="center">内容：</td>
							<td><textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我在$db_bbsname($db_bbsurl/?u=$winduid)\n这个信息，认为很有价值，特推荐给您。\n\n主要信息：\n$title\n\n描述：\n$descrip\n\n希望您能喜欢。</textarea></td>
						</tr>
					</table>
					<div class="tac" style="padding:5px 0 10px;"><input type="button" class="bt3" name="ajaxsubmit" style="width:80px;" onclick="ajax.submit(this.form);" value="提 交" />&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/></div>
					</div>
				</div></form>
				</div>

				<h1 class="b" style="margin-bottom:10px;"><a href="{$thisbase}did=$value[did]">{$value[subject]}</a></h1>
				<div class="c"></div>
				<div class="tpc_content f14 cc" id="img-width">
				<table style="table-layout:fixed;"><tr><td>$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
-->
				</td></tr></table>
			<span class="w">(<a href="{$thisbase}did=$value[did]">阅读全文</a>)</span>
				</div>
				<div id="com_diary_$value[did]" style="padding-left:12px;">
					<p class="abtn2">
						<a style="cursor: pointer;" href="{$thisbase}did=$value[did]">阅读({$value[r_num]})</a>
						<a style="cursor: pointer;" onclick="javascript:showCommList('diary','$value[did]','com_diary_$value[did]',this)">回复({$value[c_num]})</a>
<!--
EOT;
if($u==$winduid){
!$value[dtid] && $value[dtid] = '-1';
print <<<EOT
-->
					<a href="{$thisbase}dtid={$value[dtid]}">分类: {$typename}</a>  <span style="padding-left:5px;">{$privacy[$value[privacy]]}</span>
<!--
EOT;
}print <<<EOT
-->
					</p>
				</div>
			</dd>
		</dl>
<!--
EOT;
}print <<<EOT
-->
	</div>$pages
<!--
EOT;
}else{print <<<EOT
-->
	<div class="tpc_content f14 p10">您最近没有日志</div>
<!--
EOT;
}}elseif(is_numeric($did)){
$typename = !$rt[dtid] ?  '默认分类' : $diarytype[$rt[dtid]][name];
$copy = $rt[copyurl] ? '转载于' : '发表于';
$title = '所属：'.$rt[username].'&nbsp;'.$rt[title];
$descrip = $rt[subject];
print <<<EOT
-->
	<div class="list-dlA list-dlA-A" style="overflow:hidden">
		<dl class="cc" id="diary_{$rt[did]}">

			<dd class="title2">
				<p class="boxE pdtb3 cc">
					<span class="fr"><a class="a-reply" style="margin-right:5px" href="#" onclick="shareOtherType('share_diary');return false;">分享<span>+</span></a></span>
					<span style="padding-left:15px;">{$copy}$rt[postdate]</span>
<!--
EOT;
if($winduid==$u){print <<<EOT
-->
					 	&nbsp;|&nbsp;<a style="cursor: pointer;" title="编辑" href="{$thisbase}a=edit&did=$rt[did]">编辑</a> 
<!--
EOT;
}if($rt[ifcopy] && $u != $winduid){print <<<EOT
-->
						&nbsp;|&nbsp;<a style="cursor: pointer;" title="转载" href="#" onclick="Copydiary('$rt[did]');return false;">转载</a>
<!--
EOT;
}if($winduid==$u || $groupid==3){print <<<EOT
-->

					 <span class="gray" style="cursor:pointer;" onclick="pwConfirm('是否确认删除',this,function(){delDiary('$rt[did]','$u','read')})">删除</span>
<!--
EOT;
}print <<<EOT
-->
				</p>
				<div id="share_diary" style="display:none">
					<div style="width:450px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
							<div class="fl threadlist" style="padding-left:10px;">
							<a href="javascript:;" class="current b">分享</a>
							<a href="javascript:;" onclick="shareOtherType('recommend_diary');return false;">推荐</a>
							</div>
							</div>
						</div>
						<ul class="nemu-list cc mb8">
							<li>
								<div>摘要：</div>
								<div class="exp bgB" style="line-height:1.8">
									分享了一篇日志：<b>$rt[subject]</b><br />所属：$username
								</div>
							</li>
						</ul>
						<div class="c"></div>
						<ul class="nemu-list cc">
							<li>
								<div>描述：</div>
								<textarea style="width:98%;height:60px;"></textarea>
							</li>
						</ul>
						<div class="menu-bt tac">
							<input class="bt3" type="button" value=" 确 定 " style="width:80px;" onclick="postShareOtherType('diary','$rt[did]');">&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/>
						</div>
					</div>
				</div>

				<div id="recommend_diary" style="display:none">
					<form method="post" action="mode.php?m=o&q=share&see=recommend&ajax=1" onsubmit="return false;">
					<input type="hidden" name="step" value="2" />
					<div style="width:450px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
							<div class="fl threadlist" style="padding-left:10px;">
							<a href="javascript:;" onclick="shareOtherType('share_diary');return false;">分享</a>
							<a href="javascript:;" class="current b">推荐</a>
							</div>
							</div>
						</div>
						<div style="padding:5px 20px 0;">
					<table width="100%" cellspacing="0" cellpadding="5">
						<tr>
							<td width="24%" align="center">推荐方式：</td>
							<td>短消息推荐</td>
						</tr>
						<tr>
							<td align="center">对方姓名：</td>
							<td><input type="text" class="input" name="sendtoname" size="25" value="" /></td>
						</tr>
						<tr>
							<td align="center">标题：</td>
							<td><input type="text" class="input" name="subject" size="44" value="{$windid} 给您$atc_name" /></td>
						</tr>
						<tr><td align="center">内容：</td>
							<td><textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我在$db_bbsname($db_bbsurl/?u=$winduid)\n这个信息，认为很有价值，特推荐给您。\n\n主要信息：\n$title\n\n描述：\n$descrip\n\n希望您能喜欢。</textarea></td>
						</tr>
					</table><div style="text-align:center;padding:10px 0;"><input type="button" class="bt3" name="ajaxsubmit" style="width:80px;" onclick="ajax.submit(this.form);" value="提 交" />&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/></div>
					</div></div></form>
				</div>

				<h1 class="b" style="margin-bottom:10px;"><a href="{$thisbase}did=$rt[did]">{$rt[subject]}</a></h1>
<!--
EOT;
if($rt[copyurl]){print <<<EOT
-->
				<div style="margin-left:15px;">转载自：<a href="$rt[copyurl]" target="_blank">$rt[copyurl]</a></div><br />
<!--
EOT;
}print <<<EOT
-->
				<div class="tpc_content f14 cc" id="img-width" style="overflow:hidden;">
				<table style="table-layout:fixed;"><tr><td>
				$rt[content]
<!--
EOT;
if($rt['pic']){
foreach($rt['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]
<!--
EOT;
if($pic['dfadmin']){print <<<EOT
-->
							[<a style="cursor:pointer" onclick="delatt('$rt[pid]','$pic[aid]');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
						</div>
<!--
EOT;
}}}print <<<EOT
--></td></tr></table>
				</div>
				<div id="com_diary_$rt[did]" style="padding-left:12px;">
					<div class="abtn2">
						<a style="cursor: pointer;" class="fr pdr gray" title="下一篇" href="{$thisbase}a=next&did=$rt[did]" onclick="return ajaxpage(this.href,'next','$u');">下一篇</a>
						<a style="cursor: pointer;" class="fr pdr gray" title="上一篇"href="{$thisbase}a=pre&did=$rt[did]" onclick="return ajaxpage(this.href,'pre','$u');">上一篇</a>
						<span style="padding:0 5px;">阅读({$rt[r_num]})</span>
						<a style="cursor: pointer;" onclick="javascript:showCommList('diary','$rt[did]','com_diary_$rt[did]',this)">回复({$rt[c_num]})</a>
<!--
EOT;
if($u==$winduid){
!$value[dtid] && $value[dtid] = '-1';
print <<<EOT
-->
					<a href="{$thisbase}dtid={$value[dtid]}">分类: {$typename}</a>  <span style="padding:0 5px;">{$privacy[$rt[privacy]]}</span>
<!--
EOT;
}print <<<EOT
-->
					</div>
				</div>
			</dd>
		</dl>
	</div>
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="sidebarC fr cc">
<!--
EOT;
if($u==$winduid){print <<<EOT
-->
		<div class="boxA mb8" style="padding:5px;"><img src="$imgpath/pwicon/lock.png" align="absmiddle" />&nbsp;<a href="{$thisbase}a=privacy">私密日志</a></div>
<!--
EOT;
}print <<<EOT
-->
	<h2 class="h5A" style="display:block;"> <span>日志分类</span> 
<!--
EOT;
if($u==$winduid || $groupid==3){
print <<<EOT
-->
	<small> <a style="cursor: pointer;" onclick="addType('dt_ul','$u')">添加分类</a> </small> 
<!--
EOT;
}print <<<EOT
-->
	</h2>
	<div class="list-liA bdtA">
		<h2> <span class="b"><a href="{$thisbase}">全部分类</a></span> ({$count}) </h2>
		<ul id="dt_ul">
<!--
EOT;
foreach($diarytype as $value){
print <<<EOT
-->
			<li id="dt_{$value[dtid]}" onmouseover="changSpanDisplay(this);" onmouseout="changSpanDisplay(this);"> 
<!--
EOT;
if($u==$winduid || $groupid==3){
print <<<EOT
-->
			<span class="fr b pdr gray" style="cursor: pointer;display:none" onclick="pwConfirm('是否确认删除',this,function(){delDiaryType('$value[dtid]','$u')})">x</span> <span class="fr pdr gray" style="cursor: pointer;display:none;" onclick="showEidt('$value[dtid]','$u');">编辑</span> 
<!--
EOT;
}print <<<EOT
-->
			<a href="{$thisbase}dtid={$value[dtid]}">$value[name]</a> ({$value[num]})</li>
<!--
EOT;
}print <<<EOT
-->
			<li id="dt_null"> <a href="{$thisbase}dtid=-1">默认分类</a> ({$other})</li>
		</ul>
	</div>
</div>
</div>
<!--
EOT;
} elseif ($a == 'friend') {print <<<EOT
-->
<div class="wrapB cc mt8">
<div class="c"></div>
<div class="contentC cc fl">
<!--
EOT;
if($sum){print <<<EOT
-->
	<div class="boxA mb8" style="padding:5px 10px;"><img src="$imgpath/$stylepath/infobox-edit.gif" align="absmiddle" />&nbsp;共&nbsp;{$sum}&nbsp;条日志</div>
	<div class="list-dlA list-dlA-A">
<!--
EOT;
foreach($diarydb as $value){
if($value[uid]==$winduid){
	$author = '';
}else{
	$author = "<a href=\"{$basename}q=user&u=$value[uid]\" class=\"b blue\">$value[username]</a> ";
}
$title = '所属：'.$value[username].'&nbsp;'.$value[title];
$descrip = $value[subject];
print <<<EOT
-->
		<dl class="cc" id="diary_{$value[did]}">
<!--
EOT;
$ddclass = 'title2';
if($value[face]){
$ddclass = 'title1';
print <<<EOT
-->
			<dt class="fl"><img src="$value[face]" /></dt>
<!--
EOT;
}print <<<EOT
-->
			<dd class="$ddclass">
				<p class="boxE pdtb3" style="padding-left:15px;">
<span class="fr"><a class="a-reply" style="margin-right:5px" href="#" onclick="shareOtherType('share_diary_{$value[did]}');return false;">分享<span>+</span></a></span>
				$author 发表于：$value[postdate]</p>
				<h1 class="b" style="margin-bottom:10px;"><a href="{$thisbase}did=$value[did]&u=$value[uid]">{$value[subject]}</a></h1>
				<div id="img-width" class="tpc_content f14 cc" style="padding-bottom:15px;">
				<table style="table-layout:fixed;"><tr><td>
				$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
-->
				</td></tr><tr><td><span class="w f12 fn">(<a href="{$thisbase}did=$value[did]&u=$value[uid]">阅读全文</a>)</span></td></tr></table></div>
				<div id="com_diary_$value[did]" style="padding-left:11px;">
					<p class="abtn2">
						<a style="cursor: pointer;" href="{$thisbase}did=$value[did]&u=$value[uid]">阅读({$value[r_num]})</a>
						<a style="cursor: pointer;" onclick="javascript:showCommList('diary','$value[did]','com_diary_$value[did]',this)">回复({$value[c_num]})</a>
					</p>
				</div>
			</dd>
			<div id="share_diary_$value[did]" style="display:none">
					<div style="width:450px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
								<div class="fl threadlist" style="padding-left:10px;">
								<a href="javascript:;" class="current b">分享</a>
								<a href="#" onclick="shareOtherType('recommend_diary_{$value[did]}');return false;">推荐</a>
								</div>
							</div>
						</div>
						<ul class="nemu-list cc mb8">
							<li>
								<div>摘要：</div>
								<div class="exp bgB" style="line-height:1.8">
								分享了一篇日志：<b>$value[subject]</b><br />
								所属：$username
								</div>
							</li>
						</ul>
						<div class="c"></div>
						<ul class="nemu-list cc">
							<li>
								<div>描述：</div>
								<textarea style="width:98%;height:60px;"></textarea>
							</li>
						</ul>
						<div class="menu-bt tac">
							<input class="bt3" type="button" value="提 交" style="width:80px;" onclick="postShareOtherType('diary','$value[did]');">&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/>
						</div>
					</div>
				</div>
				<div id="recommend_diary_$value[did]" style="display:none">
					<form method="post" action="mode.php?m=o&q=share&see=recommend&ajax=1" onsubmit="return false;">
					<input type="hidden" name="step" value="2" />
					<div style="width:450px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
								<div class="fl threadlist" style="padding-left:10px;">
								<a href="javascript:;" onclick="shareOtherType('share_diary_{$value[did]}');return false;">分享</a>
								<a href="#" class="current b">推荐</a>
								</div>
							</div>
						</div>
					<div style="padding:5px 20px 0;">
					<table width="100%" cellspacing="0">
						<tr>
							<td width="24%" align="center">推荐方式：</td>
							<td>短消息推荐</td>
						</tr>
						<tr>
							<td align="center">对方姓名：</td>
							<td><input type="text" class="input" name="sendtoname" size="25" value="" /></td>
						</tr>
						<tr>
							<td align="center">标题：</td>
							<td><input type="text" class="input" name="subject" size="44" value="{$windid} 给您$atc_name" /></td>
						</tr>
						<tr><td align="center">内容：</td>
							<td><textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我在$db_bbsname($db_bbsurl/?u=$winduid)\n这个信息，认为很有价值，特推荐给您。\n\n主要信息：\n$title\n\n描述：\n$descrip\n\n希望您能喜欢。</textarea></td>
						</tr>
					</table>
					<div class="tac" style="padding:5px 0 10px;"><input type="button" class="bt3" name="ajaxsubmit" style="width:80px;" onclick="ajax.submit(this.form);" value="提 交" />&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/></div>
					</div>
				</div></form>
				</div>

		</dl>
<!--
EOT;
}print <<<EOT
-->
	</div>$pages
<!--
EOT;
}else{print <<<EOT
-->
	<div class="tpc_content f14 p10">好友最近没有日志</div>
<!--
EOT;
}print <<<EOT
-->
</div>
</div>
<!--
EOT;
} elseif ($a == 'write' || $a == 'edit') {print <<<EOT
-->
<div class="wrapB cc">
<div class="cc mt8 table-list">
			<p class="p10">
<!--
EOT;
if ($a == 'write') {print <<<EOT
-->
				写新日志
<!--
EOT;
} else {print <<<EOT
-->
				编辑日志
<!--
EOT;
}print <<<EOT
-->
				| <a href="{$thisbase}q=$q">返回我的日志</a>
			</p>
			<form action="{$thisbase}a=$a" method="post" enctype="multipart/form-data" onsubmit="return checkpost(document.FORM);" name="FORM" />
			<input type="hidden" name="did" value="$did" />
			<input type="hidden" name="dtided" value="$rt[dtid]" />
			<input type="hidden" name="privacyed" value="$rt[privacy]" />
			<input type="hidden" name="atc_autourl" value="1" />
			<input type="hidden" name="step" value="2" />
				<table cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td width="18%" align="right">标题</td>
						<td><input type="text" class="input" name="atc_title" id="atc_title" value="$rt[subject]" size="70"/>&nbsp;<span id="atc_title_warn" class="gray">限 $db_titlemax 字节</span></td>
					</tr>
					<tr>
						<td align="right" class="vt">
						<div style="padding:3px; text-align:center;width:200px;">
						<fieldset id="smiliebox" style="border:1px solid $tdcolor">
							<legend>表情</legend>
							<div id="menu_show"></div>
							<span style="float:right; margin:3px 10px 5px;"><a id="td_face" style="cursor:pointer;" onClick="showDefault();" align="absmiddle">[更多]</a></span><span style="float:left; margin:3px 10px 5px;"><a id="td_generalface" style="cursor:pointer;" onClick="showGeneral();" align="absmiddle">[个性表情]</a></span>
						</fieldset></div>
						<div id="menu_generalface" class="menu" style="display:none;"></div>
						<div id="menu_face" class="menu" style="display:none;"></div>
						</td>
						<td style="width:680px;">
<!--
EOT;
require_once PrintEot('wysiwyg_editor');
print <<<EOT
-->
						</td>
					</tr>
					<tr>
						<td align="right">日志分类</td>
						<td>
							<select name="dtid" id="dtid_add">
								<option value="0" $dtid_0>默认分类</option>
								$dtsel
							</select> <a style="cursor: pointer;" onclick="javascript:add_dtid('$u','dtid_add');">添加分类</a>
						</td>
					</tr>
					<tr>
						<td align="right">隐私设置</td>
						<td>
							<select name="privacy" onchange="optionsel(this.value)">
								<option value="0" $privacy_0>全站用户可见</option>
								<option value="1" $privacy_1>仅好友可见</option>
								<option value="2" $privacy_2>仅自己可见</option>
							</select>  <input id="if_copy" type="checkbox" name="ifcopy" value="1" $checked $disabled>允许好友转载
							<input type="checkbox" name="atc_convert" id="atc_convert" value="1" checked/>Wind Code自动转换
						</td>
					</tr>
<!--
EOT;
if ($db_allowupload && $_G['allowupload'] || $attach) {print <<<EOT
-->
<tr><td colspan="2">
					<table cellPadding="0" cellSpacing="0" style="display:none" width="100%">
					<tbody id="att_mode"><tr><td><input class="input" type="text" name="atc_desc" size="20" /></td>
						<td><input class="input" type="file" name="attachment_" size="20" /></td>
						<td><select style="display:none"></select></td>
						<td><select style="display:none"></select></td>
						<td><input class="input" type="hidden" name="atc_needrvrc" value="0" size="1" /></td>
						<td></td></tr>
					</tbody>
					</table>
</td></tr>
<script language="JavaScript">
var allowmutinum = 15;
var allow_ext = '$uploadfiletype';
var attachnum = parseInt('$db_attachnum');
var charset = '$db_charset';
var titlemax = '$db_titlemax';
var postmax = '$db_postmax';
initCheckTextNum('atc_title','atc_title_warn',titlemax);
initCheckTextNum('textarea','textarea_warn',postmax);
</script>
<script type="text/javascript" language="JavaScript" src="js/upload.js"></script>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if($attach){print <<<EOT
-->
	<tr class="tr3">
		<th colspan="2">
			<div class="editor-mwidth">
				<div style="margin-left:200px">该帖包含附件<span class="gray">(不想保留的附件去掉√)</span> :
					<table style="margin-top:10px;">
						<tr>
							<td width="3%"></td>
							<td width="25%">描述</td>
							<td>附件</td>
						</tr>
						<tbody id="ajaxtable"></tbody>
					</table>
<script language="JavaScript">
var attachs = {{$attach}};
oldAtt.init();
</script>
				</div>
			</div>
		</th>
	</tr>
<!--
EOT;
}if($db_allowupload && $_G['allowupload']){print <<<EOT
-->
	<tr class="tr3">
		<td>&nbsp;</td>
		<th>
<!--
EOT;
if ($mutiupload > 0) {print <<<EOT
-->
					<span id="mutiinfo">您现在有 <b>{$mutiupload}</b> 个已经上传的附件 <a href="javascript:void(0);" class="bta" onclick="flashAtt.use();">使用</a> <a href="javascript:void(0);" class="bta" onclick="flashAtt.clear();" title="删除所有已经上传的附件">清空</a></span>
<!--
EOT;
}print <<<EOT
-->
					<table>
						<tr>
							<td width="25%">描述</td>
							<td>附件</td>
						</tr>
						<tbody id="attach"></tbody>
					</table>
					<div id="viewimg" class="menu" style="display:none;"></div>
					<div id="attsize" style="margin-top:10px">有效文件类型:$uploadfilesize</div>
		</th>
	</tr>
<script language="JavaScript">
var mutiupload = '$mutiupload';
newAtt.create();
</script>
<!--
EOT;
}print <<<EOT
-->
					<tr>
						<td>&nbsp;</td>
						<td><input class="bt3" name="Submit" type="submit" value=" 提 交 " /></td>
					</tr>
				</table>
			</form>
		</div>
	</div>
<!--
EOT;
if($a == 'edit'){print <<<EOT
-->
<script language="JavaScript">setTimeout("editor.gotoEnd();",50);</script>
<!--
EOT;
}else{print <<<EOT
-->
<script language="JavaScript">setTimeout("document.FORM.atc_title.focus()",50);</script>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">var stylepath = 'wind';</script>
<!--
EOT;
if(R_P!=D_P){
$facedb = readover(D_P.'data/bbscache/face.js');
print <<<EOT
-->
<script language="javascript">
{$facedb}
</script>
<!--
EOT;
}else{print <<<EOT
-->
<script language="JavaScript" src="data/bbscache/face.js"></script>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">
editor.init();
var cnt  = 0;
document.FORM.Submit.disabled = false;
function checkpost(obj) {
	if (obj.atc_title.value == "") {
		showDialog("error","标题不能为空",2);
		obj.atc_title.focus();
		return false;
	} else if (strlen(obj.atc_title.value) > $db_titlemax) {
		showDialog("error","标题超过最大长度 $db_titlemax 个字节",2);
		obj.atc_title.focus();
		return false;
	}
	if (strlen(obj.atc_content.value) < $db_postmin) {
		showDialog("error","文章内容少于 $db_postmin 个字节",2);
		editor.focusEditor();
		return false;
	} else if (strlen(obj.atc_content.value) > $db_postmax) {
		showDialog("error","文章内容大于 $db_postmax 个字节",2);
		editor.focusEditor();
		return false;
	}
	document.FORM.Submit.disabled = true;
	cnt++;
	if (cnt != 1) {
		showDialog("warning","Submission Processing. Please Wait");
		return false;
	}
	return true;
}
</script>
<script language="JavaScript" src="js/post.js"></script>
<!--
EOT;
}print <<<EOT
-->
</div>
<script language="JavaScript" src="mode/o/js/diarytype.js"></script>
<script language="JavaScript" src="mode/o/js/comment.js"></script>
<script language="javascript">
// JavaScript Document
var imgMaxWidth=640; //控制内容中图片大小
var content = document.getElementById("img-width");
ImgLoad(content);
function ImgLoad(obj)
{
	for(var i=0;i<obj.getElementsByTagName("img").length;i++){
		var o=obj.getElementsByTagName("img")[i];
		if (o.width>imgMaxWidth){
			if (o.style.width){
				o.style.width="";
			}
			o.width=imgMaxWidth;
			o.removeAttribute("height");
			o.setAttribute("title","ctrl+鼠标滚轮缩放");
			o.style.cursor="hand";
			o.style.display="block";
			o.vspace=5;
			o.resized=1;
			o.onclick=ImgClick;
			o.onmousewheel=bbimg;
		}
	}
}

function ImgClick()
{
	if (this.parentElement){
		if (this.parentElement.tagName!="A"){
			window.open(this.src);
		}
	}else{
		window.open(this.src);
	}
}

function bbimg()
{
	if (event.ctrlKey){
		var zoom=parseInt(this.style.zoom, 10)||100;
		zoom+=event.wheelDelta/12;
		if (zoom>0) this.style.zoom=zoom+'%';
		return false;
	}else{
		return true;
	}
}
</script>
<!--
EOT;
?>-->
