<?xml version="1.0" encoding="gb2312"?>
<posttemplate>
 <label name="post">
		<![CDATA[
		<script src="../HSK_JS/common.js" type="text/javascript"></script>
		<script type="text/javascript">
		  function getCode()
          { 
			 jQuery("#showVerify").html("<img style='cursor:pointer' src='../plus/verifycode.asp?n='+Math.random() onClick='this.src=\"../plus/verifycode.asp?n=\"+ Math.random();'  align='absmiddle'>");
			}
		  function InsertFileFromUp(FileList,fileSize,maxId,title)
		  { 
		    var files=FileList.split('/');
			var file=files[files.length-1];
			var fileext = FileList.substring(FileList.lastIndexOf(".") + 1, FileList.length).toLowerCase();
			if (fileext=="gif" || fileext=="jpg" || fileext=="jpeg" || fileext=="bmp" || fileext=="png")
			  {
		         {IF:KS.Setting(59)="0"}
				    if (jQuery('#pic').val()==''){
					 jQuery('#pic').val(FileList);
					}
			     {/IF}
				 insertHTMLToEditor('[img]'+FileList+'[/img]');	
			  }else{
			  {IF:KS.Setting(59)="0"}	
			  if (jQuery('#AnnexExt').val()=='')jQuery('#AnnexExt').val(fileext);
		      {/IF}
			  var str="[UploadFiles]"+maxId+","+fileSize+","+fileext+","+title+"[/UploadFiles]";
				 insertHTMLToEditor(str);	
			 }
		}
		function insertHTMLToEditor(codeStr) { 
		  Editor.insertText(Editor.bbcode2html(codeStr));
		} 
		</script>
		<iframe src="about:blank" name="hidIframe" id="hidIframe" width="0" height="0" style="display:none"></iframe>		
	    {ElseIF:KS.Setting(59)<>"1"}
			 
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
					<form action="Save_Post.asp" method="post" name="myform" id="myform" target="hidIframe" onKeyDown="if(event.ctrlKey&&event.keyCode==13)this.submit()">
					   <input type="hidden" name="posttype" value="{$PostType}"/>
                          <tr> 
						    <td height="30" >
							{$PostSubject}
							</td>
                            <td rowspan="3" width="220" valign="top" style="padding:6px;background:#f1f1f1;line-height:25px;text-align:left;font-size:12px;font-weight:normal;color:#999999"> <strong>附加选项</strong><br/>
							 <label><input type="checkbox" disabled="disabled">Html 代码</label><br/>
							 <label><input type="checkbox" checked="checked" disabled="disabled">UBB 代码</label><br/>
							 <label><input type="checkbox" name="showip" value="0" checked>隐藏IP</label><br/>
							 <label><input type="checkbox" name="showsign" value="0" checked>使用个人签名</label><br/><br/>
							 <strong>会员需要拥有</strong><br/><input type="text" name="showscore" value="0" size="4" style="text-align:center;border:1px solid #ccc;height:18px;">个积分以上才可以查看此帖<br/>

<br/>如果需要回复才可见的内容可以调用隐藏标签，格式如：<br/><span style="color:green">[replyview]内容[/replyview]</span> ,您也可以点这里<br/><input type="button" style="padding:2px" onClick="insertHiddenContent(event)" value="插入隐藏内容" />
							<br/>
							{$ShowUpFilesTips}
							 </td>
                          </tr>
						   <input type="hidden" name="boardid" value="{$BoardID}"/>
						   <input type="hidden" value="" name="pic" id="pic" />
						   <input type="hidden" value="" name="AnnexExt" id="AnnexExt" />
                          <tr> 
						    <td height="305" class="lefttd">
							<textarea style="display:none;width:500px;height:300px" id="Content" name="Content">{$Content}</textarea>
							<iframe id="Editor" name="Editor" src="../editor/ubb/editor.html?id=Content" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" style="height:430px;width:99%"></iframe>
                            {$ShowUpFiles}
						   </td>
					      </tr>
						  
				
						   
						  {IF:mid(KS.Setting(161),3,1)="1"}
                          <tr>
                            <td height="30">
							<span style="color:red">问题：{$Question}</span><br/>
							答案：<input type="text" name="Answer{$RndID}" id="Answer{$RndID}"> <span style="color:#999999">防发帖机，只有回答正确才可以发帖</span>							</td>
						  </tr>
						  {/IF}
                          <tr>
                            <td colspan="2" height="45" style="padding-left:10px">
							<input type="submit" style="padding:3px" class="btn" value=" OK,立 即 发 表 " name="Submit" onClick="return(checkform())">
							&nbsp;
							<span {$CodeTF}>附 加 码 ：<input name="Code{$RndID}" type="text" class=inputtext size="8" onFocus="getCode();"><span id="showVerify"></span> </span></td>
                          </tr>
						   </form>
                        </table> 

		{Else}
		 
<table width="96%" align="center" border="0" cellspacing="0" cellpadding="0" class="clubfont">
		       <form action="Save_Post.asp" method="post" name="myform" id="myform" target="hidIframe" onkeydown="if(event.ctrlKey&&event.keyCode==13)this.submit()">
                          <tr> 
                            <td width="120" nowrap class="lefttd">发表主题 ：</td>
                            <td height="30" >
							<input name="Subject{$RndID}" ID="Subject{$RndID}" size="45" maxlength="150" class=inputtext>
                              <span style="color:#FF0000">*</span></td>
                          </tr>
						     <input type="hidden" name="boardid" value="{$BoardID}"/>
                            <td  height="30" class="lefttd">用 户 名 ：</td>
                            <td height="30" ><input name="Name" maxlength="15" value="{$UserName}" {$User_Enabled}class=inputtext size="36" >
                            <span style="color:#FF0000">*</span></td>
			               </tr>
                          <tr> 
                            <td height="30" class="lefttd">信&nbsp;&nbsp;箱 ：</td>
                            <td height="30" ><input name="Email" value="{$UserEmain}" size="36" maxlength="50" class=inputtext>
                              <span style="color:#FF0000">*</span></td>
						  </tr>
                          <tr> 
                            <td height="30" class="lefttd">主&nbsp;&nbsp;页 ：</td>
                            <td height="30"><input name="Homepage" size="36" maxlength="50" value="{$UserHomePage}" class=inputtext ></td>
							</tr>
                          <tr> 
                            <td height="30" class="lefttd">QQ号码 ：</td>
                            <td height="30"> <input name="Oicq" maxlength="10" value="{$UserQQ}" class=inputtext size="25" ></td>
                          </tr>
                          <tr> 
                            <td height="30" class="lefttd">留言查看 ：</td>
                            <td height="30"> 
							<label><input type="radio" name="Purview" value="0" checked> 所有人可见</label>
							<br/>
							<label><input type="radio" value="1" name="Purview"> 仅自己和管理员可见</label>							</td>
                          </tr>

                          <tr>
                            <td height="30" class="lefttd">当前心情 ：</td>
                            <td>{$EmotList}</td>
                          </tr>
						  
                          <tr> 
						    <td class="lefttd" width="120" valign="top">
							发表内容 ：<br/>							</td>
                            <td height="140" class="lefttd" >
							<textarea style="display:none" id="Content" name="Content"></textarea>
							<iframe id="Editor" name="Editor" src="../editor/ubb/editor.html?id=Content" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" style="height:430px;width:99%"></iframe>					  </td>
                          </tr>
				
						   
						  {IF:mid(KS.Setting(161),3,1)="1"}
                          <tr>
                            <td class="lefttd" height="30">请 回 答 ：</td>
                            <td>
							<span style="color:red">问题：{$Question}</span><br/>
							答案：<input type="text" name="Answer{$RndID}" id="Answer{$RndID}"> <span style="color:#999999">防发帖机，只有回答正确才可以发帖</span>							</td>
                          </tr>
						  {/IF}
                         
                          <tr>
                            <td colspan="2" height="45" style="padding-left:130px">
							<input type="submit" class="btn" style="padding:3px" value="OK,立即发表" name="Submit" onclick="return(checkform())">
							&nbsp;
							<span {$CodeTF}>附 加 码 ：<input name="Code{$RndID}" type="text" class=inputtext size="8" onFocus="getCode();"><span id="showVerify"></span> </span></td>
                          </tr>
						   </form>
                        </table> 
		 
		 
		{/ElseIf}
	]]>
	</label>


   <label name="postvote">
    <![CDATA[
	
	<div class="postvote">
	<script type="text/JavaScript">
	var rowtypedata = [
		[
			[1,'<input type="text" name="voteitem"  size="43" class="textbox"/>', 'tdbg']
		],
	];

var addrowdirect = 0;
function addrow(obj, type) {
    if ((jQuery("#votetable tr").length-2)==10){
	 alert('最多只能添加10个选项!');
	 return;
	}

	var table = obj.parentNode.parentNode.parentNode.parentNode;
	if(!addrowdirect) {
		var row = table.insertRow(obj.parentNode.parentNode.parentNode.rowIndex);
	} else {
		var row = table.insertRow(obj.parentNode.parentNode.parentNode.rowIndex + 1);
	}
	var typedata = rowtypedata[type];
	for(var i = 0; i <= typedata.length - 1; i++) {
		var cell = row.insertCell(i);
		cell.colSpan = typedata[i][0];
		var tmp = typedata[i][1];
		if(typedata[i][2]) {
			cell.className = typedata[i][2];
		}
		tmp = tmp.replace(/\{(\d+)\}/g, function($1, $2) {return addrow.arguments[parseInt($2) + 1];});
		cell.innerHTML = tmp;
	}
	addrowdirect = 0;
}
</script>



<table width="100%">
<tr>
<td  width="400">
    <table cellspacing="1" id="votetable" width="80%" cellpadding="1" border="0">
	<tr style='font-weight:bold;' class="title"><td colspan="2">选项:最多可填写 10 个选项</td></tr>
	{$VoteItem}
	<tr><td><div><img src="images/edit.gif" align="absmiddle"/> <a href="#" onclick="addrow(this, 0)" class="addtr">增加一项</a></div></td>
	</tr>
	</table>
</td>
<td valign="top" style="color:#999;line-height:25px">
 
 投票类型:
 <select name="VoteType" id="VoteType">
  {$VoteTypeOption}
</select>
 <br/>
 匿名投票:<label><input type='checkbox' name='nmtp' value='1'{$Nmtp}>允许匿名投票</label>
 <br/>
 启用时间限制: {$TimeLimit}
 <br/>
 <div id='time'{$ShowLimitTime}>
	有效天数<input type='text' class="textbox" name='ValidDays' size='4' style='text-align:center' value='{$ValidDays}'>天
</div>
  </td>
 </tr>
</table>


	</div>
	
	]]>
   </label>
</posttemplate>