<!--
<?php
$fid||$fid=0;
print <<<EOT
--> 
<style type="text/css">
.MainCont .FormTable .tdL{
	width:150px;
}
.FormTable .tdL span{
	color:red;
}
#post_top{margin:10px;border-bottom:#DDD solid 1px;}
#post_top:after{content:'';display:block;clear:both;}
#post_top span{display:block;float:left;border:#DDD solid 1px;border-bottom:0; position:relative;padding:5px 10px;font-size:14px; cursor:pointer; margin-left:10px;color:#999;}
#post_top span.ck{color:#F60;}
#post_top span.ck:after{content:'';display:block;width:100%;height:2px;background:#FFF; position:absolute; left:0; bottom:-1px;}
</style>
<script type="text/javascript" src="$webdb[www_url]/ewebeditor/ckeditor/ckeditor.js"></script>
<!--
EOT;
if(trim(preg_replace('/<([^<]*)>|&#160;/is',"",$webdb[PostNotice]))){print <<<EOT
-->
<div class="MainCont">
	<div class="head"><div class="tag">投稿注意事项!</div></div>
    <div class="cont" style="padding:10px; line-height:25px;font-size:14px;">
    	$webdb[PostNotice]
    </div>
</div>
<!--
EOT;
}print <<<EOT
-->
<form name="FORM" id="FORM" method="post" action="?job=$job&step=post" onsubmit="return post();">
<div class="MainCont mtop10">
	<div class="head"><div class="tag">投稿</div></div>
    <div class="cont">
<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 LANGUAGE="JavaScript">
<!--
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 LANGUAGE="JavaScript">
<!--
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="FormTable" 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>
                    &#160;&#160;来源网址: 
                    <input type="text" name="postdb[copyfromurl]" size="25" value="$rsdb[copyfromurl]">
            </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="70" 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'>图片地址:<font color=red>(必填)</font><br><a href='javascript:showinput_photourl()'>添加远程图片</a></td> <td >

	<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", "sap_load", "450", "30", "9", "#ffffff");
	so.addParam('wmode','transparent');
	so.addVariable('config','$webdb[www_url]/do/swfuploadxml.php?filetype=jpg,png,gif');
	so.write("sapload");
	var titledb = new Array();
	var urldb = new Array();
	
	function showFiles(t){
		totalnum=totalnum_photourl;
		showinput_photourl();
		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_photourl_url"+i)!=null){
				if(urldb[i]!=undefined){
					document.getElementById("atc_photourl_url"+i).value=urldb[i];
					document.getElementById("atc_photourl_name"+i).value=titledb[i];
				}
			}
		}
	}
	</script>
	<div id="ListPics">
<!--
EOT;
$num=count($rsdb[photourl][url]);
$job=='postnew' && $num=0;
for( $i=0; $i<$num ;$i++ ){print <<<EOT
-->
 <div id=span$i>名称: <input type="text" name="post_db[photourl][name][]" id="atc_photourl_name$i" size="15" value="{$rsdb[photourl][name][$i]}"> 	
 地址: 	
                    <input type="text" name="post_db[photourl][url][]" id="atc_photourl_url$i" size="30" value="{$rsdb[photourl][url][$i]}">	
                    [<a href='javascript:' onClick='window.open("../do/upfile.php?fn=upfile_photourl&dir=$_pre$fid&label=$i","","width=350,height=50,top=200,left=400")'><font color="#FF0000">点击更换图片</font></a>] 	[<A HREF="javascript:delpic('$i')">移除</A>]
                    </div><!--
EOT;
}print <<<EOT
-->
	</div>
<div id="input_photourl$num"></div>	
<script LANGUAGE="JavaScript">
function kill_Err(){
	return true;
}
window.onerror=kill_Err;
totalnum_photourl=$num;
function delpic(t){
	document.getElementById('atc_photourl_url'+t).value='';
	document.getElementById('span'+t).style.display='none';
}
function showinput_photourl(){	
	//var str=document.getElementById("input_photourl").innerHTML;	
	var str="";

	//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_photourl+'>名称: &#160;<input type="text" name="post_db[photourl][name][]" id="atc_photourl_name'+totalnum_photourl+'" size="15">  地址: &#160;<input type="text" name="post_db[photourl][url][]" id="atc_photourl_url'+totalnum_photourl+'" size="30" > [<a href=\'javascript:\' onClick=\'window.open("../do/upfile.php?fn=upfile_photourl&dir=$_pre$fid&label='+totalnum_photourl+'","","width=350,height=50,top=200,left=400")\'><font color="#FF0000">上传更换图片</font></a>] [<a href="javascript:delpic(\''+totalnum_photourl+'\')">移除</a>]<br></span><div id="input_photourl'+(totalnum_photourl+1)+'"></div>';	
	
	//document.getElementById("input_photourl").innerHTML=str;
	$('#ListPics').append(str);
	totalnum_photourl++;
}	
	
function upfile_photourl(url,name,size,label){	
	document.getElementById("atc_photourl_url"+label).value=url;	
	arr=name.split('.');	
	document.getElementById("atc_photourl_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]}" : "内容";
$m_config[moduleSet][edit_w]=$m_config[moduleSet][edit_w]?$m_config[moduleSet][edit_w]:'100%';
$m_config[moduleSet][edit_h]=$m_config[moduleSet][edit_h]?$m_config[moduleSet][edit_h]:'450';
!$lfjid && $m_config[moduleSet][etype]='simple';
$simpleEdit=$m_config[moduleSet][etype]?",items : ['source', 'undo', 'redo', 'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline','removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist','insertunorderedlist','link', 'unlink']":"";
print <<<EOT
-->
         <tr class="basetr" id="contenttr">
         	<td class="tdL">{$contentword}：(<span>*</span>)</td>
            <td class="tdR">
<!--
EOT;
if($webdb[EditSystem]=='3'){print <<<EOT
-->
<script type="text/javascript" charset="utf-8" src="$webdb[www_url]/ewebeditor/3.1.1/kindeditor.js"></script>
<script type="text/javascript">
KE.handpage=true;
KE.systype='article';
    KE.show({
        id : 'content1',
        cssPath : '$webdb[www_url]/ewebeditor/common.css'{$simpleEdit}
    });
</script>
<textarea id="content1" name="postdb[content]" style="width:620px;height:{$m_config[moduleSet][edit_h]}px;visibility:hidden;">$rsdb[content]</textarea>
<!--
EOT;
}elseif($webdb[EditSystem]=='2'){
$fcktoolbar=$m_config[moduleSet][etype]?"toolbar : 'Basic',":"";
print <<<EOT
-->
<textarea id="content1" name="postdb[content]" style="display:none;">$rsdb[content]</textarea>
<script type="text/javascript">
CK_Editor=CKEDITOR.replace( 'content1',
{{$fcktoolbar}
width:'620px',
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;
}elseif($webdb[EditSystem]=='1'){
print <<<EOT
-->
<textarea style="display:none;" id="content1" name="postdb[content]">$rsdb[content]</textarea>
<iframe ID="eWebEditor1" src="$webdb[www_url]/ewebeditor/v4.60/ewebeditor.php?id=content1&style=coolblue" frameborder="0" scrolling="no" width="620" HEIGHT="400"></iframe>
<!--
EOT;
}else{
$simpleEdit=$m_config[moduleSet][etype]?"wordCount:false,toolbars:[['FullScreen', 'Source','PastePlain', 'RemoveFormat', 'Undo', 'Redo','Bold',  'ForeColor', 'BackColor', 'Italic', 'Underline', 'StrikeThrough','FontSize', 'Link', 'Unlink']],":'';
$editHeight=$m_config[moduleSet][etype]?250:400;
print <<<EOT
-->
<script type="text/javascript" charset=gbk src="$webdb[www_url]/ewebeditor/baidu/editor_config.php"></script>
<script type="text/javascript" charset=gbk src="$webdb[www_url]/ewebeditor/baidu/editor_all.js"></script>
<link rel="stylesheet" type="text/css" href="$webdb[www_url]/ewebeditor/baidu/themes/default/ueditor.css"/>
<textarea id="content1" name="postdb[content]" style="width:620px;">$rsdb[content]</textarea>
<script type="text/javascript">
var editor_a = new baidu.editor.ui.Editor({ {$simpleEdit} minFrameHeight:{$editHeight} });
	editor_a.render( 'content1' );
</script>

<!--
EOT;
}print <<<EOT
-->
            </td>
         </tr>
         <tr>
         	<td class="tdL"><br/></td>
            <td class="tdR">
               <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">
            </td>
         </tr>
       </table>
       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="FormTable" id="othertable">
	   <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> 
                    <div style="padding-top:5px;"><iframe name='mainFrame2' frameborder=0 height=30 scrolling=no src='../do/upfile.php?fn=upfile&dir=article/$fid&label=picurl' width=250></iframe> </div>
<!--
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($job=="postnew"||$job=="edit"){
if($job=="postnew"&&!$only){
print <<<EOT
-->
         <tr class="othertr">
         	<td class="tdL"><br/></td>
            <td class="tdR">
            	你可以选择本文属于哪个模型： [<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:600px;height:100px;overflow-y:scroll;border:#DDD solid 1px;">$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="FormTable" 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="tdL"><br/></td>
            <td class="tdR">投票选项 
                    <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="tdL"><br/></td>
            <td class="tdR">
            	<!--
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>&#160;&#160; 
                    <!--
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 class="tdL"><br/></td>
            <td class="tdR"><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>
    </div>
</div>
<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();*/
	$('#post_top span').removeClass('ck');
	$("#button_"+t).addClass('ck');
	$('#basetable').hide();
	$('#othertable').hide();
	$('#votetable').hide();
	$('#'+t+'table').show();
}
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;
?>
-->
