<!--<?php
$style1 = $db_pwcode ? '' : 'none';
$style2 = $db_setform ? '' : 'none';
print <<<EOT
--><div style="display:none;"><link rel="stylesheet" type="text/css" href="$imgpath/post/c_editor/editor.css?{$GLOBALS['wind_repair']}" /></div>
<div class="wind_editor_con cc">
	<div class="w_editor_but">
		<ul class="cc fl">
			<li>
				<div class="wy_select" style="width:77px;" id="wy_fontname">字體</div>
				<div class="wy_select" style="width:15px;" id="wy_fontsize">2</div>
				<div class="c">&nbsp;</div>
				<a id="wy_bold" title="粗體">粗體</a>
				<a id="wy_italic" title="斜體">斜體</a>
				<a id="wy_underline" title="下劃線">下劃線</a>
                <a id="wy_strikethrough" title="刪除線">刪除線</a>
				<a id="wy_forecolor" title="字體顏色">字體顏色</a>
				<a id="wy_hilitecolor" title="背景顏色">背景顏色</a>
			</li>
			<li>
            	<div class="cc fl">
                <!--a id="wy_bold" title="粗體">粗體</a-->
				<a id="wy_justify" title="對齊">對齊</a>
				<a id="wy_insertlist" title="列表">列表</a>
				<a id="wy_indent" title="縮進">縮進</a>
				<a id="wy_inserthorizontalrule" title="水平線">水平線</a>

				<div class="c">&nbsp;</div>
                <a id="wy_removeformat" title="去除字體格式">去除字體格式</a>
				<a id="wy_createlink" title="插入鏈接">插入鏈接</a>
				<a id="wy_unlink" title="清除鏈接">清除鏈接</a>
				<a id="wy_inserttable" title="表格">表格</a>
           </div>
			</li>
			<li class="li_icon_big">
           		<div>
				<!--a id="wy_paste" title="粘貼">粘貼</a-->
				<a id="wy_insertimage" title="圖片">圖片</a>
				<a id="wy_media" title="多媒體">多媒體</a>
				<a id="td_face" title="表情" href="javascript:" unselectable="on" onclick="return showEmotion();">表情</a></div>
				<div class="c"></div>
			</li>
			<li class="li_bg_none">
				<a id="wy_pwcode" title="自定義代碼" style="display:$style1">自定義代碼</a>
                <a id="wy_setform" title="帖子格式" style="display:$style2">帖子格式</a>
				<div class="c">&nbsp;</div>
				<a id="wy_undo" title="撤銷">撤銷</a>
				<a id="wy_redo" title="恢復">恢復</a>
			</li>
		</ul>
		<div class="fr windcode">
			<input id="wy_windcode" type="checkbox" />Wind代碼 {$db_appsdb[11][status]}<div style="padding-top:3px;"><span id="autosave" style="display:none">內容已保存</span><span id="atc_content_warn">{$db_postmax}字節</span></div>
		</div>
	</div>
	<div style="padding:0.5% 0 0 0.5%;width:99.5%;display:inline;float:left;"><div class="wy_menu_B" id="menu_editor" style="display:none;"></div><textarea id="textarea" name="atc_content" style="height:280px;">{$atc_content}</textarea></div>
    <div class="c"></div>
    <div class="pr" style="height:12px;" onmousedown="editor.flex(event);"><div style="cursor:s-resize;position:absolute;bottom:-10px;height:12px;width:100%;padding-bottom:10px;" class="cc"><div class="post-flex">拉動</div></div></div>
</div>
<div class="wy_tips_A"><a href="javascript:" onclick="loadData('msg');">恢復數據</a> 　 <a href="javascript:" onclick="opendraft(this.id);" id="newdraft">草稿箱</a></div>

<script type="text/javascript" src="js/wind_c_editor.js"></script>

<script type="text/javascript">
var charset='$db_charset';
var editor = null;
var bbsurl ="{$B_url}";
function WysiwygConfig() {
	this.baseURL = document.baseURI || document.URL;
	if (this.baseURL && this.baseURL.match(/(.*)\/([^\/]?)/)) {
		this.baseURL = RegExp.$1 + "/";
	}
	this.imgURL = imgpath + "/post/c_editor/";

	this.btnList = {
		removeformat:[ false, editorcode, false ],
		bold: [ true, editorcode, true ],
		italic: [ true, editorcode, true ],
		underline: [ true, editorcode, true ],
		strikethrough: [ true, editorcode, true ],
		//subscript: [ true, editorcode, true ],
		//superscript: [ true, editorcode, true ],
		justify : [true, showJustify, false],
		//justifyleft: [ true, editorcode, true ],
		//justifycenter: [ true, editorcode, true ],
		//justifyright: [ true, editorcode, true ],
		//justifyfull: [ true, editorcode, true ],
		insertlist : [true, showList, false],
		//insertorderedlist: [ true, editorcode, true ],
		//insertunorderedlist: [ true, editorcode, true ],
		//outdent: [ true, editorcode, false ],
		indent: [ true, showDent, false ],
		forecolor: [ true, showcolor, false ],
		hilitecolor: [ true, showcolor, false ],
		inserthorizontalrule: [ true, editorcode, false ],
		createlink: [ true, showcreatelink, false ],
		unlink: [ true, editorcode, false ],
		insertimage: [ true, insertImage, false ],
		music: [ true, insertMusic, false ],
		inserttable: [ false, showTable, false ],
		windcode: [ true, editorcode, false ],
		//htmlmode: [ true, editorcode, false ],
		undo: [ true, editorcode, false ],
		redo: [ true, editorcode, false ],
		//cut: [ false, editorcode, false ],
		//copy: [ false, editorcode, false ],
		//paste: [ false, editorcode, false ],
		media: [ true, rming, false ],
		quote: [ true, code, false ],
		code: [ true, code, false ],
		post: [ true, code, false ],
		sell: [true, sell, false ],
		//br: [ false, br, false ],
		//sale: [ true, showsale, false ],
		pwcode: [true, extend , false ],
		setform: [true, extend , false ]
	};
	this.fontname = {
		"default": "字體",
		"宋體":	'宋體',
		"新宋體":	'新宋體',
		"楷體_GB2312":	'楷體_GB2312',
		"黑體":	'黑體',
		"Arial":	   'arial,helvetica,sans-serif',
		"Courier New":	   'courier new,courier,monospace',
		"Georgia":	   'georgia,times new roman,times,serif',
		"Tahoma":	   'tahoma,arial,helvetica,sans-serif',
		"Times New Roman": 'times new roman,times,serif',
		"Verdana":	   'verdana,arial,helvetica,sans-serif',
		"impact":	   'impact'
	};
	this.fontsize = {
		"default": "2",
		"1":  "1",
		"2": "2",
		"3": "3",
		"4": "4",
		"5": "5",
		"6": "6",
		"7": "7"
	};
	this.formatblock = {
		"default": "格式",
		"普通": "p",
		"標題一": "h1",
		"標題二": "h2",
		"標題三": "h3",
		"標題四": "h4",
		"標題五": "h5",
		"標題六": "h6"
	};
	this.selList = ['fontname','fontsize'];
};
editor = new WYSIWYD();
editor.config = new WysiwygConfig();
</script>
<!--
EOT;
?>