
$header
<SCRIPT language=JavaScript>

function insertstr(str)
{
	document.ctbform.topicBody.value=document.ctbform.topicBody.value+str;
}
function btn_q()
{
 txt=prompt("引用内容:","文字");     
 if(txt!=null)
 {
  AddTxt="[quote]"+txt;
  insertstr(AddTxt);
  AddTxt="[/quote]";
  insertstr(AddTxt);
 }	        
}
function btn_email()
{
 txt=prompt("Email:","@");     
 if(txt!=null)
 {
  AddTxt="[email]"+txt;
  insertstr(AddTxt);
  AddTxt="[/email]";
  insertstr(AddTxt);
 }	        
}
function btn_url()
{
 txt=prompt("URL:","http://");     
 if(txt!=null)
 {
  AddTxt="[url]"+txt;
  insertstr(AddTxt);
  AddTxt="[/url]";
  insertstr(AddTxt);
 }	        
}
function btn_swf()
{
 txt=prompt("Flash动画的URL地址:","http://");    
 if(txt!=null)
 {            
  AddTxt="[swf width=450 height=280]"+txt;
  insertstr(AddTxt);
  AddTxt="[/swf]";
  insertstr(AddTxt);
 }	
}
function btn_img()
{
 txt=prompt("图片的URL地址:","http://");    
 if(txt!=null)
 {            
  AddTxt="[img]"+txt;
  insertstr(AddTxt);
  AddTxt="[/img]";
  insertstr(AddTxt);
 }	
}
function showcolor(color)
{
 txt=prompt("文字颜色:"+color,"文字");
 if(txt!=null)
 {
  AddTxt="[color="+color+"]"+txt;
  insertstr(AddTxt);        
  AddTxt="[/color]";
  insertstr(AddTxt);
  } 
 }
function btn_i()
{
 txt=prompt("斜体文字:","斜体字");     
 if (txt!=null)
 {
  AddTxt="[i]"+txt;
  insertstr(AddTxt);
  AddTxt="[/i]";
  insertstr(AddTxt);
 }	        
}
function btn_u()
{
 txt=prompt("下划线文字:","下划线文字");     
 if (txt!=null)
 {
  AddTxt="[u]"+txt;
  insertstr(AddTxt);
  AddTxt="[/u]";
  insertstr(AddTxt);
 }	        
}
function btn_b()
{
 txt=prompt("粗体文字:","粗体字");     
 if (txt!=null)
 {           
  AddTxt="[b]"+txt;
  insertstr(AddTxt);
  AddTxt="[/b]";
  insertstr(AddTxt);
 }	        
}
function btn_code()
{
 txt=prompt("插入代码:","在此填写代码");     
 if (txt!=null)
 {           
  AddTxt="[code]"+txt;
  insertstr(AddTxt);
  AddTxt="[/code]";
  insertstr(AddTxt);
 }	        
}
</SCRIPT>
<script language=javascript>
ie = (document.all)? true:false
if (ie){
function ctlent(eventobject){if(event.ctrlKey && window.event.keyCode==13){this.document.ctbform.submit();}}
}

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>
<br>
<table width="100%"  border=0 cellPadding=3 cellSpacing=1 bgcolor="#6394bd" align="center">
    <tr bgcolor="#6394bd"> 
      <td colspan="2"><font color=white><b>-=>发表新主题</b></font></td>
    </tr>
      <form name="ctbform" method="post" action="./index.php">
	  
    <input type="hidden" name="mods" value="$actionModlue">
  <tr bgcolor="#FFFFFF"> 
      <td width="21%">
	    &nbsp;登陆ID:</td>
      <td width="79%">
	    <input type="text" name="topic_title" class="input2" size="21" maxlength=38 value="{$this->sess['sess_ulogin']}" disabled>
	  </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
      <td width="21%">
	    &nbsp;您的姓名:</td>
      <td width="79%">
	    <input type="text" name="topic_title" class="input2" size="21" maxlength=38 value="{$this->sess['sess_uname']}" disabled>
	  </td>
  </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="21%">&nbsp;文章标题:</td>
      <td width="79%" bgcolor="#FFFFFF">
	<SELECT name="subject" 
                  onchange="document.ctbform.topicTitle.value = this.options[this.selectedIndex].value"> 
                    <OPTION selected value="">选择话题</OPTION> <OPTION 
                    value=［原创］>［原创］</OPTION> <OPTION value=［转贴］>［转贴］</OPTION> 
                    <OPTION value=［灌水］>［灌水］</OPTION> <OPTION 
                    value=［讨论］>［讨论］</OPTION> <OPTION value=［求助］>［求助］</OPTION> 
                    <OPTION value=［推荐］>［推荐］</OPTION> <OPTION 
                    value=［公告］>［公告］</OPTION> <OPTION value=［注意］>［注意］</OPTION> 
                    <OPTION value=［贴图］>［贴图］</OPTION> <OPTION 
                    value=［建议］>［建议］</OPTION> <OPTION value=［下载］>［下载］</OPTION> 
                    <OPTION value=［分享］>［分享］</OPTION> <OPTION 
                    value=［警告］>［警告］</OPTION></SELECT> 
		<INPUT maxLength="{$this->set[postTopicWidth]}" name="topicTitle" size=45 class="input2" value="$topicTitle"> 
        (<font color="#FF0000">必填</font>) 
        <input type="hidden" name="forumid" value="{$this->input['forumid']}">
        <input type="hidden" name="action" value="$actionType">
        <input type="hidden" name="postid" value="{$this->input['postid']}">
        <input type="hidden" name="topicid" value="{$this->input['topicid']}">
      </td>
  </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="21%">&nbsp;主题图标:</td>
      <td width="79%"><table width="70%"  border=0 cellPadding=0 cellSpacing=0 ><tr><td>
   <input type="radio" value="smileyface.gif" name="pic" checked><img src="{$this->tplPath}/images/icon/smileyface.gif" width="15" height="15">
   <input type="radio" value="butterfly.gif" name="pic"><img src="{$this->tplPath}/images/icon/butterfly.gif"width="15" height="11">
</td><td>
   <input type="radio" value="yinyang.gif" name="pic"><img src="{$this->tplPath}/images/icon/yinyang.gif" width="15" height="15">
   <input type="radio" value="heart.gif" name="pic"><img src="{$this->tplPath}/images/icon/heart.gif" width="16" height="15">
</td><td>
   <input type="radio" value="male.gif" name="pic"><img src="{$this->tplPath}/images/icon/male.gif" width="15" height="15">
   <input type="radio" value="thumbsup.gif" name="pic"><img src="{$this->tplPath}/images/icon/thumbsup.gif" width="12" height="15">
</td><td>
   <input type="radio" value="lightbulb.gif" name="pic"><img src="{$this->tplPath}/images/icon/lightbulb.gif" width="12" height="15">
   <input type="radio" value="ladybug.gif" name="pic"><img src="{$this->tplPath}/images/icon/ladybug.gif" width="15" height="15">
</td><td>
   <input type="radio" value="musicnote.gif" name="pic"><img src="{$this->tplPath}/images/icon/musicnote.gif" width="14" height="15">
   <input type="radio" value="peace.gif" name="pic"><img src="{$this->tplPath}/images/icon/peace.gif" width="15" height="15">
</td><td>
   <input type="radio" value="pawprint.gif" name="pic"><img src="{$this->tplPath}/images/icon/pawprint.gif" width="13" height="15">
   <input type="radio" value="balloons.gif" name="pic"><img src="{$this->tplPath}/images/icon/balloons.gif" width="13" height="15">
</td><td>
   <input type="radio" value="fish.gif" name="pic"><img src="{$this->tplPath}/images/icon/fish.gif" width="15" height="15">
   <input type="radio" value="hand.gif" name="pic"><img src="{$this->tplPath}/images/icon/hand.gif" width="11" height="15">
</td><td>
   <input type="radio" value="beer.gif" name="pic"><img src="{$this->tplPath}/images/icon/beer.gif" width="12" height="15">
   <input type="radio" value="cheese.gif" name="pic"><img src="{$this->tplPath}/images/icon/cheese.gif" width="17" height="15">
</td><td>
   <input type="radio" value="pepper.gif" name="pic"><img src="{$this->tplPath}/images/icon/pepper.gif" width="16" height="15">
   <input type="radio" value="strawberry.gif" name="pic"><img src="{$this->tplPath}/images/icon/strawberry.gif" width="14" height="15">
</td><td>
   <input type="radio" value="sun.gif" name="pic"><img src="{$this->tplPath}/images/icon/sun.gif" width="15" height="15">
   <input type="radio" value="moon.gif" name="pic"><img src="{$this->tplPath}/images/icon/moon.gif" width="14" height="15">
</td><td>
   <input type="radio" value="clover.gif" name="pic"><img src="{$this->tplPath}/images/icon/clover.gif" width="15" height="15">
   <input type="radio" value="cake.gif" name="pic"><img src="{$this->tplPath}/images/icon/cake.gif" width="12" height="15">
</td><td>
   <input type="radio" value="alien.gif" name="pic"><img src="{$this->tplPath}/images/icon/alien.gif" width="15" height="15">
   <input type="radio" value="new.gif" name="pic"><img src="{$this->tplPath}/images/icon/new.gif" width="15" height="15">
</td></tr></table>
  </td>
  </tr>
<!-- 显示投票界面 -->
$showPoll 
<!-- 结束显示投票界面 -->
   <tr bgcolor="#FFFFFF"> 
      <td width="21%" valign=top><br>&nbsp;文章信息:
	  <br><br>>html 代码不可以使用；<br>>CTB 代码可以使用；<br>>点击<a href="index.php?mods=others&action=ctbhelp" target="_blnk"><b>这里</b></a>查看使用方法；
	  <br><br>
	  <INPUT name="disableCtbCode" type=checkbox  value="1" $codeChecked>禁用CTB代码;<br>
      <INPUT name="disableUrl" type=checkbox  value="1" $urlChecked>禁用url自动识别;<br>
<INPUT name="disableSymbol"  type=checkbox  value="1" $fuhaoChecked>禁用表情符号；<br>
<INPUT name="disableSig" type=checkbox  value="1" $sigChecked>禁用我的签名；	  	  
	  </td>
      <td width="79%" bgcolor="#FFFFFF">
<img  align=absBottom alt="插入粗体字" onclick=btn_b() src="{$this->tplPath}/images/post/bold.gif"  width="23" height="22">
<img  align=absBottom alt="插入斜体字" onclick=btn_i() src="{$this->tplPath}/images/post/italicize.gif"  width="23" height="22">
<img  align=absBottom alt="下划线文字" onclick=btn_u() src="{$this->tplPath}/images/post/underline.gif"  width="23" height="22">
<img  align=absBottom alt="插入超级链接" onclick=btn_url()  src="{$this->tplPath}/images/post/url.gif"  width="23" height="22">
<img  align=absBottom alt="插入图片" onclick=btn_img() src="{$this->tplPath}/images/post/img.gif"  width="23" height="22">
<img  align=absBottom alt="插入Flash动画" onclick=btn_swf() src="{$this->tplPath}/images/post/flash.gif"  width="23" height="22">
<img  align=absBottom alt=插入email onclick=btn_email() src="{$this->tplPath}/images/post/email2.gif"  width="23" height="22">
<img  align=absBottom alt=插入引用内容 onclick=btn_q() src="{$this->tplPath}/images/post/quote2.gif"  width="23" height="22">
<img  align=absBottom alt=插入代码 onclick=btn_code() src="{$this->tplPath}/images/post/code.gif"  width="23" height="22">
<SELECT  class="input5" name=color 
      onchange=showcolor(this.options[this.selectedIndex].value)> <OPTION 
        selected style="COLOR: #cc0099" value=#cc0099>◆深紫◆</OPTION> <OPTION 
        style="COLOR: #009933" value=#009933>◆深绿◆</OPTION> <OPTION 
        style="COLOR: #ff9900" value=#ff9900>◆棕色◆</OPTION> <OPTION 
        style="COLOR: #00cc99" value=#00cc99>◆叶绿◆</OPTION> <OPTION 
        style="COLOR: #ff9999" value=#ff9999>◆粉红◆</OPTION> <OPTION 
        style="COLOR: #cc0066" value=#cc0066>◆深红◆</OPTION> <OPTION 
        style="COLOR: #33ccff" value=#33aaff>◆天蓝◆</OPTION> <OPTION 
        style="COLOR: #330099" value=#330099>◆深蓝◆</OPTION> <OPTION 
        style="COLOR: #333333" value=#333333>◆深灰◆</OPTION></SELECT> 
<br>
        <textarea onkeyup=checkcomments2(this.charleft) name="topicBody" cols="98" rows="15" class="input3" wrap=physical onkeydown=ctlent()>$topicBody</textarea>
        (<font color="#FF0000">必填</font>) <br>
        <script language="JavaScript">
			//检查文章内容的长度，超过限制长度就提示
			function checkcomments2() {
				var length;
				document.ctbform.charleft.value = document.ctbform.topicBody.value.length;
				if (document.ctbform.topicBody.value.length > {$this->set[postCommonWidth]}) {
					length = document.ctbform.topicBody.value.length - {$this->set[postCommonWidth]};
					alert("您输入的文章长度超过限制了，请返回检查！限制字符长度是 " + {$this->set[postCommonWidth]} + " 个字符 ， 您的文章长度是 " + document.ctbform.topicBody.value.length + " 个字符，超过了 " + length + "个字符。");
					return false;
				}

			}
        </script>
        自动显示帖子长度：<input type="text" name="charleft" value="0" readonly class="input2" size="10">
  </tr>
    <tr align="center" bgcolor="#FFFFFF"> 
      <td colspan="2"> 
        <input type="submit" name="send" value=" 确定 " class="input1">
        <input type="reset" name="Submit2" value=" 取消 " class="input1">
        [<font color="#FF0000"><b>Ctrl+Enter</b>直接提交贴子</font>] </td>
  </tr>
    <tr>
    <td bgcolor="#dee7ef" colspan="2">&nbsp;</td>
  </tr>
      </form>
</table>
$footer

