<!--
<?php
print <<<EOT
--> 
<style>
.dragTable{
	margin-top:5px;
}
.basetr{
	display:$basetr;
}
.dragTable .tdL{
	width:120px;
	text-align:right;
	padding:5px 10px 0 0;
	vertical-align:top;
}
.dragTable .tdL span{
	color:#f00;
}
.dragTable .tdR{
	padding-top:3px;
}
.dragTable .submit{
	text-align:center;
}
</style>
<script type="text/javascript" src="$webdb[www_url]/ewebeditor/ckeditor/ckeditor.js"></script>
<!--
EOT;
if(trim(preg_replace('/<([^<]*)>|&nbsp;/is',"",$webdb[PostNotice]))){print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable" >
  <tr> 
    <td class="head">投稿注意事项!</td>
  </tr>
  <tr> 
    <td class="middle">$webdb[PostNotice]</td>
  </tr>
</table>
<!--
EOT;
}print <<<EOT
-->
<form name="FORM" id="FORM" method="post" action="?job=$job&step=post" onsubmit="return post();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable" >
  <tr> 
    <td class="head">投稿</td>
  </tr>
  <tr> 
    <td class="middle">
<SCRIPT LANGUAGE="JavaScript">
<!--
function uppic(url,name,size,b){
	get_obj('picurl').value=url;
}
function upfile(url,name,size,b){
	document.getElementById(b).value=url;
}
//-->
</SCRIPT>
              <script src="../images/default/setday.js"></script>
              <SCRIPT>
function foreColor_font()
{
  
  var arr = showModalDialog('../images/default/selcolor.htm', '', 'dialogWidth:18.5em; dialogHeight:17.5em; status:0');
  if (arr != null)  get_obj('titlecolor').value=arr;
  else  get_obj('titlecolor').focus();
  get_obj('titlecolor').style.background=arr;
}

function post(){
	if(document.getElementById("postfid")!=null&&(get_obj('postfid').value==''||parseInt(get_obj('postfid').value)<1)){
		alert("请选择一个栏目");
		choosetable('base');
		get_obj('postfid').focus();
		return false;
	}
	if(document.getElementById("title")!=null&&get_obj('title').value==''){
		alert("标题不能为空");
		choosetable('base');
		get_obj('title').focus();
		return false;
	}
	if(document.getElementById("yzimg")!=null)
	{	
		if(document.getElementById("yzimg").value==''){
			alert("请输入正确验证码");
			choosetable('base');
			get_obj('yzimg').focus();
			return false;
		}
	}
	//get_obj("FORM").submit();
	
}
  </SCRIPT>
              <script>
function javashowpic(values)
{
	if(values!= '') {	
		document.images.myface.src='../$webdb[updir]/'+values;
		document.images.myface.width=100;
	}else{
		document.images.myface.src='../images/default/pot.gif';
		document.images.myface.width=5;
	}
	get_obj('picurl').value=values;
}
function Addpicnews(strFileName){
	var arrName=strFileName.split('.');
	var FileExt=arrName[1];
	if (FileExt=='gif'||FileExt=='GIF'||FileExt=='JPG'||FileExt=='jpg'||FileExt=='bmp'){
		get_obj('DefaultPicList').options[get_obj('DefaultPicList').length]=new Option(strFileName,strFileName);
		get_obj('DefaultPicList').selectedIndex+=1;
		javashowpic(strFileName);
	}
}
function heightdisplay(){
	if(parent.document.getElementById('member_mainiframe')!=null){
		parent.document.getElementById('member_mainiframe').height=parseInt(parent.document.getElementById('member_mainiframe').height)+300;
	}
}
</script>
    	<div id="post_top">
        	<span id="button_base" onclick="choosetable('base')">基本信息</span>
            <span id="button_other" onclick="choosetable('other');heightdisplay()" >其它设置</span> 
<!--
EOT;
if(($groupdb[SetVote]||$web_admin)&&($job=="postnew"||($job=="edit"&&$rsdb[ifvote]))){print <<<EOT
-->
            <span id="button_vote" onclick="choosetable('vote')">投票设置</span> 
<!--
EOT;
}print <<<EOT
-->
       </div>
       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="borderTable" id="basetable">
<!--
EOT;
if($job=="postnew"||$job=="edit"){
$titlename = $m_config[moduleSet][title_name] ? "{$m_config[moduleSet][title_name]}" : "标题";
print <<<EOT
-->
       	 <tr class="basetr">
         	<td class="tdL">所属栏目：(<span>*</span>)</td>
            <td class="tdR">
<!--
EOT;
if($webdb[sortNUM]>500){
print <<<EOT
-->
				$select_fid				
<!--
EOT;
}else{print <<<EOT
-->
				<select name="fid" onChange="choosefid(this,'$rsdb[aid]','$only')" id="postfid">
                  <option value=''>请选择一个栏目</option>$select_fid
                </select>

<!--
EOT;
}
print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function choosefid(selObj,aid,only){
	//如果指定模型发表时,就没必要跳转了
	if(only=='1'){
		return ;
	}
	fid=selObj.options[selObj.selectedIndex].value;
	if(fid==='0'){
		alert('你不能选择大分类,请选择一个黑色字体的子栏目');
		return false;
	}else if(fid===''){
		alert('请选择一个子栏目');
		return false;
	}
	//新发表的时候
	if(aid==''){
		window.location.href="post.php?job=postnew&fid="+fid;
	}
}
//-->
</SCRIPT>            
            </td>
         </tr>
         <tr class="basetr">
         	<td class="tdL">{$titlename}：(<span>*</span>)</td>
            <td class="tdR">
				<input type="text" name="postdb[title]" size="50" value="$rsdb[title]" id="title">
                 <span close="0$web_admin$groupdb[SetTileColor]"> 
                    颜色: <input type="text" name="postdb[titlecolor]" style="background:$rsdb[titlecolor];" size="7" value="$rsdb[titlecolor]" id="titlecolor" onClick="foreColor_font();">
                    加粗: <input type="checkbox" name="postdb[fonttype]" value="1" $fonttype>
                 </span>
                 禁用评论:<input type="checkbox" name="postdb[forbidcomment]" value="1" $forbidcomment>
            </td>
         </tr>
         <tr class="basetr">
         	<td class="tdL">关键字(标签)：(<span>*</span>)</td>
            <td class="tdR">
				<input type="text" name="postdb[keywords]" size="35" value="$rsdb[keywords]" id="keyword_s">
                 <select name="select2" onChange="MM_keyword(this)">
                    <option value='' selected>常用关键字</option>
		  $keywords
                  </select>
<script language="JavaScript">
<!--
function MM_keyword(selObj){ //v3.0
  va=selObj.options[selObj.selectedIndex].value
  if (va!=''){
  	if(get_obj('keyword_s').value==''){
		get_obj('keyword_s').value=va;
	}else{
		vb=get_obj('keyword_s').value;
		arr = vb.split(' ');
		for(var i=0;i<arr.length;i++){
			if(arr[i]==va){
				alert(va+",已经存在了,不能雷同");
				return ;
			}
		}
		get_obj('keyword_s').value+=" "+va;
	}
  } 
}
//-->
</script>
               作为相关文章的索引,如多个用空格隔开
            </td>
         </tr>
<!--
EOT;
if(!$m_config[moduleSet][no_author]){
print <<<EOT
-->
         <tr class="basetr">
         	<td class="tdL">作者：</td>
            <td class="tdR"><input type="text" name="postdb[author]" size="15" value="$rsdb[author]"></td>
         </tr>
<!--
EOT;
}if(!$m_config[moduleSet][no_from]){
print <<<EOT
-->
         <tr class="basetr">
         	<td class="tdL">来源：</td>
            <td class="tdR">
				<input type="text" name="postdb[copyfrom]" size="15" value="$rsdb[copyfrom]" id="copyfrom">
                    <select name="select" onChange="MM_copyfrom(this)">
                      <option value='' selected>常用来源站点</option>
		  $copyfroms
                    </select>
                    <span close="0$web_admin"> 
                    <input type="checkbox" name="postdb[addcopyfrom]" value="1">
                    入库 [<a href="$webdb[admin_url]/index.php?lfj=copyfrom&job=list" target="_blank">来源管理</a>] 
                    </span> 
<script language="JavaScript">
<!--
function MM_copyfrom(selObj){ //v3.0
  va=selObj.options[selObj.selectedIndex].value
  if (va!=''){
  	get_obj('copyfrom').value=va;
  } 
}
//-->
</script>
                    &nbsp;&nbsp;来源网址: 
                    <input type="text" name="postdb[copyfromurl]" size="25" value="$rsdb[copyfromurl]">
            </td>
         </tr>
<!--
EOT;
}
print <<<EOT
-->
         <tr class="basetr">
         	<td class="tdL">缩略图：</td>
            <td class="tdR">
                    <input type="text" name="postdb[picurl]" size="40" value="$rsdb[picurl]" id="picurl">
                    <!--
EOT;
if($lfjdb){
print <<<EOT
-->
                    <input type="radio" name="postdb[automakesmall]" value="1" onclick="get_obj('cutimg_title').style.display='none';" checked>
                    系统自动截图 
                    <input type="radio" name="postdb[automakesmall]" value="0" onclick="get_obj('cutimg_title').style.display='';">
                    手工截图 宽: 
                    <input type="text" name="picWidth" id="picWidth" size="3" value="300">
                    高: 
                    <input type="text" name="picHeight" id="picHeight" size="3" value="225">
                    <a href="javascript:" style="display:none;color:red;" id="cutimg_title" onClick="javascript:cutimg();">[手工剪裁图片]</a> 
                    <br>
                    <iframe name='mainFrame2' frameborder=0 height=23 scrolling=no src='../do/upfile.php?fn=uppic&dir=article/$fid&ISone=1' width=370></iframe> 
                    <!--
EOT;
}
print <<<EOT
-->
<script language="javascript">
function cutimg() 
{
	var img=get_obj("picurl").value;
	var cw=get_obj("picWidth").value;
	var ch=get_obj("picHeight").value;
	if(cw==''){
		get_obj("picWidth").focus();
		alert("请设置好图片宽度");return false;
	}
	if(ch==''){
		get_obj("picHeight").focus();
		alert("请设置好图片高度");return false;
	}
if(img!=''){
	if(img.indexOf("http://")==-1){
		img="$webdb[www_url]/$webdb[updir]/"+img;
	}
	//get_obj("automakesmall").checked=false;
	window.open("../do/cutimg.php?nextpic=1&job=cutimg&width="+cw+"&height="+ch+"&srcimg="+img,'',"width=480,height=430")
}else{
	get_obj("picurl").focus();
	alert('图片地址不存在');
}
}
</script>
            </td>
         </tr>
<!--
EOT;
if(!$m_config[moduleSet][description]){
print <<<EOT
-->
         <tr class="basetr">
         	<td class="tdL">内容简介：</td>
            <td class="tdR"><textarea name="postdb[description]" cols="80" rows="5">$rsdb[description]</textarea></td>
         </tr>
<!--
EOT;
}print <<<EOT
-->
         <tr class="basetr">
         	<td class="tdL">相关设置：</td>
            <td class="tdR">
            	<span close="0$web_admin$groupdb[PassContribute]"> 
                    <input type="checkbox" name="postdb[yz]" value="1" $yz>
                    审核 </span> <span close="0$web_admin$groupdb[SetArticleTopCom]"> 
                    <input type="checkbox" name="postdb[top]" value="1" $top>
                    置顶 
                    <input type="checkbox" name="postdb[levels]" value="1" $levels>
                    推荐 </span> 
                    <input type="checkbox" name="postdb[target]" value="1" $target>
                    新窗口打开 $baseSpecial
            </td>
         </tr>         
<!--
EOT;
}print <<<EOT
-->
		 <tr> <td  class='tdL'>软件作者:</td> <td > <input type='text' name='post_db[my_author]' id='atc_my_author' size='10' value='$rsdb[my_author]'>  </td></tr><tr> <td  class='tdL'>厂商主页:</td> <td > <input type='text' name='post_db[my_copyfromurl]' id='atc_my_copyfromurl' size='50' value='$rsdb[my_copyfromurl]'>  </td></tr><tr> <td  class='tdL'>演示网址:</td> <td > <input type='text' name='post_db[my_demo]' id='atc_my_demo' size='50' value='$rsdb[my_demo]'>  </td></tr><tr> <td  class='tdL'>运行环境:</td> <td > <input type='text' name='post_db[operatingsystem]' id='atc_operatingsystem' size='60' value='$rsdb[operatingsystem]'>  <br>平台选择：<a href="javascript:ToSystem('Linux')">Linux</a>/<a href="javascript:ToSystem('DOS')">DOS</a>/<a href="javascript:ToSystem('9x')">9x</a>/<a href="javascript:ToSystem('NT')">NT</a>/<a href="javascript:ToSystem('2000')">2000</a>/<a href="javascript:ToSystem('2003')">2003</a>/<a href="javascript:ToSystem('XP')">XP</a>/<a href="javascript:ToSystem('.NET')">.NET</a>/<a href="javascript:ToSystem('ASP')">ASP</a>/<a href="javascript:ToSystem('PHP')">PHP</a>/<a href="javascript:ToSystem('JSP')">JSP</a>/<a href="javascript:ToSystem('CGI')">CGI</a>

<SCRIPT LANGUAGE="JavaScript">
function ToSystem(va){
	cc=document.getElementById("atc_operatingsystem").value
	if(cc==''){
		document.getElementById("atc_operatingsystem").value=va;
	}else{
		document.getElementById("atc_operatingsystem").value+="/"+va;
	}
	
}
</SCRIPT></td></tr><tr> <td  class='tdL'>软件语言: </td><td > <select name='post_db[softlanguage]' id='atc_softlanguage'><option value='简体中文' {$rsdb[softlanguage]['简体中文']}>简体中文</option><option value='繁体中文' {$rsdb[softlanguage]['繁体中文']}>繁体中文</option><option value='英文' {$rsdb[softlanguage]['英文']}>英文</option><option value='其他语言' {$rsdb[softlanguage]['其他语言']}>其他语言</option></select> </td> </tr><tr> <td  class='tdL'>授权形式: </td><td > <select name='post_db[copyright]' id='atc_copyright'><option value='免费版' {$rsdb[copyright]['免费版']}>免费版</option><option value='试用版' {$rsdb[copyright]['试用版']}>试用版</option><option value='破解版' {$rsdb[copyright]['破解版']}>破解版</option><option value='商业版' {$rsdb[copyright]['商业版']}>商业版</option></select> </td> </tr><tr> <td  class='tdL'>文件大小:</td> <td > <input type='text' name='post_db[softsize]' id='atc_softsize' size='10' value='$rsdb[softsize]'> M </td></tr><tr> <td  class='tdL'>软件地址:<font color=red>(必填)</font><br> <a href='javascript:showinput_softurl()'>添加远程文件</a></td> <td>
<!--
EOT;

$upfiletype=str_replace(' ',',',trim($groupdb[upfileType]?$groupdb[upfileType]:$webdb[upfileType]));
$upfiletype=str_replace('.','',$upfiletype);
$max_upload=ini_get('upload_max_filesize')?ini_get('upload_max_filesize'):'0';
print <<<EOT
-->注意:服务器限制单个文件大小不能超过 <font color=red>{$max_upload}</font>
		<script type="text/javascript" src="$webdb[www_url]/images/default/jquery-1.2.6.min.js"></script>
        <script type="text/javascript" src="$webdb[www_url]/images/default/swfobject.js"></script>
        <div id="sapload"></div>
        <script type="text/javascript">
	var so = new SWFObject("$webdb[www_url]/images/default/uploadmore.swf", "sapload", "450", "30", "9", "#ffffff");
	so.addParam('wmode','transparent');
	so.addVariable('config','$webdb[www_url]/do/swfuploadxml.php?filetype=$upfiletype');
	so.write("sapload");
	var titledb = new Array();
	var urldb = new Array();
	
	function showFiles(t){
		totalnum=totalnum_softurl;
		showinput_softurl();
		arr=t.split('|');
		urldb[totalnum]=arr[0];
		arr2=arr[1].split('.');
		titledb[totalnum]=arr2[0];
		for(var i=0;i<=totalnum;i++){
			if(document.getElementById("atc_softurl_url"+i)!=null){
				if(urldb[i]!=undefined){
					document.getElementById("atc_softurl_url"+i).value=urldb[i];
					document.getElementById("atc_softurl_name"+i).value=titledb[i];
				}
			}
		}
	}
	</script>
<!--
EOT;
$num=count($rsdb[softurl][url]);
$job=='postnew' && $num=0;
for( $i=0; $i<$num ;$i++ ){print <<<EOT
-->
 <span id=span$i>名称: <input type="text" name="post_db[softurl][name][]" id="atc_softurl_name$i" size="15" value="{$rsdb[softurl][name][$i]}">	
 消耗{$webdb[MoneyName]}: <input type="text" name="post_db[softurl][fen][]" id="atc_softurl_fen$i" size="3" value="{$rsdb[softurl][fen][$i]}">	
 地址: 	
                    <input type="text" name="post_db[softurl][url][]" id="atc_softurl_url$i" size="30" value="{$rsdb[softurl][url][$i]}">	
                    [<a href='javascript:' onClick='window.open("../do/upfile.php?fn=upfile_softurl&dir=$_pre$fid&label=$i","","width=350,height=50,top=200,left=400")'><font color="#FF0000">点击更换文件</font></a>] 	[<A HREF="javascript:delpic('$i')">移除</A>]
                    <br></span><!--
EOT;
}print <<<EOT
-->
						<div id="input_softurl"></div>	
<script LANGUAGE="JavaScript">
function kill_Err(){
	return true;
}
window.onerror=kill_Err;
function delpic(t){
	document.getElementById('atc_softurl_url'+t).value='';
	document.getElementById('span'+t).style.display='none';
}
totalnum_softurl=$num;	
function showinput_softurl(){	
	var str=document.getElementById("input_softurl").innerHTML;	

	if(parent.document.getElementById('member_mainiframe')!=null){
	parent.document.getElementById('member_mainiframe').height=parseInt(parent.document.getElementById('member_mainiframe').height)+18;
	}	
	    str+='<span id=span'+totalnum_softurl+'>名称: &nbsp;<input type="text" name="post_db[softurl][name][]" id="atc_softurl_name'+totalnum_softurl+'" size="15"> 消耗{$webdb[MoneyName]}: &nbsp;<input type="text" name="post_db[softurl][fen][]" id="atc_softurl_fen'+totalnum_softurl+'" size="3"> 地址: &nbsp;<input type="text" name="post_db[softurl][url][]" id="atc_softurl_url'+totalnum_softurl+'" size="30" > [<a href=\'javascript:\' onClick=\'window.open("../do/upfile.php?fn=upfile_softurl&dir=$_pre$fid&label='+totalnum_softurl+'","","width=350,height=50,top=200,left=400")\'><font color="#FF0000">上传更换文件</font></a>] [<a href="javascript:delpic(\''+totalnum_softurl+'\')">移除</a>]<br></span>';	
	totalnum_softurl++;
	document.getElementById("input_softurl").innerHTML=str;	
}	
	
function upfile_softurl(url,name,size,label){	
	document.getElementById("atc_softurl_url"+label).value=url;	
	arr=name.split('.');	
	document.getElementById("atc_softurl_name"+label).value=arr[0];	
}	
</SCRIPT></td></tr> 
         <tr class="basetr">
         	<td class="tdL">工具箱：</td>
            <td class="tdR">
<SCRIPT LANGUAGE="JavaScript">
<!--
function ExplodePage_type(t){
	get_obj('ExplodePage_auto').style.display='none';
	get_obj('ExplodePage_hand').style.display='none';
	if(t=='1'){
		get_obj('ExplodePage_auto').style.display='';
	}else if(t=='-1'){
		get_obj('ExplodePage_hand').style.display='';
	}
}
function CopyText(obj) {
	ie = (document.all)? true:false
	if (ie){
		var rng = document.body.createTextRange();
		rng.moveToElementText(obj);
		rng.scrollIntoView();
		rng.select();
		rng.execCommand("Copy");
		rng.collapse(false);
		alert(obj.innerText+'被复制成功');
	}
}
//-->
</SCRIPT>
                    <!--
EOT;
if(!$m_config[moduleSet][morepage]){
print <<<EOT
-->
                    <input type="radio" name="ExplodePage" value="1" onclick="ExplodePage_type('1')">
                    自动分页 
                    <input type="radio" name="ExplodePage" value="-1"  onclick="ExplodePage_type('-1')">
                    手工分页 <span id="ExplodePage_auto" style="display:none;">自动分页时,每页不超过 
                    <input type="text" name="PageNum" size="5" value="3000">
                    个字数</span> <span id="ExplodePage_hand"  style="display:none;">请在需要分隔的地方插入 
                    [-page-] 这个分页符即可</span><br>
<!--
EOT;
}
print <<<EOT
-->
                    <input type="checkbox" name="GetOutPic" value="1">
                    是否将内容中的外部图片采集回来（网速慢时，很影响速度）<br>
                    <input type="checkbox" name="DelLink" value="1">
                    是否将内容中的超级链接去除
            </td>
         </tr>
<!--
EOT;
if($groupdb[PostArticleYzImg]&&!$web_admin){
print <<<EOT
-->
		 <tr class="basetr">
         	<td class="tdL">请输入验证码：(<span>*</span>)</td>
            <td class="tdR">
            	<input type="text" name="yzimg" size="8" id="yzimg">
                    <img border="0" name="imageField" src="$webdb[www_url]/do/yzimg.php">
            </td>
         </tr>
<!--
EOT;
}
$contentword = $m_config[moduleSet][content_name] ? "{$m_config[moduleSet][content_name]}" : "内容";
print <<<EOT
-->
         <tr class="basetr" id="contenttr">
         	<td class="tdL">{$contentword}：(<span>*</span>)</td>
            <td class="tdR">
            <!--<iframe id="eWebEditor1" name="eWebEditor1"  src="../ewebeditor/ewebeditor.php?id=content&style=standard&etype={$m_config[moduleSet][etype]}" frameborder="0" scrolling="no" width="{$m_config[moduleSet][edit_w]}" height="{$m_config[moduleSet][edit_h]}"></iframe> 
              <input name="postdb[content]" type="hidden" id="content" value='$rsdb[content]'>-->

<!--
EOT;
if($webdb[EditSystem]=='2'){print <<<EOT
-->
<textarea id="content1" name="postdb[content]" style="display:none;">$rsdb[content]</textarea>
<script type="text/javascript">
CKEDITOR.replace( 'content1',
{
width:'100%',
height:'300px',
filebrowserBrowseUrl : '$webdb[www_url]/ewebeditor/ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : '$webdb[www_url]/ewebeditor/ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl : '$webdb[www_url]/ewebeditor/ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl : '$webdb[www_url]/ewebeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl : '$webdb[www_url]/ewebeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl : '$webdb[www_url]/ewebeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
});
</script>
<!--
EOT;
}else{print <<<EOT
-->
<script type="text/javascript" charset="utf-8" src="../ewebeditor/3.1.1/kindeditor.js"></script>
<script type="text/javascript">
KE.handpage=true;
KE.systype='article';
    KE.show({
        id : 'content1',
        cssPath : '../ewebeditor/common.css'{$simpleEdit}
    });
</script>
<textarea id="content1" name="postdb[content]" style="width:99%;height:{$m_config[moduleSet][edit_h]}px;visibility:hidden;">$rsdb[content]</textarea>

<!--
EOT;
}print <<<EOT
-->
            </td>
         </tr>
         <tr>
         	<td class="submit" colspan="2">
            <br/><br/>
               <input type="submit" name="Submit" value=" 提 交 ">
              <input type="hidden" name="postdb[bak_id]" value="$bak_id">
              <input type="hidden" name="mid" value="$mid">
              <input type="hidden" name="i_id" value="$i_id">
              <input type="hidden" name="aid" value="$aid">
              <input type="hidden" name="rid" value="$rid">
              <input type="hidden" name="only" value="$only">
              <br/><br/>
            </td>
         </tr>
       </table>
       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="borderTable" id="othertable">
<!--
EOT;
if($job=="postnew"||$job=="edit"){
if($job=="postnew"&&!$only){
print <<<EOT
-->
         <tr class="othertr">
         	<td class="modles" colspan="2">
            	你可以选择本文属于哪个模型： [<a href="?job=postnew&fid=$fid&mid=0&only=$only" style="color:$moduledb_color[0];">文章模型</a>] 
<!--
EOT;
foreach($moduledb AS $key=>$rs){
print <<<EOT
-->
                    [<a href="?job=postnew&fid=$fid&mid=$rs[id]&only=$only" style="color:{$moduledb_color[$rs[id]]};">$rs[name]</a>] 
<!--
EOT;
}
print <<<EOT
-->
            </td>
         </tr>
<!--
EOT;
}
print <<<EOT
-->

<!--
EOT;
}
print <<<EOT
-->
         <tr class="basetr">
         	<td class="tdL">简短标题：</td>
            <td class="tdR"><input type="text" name="postdb[smalltitle]" size="30" value="$rsdb[smalltitle]">  (填写后,只是列表页显示.而内容页不显示.当主题太长时,有需要)</td>
         </tr>
         <tr class="othertr">
         	<td class="tdL">所属专题：</td>
            <td class="tdR"><div style="width:100%;height:100px;overflow-y:scroll;">$specials</div></td>
         </tr>
         <tr class="othertr">
         	<td class="tdL">所属辅栏目:</td>
            <td class="tdR">$fu_sort</td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetHtmlName]">
         	<td class="tdL">自定义文件名：</td>
            <td class="tdR"><input type="text" name="postdb[htmlname]" size="30" value="$rsdb[htmlname]"> (只有把文章生成静态后,才能生效) </td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SelectArticleTpl]$groupdb[SetArticleTpl]">
         	<td class="tdL">模板选择：</td>
            <td class="tdR">
            	网页头部： 
                    <input type="text" {$readonly} name="postdb[tpl][head]" size="50" id="head_tpl" value="$value_tpl_head">
                    {$tpl_head}<br>
                    网页尾部： 
                    <input type="text" {$readonly} name="postdb[tpl][foot]" size="50" id="foot_tpl" value="$value_tpl_foot">
                    {$tpl_foot} <br>
                    网页中间： 
                    <input type="text" {$readonly} name="postdb[tpl][bencandy]" size="50" id="main_tpl" value="$value_tpl_show">
                    {$tpl_show}
            </td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SelectArticleStyle]">
         	<td class="tdL">风　格：</td>
            <td class="tdR">$style_select</td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticlePosttime]">
         	<td class="tdL">日　期：</td>
            <td class="tdR"><input type="text" name="postdb[posttime]" size="20" value="$rsdb[posttime]"  onClick="setday(this)" ></td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticleViewtime]">
         	<td class="tdL">浏览日期：</td>
            <td class="tdR">
            	开始浏览日期： 
                    <input type="text" name="postdb[begintime]" size="20" value="$rsdb[begintime]"  onClick="setday(this)" >
                    (0或留空,则不做限制.否则日期未到或超过了就不能看)<br>
                    结束浏览日期： 
                    <input type="text" name="postdb[endtime]" size="20" value="$rsdb[endtime]"  onClick="setday(this)" >
            </td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticleHitNum]">
         	<td class="tdL">点　击：</td>
            <td class="tdR"><input type="text" name="postdb[hits]" size="10" value="$rsdb[hits]"></td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticlePassword]">
         	<td class="tdL">密 码：</td>
            <td class="tdR"><input type="text" name="postdb[passwd]" size="20" value="$rsdb[passwd]"></td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetSellArticle]">
         	<td class="tdL">收费({$webdb[MoneyName]})：</td>
            <td class="tdR"><input type="text" name="postdb[money]" size="8" value="$rsdb[money]"> {$webdb[MoneyDW]}</td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticleDownGroup]">
         	<td class="tdL">下载附件的用户组：</td>
            <td class="tdR">$group_allowdown</td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticleViewGroup]">
         	<td class="tdL">浏览内容的用户组：</td>
            <td class="tdR">$group_allowview</td>
         </tr>
         <tr class="othertr" close="0$web_admin$groupdb[SetArticleJumpurl]">
         	<td class="tdL">跳转地址：</td>
            <td class="tdR">
            	<input type="text" name="postdb[jumpurl]" size="40" value="$rsdb[jumpurl]" id="jumpurl"  disabled>
                <input type="checkbox" name="ckjump" id="ckjump" value="checkbox" onClick="changpost('jump',0);">
                (选中后,将不显示内容而跳转到此网址)
            </td>
         </tr>
         <tr class="othertr" id="iframetr" close="0$web_admin$groupdb[SetArticleIframeurl]">
         	<td class="tdL">框架地址：</td>
            <td class="tdR">
            	<input type="text" name="postdb[iframeurl]" size="40" value="$rsdb[iframeurl]" id="iframeurl" disabled>
                <input type="checkbox" name="ckiframe" id="ckiframe" value="checkbox" onClick="changpost('iframe',0);">
                (选中后,将不显示内容而套用框架此网址) 
            </td>
         </tr>
         <tr class="othertr">
         	<td class="tdL">副标题：</td>
            <td class="tdR"><input type="text" name="postdb[subhead]" size="60" value="$rsdb[subhead]"></td>
         </tr>
       </table>
       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="borderTable" id="votetable">
<!--
EOT;
if($job=="postnew"||$job=="edit"){
print <<<EOT
-->
         <tr class="votetr">
         	<td class="tdL">投票项目名称：</td>
            <td class="tdR"><input type="text" name="vote_db[name]" value="$votedb[name]" size="40"></td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">投票选项：</td>
            <td class="tdR"><input type="radio" name="vote_db[type]" value="1" {$votedb[_type][1]}>
                    单选 
                    <input type="radio" name="vote_db[type]" value="2" {$votedb[_type][2]}>
                    多选</td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">是否做时间限制：</td>
            <td class="tdR">
            	<input type="text" name="vote_db[limittime]" value="$votedb[limittime]" size="4"> 分钟<br/>不做限制请输入0,否则请输入限制每次投票的时间间隔
            </td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">是否限制IP重复投票：</td>
            <td class="tdR"><input type="radio" name="vote_db[limitip]" value="1" {$votedb[_limitip][1]}>
                    限制 
                    <input type="radio" name="vote_db[limitip]" value="0" {$votedb[_limitip][0]}>
                    不限制</td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">是否禁止游客投票：</td>
            <td class="tdR"><input type="radio" name="vote_db[forbidguestvote]" value="1" {$votedb[_forbidguestvote][1]}>
                    限制 
                    <input type="radio" name="vote_db[forbidguestvote]" value="0" {$votedb[_forbidguestvote][0]}>
                    不限制</td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">投票时间的期限：</td>
            <td class="tdR">开始日期: 
                    <input type="text"  onclick="setday(this,0)" name="vote_db[begintime]" value="$votedb[begintime]" size="20">
                    格式:2007-02-02 12:12:23<br>
                    结束日期: 
                    <input type="text" onclick="setday(this,0)" name="vote_db[endtime]" value="$votedb[endtime]" size="20">
                    格式:2007-02-02 12:12:23 </td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">投票描述及详细介绍：</td>
            <td class="tdR"><textarea name="vote_db[about]" cols="60" rows="5">$votedb[about]</textarea></td>
         </tr>
         <tr class="votetr">
         	<td class="tdL">投票类型：</td>
            <td class="tdR"><input type="radio" name="vote_db[votetype]" value="0" {$votedb[_votetype][0]}>
                    普通投票 
                    <input type="radio" name="vote_db[votetype]" value="1" {$votedb[_votetype][1]}>
                    人物/图片展示投票 
                    <input type="radio" name="vote_db[votetype]" value="2" {$votedb[_votetype][2]}>
                    PK投票</td>
         </tr>
         <tr class="votetr">
         	<td class="votecont" colspan="2">投票选项 
                    <input type="text" name="textfield" value="1" size="5" id="addnum">
                    <input type="button" name="Submit3" value="增加几项" onclick="addvote();">
            </td>
         </tr>
         <tr class="votetr">
         	<td class="votecont" colspan="2">
            	<!--
EOT;
$nums=count($votelistdb);
foreach($votelistdb AS $key=>$rs){
print <<<EOT
-->
                    第{$key}个 选项名称: 
                    <input type="text" name="votesdb[{$key}][title]" value="$rs[title]" size="20">
                    图片: 
                    <input type="text" name="votesdb[{$key}][img]" value="$rs[img]" size="15" id="img$key">
                    <a href='javascript:' onClick='window.open("../do/upfile.php?fn=upfile&dir=vote&label=img$key","","width=350,height=50,top=200,left=400")'>上传</a>, 
                    描述: 
                    <input type="text" name="votesdb[{$key}][describes]" size="5" value="$rs[describes]">
                    链接: 
                    <input type="text" name="votesdb[{$key}][url]" size="5" value="$rs[url]">
                    排序: 
                    <input type="text" name="votesdb[{$key}][list]" size="2" value="$rs[list]">
                    <input type="hidden" name="votesdb[{$key}][id]" value="$rs[id]">
                    <!--
EOT;
if($job!='postnew'){
print <<<EOT
-->
                    <a href="../do/job.php?job=delete_vote&id=$rs[id]">删除</a>&nbsp;&nbsp; 
                    <!--
EOT;
}
print <<<EOT
-->
                    <br>
                    <!--
EOT;
}
print <<<EOT
-->
                    <input type="hidden" name="hiddenField" value="$nums" id="num_s">
                    <div id="morevote"></div>
            </td>
         </tr>
         <tr class="votetr"> 
          <td colspan="2" class="voteconta"><b><font color="#0000FF">注意:</font></b><font color="#0000FF"> 
            如选择普通投票的话,图片、描述、链接这三项可留空。</font></td>
        </tr>
<SCRIPT LANGUAGE="JavaScript">
<!--
function addvote(){
	var str='';
	num=document.getElementById('addnum').value;
	num=parseInt(num);
	n=document.getElementById('num_s').value;
	document.getElementById('num_s').value=num+parseInt(n);
	min=parseInt(n)+1;
	max=parseInt(n)+num+1;
	for(var i=min;i<max;i++){
		if(parent.document.getElementById('member_mainiframe')!=null){
		parent.document.getElementById('member_mainiframe').height=parseInt(parent.document.getElementById('member_mainiframe').height)+18;
		}
		str+='<br>第'+i+'个 选项名称:<input type="text" size="20" name="votesdb['+i+'][title]"> 图片:<input type="text" size="15" name="votesdb['+i+'][img]" id="img'+i+'"><a href=\'javascript:\' onClick=\'window.open("../do/upfile.php?fn=upfile&dir=vote&label=img'+i+'","","width=350,height=50,top=200,left=400")\'>上传</a>,描述:<input type="text" name="votesdb['+i+'][describes]" size="5"> 链接:<input type="text" name="votesdb['+i+'][url]" size="5">';
	}
	document.getElementById('morevote').innerHTML+=str;
}
//-->
</SCRIPT>
<!--
EOT;
}
print <<<EOT
-->

       </table>
    </td>
  </tr>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--
function changpost(va,num){
	if(va=="jump"){
		if(get_obj("ckjump").checked==true||num==1){
			if(num==1){get_obj("ckjump").checked=true}
			get_obj("jumpurl").disabled=false;
			get_obj("iframeurl").disabled=true;
			get_obj("ckiframe").checked=false;
			get_obj("contenttr").style.display="none";
		}else{
			get_obj("jumpurl").disabled=true;
			get_obj("ckiframe").checked=false;
			get_obj("contenttr").style.display="";
		}
	}else{
		if(get_obj("ckiframe").checked==true||num==1){
			if(num==1){get_obj("ckiframe").checked=true}
			get_obj("iframeurl").disabled=false;
			get_obj("jumpurl").disabled=true;
			get_obj("ckjump").checked=false;
			get_obj("contenttr").style.display="none";
		}else{
			get_obj("iframeurl").disabled=true;
			get_obj("ckjump").checked=false;
			get_obj("contenttr").style.display="";
		}
	}
}

//判断用户组是否有权限使用此表单元素
function set_close(){
	var obj=document.body.getElementsByTagName("tr");
	for(var i=0;i<obj.length;i++){
		va=obj[i].getAttribute("close");
		va=parseInt(va);
		if(va==0){
			obj[i].style.display='none';	
		}
	}
	var obj=document.body.getElementsByTagName("span");
	for(var i=0;i<obj.length;i++){
		va=obj[i].getAttribute("close");
		va=parseInt(va);
		if(va==0){
			obj[i].style.display='none';	
		}
	}
}


function choosetable(t){
	get_obj("button_base").className="";
	get_obj("button_other").className="";
	if(document.getElementById("button_vote")!=null)get_obj("button_vote").className="";
	get_obj("basetable").style.display="none";
	get_obj("othertable").style.display="none";
	get_obj("votetable").style.display="none";
	
	get_obj("button_"+t).className="choosebutton";
	get_obj(t+"table").style.display="";
	set_close();
}
choosetable('base');
//-->
</SCRIPT>
              <!--
EOT;
if($rsdb[jumpurl]){print <<<EOT
-->
              <SCRIPT LANGUAGE="JavaScript">
<!--
changpost('jump',1);
//-->
</SCRIPT>
              <!--
EOT;
}elseif($rsdb[iframeurl]){print <<<EOT
-->
              <SCRIPT LANGUAGE="JavaScript">
<!--
//show_more(1);
changpost('iframe',1);
//-->
</SCRIPT>
              <!--
EOT;
}print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function ck_iframe(user){
	var jobs='$job';
	if(user!=''&&window.self==window.top&&jobs=='postnew'){
		window.location.href='index.php?main=post.php?job=postnew&fid=$fid';
	}
}
ck_iframe('$lfjid');
//-->
</SCRIPT>
</form>
<!--
EOT;
?>
-->
