<!--<?php
print<<<EOT
--><!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; 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" type="text/css" href="images/pw_core.css" media="all" />
<link rel="stylesheet" type="text/css" href="u/images/style.css" media="all" />
<link rel="stylesheet" type="text/css" href="images/post/minieitor/minieitor.css" media="all" />
<SCRIPT type="text/javascript" LANGUAGE="JavaScript" src="js/core/core.js"></SCRIPT>
<script type="text/javascript" language="JavaScript" src="js/pw_ajax.js"></script>
<script language="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" 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 language="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 language="JavaScript" src="js/global.js"></script>
<script language="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 language="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) {
$gdSize = explode("\t",$db_gdsize);
print <<<EOT
-->
	<div class="mb10">认证码: <input class="input mr5" type="text" name="gdcode" onFocus="showgd();" id="fs_gdcode" size="5" tabindex="3"  />
<script type="text/javascript" src="js/pw_authcode.js"></script>
<script>
var flashWidth = "$gdSize[0]";
var flashHeight = "$gdSize[1]";
var gdtype = $db_gdtype;
showGdCode();
</script>
				</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 language="JavaScript">setTimeout("document.FORM.atc_title.focus()",50);</script>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">var stylepath = 'wind';</script>
<script src="$db_htmdir/js/face.js"></script>
<script language="JavaScript">
var cnt  = 0;
document.FORM.Submit.disabled = false;
function checkpost(obj) {
	if (obj.atc_title.value == "") {
		showDialog("error","日志<span class='warnFontStyle'>标题</span>不能为空",2);
		SETTOP();
		obj.atc_title.focus();
		return false;
	} else if (strlen(obj.atc_title.value) > $db_titlemax) {
		showDialog("error","日志<span class='warnFontStyle'>标题</span>不能大于 <span class='warnFontStyle'>$db_titlemax</span> 个字节",2);
		obj.atc_title.focus();
		SETTOP();
		return false;
	}
	if (strlen(obj.atc_content.value) < $db_postmin) {
		showDialog("error","日志<span class='warnFontStyle'>内容</span>不能少于 <span class='warnFontStyle'>$db_postmin</span> 个字节",2);
		SETTOP();
		return false;
	} else if (strlen(obj.atc_content.value) > $db_postmax) {
		showDialog("error","日志<span class='warnFontStyle'>内容</span>不能大于 <span class='warnFontStyle'>$db_postmax</span> 个字节",2);
		SETTOP();
		return false;
	}
	document.FORM.Submit.disabled = true;
	cnt++;
	return true;
}
</script>
<script language="JavaScript" src="js/post.js"></script>
<!--

EOT;
}print <<<EOT
-->
<script language="JavaScript" src="apps/$appdir/js/diarytype.js"></script>
<script language="JavaScript" src="js/app_comment.js"></script>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript" src="js/core/friendlist.js"></SCRIPT>
<!--
EOT;
if((empty($a) || $a == 'privacy' || $a == 'friend') && !empty($sum)) {print <<<EOT
-->
<SCRIPT type="text/javascript" LANGUAGE="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;
?>-->