<!--<?php
print <<<EOT
-->
<div class="bdbA">
	<div id="breadcrumbs">
		<a class="crumbs-item gray3" href="$db_bfn" title="$db_bbsname">$db_bbsname</a><a class="crumbs-item gray3" href="u.php"><i> </i>用戶中心</a>
		<span class="crumbs-item current"><i> </i><strong>短消息</strong></span>
	</div>
</div>
<style>
.s3,a.s3{color:#f06f18;}
#set-wrap{width:100%;margin:8px auto 1.5em;line-height:150%}
#set-side{width:170px;float:left;}
#set-content{margin-left:178px;_margin-left:175px;background:$bgcolor;}
#set-content-wrap{}
#set-side-wrap {border:1px solid $tdcolor;background:$bgcolor;}
.set-h2{background:url($imgpath/$stylepath/set-h3.gif) repeat-x;height:30px; line-height:30px;border-bottom:$tdcolor solid 1px;margin:0;padding:0 .6em;font-size:12px;display:block}
.color8{color:#D2C100}
#set-menu{font-size:14px;padding:.6em 0 .6em 1em;margin:0;list-style:none}
#set-menu li{margin:0;padding:.3em 0 0 1.5em;background:url($imgpath/$stylepath/u-fav.gif) no-repeat 0 0.5em;}
#set-menu li a{color:#949494}
#set-menu li.current{background:url($imgpath/$stylepath/u-fav-cur.gif) no-repeat 0 0.5em;}
#set-menu li.current a{color:#707070;font-weight:700}
.set-content-left{margin-right:320px;}
.set-content-right{width:300px;float:right}
.set-table1{line-height:200%}
.set-table1 .tdpr2{padding-right:2em}
#set-content-wrap td{vertical-align:top;}
.set-table2 td{padding:.5em 1em;border-bottom:1px dotted $cbgborder;}
.set-table2 td.td1{text-align:right;padding:.5em 1em;}
.set-tab-table{background:$cbgcolor url($imgpath/$stylepath/set-tab-dot.gif) repeat-x left bottom}
.set-tab-table td{border-bottom:0;padding:.2em 2em;border-right:1px solid $tdcolor;border-left:1px solid $tdcolor}
.set-tab-table td.current{border:1px solid $tdcolor;border-bottom:0;background:$bgcolor}
.set-tab-table td.current a{color:#000;font-weight:700}
.set-tab-box{border:1px solid $tdcolor;border-top:0;padding:.5em 1em}
textarea{font-size:12px;}
</style>
<div id="set-wrap">
	<div id="set-side">
		<div id="set-side-wrap">
			<h2 class="set-h2 color8">短消息</h2>
			<ul id="set-menu">
				<li id="msg_receivebox">
					<a href="$secondurl">收件箱</a>
				</li>
				<li id="msg_sendbox">
					<a href="$secondurl?action=sendbox">發件箱</a>
				</li>
				<li id="msg_scout">
					<a href="$secondurl?action=scout">消息跟蹤</a>
				</li>
				<li id="msg_write">
					<a href="$secondurl?action=write">寫新消息</a>
				</li>
				<li>
					<a href="profile.php?action=bbsset&info_type=msg">短消息設置</a>
				</li>
				<li>
					<a style="cursor:pointer;" onclick="return checkset();">清空</a>
				</li>
			</ul>
		</div>
	</div>
<script language="javascript">
setCurrent('msg_$action','','current');
var ifcheck = true;
function CheckAll(form,match) {
	for (var i = 0; i < form.elements.length; i++) {
		var e = form.elements[i];
		if (e.type == 'checkbox' && (typeof match == 'undefined' || e.name.match(match))) {
			e.checked = ifcheck;
		}
	}
	ifcheck = ifcheck == true ? false : true;
}
</script>
	<div id="set-content">
		<div id="set-content-wrap" class="cc">
		<div>
<!--
EOT;
if($action=='receivebox'){print <<<EOT
-->
			<div class="set-tab-table">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tac" id="infolist">
<!--
EOT;
if($type=='notify'){print <<<EOT
-->
						<td><a style="cursor:pointer" href="$secondurl">個人消息</a>
<!--
EOT;
} else {print <<<EOT
-->
						<td id="base"><a style="cursor:pointer" onclick="showTabs('infolist','base','td','current')">個人消息</a>
<!--
EOT;
}if ($contl > 100) {print <<<EOT
-->
							<font color="red">[您的信箱已滿，請刪除一些，以查看最新消息]</font>
<!--
EOT;
} elseif ($winddb['newpm'] & 1) {print <<<EOT
-->
							<img src="$imgpath/$stylepath/file/new.gif" />
<!--
EOT;
}print <<<EOT
-->
						</td>
						<td id="public">
							<a onclick="showTabs('infolist','public','td','current')" style="cursor:pointer">群發消息</a>
<!--
EOT;
if ($winddb['newpm'] & 2) {print <<<EOT
-->
							<img src="$imgpath/$stylepath/file/new.gif" />
<!--
EOT;
}print <<<EOT
-->
						</td>
<!--
EOT;
if($type=='notify'){print <<<EOT
-->
							<td id="notify"><a onclick="showTabs('infolist','notify','td','current')" style="cursor:pointer">系統通知</a>
<!--
EOT;
} else {print <<<EOT
-->
							<td><a href="$secondurl?type=notify" style="cursor:pointer">系統通知</a>
<!--
EOT;
}if ($winddb['newpm'] & 4) {print <<<EOT
-->
							<img src="$imgpath/$stylepath/file/new.gif" />
<!--
EOT;
}print <<<EOT
-->
						</td>
					</tr>
				</table>
			</div>
			<div class="set-tab-box">
				<form name="del" action="$secondurl" method="post">
				<input type="hidden" name="verify" value="$verifyhash" />
<!--
EOT;
if ($type=='notify'){print <<<EOT
-->
				<div id="info_notify" style="display:none">
				<div style="margin:1em 2em;">
					<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
<!--
EOT;
if ($msgdb) {print <<<EOT
-->
						<tr class="gray3">
							<td width="6%">ID</a></td>
							<td width="*">標題</td>
							<td width="25%">時間</td>
							<td width="8%">選定</a></td>
						</tr>
<!--
EOT;
$i = ($page-1) * $permsg;
foreach ($msgdb as $key => $message) {
$i++;
$boldclass = $message['ifnew'] ? 'class="b"' : '';
print <<<EOT
-->
						<tr>
							<td>$i</td>
							<td><a href="$secondurl?action=readn&mid=$message[mid]" $boldclass>$message[title]</a></td>
							<td>$message[mdate]</td>
							<td><input type="checkbox" name="delid[]" value="$message[mid]" /></td>
						</tr>
<!--
EOT;
}}else{print <<<EOT
-->
						<tr>
							<td>暫時沒有通知。</td>
						</tr>
<!--
EOT;
}print <<<EOT
-->
				</table></div>$pages</div>
<!--
EOT;
}else{print <<<EOT
-->
				<div id="info_base" style="display:none">
				<div style="margin:1em 2em;">
					<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
<!--
EOT;
if ($msgdb) {print <<<EOT
-->
						<tr class="gray3">
							<td width="6%">ID</a></td>
							<td width="12%">發件人</td>
							<td width="*">標題</td>
							<td width="25%">時間</td>
							<td width="8%">選定</a></td>
						</tr>
<!--
EOT;
$i = ($page-1) * $permsg;
foreach ($msgdb as $key => $message) {
$i++;
$boldclass = $message['ifnew'] ? 'class="b"' : '';
print <<<EOT
-->
						<tr>
							<td>$i</td>
							<td><a href="u.php?action=show&uid=$message[fromuid]">$message[from]</a></td>
							<td><a href="$secondurl?action=read&mid=$message[mid]" $boldclass>$message[title]</a></td>
							<td>$message[mdate]</td>
							<td><input type="checkbox" name="delid[]" value="$message[mid]" /></td>
						</tr>
<!--
EOT;
}}else{print <<<EOT
-->
						<tr>
							<td>暫時沒有消息。</td>
						</tr>
<!--
EOT;
}print <<<EOT
-->
				</table></div>$pages</div>
<!--
EOT;
}print <<<EOT
-->
				<div style="margin:1em 2em;display:none" id="info_public">
					<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
<!--
EOT;
if($pmsgdb){print <<<EOT
-->
						<tr class="gray3">
							<td width="6%">ID</a></td>
							<td width="*">標題</td>
							<td width="25%">時間</td>
							<td width="8%">選定</a></td>
						</tr>
<!--
EOT;
$i = 0;
foreach ($pmsgdb as $key => $message) {
$boldclass = $message['ifnew'] ? 'class="b"' : '';
$i++;
print <<<EOT
-->
						<tr>
							<td>$i</td>
							<td><a href="$secondurl?action=readpub&mid=$message[mid]" $boldclass>$message[title]</a></td>
							<td>$message[mdate]</td>
							<td><input type="checkbox" name="pdelid[]" value="$message[mid]" /></td>
						</tr>
<!--
EOT;
}}else{print <<<EOT
-->
						<tr>
							<td>暫時沒有消息。</td>
						</tr>
<!--
EOT;
}print <<<EOT
-->
					</table>
				</div>
				<div class="tac" style=" padding:1em">
					<input class="bt" type="button" name="chkall" value="全選" onclick="CheckAll(this.form,p_match)" />
					<input class="btn" type="submit" value="提 交" />
					<input name="towhere" type="hidden" value="receivebox" /><!--
					<input name="action" type="radio" value="doread" checked />標記為已讀 -->
					<input name="action" type="radio" value="down" />下載
					<input name="action" type="radio" value="del" checked />刪除
				</div>
				</form>
<script type="text/javascript">
var p_match = '';
function showTabs(id,select,element,css) {
	var o = getObj(id);
	var t = o.getElementsByTagName(element);
	for (var i = 0; i < t.length; i++) {
		if (t[i].id) {
			var oo = getObj(t[i].id);
			if (t[i].id == select) {
				getObj(t[i].id).className = css;
				getObj('info_'+t[i].id).style.display = '';
			} else {
				getObj(t[i].id).className = '';
				getObj('info_'+t[i].id).style.display = 'none';
			}
		}
	}
	ifcheck = false;
	p_match = select == 'public' ? /^pdelid/ : /^delid/;
	CheckAll(document.del);
	return false;
}
showTabs('infolist','$type','td','current');
</script>
<!--
EOT;
}elseif($action=='sendbox'){print <<<EOT
-->
			<div class="set-tab-table">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tac">
						<td class="current link5 b">發件箱</td>
					</tr>
				</table>
			</div>
			<div class="set-tab-box">
			<form name="del" action="$secondurl" method="post">
			<input type="hidden" name="verify" value="$verifyhash" />
			<div style="margin:1em 2em;" id="info_base">
				<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
<!--
EOT;
if ($msgdb) {print <<<EOT
-->
					<tr class="gray3">
						<td width="6%">ID</a></td>
						<td width="12%">收件人</td>
						<td width="*">標題</td>
						<td width="25%">時間</td>
						<td width="8%">選定</a></td>
					</tr>
<!--
EOT;
$i = ($page - 1) * $permsg;
foreach ($msgdb as $key => $message) {
$i++;
print <<<EOT
-->
					<tr>
						<td>$i</td>
						<td><a href="u.php?action=show&uid=$message[touid]">$message[to]</a></td>
						<td><a href="$secondurl?action=readsnd&mid=$message[mid]">$message[title]</a></td>
						<td>$message[mdate]</td>
						<td><input type="checkbox" name="delid[]" value="$message[mid]" /></td>
					</tr>
<!--
EOT;
}}else{print <<<EOT
-->
					<tr>
						<td>暫時沒有消息。</td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
			</div>$pages
			<div class="tac" style=" padding:1em">
				<input class="bt" type="button" name="chkall" value="全選" onclick="CheckAll(this.form)" />
				<input class="btn" type="submit" value="提 交" />
				<input name="towhere" type="hidden" value="sendbox" />
				<input name="action" type="radio" value="down" />下載
				<input name="action" type="radio" value="del" checked />刪除
			</div></form><br />
<!--
EOT;
} elseif ($action == 'scout') {print <<<EOT
-->
			<div class="set-tab-table">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tac">
						<td class="current link5 b">消息跟蹤</td>
					</tr>
				</table>
			</div>
			<div class="set-tab-box">
			<form name="del" action="$secondurl" method="post">
			<input type="hidden" name="verify" value="$verifyhash" />
			<div style="margin:1em 2em;" id="info_base">
				<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
					<tr class="gray3">
						<td width="6%">ID</a></td>
						<td width="12%">收件人</td>
						<td width="*">標題</td>
						<td width="25%">時間</td>
						<td width="8%">已讀</td>
						<td width="8%">選定</a></td>
						<td width="8%">編輯</td>
					</tr>
<!--
EOT;
$i = ($page-1) * $permsg;
foreach ($msgdb as $key => $message) {
$i++;
print <<<EOT
-->
					<tr>
						<td>$i</td>
						<td><a href="u.php?action=show&uid=$message[touid]">$message[to]</a></td>
						<td><a href="$secondurl?action=readscout&mid=$message[mid]">$message[title]</a></td>
						<td>$message[mdate]</td>
						<td>
<!--
EOT;
if($message['ifnew']){print <<<EOT
-->
							<font color="red">否</font>
<!--
EOT;
}else{print <<<EOT
-->
							是
<!--
EOT;
}print <<<EOT
-->
						</td>
<!--
EOT;
if($message['ifnew']==0 && $message['to'] != $windid){print <<<EOT
-->
						<td>--</td><td><br /></td>
<!--
EOT;
}else{print <<<EOT
-->
						<td><input type="checkbox" name="delid[]" value="$message[mid]" /></td>
						<td><a href="message.php?action=write&edmid=$message[mid]">編輯</a></td>
<!--
EOT;
}print <<<EOT
-->
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
			</div>$pages
			<div class="tac" style=" padding:1em">
				<input class="bt" type="button" name="chkall" value="全選" onclick="CheckAll(this.form)" />
				<input class="btn" type="submit" value="提 交" />
				<input name="towhere" type="hidden" value="scout" />
				<input name="action" type="radio" value="down" />下載
				<input name="action" type="radio" value="del" checked />刪除
			</div></form><br />
<!--
EOT;
} elseif (in_array($action,array('read','readsnd','readscout','readpub','readn'))) {print <<<EOT
-->
			<div class="set-tab-table">
				<span class="fr" style="margin-right:3px"><a href="javascript:void(0)" onclick="msggoto('previous');">上一條</a> <a href="javascript:void(0)" onclick="msggoto('next');">下一條</a></span>
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tac">
<!--
EOT;
if ($action == 'read') {print <<<EOT
-->
						<td><a href="message.php">個人消息</a></td>
<!--
EOT;
} elseif ($action == 'readpub') {print <<<EOT
-->
						<td><a href="message.php?action=receivebox&type=public">群發消息</a></td>
<!--
EOT;
} elseif ($action == 'readsnd') {print <<<EOT
-->
						<td><a href="message.php?action=sendbox">發件箱</a></td>
<!--
EOT;
} elseif ($action == 'readn') {print <<<EOT
-->
						<td><a href="message.php?action=receivebox&type=notify">系統通知</a></td>
<!--
EOT;
} else {print <<<EOT
-->
						<td><a href="message.php?action=scout">消息跟蹤</a></td>
<!--
EOT;
}print <<<EOT
-->
						<td class="current link5 b">查看信息</td>
					</tr>
				</table>
			</div>
			<div class="set-tab-box">
			<div style="margin:1em 2em;" id="info_base">
				<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
					<tr>
						<td class="td1" width="13%"><font color="#5A6633">
<!--
EOT;
if($action == 'readscout' || $action == 'readsnd'){print <<<EOT
-->
		收件人:
<!--
EOT;
}else{print <<<EOT
-->
		發件人:
<!--
EOT;
}print <<<EOT
-->
						</font></td>
						<td><a href="u.php?action=show&uid=$msginfo[withuid]">$msginfo[username]</a></td>
					</tr>
					<tr>
						<td class="td1" width="12%"><font color="#5A6633">標題:</font></td>
						<td>$msginfo[title]</td>
					</tr>
					<tr>
						<td class="td1" width="12%"><font color="#5A6633">時間:</font></td>
						<td>$msginfo[mdate]</td>
					</tr>
					<tr>
						<td class="td1" width="12%"><font color="#5A6633">內容:</font></td>
						<td>$msginfo[content]</td>
					</tr>
					<tr>
						<td class="td1"><font color="#5A6633">選項:</font></td>
						<td><font color="#5A6633">
<!--
EOT;
if($action=='read'){print <<<EOT
-->
							[<a href="$secondurl?action=chatlog&withuid=$msginfo[withuid]">通信記錄</a>]
							[<a href="$secondurl?action=unread&mid=$msginfo[mid]&verify=$verifyhash">標記未讀</a>]
							[<a href="$secondurl?action=write&remid=$msginfo[mid]">回復</a>]
							[<a href="$secondurl?action=write&transmit=$msginfo[mid]">轉發</a>]
							[<a href="$secondurl?action=del&towhere=receivebox&delids=$msginfo[mid]&verify=$verifyhash">刪除</a>]
							[<a href="message.php?action=receivebox">返回</a>]
<!--
EOT;
}elseif($action=='readpub'){print <<<EOT
-->
							[<a href="$secondurl?action=del&towhere=receivebox&pdelids=$msginfo[mid]&verify=$verifyhash">刪除</a>]
							[<a href="message.php?action=receivebox&type=public">返回</a>]
<!--
EOT;
}elseif($action=='readn'){print <<<EOT
-->
							[<a href="$secondurl?action=del&towhere=receivebox&delids=$msginfo[mid]&verify=$verifyhash">刪除</a>]
							[<a href="message.php?action=receivebox&type=notify">返回</a>]
<!--
EOT;
}elseif($action=="readsnd"){print <<<EOT
-->
							[<a href="$secondurl?action=chatlog&withuid=$msginfo[withuid]">通信記錄</a>]
							[<a href="$secondurl?action=write&touid=$msginfo[withuid]">另發</a>]
							[<a href="$secondurl?action=write&transmit=$msginfo[mid]">轉發</a>]
							[<a href="$secondurl?action=del&towhere=sendbox&delids=$msginfo[mid]&verify=$verifyhash">刪除</a>]
							[<a href="message.php?action=sendbox">返回</a>]
<!--
EOT;
}elseif($action=="readscout"){print <<<EOT
-->
							[<a href="$secondurl?action=chatlog&withuid=$msginfo[withuid]">通信記錄</a>]
							[<a href="$secondurl?action=write&touid=$msginfo[withuid]">另發</a>]
							[<a href="$secondurl?action=write&transmit=$msginfo[mid]">轉發</a>]
							[<a href="$secondurl?action=del&towhere=scout&delids=$msginfo[mid]&verify=$verifyhash">刪除</a>]
							[<a href="message.php?action=scout">返回</a>]
<!--
EOT;
}print <<<EOT
-->
						</font>
						</td>
					</tr>
				</table>
			</div></div>
<script language="JavaScript">
function msggoto(type) {
	ajax.send('pw_ajax.php?action=msggoto&from=$action&mid=$mid&type=' + type, '', function() {
		var rText = ajax.request.responseText.split('\t');
		if (rText[0] == 'ok') {
			location.href = 'message.php?action=$action&mid=' + rText[1];
		} else if (rText[0] == 'none') {
			showDialog("warning",type == 'next' ? '已經是最後一條了!' : '已經是第一條了!!');
		} else {
			ajax.guide();
		}
	});
}
</script>
<!--
EOT;
}elseif($action == 'chatlog'){print <<<EOT
-->
			<div class="set-tab-table">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tac">
						<td class="current link5 b">與 {$m[username]} 的通信記錄</td>
					</tr>
				</table>
			</div>
			<div class="set-tab-box">
			<form action="$secondurl" method="post">
			<input type="hidden" name="verify" value="$verifyhash" />
			<input type="hidden" name="action" value="dellog" />
			<input type="hidden" name="withuid" value="$withuid" />
			<div style="margin:1em 2em;" id="info_base">
				<table width="100%" cellspacing="0" cellpadding="0" class="set-table2" style="table-layout:fixed">
<!--
EOT;
foreach($msgdb as $key => $value){print <<<EOT
-->
					<tr>
						<td style="line-height:150%; width:100%">
						<div>
							<span class="fr gray">{$u_name[$value[mtype]]} - $value[mdate]  <input type="checkbox" name="selid[]" value="$value[mid]" /></span>
							<span class="s2"><b>{$value[title]}</b></span><br />{$value[content]}</div>
						</td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
			</table></div>{$pages}
			<div class="tac" style=" padding:1em">
				<input class="bt" type="button" name="chkall" value="全選" onclick="CheckAll(this.form)" />
				<input class="btn" type="submit" value="刪除" name="Submit" />
			</div>
		</form><div>
<!--
EOT;
}elseif($action=='write'){print <<<EOT
-->
			<script language="JavaScript" src="js/wind_editor.js"></script>
			<div class="set-tab-table">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tac">
						<td class="current link5 b">寫新消息</td>
					</tr>
				</table>
			</div>
			<div class="set-tab-box">
			<form name="FORM" action="$secondurl" method="post" onsubmit="return checkCnt();">
<!--
EOT;
if($edinfo){ print <<<EOT
-->
			<input type="hidden" name="edmid" value="$edmid" />
<!--
EOT;
} print <<<EOT
-->
			<input type="hidden" name="action" value="write" />
			<input type="hidden" name="step" value="2" />
			<input type="hidden" name="verify" value="$verifyhash" />
			<div style="margin:1em;" id="info_base">
				<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
				<tr>
					<td class="td1" width="20%">用戶名</td>
					<td><input class="input" type="text" name="pwuser"  style="width:50%"  size="73" $msgid />
					</td></tr>

<tr><td class="td1" width="20%">其他</td>
<td>
<div id="menu_show" style="display:none;"></div>
<a class="bta" id="td_face" style="cursor:pointer;" onClick="showDefault();" align="absmiddle" unselectable="on">添加表情</a> <a class="bta" id="newdraft" onclick="opendraft(this.id);">草稿箱</a>
<!--
EOT;
if($frienddb){print <<<EOT
-->
				<span class="bta" onClick="getObj('tofriend').style.display='';">好友群發</span>
				</td></tr>

				<tr id="tofriend" style="display:none">
					<td class="td1">好友群發</td>
					<td>
<!--
EOT;
foreach($frienddb as $key=>$val){print <<<EOT
-->
						<input type="checkbox" name="touid[]" value="$val[friendid]" />$val[username]
<!--
EOT;
}print <<<EOT
-->
						<span class="bta" style="cursor:pointer;" onClick="CheckAll(document.FORM,'touid')">全 選</span>
<!--
EOT;
}print <<<EOT
-->
			</td>

				</tr>



				<tr>
					<td class="td1">標題</td>
					<td><input class="input" type="text" name="msg_title" style="width:50%" size="73" value="$subject" /></td>
				</tr>
<!--
EOT;
if($db_gdcheck & 8){print <<<EOT
-->
				<tr>
					<td class="td1">認證碼</td>
					<td><input class="input" type="text" name="gdcode" size="8" onfocus="try{opencode('menu_gd',this)}catch(e){}" /><span style="cursor:pointer; margin-left:3px" onclick="this.previousSibling.focus();">點此顯示驗證碼</span>
					<div class="menu" id="menu_gd" style="visibility:hidden;"><img src="ck.php?" align="absmiddle" style="cursor:pointer;" id="ckcode" title="看不清楚，換一張" /></div></td>
				</tr>
<!--
EOT;
}if($msgq && $db_question){
$qkey = array_rand($db_question);
print <<<EOT
-->
				<tr>
					<td class="td1">驗證問題<br />{$db_question[$qkey]}</td>
					<td><input class="input" type="text" name="qanswer" /><input type="hidden" name="qkey" value="$qkey" /></td>
				</tr>
<!--
EOT;
}print <<<EOT
-->
				<tr>
					<td class="td1">內容<br /><br />
					<div id="menu_face" class="menu" style="display:none;"></div>
					<script language="javascript">
						var imgpath   = '$imgpath';
						var stylepath = '$stylepath';
					</script>
<!--
EOT;
if(R_P==D_P){print <<<EOT
-->
					<script language="JavaScript" src="data/bbscache/face.js"></script>
<!--
EOT;
}else{
$facedb=readover(D_P."data/bbscache/face.js");
print <<<EOT
-->
					<script language="JavaScript">
					$facedb
					</script>
<!--
EOT;
}print <<<EOT
-->
				<td>
<!--
EOT;
require_once PrintEot('editor');
print <<<EOT
-->
					<div style="margin:4px 0 2px"><input type="checkbox" name="ifsave" value="Y" />保存到發件箱中
					</div>
				</td>
			</tr>
		</table></div>
		<script language="JavaScript" src="js/post.js"></script></td>
		<div class="tac" style=" padding:1em">
			按 Ctrl+Enter 直接提交
			<input class="btn" type="submit" value="提 交" name="Submit" />
		</div>
	</form><br />
<!--
EOT;
}print <<<EOT
-->
</div></div></div></div>
<script language="JavaScript" src="js/pw_dialog.js"></script>
<script language="JavaScript">
cnt = 0;
function checkCnt() {
	document.FORM.Submit.disabled = true;
	cnt++;
	if (cnt != 1) {
		showDialog("warning","Submission Processing. Please Wait");
		return false;
	}
}
function checkset() {
	if (confirm("將刪除收件箱和發件箱內所有消息，請確認！")) {
		window.location=('$B_url/message.php?action=clear&verify=$verifyhash');
	} else {
		return false;
	}
}
</script>
</div>
<!--
EOT;
?>-->