<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<br>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
  <tr>
    <td class="tit1" colspan="8"><?=$lang['gather.info215']?> <?=$lang['gather.info17']?></td>
  </tr>
  <tr>
    <td class="forumrow" style="text-align:center;">
	<input type="submit" name="Submit" value="<? echo $lang['gather.info221']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
</td>
    <td class="forumrow" colspan="7"><b><?=$lang['gather.info18']?></b><br>
	<?=$lang['gather.info19']?><br>
	<?=$lang['gather.info20']?><br>
	<?=$lang['gather.info21']?><br>
	<?=$lang['gather.info22']?>
</td>
  </tr>
  <tr><td height="1" colspan="8" bgcolor="#ffffff"></td></tr>
  <tr>
    <td style="text-align:center;" <?if($action=="manage" and $doaction==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?action=manage"><font color="<?if($action=='manage' and $doaction==''){echo 'red';}else{echo '#000000';}?>"><?=$lang['gather.info23']?></font></a>
	</td>
    <td style="text-align:center;" <?if($action=="add"){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?action=add"><font color="<?if($action=='add'){echo 'red';}else{echo '#000000';}?>"><?=$lang['gather.info24']?></font></a>
	</td>
    <td style="text-align:center;" <?if($action=="get_gather"){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?action=get_gather"><font color="<?if($action=='get_gather'){echo 'red';}else{echo '#000000';}?>"><?=$lang['gather.info25']?></font></a> 
	</td>
    <td style="text-align:center;" <?if($action=="pic_manager"){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?action=pic_manager"><font color="<?if($action=='pic_manager'){echo 'red';}else{echo '#000000';}?>"><?=$lang['gather.info157']?></font></a>
	</td>
	 <?
	 if($action=="view" and $doaction==''){
	?>
    <td style="text-align:center;" bgcolor="#C9DEFA"><font color="red"><?=$lang['gather.info37']?></font>
	</td>
	<?}
	if($action=="gather_edit" and $doaction==''){
	?>
    <td style="text-align:center;" bgcolor="#C9DEFA"><font color="red"><?=$lang['gather.info35']?></font>
	</td>
	<?}
	if($action=="test" and $doaction==''){
	?>
    <td style="text-align:center;" bgcolor="#C9DEFA"><font color="red"><?=$lang['gather.info36']?></font>
	</td>
	<?}?>
  </tr>
</table>
<?if($action=="manage" and $doaction==""){?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
<form name="form1" method="post" action="">
<input type="hidden" name="doaction"  value="">
<input type="hidden" name="rule_expression" id="rule_expression" value="">
  <tr>
    <td colspan="7" class="tdtit"><?=$lang['gather.info215']?> <?=$lang['gather.info26']?></td>
  </tr>
  <tr class="forumrow2">
    <td align="center"><?=$lang['gather.info27']?></td>
    <td align="center"><?=$lang['gather.info28']?></td>
    <td align="center"><?=$lang['gather.info29']?></td>
    <td align="center"><?=$lang['gather.info30']?></td>
    <td align="center"><?=$lang['gather.info31']?></td>
    <td align="center"><?=$lang['gather.info32']?></td>
    <td align="center"><?=$lang['gather.info33']?></td>
  </tr>
  <?
  if(!empty($note_arr)){
  	foreach ($note_arr as $notelist){
  ?>
  <tr class="forumrow">
    <td style="text-align:center;">
	<input type="radio" name="noteid" value="<?=$notelist['id']?>">
	<input type="hidden" name="id" value="<?=$notelist['id']?>">
	</td>
    <td style="text-align:center;"><?=$notelist['note_name']?></td>
	<td style="text-align:center;">
	<?
	$board_type=&$_DCACHE['all_forums'][$notelist['bordertype']];
	echo $board_type['boardtype'];
	?>
	  </td>
    <td style="text-align:center;">
	<?
	if($notelist['last_gather_date']=="" or is_null($notelist['last_gather_date'])){
		echo $lang['gather.info34'];
	}
	else {
		echo gmdate('Y-m-d',$notelist['last_gather_date']+getUserTimeZoneOffset());
	}
    ?>
	</td>
    <td style="text-align:center;"><?=gmdate('Y-m-d',$notelist['note_datetime']+getUserTimeZoneOffset())?></td>
    <td style="text-align:center;">
	<?
	switch (intval($notelist['coding'])){
		case 1:
			$codestr="GBK";
			break;
		case 2:
			$codestr="GB2312";
			break;
		case 3:
			$codestr="UTF8";
			break;
		case 4:
			$codestr="BIG5";
			break;
	}
	echo $codestr;
	?>
		</td>
    <td style="text-align:center;">
	<?
	if($notelist['web_num']==0 or $notelist['web_num']=="" or is_null($notelist['web_num'])){
		echo "0";
	}
	else {
		echo $notelist['web_num'];
	}
    ?>
	</td>
  </tr>
  <?
  	}
  }
  ?>
  <tr class="forumrow"><td colspan="7" height="30"><font color="red"><b>&nbsp;
  <?=$lang['gather.info131']."&nbsp;&nbsp;".$lang['gather.info130']?></b></font>&nbsp;&nbsp;
	<select name="rule_expression" id="rule_expression" class="btn">
		<option value="1"><?=$lang['gather.info142']?></option>
		<option value="2"><?=$lang['gather.info143']?></option>
		<option value="3"><?=$lang['gather.info144']?></option>
		<option value="4"><?=$lang['gather.info145']?></option>
	</select>
  </td></tr>
  <tr class="forumrow1">
    <td colspan="7" style="height:30px;">
	<input type="submit" class="button" name="Submit1" class="btn" value="<?=$lang['gather.info35']?>" onclick="return get_radio_value(form1,'?action=gather_edit&id=');">&nbsp;&nbsp;
      <input type="submit"  class="button" name="Submit1" class="btn" value="<?=$lang['gather.info36']?>" onclick="return get_radio_value(form1,'?action=test&id=');">&nbsp;&nbsp;
      <input type="submit"  class="button" name="Submit1" class="btn" value="<?=$lang['gather.info37']?>" onclick="return get_radio_value(form1,'?action=view&id=');">&nbsp;&nbsp;
      <input type="submit" class="button"  name="Submit1" class="btn" value="<?=$lang['gather.info38']?>" onclick="return get_radio_value(form1,'?action=gather_del&id=');">
	  </td>
    </tr>
</form>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
  <tr>
    <td style="height:30px;">
	<?
	if($total!=0){
		$p = new page;
		$p->setall($page,$total,$page_size,$lang['gather.info4'],$lang['gather.info5'],'100%','center','biz');
		print $p->printpage(null,1);
	}
	?>
	</td>
  </tr>
</table>
<?
}
elseif($action=="view" and $doaction==""){
?>
<script language="javascript" src="<? echo(LANG_PATH);?>js/gather_plan.js" type="text/javascript"></script>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
<form name="form1" id="gather_form" method="post" action="">
<input type="hidden" name="doaction" value="">
<input type="hidden" name="rule_expression"  value="<?=$rule_expression?>">
  <tr>
    <td colspan="6" class="tdtit"><?=$lang['gather.info215']?> <?=$lang['gather.info39']?> -> <font color="ffff00"><?=$notename?></font></td>
  </tr>
  <tr class="forumrow2">
    <td style="text-align:center;"><?=$lang['gather.info27']?></td>
    <td style="text-align:center;"><?=$lang['gather.info129']?></td>
    <td style="text-align:center;"><?=$lang['gather.info40']?></td>
    <td style="text-align:center;"><?=$lang['gather.info41']?></td>
    <td style="text-align:center;"><?=$lang['gather.info42']?></td>
    <td style="text-align:center;"><?=$lang['gather.info43']?></td>
  </tr>
  <?
  $page_count=($page_size==0?0:intval(intval($total/$page_size)));
  if(is_array($gatherurls)){
  	foreach ($gatherurls as $k=>$gurl){
  		$strboardtype=&$_DCACHE['all_forums'][$gurl['boardtype']]['boardtype'];
  ?>
  <tr class="forumrow">
    <td style="text-align:center;"><input type="checkbox" name="n_id[]" id="n_id_<?=$gurl['id']?>" value="<?=$gurl['id']?>" <? if($gurl['isdone']!=0) echo "disabled";?>></td>
    <td><span id="title_<?=$gurl['id']?>"><?=strip_tags($gurl['title'])?></span></td>
    <td style="text-align:center;"><?echo $strboardtype?></td>
    <td style="text-align:center;"><?echo gmdate('Y-m-d', time()+$gurl['gatherdate'])?></td>
    <td style="text-align:center;"><span id="downstatu_<?=$gurl['id']?>"><?echo ($gurl['isdone']!=0?$lang['gather.info44']:$lang['gather.info45']);?></span></td>
    <td style="text-align:center;"><a href="<?=$gurl['url']?>" target="_blank"><?echo $lang['gather.info46']?></a></td>
  </tr>
  <?
  	}
  }
  ?>
  <tr class="forumrow">
    <td colspan="6" style="height:30px;"><input type="checkbox" name="all_select" onclick="un(this)" value="Y"><?=$lang['gather.info47']?>
	  <input type="submit" class="button" onclick="ShowHide('1',null);gather_start(this);return false;" name="Submit" value="<?=$lang['gather.info48']?>"></td>
  </tr>
<?
if($page_count>0){
	$next = $page+1;
	$pre = $page-1;
	if($next==1){
		$next=2;
	}
	if($pre==-1){
		$pre=0;
	}
	if($next>$page_count){
		$next=$page_count;
	}
	if($_GET['page']==0 or $_GET['page']==""){
		if($ten_page=="" or $ten_page==0){
			$page_str=1;
		}
		else{
			$page_str=$_GET['ten_page']*10-10+1;
		}
	}
	else{
		$page_str=$_GET['page'];
	}
	$pageinfo1=$lang['gather.info49'].$total.$lang['gather.info50']."&nbsp;&nbsp; ".$lang['gather.info51'].$page_size.$lang['gather.info52']." &nbsp;&nbsp;";
	$pageinfo2=$lang['gather.info53']."&nbsp;".intval($total/$page_size)."&nbsp;".$lang['gather.info54']."&nbsp;&nbsp;".$lang['gather.info55']."<font color=\"#ff0000\">".$page_str."</font>/".intval($total/$page_size)."";
	$pageinfo3=$lang['gather.info56']."&nbsp;&nbsp;";
}
?>
  <tr>
    <td colspan="6" style="text-align:right;">
<?
echo $pageinfo1;
?>
	</td>
  </tr>
  <tr>
    <td colspan="2" style="text-align:center;">
<?
echo $pageinfo2;
?>
	</td>
    <td colspan="2" style="text-align:center;"></td>
    <td colspan="2" style="text-align:right;height:30px;">
<?
echo $pageinfo3;
if($page_count>10){
	$ten_num=ceil($page_count/10);//page_count得到多少页;
}
//进入十页开始ten_start;
if(intval($_GET['ten_page'])==1 or $_GET['ten_page']=="" or intval($_GET['ten_page'])==0){
	$ten_start=1;
}
else{
	$ten_start=$_GET['ten_page']*10+1-10;
}
//进入十页结束ten_end;
$ten_end=$_GET['ten_page']*10;
if($ten_end==0 or $ten_end==""){
	$ten_end=10;
}
if($ten_end>$page_count){
	$ten_end=$page_count;
}
$pre_ten=$_GET['ten_page']-1;
$next_ten=$_GET['ten_page']+1;
if($next_ten>$ten_num){
	$next_ten=$ten_num;
}
if($ten_num>1 and $next_ten==1){
	$next_ten=2;
}
if($_GET['ten_page']=="" or $_GET['ten_page']==0){
	$_GET['ten_page']=1;
}
if($_GET['ten_page']>1){
	echo "<a href=\"?action=view&rule_expression=".$rule_expression."&id=".$_GET['id']."&ten_page=".$pre_ten."\" title=\"".$lang['gather.info123']."".($_GET['ten_page']*10-10)."".$lang['gather.info124']."\"><font color=\"#990000\">[<<]</font></a>&nbsp;";
}
for($i=$ten_start;$i<=$ten_end;$i++){
	if($page_str==$i){
		$color_str="<font color=\"#ff0000\">";
	}
	else{
		$color_str="<font color=\"#0000FF\">";
	}
	echo "<a href=\"?action=view&rule_expression=".$rule_expression."&id=".$_GET['id']."&ten_page=".$_GET['ten_page']."&page=".$i."\" title=\"".$lang['gather.info123']."".$i."".$lang['gather.info124']."\">".$color_str."[".$i."]</font></a>&nbsp;";
}
if($ten_end==$page_count){
	echo "";
}
else{
	echo "<a href=\"?action=view&rule_expression=".$rule_expression."&id=".$_GET['id']."&ten_page=".$next_ten."\" title=\"".$lang['gather.info123']."".($_GET['ten_page']*10+10)."".$lang['gather.info124']."\"><font color=\"#990000\">[>>]</font></a>";
}
?>
	</td>
  </tr>
</form>
</table>
<?
}elseif($action=="add" and $doaction==""){//添加项目
	$gather_rulefile_contentarr=read_gather_rulefile();
	if($item=="new_basic" or $item==''){
?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
<form id="form1" name="form1" method="post" action="?action=note_addok&sort=basic">
<tr><td class="tdtit" colspan="2"><?=$lang['gather.info24']?></td></tr>
  <tr  class="forumrow">
    <td colspan="2" height="30"><a href="?action=add&item=new_basic"><b><?=$lang['gather.info176']?></b></a> | <a href="?action=add&item=new_rule"><?=$lang['gather.info177']?></a> | <a href="?action=add&item=new_leach"><?=$lang['gather.info178']?></a> | <a href="?action=add&item=new_other"><?=$lang['gather.info179']?></a></td>
    </tr>
  <tr>
    <td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info176']?></td>
  </tr>
  <tr class="forumrow">
    <td width="20%" height="30"><strong><?=$lang['gather.info28']?></strong></td>
    <td width="80%" height="30"><input name="note_name" type="text" id="note_name" value="<?=$gather_rulefile_contentarr[0]?>" size="80" /><?=$lang['gather.info181']?></td>
  </tr>
  <tr class="forumrow1">
    <td width="20%" height="30"><strong><?=$lang['gather.info66']?></strong></td>
    <td width="80%" height="30">
	<select name="bordertype" id="bordertype">
	<?php
	if($gather_rulefile_contentarr[1]<>''){
		echo boardjumplist($gather_rulefile_contentarr[1],$lang['gather.info1']);
	}
	else{
		echo boardjumplist($bordertype,$lang['gather.info1']);
	}
	?>
    </select>
	</td>
  </tr>
  <tr class="forumrow">
    <td width="20%" height="30"><strong><?=$lang['gather.info68']?></strong></td>
    <td width="80%" height="30"><input name="from_url"  type="text" id="from_url" value="<?=$gather_rulefile_contentarr[2]?>" size="80" /></td>
  </tr>
  <tr class="forumrow1">
    <td height="30" colspan="2" style="text-align:center;"><input type="submit" class="button" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
    </tr>
  </form>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
	<form id="form2" name="form2" method="post" action="?action=inport" enctype="multipart/form-data">
	  	<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
  <tr>
    <td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info182']?></td>
    </tr>
  <tr class="forumrow1">
    <td width="40%" height="40"><?=$lang['gather.info183']?><input name="inportrule" class="button" type="file" id="inportrule" size="30" />    </td>
    <td width="60%" height="40"><input type="submit" class="button" name="submit" value="<?=$lang['gather.info213']?>" /></td>
    </tr>
	</form>
</table>
	<?}elseif($item=='new_rule'){//end 新设计
	$ruletitle=explode('|||',$gather_rulefile_contentarr[3]);
	$rulefrom=explode('|||',$gather_rulefile_contentarr[4]);
	$rulewrite=explode('|||',$gather_rulefile_contentarr[5]);
	$ruletime=explode('|||',$gather_rulefile_contentarr[6]);
	$rulebody=explode('|||',$gather_rulefile_contentarr[7]);
	?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
	<form id="form1" name="form1" method="post" action="?action=note_addok&sort=rule">
	<tr><td class="tdtit" colspan="4"><?=$lang['gather.info24']?></td></tr>
	  <tr class="forumrow">
    <td colspan="4" height="30"><a href="?action=add&item=new_basic"><?=$lang['gather.info176']?></a> | <a href="?action=add&item=new_rule"><b><?=$lang['gather.info177']?></b></a> | <a href="?action=add&item=new_leach"><?=$lang['gather.info178']?></a> | <a href="?action=add&item=new_other"><?=$lang['gather.info179']?></a></td>
	  </tr>
	  <tr>
		<td colspan="4" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info177']?></td>
	  </tr>
	  <tr class="forumrow">
		<td width="17%" align="center"><strong><?=$lang['gather.info146']?></strong></td>
		<td width="33%"><span style="font-weight: bold">
		  <textarea name="article_title_start" style="width:100%;" rows="5" id="article_title_start"><?=$ruletitle[0]?></textarea>
		</span></td>
		<td width="17%" align="center"><strong><?=$lang['gather.info147']?></strong></td>
		<td width="33%"><textarea name="article_title_end" style="width:100%;" rows="5" id="article_title_end"><?=$ruletitle[1]?></textarea></td>
	  </tr>
	  <tr class="forumrow1">
		<td colspan="4">&nbsp;</td>
		</tr>
	  <tr class="forumrow">
		<td width="17%" align="center"><strong><?=$lang['gather.info148']?></strong></td>
		<td width="33%"><span style="font-weight: bold">
		  <textarea name="article_from_start" style="width:100%;" rows="5" id="article_from_start"><?=$rulefrom[0]?></textarea>
		</span></td>
		<td width="17%" align="center"><strong><?=$lang['gather.info149']?></strong></td>
		<td width="33%"><textarea name="article_from_end" style="width:100%;" rows="5" id="article_from_end"><?=$rulefrom[1]?></textarea></td>
	  </tr>
	  <tr class="forumrow1">
		<td colspan="4">&nbsp;</td>
		</tr>
	  <tr class="forumrow">
		<td width="17%" align="center"><strong><?=$lang['gather.info150']?></strong></td>
		<td width="33%"><span style="font-weight: bold">
		  <textarea name="article_write_start" style="width:100%;" rows="5" id="article_write_start"><?=$rulewrite[0]?></textarea>
		</span></td>
		<td width="17%" align="center"><strong><?=$lang['gather.info151']?></strong></td>
		<td width="33%"><textarea name="article_write_end" style="width:100%;" rows="5" id="article_write_end"><?=$rulewrite[1]?></textarea></td>
	  </tr>
	  <tr class="forumrow1">
		<td colspan="4">&nbsp;</td>
		</tr>
	  <tr class="forumrow">
		<td width="17%" align="center"><strong><?=$lang['gather.info152']?></strong></td>
		<td width="33%"><span style="font-weight: bold">
		  <textarea name="article_time_start" style="width:100%;" rows="5" id="article_time_start"><?=$ruletime[0]?></textarea>
		</span></td>
		<td width="17%" align="center"><strong><?=$lang['gather.info153']?></strong></td>
		<td width="33%"><textarea name="article_time_end" style="width:100%;" rows="5" id="article_time_end"><?=$ruletime[1]?></textarea></td>
	  </tr>
	  <tr class="forumrow1">
		<td colspan="4">&nbsp;</td>
		</tr>
	  <tr class="forumrow">
		<td width="17%" align="center"><strong><?=$lang['gather.info154']?></strong></td>
		<td width="33%"><span style="font-weight: bold">
		  <textarea name="article_body_start" style="width:100%;" rows="5" id="article_body_start"><?=$rulebody[0]?></textarea>
		</span></td>
		<td width="17%" align="center"><strong><?=$lang['gather.info155']?></strong></td>
		<td width="33%"><textarea name="article_body_end" style="width:100%;" rows="5" id="article_body_end"><?=$rulebody[1]?></textarea></td>
	  </tr>
	  <tr>
		<td colspan="4" height="30" class="forumrow1" style="text-align:center;"><input type="submit" class="button" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
	  </tr>
	</form>
	</table>
	<?}elseif($item=="new_leach"){//信息获取规则 end
	$include=explode('|||',$gather_rulefile_contentarr[10]);
	$titleswap=explode('|||',$gather_rulefile_contentarr[11]);
	$bodyswap=explode('|||',$gather_rulefile_contentarr[12]);
	if(strpos($bodyswap[0],'@@@')!==false){//被替换的
		$bodyswap_1=explode('@@@',$bodyswap[0]);
		foreach($bodyswap_1 as $bodyswaparr_1){
			$bodyswaplist_1.=$bodyswaparr_1."\r\n";
		}
	}
	else{
		$bodyswaplist_1=$bodyswap[0];
	}//end
	if(strpos($bodyswap[1],'@@@')!==false){//
		$bodyswap_2=explode('@@@',$bodyswap[1]);
		foreach($bodyswap_2 as $bodyswaparr_2){
			$bodyswaplist_2.=$bodyswaparr_2."\r\n";
		}
	}
	else{
		$bodyswaplist_2=$bodyswap[1];
	}//end
	$leachlabel=explode('|||',$gather_rulefile_contentarr[13]);
	?>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
	<form id="form1" name="form1" method="post" action="?action=note_addok&sort=leach">
	<tr><td class="tdtit" colspan="2"><?=$lang['gather.info24']?></td></tr>
	  <tr class="forumrow">
		<td colspan="2" height="30"><a href="?action=add&item=new_basic"><?=$lang['gather.info176']?></a> | <a href="?action=add&item=new_rule"><?=$lang['gather.info177']?></a> | <a href="?action=add&item=new_leach"><b><?=$lang['gather.info178']?></b></a> | <a href="?action=add&item=new_other"><?=$lang['gather.info179']?></a></td>
		</tr>
	  <tr>
		<td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info178']?></td>
		</tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info184']?></strong></td>
		<td width="80%" height="30">
		<select name="color_style" id="color_style">
		<option value="1"><?=$lang['gather.info185']?></option><?//value=$gather_rulefile_contentarr[8]?>
		</select>
		</td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info186']?></strong></td>
		<td width="80%" height="30">
		<select name="board_setup" id="board_setup">
		<option value="1"><?=$lang['gather.info187']?></option><?//value=$gather_rulefile_contentarr[9]?>
		</select>
		</td>
	  </tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info188']?></strong></td>
		<td width="80%" height="30"><input name="include_url" value="<?=$include[0]?>" type="text" id="include_url" size="46" /></td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info189']?></strong></td>
		<td width="80%" height="30"><input name="no_include_url" value="<?=$include[1]?>" type="text" id="no_include_url" size="46" /></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30"><b><?=$lang['gather.info190']?></b></td>
		<td height="30"><?=$lang['gather.info191']?>
		  <input name="inhere_title" value="<?=$titleswap[0]?>" type="text" id="inhere_title" size="40" /> 
		  <?=$lang['gather.info193']?>
		  <input name="swap_title" value="<?=$titleswap[1]?>" type="text" id="swap_title" size="40" /></td>
	  </tr>
	  <tr class="forumrow1">
		<td height="30"><b><?=$lang['gather.info195']?></b></td>
		<td height="30" valign="middle"><?=$lang['gather.info191']?>
		  <textarea name="inhere_body" style="width:99%" rows="5" id="inhere_body"><?=$bodyswaplist_1?></textarea><br>
	<?=$lang['gather.info193']?>
	<textarea name="swap_body" style="width:99%" rows="5" id="swap_body"><?=$bodyswaplist_2?></textarea><br>
	<b><font color="green"><?=$lang['gather.info219']?></font></b><br>
	</td>
	  </tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info196']?></strong></td>
		<td width="80%" height="30">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr class="forumrow1">
				<td height="35"><input name="script_iframe" <?if(!empty($leachlabel[0]))echo 'checked=checked';?> type="checkbox" value="iframe"  style="border: 0px;background-color: #eeeeee;">
			iframe
			<input name="script_object" <?if(!empty($leachlabel[1]))echo 'checked=checked';?> type="checkbox" value="object"  onclick='return confirm("<?=$lang['gather.info211']?>");' style="border: 0px;background-color: #eeeeee;">
			object
			<input name="script_script" <?if(!empty($leachlabel[2]))echo 'checked=checked';?> type="checkbox" value="script"  style="border: 0px;background-color: #eeeeee;">
			script
			<input name="script_div" <?if(!empty($leachlabel[3]))echo 'checked=checked';?> type="checkbox"  value="div"  style="border: 0px;background-color: #eeeeee;">
			div</td>
			  </tr>
			  <tr class="forumrow">
				<td height="35"><input name="script_class" <?if(!empty($leachlabel[4]))echo 'checked=checked';?> type="checkbox"  value="class"  style="border: 0px;background-color: #eeeeee;">
			class
			<input name="script_table" <?if(!empty($leachlabel[5]))echo 'checked=checked';?> type="checkbox"  value="table"  style="border: 0px;background-color: #eeeeee;">
			table
			<input name="script_tr" <?if(!empty($leachlabel[6]))echo 'checked=checked';?> type="checkbox"  value="tr"  style="border: 0px;background-color: #eeeeee;">
			tr
			<input name="script_span" <?if(!empty($leachlabel[7]))echo 'checked=checked';?> type="checkbox"  value="span"  style="border: 0px;background-color: #eeeeee;">
			span&nbsp;</td>
			  </tr>
			  <tr class="forumrow1">
				<td height="35"><input name="script_img" <?if(!empty($leachlabel[8]))echo 'checked=checked';?> type="checkbox" value="img"  style="border: 0px;background-color: #eeeeee;">
			img&nbsp;&nbsp;&nbsp;
			<input name="script_font" <?if(!empty($leachlabel[9]))echo 'checked=checked';?> type="checkbox"  value="font"  style="border: 0px;background-color: #eeeeee;">
			font&nbsp;&nbsp;
			<input name="script_a" <?if(!empty($leachlabel[10]))echo 'checked=checked';?> type="checkbox" value="a"  style="border: 0px;background-color: #eeeeee;">
			a        &nbsp;&nbsp;
			<input name="script_html" <?if(!empty($leachlabel[11]))echo 'checked=checked';?> type="checkbox" id="script_html" style="border: 0px;background-color: #eeeeee;"  onclick='return confirm("<?=$lang['gather.info212']?>");' value="html">
			html&nbsp;</td>
			  </tr>
			  <tr class="forumrow">
				<td height="35"><input name="script_td" <?if(!empty($leachlabel[12]))echo 'checked=checked';?> type="checkbox" id="script_td"  style="border: 0px;background-color: #eeeeee;"  value="td">
			td	&nbsp;
			<input name="script_p" <?if(!empty($leachlabel[13]))echo 'checked=checked';?> type="checkbox" id="script_p"  style="border: 0px;background-color: #eeeeee;"  value="p">
			p
			&nbsp;
			<input name="script_br" <?if(!empty($leachlabel[14]))echo 'checked=checked';?> type="checkbox" id="script_br"  style="border: 0px;background-color: #eeeeee;"  value="br">
			br</td>
			  </tr>
			</table>
			</td>
	  </tr>
	  <tr class="forumrow1">
		<td height="30" colspan="2" style="text-align:center;"><input type="submit" class="button" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
		</tr>
	</form>
	</table>
	<?}elseif($item=="new_other"){//过滤设置 end
	$pagearr=explode('|||',$gather_rulefile_contentarr[19]);
	?>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
	<form id="form1" name="form1" method="post" action="?action=note_addok&sort=other">
	<tr><td class="tdtit" colspan="2"><?=$lang['gather.info24']?></td></tr>
	  <tr class="forumrow">
		<td colspan="2" height="30"><a href="?action=add&item=new_basic"><?=$lang['gather.info176']?></a> | <a href="?action=add&item=new_rule"><?=$lang['gather.info177']?></a> | <a href="?action=add&item=new_leach"><?=$lang['gather.info178']?></a> | <a href="?action=add&item=new_other"><b><?=$lang['gather.info179']?></b></a></td>
		</tr>
	  <tr>
		<td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info179']?></td>
		</tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info61']?></strong></td>
		<td width="80%" height="30">
			<input type="radio" name="coding" <?if($gather_rulefile_contentarr[14]==1 or $gather_rulefile_contentarr[14]=='')echo 'checked';?> value="1">GBK
			<input type="radio" name="coding" <?if($gather_rulefile_contentarr[14]==2)echo 'checked';?> value="2">GB2312 
			<input type="radio" name="coding" <?if($gather_rulefile_contentarr[14]==3)echo 'checked';?> value="3">UTF8         
		  <input type="radio" name="coding" <?if($gather_rulefile_contentarr[14]==4)echo 'checked';?> value="4">BIG5</td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info62']?></strong></td>
		<td width="80%" height="30"><input type="radio" <?if($gather_rulefile_contentarr[15]==0)echo 'checked';?> name="down_pic" value="0" />
		  <?=$lang['gather.info63']?>
			<input name="down_pic" <?if($gather_rulefile_contentarr[15]==1)echo 'checked';?> type="radio" value="1" />
			<?=$lang['gather.info64']?>&nbsp;&nbsp;
		  <input name="comp_url" type="text" id="comp_url" value="../uploadfile/upimg/" readonly /> 
		  <?=$lang['gather.info65']?></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30"><strong><?=$lang['gather.info197']?></strong></td>
		<td height="30"><input name="news_time" <?if($gather_rulefile_contentarr[16]==1)echo 'checked';?> type="radio" value="1" />
		<?=$lang['gather.info198']?>
		  <input type="radio" <?if($gather_rulefile_contentarr[16]==2)echo 'checked';?> name="news_time" value="2" />
		  <?=$lang['gather.info214']?></td>
	  </tr>
	  <tr class="forumrow1">
		<td height="30"><strong><?=$lang['gather.info200']?></strong></td>
		<td height="30"><input name="keyword" value="<?=$gather_rulefile_contentarr[17]?>" type="text" id="keyword" size="30" /></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30"><strong><?=$lang['gather.info201']?></strong></td>
		<td height="30">
		<select name="page_class" id="page_class">
		  <option value="1" <?if($gather_rulefile_contentarr[18]==1)echo 'selected="selected"'?>><?=$lang['gather.info202']?></option>
		  <option value="2" <?if($gather_rulefile_contentarr[18]==2)echo 'selected="selected"'?> ><?=$lang['gather.info203']?></option>
		</select>
		</td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info133']?></strong></td>
		<td width="80%" height="30"><input name="pagestart" value="<?=$pagearr[0]?>" type="text" id="pagestart" size="30" />
		<?=$lang['gather.info204']?></td>
	  </tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info205']?></strong></td>
		<td width="80%" height="30"><input name="pageend" value="<?=$pagearr[1]?>" type="text" id="pageend" size="30" />
		  <?=$lang['gather.info206']?></td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info207']?></strong></td>
		<td width="80%" height="30"><input name="sp_page" value="<?=$gather_rulefile_contentarr[20]?>" type="text" id="sp_page" value="" size="30" />
		 <font color="red"><?=$lang['gather.info139']?></font></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30" colspan="2" style="text-align:center;"><input type="submit" class="button" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
		</tr>
	</form>
	</table>
	<?}//其它选项end?>
<?}
elseif($action=="gather_edit"){//编辑节点信息
	if($item=="edit_basic" or $item==""){
		if(!empty($note_arr)){
			foreach($note_arr as $notelist){
?>
		<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
		<form id="form1" name="form1" method="post" action="?action=editok&sort=basic&id=<?=$notelist['id']?>">
		<tr><td colspan="2" class="tdtit"><?=$lang['gather.info35']?>--><?=$notelist['note_name']?></td></tr>
		  <tr  class="forumrow">
			<td colspan="2" height="30"><a href="?action=gather_edit&item=edit_basic&id=<?=$notelist['id']?>"><b><?=$lang['gather.info176']?></b></a> | <a href="?action=gather_edit&item=edit_rule&id=<?=$notelist['id']?>"><?=$lang['gather.info177']?></a> | <a href="?action=gather_edit&item=edit_leach&id=<?=$notelist['id']?>"><?=$lang['gather.info178']?></a> | <a href="?action=gather_edit&item=edit_other&id=<?=$notelist['id']?>"><?=$lang['gather.info179']?></a></td>
			</tr>
		  <tr>
			<td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info176']?></td>
		  </tr>
		  <tr class="forumrow">
			<td width="20%" height="30"><strong><?=$lang['gather.info28']?></strong></td>
			<td width="80%" height="30"><input name="note_name" value="<?=$notelist['note_name']?>" type="text" id="note_name" size="80" /><?=$lang['gather.info181']?></td>
		  </tr>
		  <tr class="forumrow1">
			<td width="20%" height="30"><strong><?=$lang['gather.info66']?></strong></td>
			<td width="80%" height="30">
			<select name="bordertype" id="bordertype">
			<?php
			echo boardjumplist($notelist['bordertype'],$lang['gather.info1']);
			?>
			</select>
			</td>
		  </tr>
		  <tr class="forumrow">
			<td width="20%" height="30"><strong><?=$lang['gather.info68']?></strong></td>
			<td width="80%" height="30"><input name="from_url" value="<?=$notelist['from_url']?>" type="text" id="from_url" size="80" /></td>
		  </tr>
		  <tr class="forumrow1">
			<td height="30" colspan="2"><input type="submit" class="button" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
			</tr>
		  </form>
		</table>
		<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
			<form id="form2" name="form2" method="post" action="?action=export&id=<?=$notelist['id']?>">
		  <tr>
			<td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info208']?></td>
			</tr>
		  <tr class="forumrow1">
			<td width="40%" height="40"><?=$lang['gather.info209']?><input name="export_rule" type="text" id="export_rule" size="30" /></td>
			<td width="60%" height="40"><?=$lang['gather.info210']?>&nbsp;<b><?=$uploaddir.'/upimg/'?></b>&nbsp;&nbsp;<input type="submit" name="submit" class="button" value="<?=$lang['gather.info216']?>" /></td>
			</tr>
			</form>
		</table>
<?
			}
		}
	}//基本设置 end
	elseif($item=="edit_rule"){
		if(!empty($note_arr)){
			foreach($note_arr as $notelist){
				$article_title=explode('|||',$notelist['article_title']);
				$article_from=explode('|||',$notelist['article_from']);
				$article_write=explode('|||',$notelist['article_write']);
				$article_time=explode('|||',$notelist['article_time']);
				$article_body=explode('|||',$notelist['article_body']);
	?>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
		<form id="form1" name="form1" method="post" action="?action=editok&sort=rule&id=<?=$notelist['id']?>">
		  <tr class="forumrow">
		<td colspan="4" height="30"><a href="?action=gather_edit&item=edit_basic&id=<?=$notelist['id']?>"><?=$lang['gather.info176']?></a> | <a href="?action=gather_edit&item=edit_rule&id=<?=$notelist['id']?>"><b><?=$lang['gather.info177']?></b></a> | <a href="?action=gather_edit&item=edit_leach&id=<?=$notelist['id']?>"><?=$lang['gather.info178']?></a> | <a href="?action=gather_edit&item=edit_other&id=<?=$notelist['id']?>"><?=$lang['gather.info179']?></a></td>
		  </tr>
		  <tr>
			<td colspan="4" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info177']?></td>
		  </tr>
		  <tr class="forumrow">
			<td width="17%" align="center"><strong><?=$lang['gather.info146']?></strong></td>
			<td width="33%"><span style="font-weight: bold">
			  <textarea name="article_title_start" style="width:100%;" rows="5" id="article_title_start"><?=$article_title[0]?></textarea>
			</span></td>
			<td width="17%" align="center"><strong><?=$lang['gather.info147']?></strong></td>
			<td width="33%"><textarea name="article_title_end" style="width:100%;" rows="5" id="article_title_end"><?=$article_title[1]?></textarea></td>
		  </tr>
		  <tr class="forumrow1">
			<td colspan="4">&nbsp;</td>
			</tr>
		  <tr class="forumrow">
			<td width="17%" align="center"><strong><?=$lang['gather.info148']?></strong></td>
			<td width="33%"><span style="font-weight: bold">
			  <textarea name="article_from_start" style="width:100%;" rows="5" id="article_from_start"><?=$article_from[0]?></textarea>
			</span></td>
			<td width="17%" align="center"><strong><?=$lang['gather.info149']?></strong></td>
			<td width="33%"><textarea name="article_from_end" style="width:100%;" rows="5" id="article_from_end"><?=$article_from[1]?></textarea></td>
		  </tr>
		  <tr class="forumrow1">
			<td colspan="4">&nbsp;</td>
			</tr>
		  <tr class="forumrow">
			<td width="17%" align="center"><strong><?=$lang['gather.info150']?></strong></td>
			<td width="33%"><span style="font-weight: bold">
			  <textarea name="article_write_start" style="width:100%;" rows="5" id="article_write_start"><?=$article_write[0]?></textarea>
			</span></td>
			<td width="17%" align="center"><strong><?=$lang['gather.info151']?></strong></td>
			<td width="33%"><textarea name="article_write_end" style="width:100%;" rows="5" id="article_write_end"><?=$article_write[1]?></textarea></td>
		  </tr>
		  <tr class="forumrow1">
			<td colspan="4">&nbsp;</td>
			</tr>
		  <tr class="forumrow">
			<td width="17%" align="center"><strong><?=$lang['gather.info152']?></strong></td>
			<td width="33%"><span style="font-weight: bold">
			  <textarea name="article_time_start" style="width:100%;" rows="5" id="article_time_start"><?=$article_time[0]?></textarea>
			</span></td>
			<td width="17%" align="center"><strong><?=$lang['gather.info153']?></strong></td>
			<td width="33%"><textarea name="article_time_end" style="width:100%;" rows="5" id="article_time_end"><?=$article_time[1]?></textarea></td>
		  </tr>
		  <tr class="forumrow1">
			<td colspan="4">&nbsp;</td>
			</tr>
		  <tr class="forumrow">
			<td width="17%" align="center"><strong><?=$lang['gather.info154']?></strong></td>
			<td width="33%"><span style="font-weight: bold">
			  <textarea name="article_body_start" style="width:100%;" rows="5" id="article_body_start"><?=$article_body[0]?></textarea>
			</span></td>
			<td width="17%" align="center"><strong><?=$lang['gather.info155']?></strong></td>
			<td width="33%"><textarea name="article_body_end" style="width:100%;" rows="5" id="article_body_end"><?=$article_body[1]?></textarea></td>
		  </tr>
		  <tr>
			<td colspan="4" align="center" height="30" class="forumrow1"><input type="submit" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
		  </tr>
		</form>
		</table>
<?
			}
		}
	}//信息获取规则 end
	elseif($item=="edit_leach"){
		if(!empty($note_arr)){
			foreach($note_arr as $notelist){
				$inheretitle=explode('|||',$notelist['title_inhere_swap']);
				$inherebody=explode('|||',$notelist['body_inhere_swap']);
				if(strpos($inherebody[0],'@@@')!==false){//被替换的
					$inherebodytmpstr_1=explode('@@@',$inherebody[0]);
					foreach($inherebodytmpstr_1 as $inherebodytmpstrlist_1){
						$inherebodytmpstrarr_1.=$inherebodytmpstrlist_1."\r\n";
					}
				}
				else{
					$inherebodytmpstrarr_1=$inherebody[0];
				}//end
				if(strpos($inherebody[1],'@@@')!==false){//
					$inherebodytmpstr_2=explode('@@@',$inherebody[1]);
					foreach($inherebodytmpstr_2 as $inherebodytmpstrlist_2){
						$inherebodytmpstrarr_2.=$inherebodytmpstrlist_2."\r\n";
					}
				}
				else{
					$inherebodytmpstrarr_2=$inherebody[1];
				}//end
				$scriptleach=explode('|||',$notelist['script_leach']);
				$includeurllist=explode('|||',$notelist['includeurl']);
?>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
	<form id="form1" name="form1" method="post" action="?action=editok&sort=leach&id=<?=$notelist['id']?>">
	  <tr class="forumrow">
		<td colspan="2" height="30"><a href="?action=gather_edit&item=edit_basic&id=<?=$notelist['id']?>"><?=$lang['gather.info176']?></a> | <a href="?action=gather_edit&item=edit_rule&id=<?=$notelist['id']?>"><?=$lang['gather.info177']?></a> | <a href="?action=gather_edit&item=edit_leach&id=<?=$notelist['id']?>"><b><?=$lang['gather.info178']?></b></a> | <a href="?action=gather_edit&item=edit_other&id=<?=$notelist['id']?>"><?=$lang['gather.info179']?></a></td>
		</tr>
	  <tr>
		<td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info178']?></td>
		</tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info184']?></strong></td>
		<td width="80%" height="30"><select name="color_style" id="color_style">
		<option value="1"><?=$lang['gather.info185']?></option>
		  </select></td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info186']?></strong></td>
		<td width="80%" height="30"><select name="board_setup" id="board_setup"><option value="1"><?=$lang['gather.info187']?></option>
		</select></td>
	  </tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info188']?></strong></td>
		<td width="80%" height="30"><input name="include_url" value="<?=$includeurllist[0]?>" type="text" id="include_url" size="46" /></td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info189']?></strong></td>
		<td width="80%" height="30"><input name="no_include_url" value="<?=$includeurllist[1]?>" type="text" id="no_include_url" size="46" /></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30"><b><?=$lang['gather.info192']?></b></td>
		<td height="30"><?=$lang['gather.info191']?>
		  <input name="inhere_title" value="<?=$inheretitle[0]?>" type="text" id="inhere_title" size="40" /> 
		  <?=$lang['gather.info193']?>
		  <input name="swap_title" value="<?=$inheretitle[1]?>" type="text" id="swap_title" size="40" /></td>
	  </tr>
	  <tr class="forumrow1">
		<td height="30"><b><?=$lang['gather.info194']?></b></td>
		<td height="30" valign="middle"><?=$lang['gather.info191']?>
		  <textarea name="inhere_body" style="width:99%" rows="5" id="inhere_body"><?=$inherebodytmpstrarr_1?></textarea>
	<?=$lang['gather.info193']?>
	<textarea name="swap_body" style="width:99%" rows="5" id="swap_body"><?=$inherebodytmpstrarr_2?></textarea><br><font color=
	"green"><b><?=$lang['gather.info219']?></b></font></td>
	  </tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info196']?></strong></td>
		<td width="80%" height="30">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr class="forumrow1">
				<td height="35"><input name="script_iframe" <?if($scriptleach[0]=="iframe") echo "checked=checked"?> type="checkbox" value="iframe"  style="border: 0px;background-color: #eeeeee;">
			iframe
			<input name="script_object" <?if($scriptleach[1]=="object") echo "checked=checked"?> type="checkbox" value="object"  onclick='return confirm("<?=$lang['gather.info211']?>");' style="border: 0px;background-color: #eeeeee;">
			object
			<input name="script_script" <?if($scriptleach[2]=="script") echo "checked=checked"?> type="checkbox" value="script"  style="border: 0px;background-color: #eeeeee;">
			script
			<input name="script_div" <?if($scriptleach[3]=="div") echo "checked=checked"?> type="checkbox"  value="div"  style="border: 0px;background-color: #eeeeee;">
			div</td>
			  </tr>
			  <tr class="forumrow">
				<td height="35"><input name="script_class" <?if($scriptleach[4]=="class") echo "checked=checked"?> type="checkbox"  value="class"  style="border: 0px;background-color: #eeeeee;">
			class
			<input name="script_table" <?if($scriptleach[5]=="table") echo "checked=checked"?> type="checkbox"  value="table"  style="border: 0px;background-color: #eeeeee;">
			table
			<input name="script_tr" <?if($scriptleach[6]=="tr") echo "checked=checked"?> type="checkbox"  value="tr"  style="border: 0px;background-color: #eeeeee;">
			tr
			<input name="script_span" <?if($scriptleach[7]=="span") echo "checked=checked"?> type="checkbox"  value="span"  style="border: 0px;background-color: #eeeeee;">
			span&nbsp;</td>
			  </tr>
			  <tr class="forumrow1">
				<td height="35"><input name="script_img" <?if($scriptleach[8]=="img") echo "checked=checked"?> type="checkbox" value="img"  style="border: 0px;background-color: #eeeeee;">
			img&nbsp;&nbsp;&nbsp;
			<input name="script_font" <?if($scriptleach[9]=="font") echo "checked=checked"?> type="checkbox"  value="font"  style="border: 0px;background-color: #eeeeee;">
			font&nbsp;&nbsp;
			<input name="script_a" <?if($scriptleach[10]=="a") echo "checked=checked"?> type="checkbox" value="a"  style="border: 0px;background-color: #eeeeee;">
			a        &nbsp;&nbsp;
			<input name="script_html" <?if($scriptleach[11]=="html") echo "checked=checked"?> type="checkbox" id="script_html" style="border: 0px;background-color: #eeeeee;"  onclick='return confirm("<?=$lang['gather.info212']?>");' value="html">
			html&nbsp;</td>
			  </tr>
			  <tr class="forumrow">
				<td height="35"><input name="script_td" <?if($scriptleach[12]=="td") echo "checked=checked"?> type="checkbox" id="script_td"  style="border: 0px;background-color: #eeeeee;"  value="td">
			td	&nbsp;
			<input name="script_p" <?if($scriptleach[13]=="p") echo "checked=checked"?> type="checkbox" id="script_p"  style="border: 0px;background-color: #eeeeee;"  value="p">
			p
			&nbsp;
			<input name="script_br" <?if($scriptleach[14]=="br") echo "checked=checked"?> type="checkbox" id="script_br"  style="border: 0px;background-color: #eeeeee;"  value="br">
			br</td>
			  </tr>
			</table>
			</td>
	  </tr>
	  <tr class="forumrow1">
		<td height="30" colspan="2"><input type="submit" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
		</tr>
	</form>
	</table>
<?
			}
		}
	}//过滤  end
	elseif($item=="edit_other"){
		if(!empty($note_arr)){
			foreach($note_arr as $notelist){
				$pagevarlist=explode("|||",$notelist['pagevar']);
?>

	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
	<form id="form1" name="form1" method="post" action="?action=editok&sort=other&id=<?=$notelist['id']?>">
	  <tr class="forumrow">
		<td colspan="2" height="30"><a href="?action=gather_edit&item=edit_basic&id=<?=$notelist['id']?>"><?=$lang['gather.info176']?></a> | <a href="?action=gather_edit&item=edit_rule&id=<?=$notelist['id']?>"><?=$lang['gather.info177']?></a> | <a href="?action=gather_edit&item=edit_leach&id=<?=$notelist['id']?>"><?=$lang['gather.info178']?></a> | <a href="?action=gather_edit&item=edit_other&id=<?=$notelist['id']?>"><b><?=$lang['gather.info179']?></b></a></td>
		</tr>
	  <tr>
		<td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info180']?>-><?=$lang['gather.info179']?></td>
		</tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info61']?></strong></td>
		<td width="80%" height="30">
			<input type="radio" name="coding" value="1" <?if($notelist['coding']==1) echo "checked"?>>GBK
			<input type="radio" name="coding" value="2" <?if($notelist['coding']==2) echo "checked"?>>GB2312 
			<input type="radio" name="coding" value="3" <?if($notelist['coding']==3) echo "checked"?>>UTF8         
		  <input type="radio" name="coding" value="4" <?if($notelist['coding']==4) echo "checked"?>>BIG5</td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info62']?></strong></td>
		<td width="80%" height="30"><input type="radio" <?if($notelist['down_pic']==0) echo "checked"?> name="down_pic" value="0" />
		  <?=$lang['gather.info63']?>
			<input name="down_pic" type="radio" <?if($notelist['down_pic']==1) echo "checked"?> value="1" />
			<?=$lang['gather.info64']?>&nbsp;&nbsp;
		  <input name="comp_url" type="text" id="comp_url" value="../uploadfile/upimg/" readonly /> 
		  <?=$lang['gather.info65']?></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30"><strong><?=$lang['gather.info197']?></strong></td>
		<td height="30"><input name="news_time" type="radio" <?if($notelist['news_time']==1) echo "checked"?> value="1" />
		<?=$lang['gather.info198']?>
		  <input type="radio" name="news_time" <?if($notelist['news_time']==2) echo "checked"?> value="2" />
		  <?=$lang['gather.info199']?></td>
	  </tr>
	  <tr class="forumrow1">
		<td height="30"><strong><?=$lang['gather.info200']?></strong></td>
		<td height="30"><input name="keyword" value="<?=$notelist['keyword']?>" type="text" id="keyword" size="30" /></td>
	  </tr>
	  <tr class="forumrow">
		<td height="30"><strong><?=$lang['gather.info201']?></strong></td>
		<td height="30"><select name="page_class" id="page_class">
		  <option value="1" <?if($notelist['page_class']==1)echo 'selected="selected"'?>><?=$lang['gather.info202']?></option>
		  <option value="2" <?if($notelist['page_class']==2)echo 'selected="selected"'?>><?=$lang['gather.info203']?></option>
		</select>    </td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info133']?></strong></td>
		<td width="80%" height="30"><input name="pagestart" type="text" value="<?=$pagevarlist[0]?>" id="pagestart" size="30" />
		<?=$lang['gather.info204']?></td>
	  </tr>
	  <tr class="forumrow">
		<td width="20%" height="30"><strong><?=$lang['gather.info205']?></strong></td>
		<td width="80%" height="30"><input name="pageend" type="text" value="<?=$pagevarlist[1]?>" id="pageend" size="30" />
		  <?=$lang['gather.info206']?></td>
	  </tr>
	  <tr class="forumrow1">
		<td width="20%" height="30"><strong><?=$lang['gather.info207']?></strong></td>
		<td width="80%" height="30"><input name="sp_page" value="<?=$notelist['sp_page']?>" type="text" id="sp_page" value="" size="30" /><font color="red"><?=$lang['gather.info139']?></font>
		 </td>
	  </tr>
	  <tr class="forumrow">
		<td height="30" colspan="2"><input type="submit" name="Submit" value="<?=$lang['gather.info115']?>" /></td>
		</tr>
	</form>
	</table>
<?
			}
		}
	}
?>
<?
}
elseif($action=="get_gather" and $doaction==""){
?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
<form name="form1" method="post" action="">
<input type="hidden" name="doaction" value="">
  <tr>
    <td colspan="8" class="tdtit"><?=$lang['gather.info215']?> <?=$lang['gather.info100']?></td>
    </tr>
  <tr class="forumrow2">
    <td align="center"><?=$lang['gather.info101']?></td>
    <td align="center"><?=$lang['gather.info102']?></td>
    <td align="center"><?=$lang['gather.info29']?></td>
    <td align="center"><?=$lang['gather.info103']?></td>
    <td align="center"><?=$lang['gather.info104']?></td>
    <td align="center"><?=$lang['gather.info105']?></td>
    <td align="center"><?=$lang['gather.info106']?></td>
    <td align="center"><?=$lang['gather.info107']?></td>
  </tr>
<?
global $_DCACHE,$forum_notename,$board_type;
require_once INC_PATH.'DV_Encoding.class.php';
$objEnc = DV_Encoding::GetEncoding($GLOBALS['charset']);
if(!empty($db_info)){
	foreach($db_info as $dblist){
		if(strpos($dblist['g_title'],'&lt;/title&gt;')!==false){
			$strtmp=explode('&lt;/title&gt;',$dblist['g_title']);
			$str_title=$strtmp[0];
		}
		else{
			$str_title=$dblist['g_title'];
		}
		$board_type=&$_DCACHE['all_forums'][$dblist['board_type']];
		$forum_notename=$board_type['boardtype'];
		/*if(strlen($dblist['g_write'])>20){
		$g_writestr=$objEnc->SubString($dblist['g_write'],0,10)."...";
		}
		else{
		$g_writestr=$dblist['g_write'];
		}*/
?>
  <tr class="forumrow">
    <td style="text-align:center;"><input type="checkbox" name="dbid[]" value="<?=$dblist['g_id']?>"></td>
    <td style="text-align:left;"><a href="gather_view.php?id=<?=$dblist['g_id']?>" target="_blank"><?=$str_title?></a></td>
    <td style="text-align:center;"><?=$forum_notename?></td>
    <td style="text-align:center;"><?=$dblist['g_notename']?></td>
    <td style="text-align:center;"><?=$dblist['g_write']?></td>
    <td style="text-align:center;"><?=$dblist['g_from']?></td>
    <td style="text-align:center;"><?=$dblist['g_datetime']?></td>
    <td style="text-align:center;"><a href="?doaction=dbedit&id=<?=$dblist['g_id']?>"><?=$lang['gather.info108']?></a></td>
  </tr>
<?
	}
}
?>
  <tr class="forumrow">
    <td colspan="8"><input type="checkbox" name="all" value="Y" onclick="un(this)"><?=$lang['gather.info109']?>&nbsp;&nbsp;
      <input type="submit" name="Submit" class="button" onclick="this.form.doaction.value='del_dbinfo'" value="<?=$lang['gather.info110']?>">&nbsp;&nbsp;
      <input type="submit" name="Submit" class="button" onclick="this.form.doaction.value='put_forumtable'" value="<?=$lang['gather.info127']?>">
	</td>
  </tr>
</form>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr class="forumrow1">
    <td>
	<?
	if($total!=0){
		$p = new page;
		$p->setall($page,$total,$page_size,$lang['gather.info4'],$lang['gather.info5'],'100%','center','biz');
		print $p->printpage(null,1);
	}
	?>
	</td>
    </tr>
</table>
<?
}
elseif($action=="test"){
?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
<form name="form1" method="post" action="?action=view&id=<?php echo $id?>">
  <tr>
    <td class="tdtit"><?=$lang['gather.info215']?> <?=$lang['gather.info112']?>-><?=$note_name?></td>
 </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info113']?></td>
 </tr>
  <tr class="forumrow1">
    <td>
	<textarea name="listtitle" style="width:99%" rows="15" cols="20">
<?
if(!empty($note_info)){
	$info_total=count($note_info);
	for($i=0;$i<$info_total;$i++){
		echo $note_link[$i].$lang['gather.info217'].$note_info[$i]."\r\n";
	}
}
?>
	</textarea>
	</td>
 </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info114']?></td>
 </tr>
  <tr class="forumrow1">
    <td>
    <textarea name="test_info" style="width:99%" rows="15" cols="20"><?=$test_info?></textarea> 
    </td>
 </tr>
  <tr class="forumrow1">
    <td style="text-align:center;"><input type="submit" class="button" name="but" value="<?=$lang['gather.info229']?>"></td>
 </tr>
</table>
<?}
elseif($action=="get_gather" and $doaction=="edit_datinfo"){
?>
<table width="100%"  border="0" cellspacing="1" cellpadding="1" class="tableborder">
<form name="form1" method="post" action="?action=dat_editok">
  <tr>
    <td colspan="3" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info116']?></td>
  </tr>	
  <tr class="forumrow">
    <td><?=$lang['gather.info28']?></td>
    <td colspan="2">
	<select name="notename">
		<option value=""><?=$lang['gather.info118']?></option>
		<?
		if(!empty($notearr)){
			foreach($notearr as $noteset){
		?>
				<option value="<?=$noteset['note_name']?>"><?=$noteset['note_name']?></option>
		<?
			}
		}
		?>
    </select>
	</td>
  </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info102']?></td>
    <td>
	<select name="fielt_title">
		<option value=""><?=$lang['gather.info119']?></option>
		<option value="1">g_title</option>
    </select>	</td>
    <td>
      <input name="swap_title" type="text" size="80">    </td>
  </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info104']?></td>
    <td>
      <select name="fielt_write">
		<option value=""><?=$lang['gather.info119']?></option>
		<option value="1">g_write</option>
      </select>	  </td>
    <td>
      <input type="text" name="swap_write" size="40">    </td>
  </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info105']?></td>
    <td>
      <select name="fielt_frow">
		<option value=""><?=$lang['gather.info119']?></option>
		<option value="1">g_from</option>
      </select>	  </td>
    <td>
      <input type="text" name="swap_from" size="40">    </td>
  </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info120']?></td>
    <td>
      <select name="fielt_body">
		<option value=""><?=$lang['gather.info119']?></option>
		<option value="1">g_body</option>
	  </select>	  </td>
    <td>
      <textarea name="swap_body" rows="10" style="width:99%"></textarea>    </td>
  </tr>
  <tr class="forumrow1">
    <td height="30" colspan="3" align="center"><input type="submit" class="button" name="Submit" value="<?=$lang['gather.info121']?>"></td>
    </tr>
</form>
</table>
<?
}
elseif($action=="" and $doaction=="dbedit"){
	if(!empty($db_info)){
		foreach($db_info as $dbinfolist){
?>
<table width="100%" border="0" cellspacing="1" cellpadding="1" class="tableborder">
<form name="form1" method="post" action="?action=odd_editok&id=<?=$dbinfolist['g_id']?>">
  <tr>
    <td colspan="2" class="tit1"><?=$lang['gather.info215']?> <?=$lang['gather.info122']?></td>
  </tr>
  <tr class="forumrow">
    <td height="30"><?=$lang['gather.info102']?></td>
    <td height="30">
      <input name="title" type="text" id="title" size="100" value="<?=$dbinfolist['g_title']?>"></td>
  </tr>
  <tr class="forumrow">
    <td height="30"><?=$lang['gather.info104']?></td>
    <td height="30">
      <input name="write" type="text" id="write" size="40" value="<?=$dbinfolist['g_write']?>"></td>
  </tr>
  <tr class="forumrow">
    <td height="30"><?=$lang['gather.info105']?></td>
    <td height="30">
      <input name="from" type="text" id="from" size="40" value="<?=$dbinfolist['g_from']?>"></td>
  </tr>
  <tr class="forumrow">
    <td><?=$lang['gather.info120']?></td>
    <td>
      <textarea name="body" rows="10" id="body" style="width:99%"><?=$dbinfolist['g_body']?></textarea></td>
  </tr>
  <tr class="forumrow1">
    <td height="30" colspan="2" align="center"><input type="submit" name="Submit" value=" <?=$lang['gather.info108']?> "></td>
    </tr>
</form>
</table>
<?
		}
	}
}
elseif($action=="pic_manager"){
?>

<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <form name="form1" method="post" action="?action=clear">
  <tr>
    <td colspan="7" class="tdtit"><?echo $lang['gather.info160']?></td>
  </tr>
  <tr class="forumrow2">
    <td style="text-align:center;"><?echo $lang['gather.info164']?></td>
    <td style="text-align:center;"><?echo $lang['gather.info161']?></td>
    <td style="text-align:center;"><?echo $lang['gather.info162']?></td>
    <td style="text-align:center;"><?echo $lang['gather.info163']?></td>
    <td style="text-align:center;"><?echo $lang['gather.info165']?></td>
  </tr>
  <?
  if(!empty($file_list)){
  	if(is_array($file_list)){
  		$record_start=intval($_GET['page'])*$page_size;
  		$record_end=intval($_GET['page']*$page_size);
  		if($_GET['page']<=0 or $_GET['page']==1){
  			$record_start=0;
  			$record_end=$page_size;
  		}
  		if($record_start>0){
  			$record_start-=$page_size;
  		}
  		for($j=$record_start;$j<$record_end;$j++){
  			if($file_list[$j]=="" or empty($file_list[$j])){
  				break;
  			}
  ?>
  <tr class="forumrow" style="padding:1px;">
    <td style="text-align:center;"><?=$j.$lang['gather.info218']?><input type="checkbox" name="fileid[]" value="<?echo $j?>"></td>
    <td height="25" style="text-align:center;">
	<a href="<?echo $facesdir.$file_list[$j]?>" target="_blank"><?echo $file_list[$j]?></a>
	</td>
    <td height="25" style="text-align:center;"><?echo filesize($facesdir.$file_list[$j]).'&nbsp;'.$lang['gather.info168']?></td>
    <td height="25" style="text-align:center;"><?echo gmdate("Y-m-d H:i:s",fileatime($facesdir.$file_list[$j])+getUserTimeZoneOffset())?></td>
    <td height="25" style="text-align:center;"><a href="?action=delfile&filename=<?echo $facesdir.$file_list[$j]?>"><?echo $lang['gather.info167']?></a></td>
  </tr>
  <?
  		}
  	}
  }
  ?>
  <tr>
    <td colspan="5" style="text-align:left;" class="forumrow1"><input type="submit" class="button" name="Submit" value="<?echo $lang['gather.info166']?>">&nbsp;&nbsp;<input type="checkbox" name="allid" value="Y" onclick="un(this)"><?echo $lang['gather.info109']?></td>
  </tr>
<?
if($page_count>0){
	$next = $page+1;
	$pre = $page-1;
	if($next==1){
		$next=2;
	}
	if($pre==-1){
		$pre=0;
	}
	if($next>$page_count){
		$next=$page_count;
	}
	if($_GET['page']==0 or $_GET['page']==""){
		if($ten_page=="" or $ten_page==0){
			$page_str=1;
		}
		else{
			$page_str=$_GET['ten_page']*10-10+1;
		}
	}
	else{
		$page_str=$_GET['page'];
	}
	$pageinfo1=$lang['gather.info49'].$total.'&nbsp;'.$lang['gather.info52'].'&nbsp;'.$lang['gather.info51'].$page_size.$lang['gather.info52'];
	$pageinfo2=$lang['gather.info53'].ceil($total/$page_size).$lang['gather.info54'].'&nbsp;'.$lang['gather.info55']."<font color=\"#ff0000\">".$page_str."</font>/".ceil($total/$page_size)."";
	$pageinfo3=$lang['gather.info56']."&nbsp;&nbsp;";
}
?>
  <tr>
    <td colspan="5" style="text-align:right;">
<?
echo $pageinfo1;
?>
	</td>
  </tr>
  <tr>
    <td colspan="1" style="text-align:center;">
<?
echo $pageinfo2;
?>
	</td>
    <td colspan="3" style="text-align:left;"></td>
    <td colspan="1" style="text-align:right;height:30px;">
<?
echo $pageinfo3;
if($page_count>10){
	$ten_num=ceil($page_count/10);//page_count得到多少页;
}
//进入十页开始ten_start;
if(intval($_GET['ten_page'])==1 or $_GET['ten_page']=="" or intval($_GET['ten_page'])==0){
	$ten_start=1;
}
else{
	$ten_start=$_GET['ten_page']*10+1-10;
}
//进入十页结束ten_end;
$ten_end=$_GET['ten_page']*10;
if($ten_end==0 or $ten_end==""){
	$ten_end=10;
}
if($ten_end>$page_count){
	$ten_end=$page_count;
}
$pre_ten=$_GET['ten_page']-1;
$next_ten=$_GET['ten_page']+1;
if($next_ten>$ten_num){
	$next_ten=$ten_num;
}
if($ten_num>1 and $next_ten==1){
	$next_ten=2;
}
if($_GET['ten_page']=="" or $_GET['ten_page']==0){
	$_GET['ten_page']=1;
}
if($_GET['ten_page']>1){
	echo "<a href=\"?action=pic_manager&ten_page=".$pre_ten."\" title=\"".$lang['gather.info123']."".($_GET['ten_page']*10-10)."".$lang['gather.info124']."\"><font color=\"#990000\">[<<]</font></a>&nbsp;";
}
for($i=$ten_start;$i<=$ten_end;$i++){
	if($page_str==$i){
		$color_str="<font color=\"#ff0000\">";
	}
	else{
		$color_str="<font color=\"#0000FF\">";
	}
	echo "<a href=\"?action=pic_manager&ten_page=".$_GET['ten_page']."&page=".$i."\" title=\"".$lang['gather.info123']."".$i."".$lang['gather.info124']."\">".$color_str."[".$i."]</font></a>&nbsp;";
}
if($ten_end==$page_count){
	echo "";
}
else{
	echo "<a href=\"?action=pic_manager&ten_page=".$next_ten."\" title=\"".$lang['gather.info123']."".($_GET['ten_page']*10+10)."".$lang['gather.info124']."\"><font color=\"#990000\">[>>]</font></a>";
}
?>
&nbsp;&nbsp;
  </td>
  </tr>
  </form>
</table>
<?
}
?>

