<!--<?php
print<<<EOT
--><!doctype html>
<html>
<head>
<meta charset="$db_charset" />
<title>寫日志</title>
<meta name="generator" content="phpwind $wind_version" />
<meta name="description" content="phpwind" />
<meta name="keywords" content="phpwind" />
<base id="headbase" href="$db_bbsurl/" />
<link rel="stylesheet" href="images/pw_core.css?{$GLOBALS['wind_repair']}" />
<link rel="stylesheet" href="u/images/style.css?{$GLOBALS['wind_repair']}" />
<link rel="stylesheet" href="images/post/minieitor/minieitor.css?{$GLOBALS['wind_repair']}" />
<script type="text/javascript" src="js/core/core.js"></script>
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript">
var imgpath = '$imgpath';
var verifyhash = '$verifyhash';
var winduid = '$winduid';
var windid	= '$windid';
var groupid	= '$groupid';
var charset = '$db_charset';
var basename = '$basename';
var temp_basename = '$temp_basename';
</script>
<style>html,body{padding:0;margin:0;background:#fff;overflow:hidden;}</style>
</head>
<body onKeyDown="try{keyCodes(event);}catch(e){}">
<!--
EOT;
if ($a == 'write' || $a == 'edit') {print <<<EOT
-->
		<div id="content" style="overflow:hidden;width:615px;">
			<script type="text/javascript">
			if(getObj('upPanel'))
			{
				getObj('upPanel').style.overflow="hidden";
				getObj('upPanel').style.overflowY="hidden";
			}
			</script><iframe style="width:0;height:0;overflow:hidden; visibility:hidden;" name="formTarget" src="javascript:;" onLoad="iDiaryForm(this)"></iframe>
			<form action="{$basename}a=$a&diraryAjax=1" method="post" enctype="multipart/form-data" onSubmit="return checkpost(document.FORM);" name="FORM" id="FORM" target="formTarget" />
			<input type="hidden" name="did" value="$did" />
			<input type="hidden" name="dtided" value="$diary[dtid]" />
			<input type="hidden" name="privacyed" value="$diary[privacy]" />
			<input type="hidden" name="atc_autourl" value="1" />
			<input type="hidden" name="step" value="2" />
			<input type="hidden" name="verify" value="$verifyhash" />
			<div style="padding-left:15px;">
			<div><input type="text" class="input" name="atc_title" id="atc_title" value="$diary[subject]" size="70"/>&nbsp;<span id="atc_title_warn" class="gray">限 $db_titlemax 字節</span></div>
			<div id="menu_face" class="menu" style="display:none;"></div>
			<div style="padding:10px 0 0;">
<script type="text/javascript">
	var imgpath   = 'images';
	var stylepath = 'wind';
	function addsmile(NewCode){
	    document.FORM.atc_content.value += ' [s:'+NewCode+'] ';
	}
	window.onerror=function()
	{
	return true;
	};
</script>
<script src="$db_htmdir/js/face.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" src="js/app_global.js"></script>
					<div id="menu_show" style="display:none;"></div>
					<div id="menu_face" class="menu" style="display:none;"></div>
					<script type="text/javascript" src="js/post.js"></script>
							<div id="linkbox" style="display:none;"></div>
                            <div class="minieitor_pw cc">
                                <ul class="miniUl">
                                	<li><a href="javascript:" title="插入url鏈接" class="milink_pw" onClick="createLinkBox();" id="createlinkid">插入url鏈接</a></li>
                                	<li><a href="javascript:" title="添加表情" class="mishow_pw" id="td_face" onClick="showDefault();" unselectable="on">添加表情</a></li>
                                </ul>
                                <div class="minitextarea">
                                    <textarea maxlength="200" id="comm_input_diary_5294_0" name="atc_content"></textarea>
                                    <div class="c"></div>
                                </div>
                            	<div class="c"></div>
                            </div>

				</div>
				<div class="c"></div>
<!--
EOT;
if ($o_diary_gdcheck) {
$checkCode = L::loadClass('checkcode', 'site');
$checkCodeString = $checkCode->getCheckCodeTemplate();
print <<<EOT
-->
	<div class="mb10">驗證碼: <input class="input mr5" type="text" name="gdcode" onfocus="showgd();" id="fs_gdcode" size="5" tabindex="3"  />
		<span id="ckcode" style="display:none;"></span>
$checkCodeString
	</div>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if($db_question && $o_diary_qcheck){
list(,$showq)=explode("\t",$db_qcheck);
if($db_imagequestion){
	$question = '<img id="ckquestion" src="ckquestion.php?q='.$qkey.'&t='.$timestamp.'" align="top">';
}else{
	$question = $qkey<0 ? getMachineQuestion_1() :  $db_question[$qkey];
}
$q_a = $question.($showq && $qkey>0?" （答案︰".$db_answer[$qkey] . '）' : '');
print <<<EOT
-->
				<div><span class="mr10">驗證問題:</span>{$q_a}<input class="input" size="5" name="qanswer" id="qanswer" tabindex="7" /><input type="hidden" name="qkey" id="qkey" value="$qkey" /></div>
<!--
EOT;
}print <<<EOT
-->
		<div style="display:block;padding:10px 0;" class="cc">
        		<div class="cc">
				<div class="mr10 fl lh_24">隱私設置</div>
				<span class="dropdown mr20"><select name="privacy" id="dtid_pvc" onChange="optionsel(this.value,'{$sendWeiboPrivacy}')">
					<option value="0" $privacy_0>全站可見</option>
					<option value="1" $privacy_1>僅好友可見</option>
					<option value="2" $privacy_2>僅自己可見</option>
				</select></span>
				<span style="display:none;">
				<input type="checkbox" name="atc_convert" id="atc_convert" value="1" checked/>Wind Code自動轉換
				</span>
                
                <div class="fl">
                <label for="if_copy" class="mr10 fl">
                <input id="if_copy" type="checkbox" name="ifcopy" value="1" $checked $disabled>&nbsp;允許轉載
                </label>
<!--
EOT;
if ($sendWeiboPrivacy) {print <<<EOT
-->
                <label for="if_sendweibo" class="mr10" $weibodisplay id="lab_weibo">
                <input id="if_sendweibo" type="checkbox" name="ifsendweibo" value="1" checked="checked">&nbsp;同時發送到新鮮事
                </label>
<!--
EOT;
}print <<<EOT
-->
                </div>
             </div>
               <div style="display:block;padding:10px 0;" class="cc">
				<div class="mr10 fl lh_24">日志分類</div><span class="dropdown"><select name="dtid" id="dtid_add">
					<option value="0" $dtid_0>默認分類</option>
					$dtsel
				</select></span>
				</div>
				<span class="btn" style="margin:0;"><span><button name="Submit" type="submit">提 交</button></span></span>
			</div>
			</form>
	</div>
<!--
EOT;
if($a == 'edit'){print <<<EOT
-->

<!--
EOT;
}else{print <<<EOT
-->
<script type="text/javascript">setTimeout("document.FORM.atc_title.focus()",50);</script>
<!--
EOT;
}print <<<EOT
-->
<script type="text/javascript">var stylepath = 'wind';</script>
<script src="$db_htmdir/js/face.js"></script>
<script type="text/javascript">
var cnt  = 0;
document.FORM.Submit.disabled = false;
function checkpost(obj) {
	if (obj.atc_title.value == "") {
		showDialog("error","日志<span class='s1'>標題</span>不能為空",2);
		SETTOP();
		obj.atc_title.focus();
		return false;
	} else if (strlen(obj.atc_title.value) > $db_titlemax) {
		showDialog("error","日志<span class='s1'>標題</span>不能大于 <span class='s1'>$db_titlemax</span> 個字節",2);
		obj.atc_title.focus();
		SETTOP();
		return false;
	}
	if (strlen(obj.atc_content.value) < $db_postmin) {
		showDialog("error","日志<span class='s1'>內容</span>不能少于 <span class='s1'>$db_postmin</span> 個字節",2);
		SETTOP();
		return false;
	} else if (strlen(obj.atc_content.value) > $db_postmax) {
		showDialog("error","日志<span class='s1'>內容</span>不能大于 <span class='s1'>$db_postmax</span> 個字節",2);
		SETTOP();
		return false;
	}
	document.FORM.Submit.disabled = true;
	cnt++;
	return true;
}
</script>
<script type="text/javascript" src="js/post.js"></script>
<!--

EOT;
}print <<<EOT
-->
<script type="text/javascript" src="apps/$appdir/js/diarytype.js"></script>
<script type="text/javascript" src="js/app_comment.js"></script>
<script type="text/javascript" src="js/core/friendlist.js"></script>
<!--
EOT;
if((empty($a) || $a == 'privacy' || $a == 'friend') && !empty($sum)) {print <<<EOT
-->
<script type="text/javascript" src="js/core/space.js"></script>
<!--
EOT;
}print <<<EOT
-->
<script type="text/javascript" src="js/select.js"></script>
<script type="text/javascript">
var ld=window.onload;
window.onReady(function(){
	new sSelect(getObj('dtid_add'));
	new sSelect(getObj('dtid_pvc'));
})
</script>
</body></html>
<!--
EOT;
?>-->