<!--<?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">
				<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" 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 class="tpc_content f14 cc" style="padding-bottom:15px;">$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
-->
				<span class="w">(<a href="{$thisbase}did=$value[did]&u=$value[uid]">閱讀全文</a>)</span></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>
<!--
EOT;
?>-->
