<?
$C_126cmsadmin_tname = 'MakeHtml_config';

include(dirname(__FILE__)."/global.php");




@$job = $submitted_vars["job"];

if($job == "modify"){
  $postdb = $_POST['postdb'];
  
  $query="UPDATE `w6_menu` 
          SET `name`='".$postdb['name']."' , `linkurl`='".$postdb['linkurl']."' , `color`='".$postdb['color']."' , `target`='".$postdb['target']."' , `hide`='".$postdb['hide']."' , `list`='".$postdb['list']."'
		  WHERE `id`=".$postdb['id']; 
		  
  $result = mysql_query($query) or die(mysql_error());
  if ($result)
     {
       $showmsg = "导航菜单修改成功！";
	   $formurl = "menu_modify.php?id=".$postdb['id'];
     }
  else
     {
       $showmsg = "导航菜单修改失败！";
	   $formurl = "menu_modify.php?id=".$postdb['id'];
     }
	 
  include('showmsg.php');
  exit;
  
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>后台管理</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
	text-decoration: none;
	color: #000000;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: underline;
	color: #FF0000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
-->
</style></head>

<body>
<div align="center" class="font12">
  <table width="100%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#A4B6D7">
    <tr>
      <td width="100%" height="22" align="center" background="images/titlebg.jpg">&nbsp;</td>
    </tr>
  </table>
  <br />
  <table width="100%" height="25" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
      <td align="left" bgcolor="#FFFFFF"> [<a 
      href="../../index.php?job=makeIndexHtml" target="_blank" class="a_bt">首页静态</a>]      [<a 
      href="MakeHtml.php" class="a_bt">栏目静态</a>]      [<a 
      href="../../index.php?job=delIndexHtml" class="a_bt">删除静态首页</a>]
      [<a       href="WJT.php" class="a_bt">伪静态设置</a>]
	  <!--
	  <?
	  if($webdb['NewsWYC']=='1'){
	  ?>
	  [<a href="wyc.php" class="a_bt">文章伪原创处理</a>]
	  <?
	  }
	  ?>
	  
	  <?
	  if($webdb['KeyZQ']=='1'){
	  ?>
	  [<a href="zq.php" class="a_bt">关键词站群功能</a>]
	  <?
	  }
	  ?>
	  
	  <?
	  if($webdb['NewsFY']=='1'){
	  ?>
	  [<a href="fy.php" class="a_bt">英文翻译功能</a>]
	  <?
	  }
	  ?>
	  
	  <?
	  if($webdb['NewsKey']=='1'){
	  ?>
	  [<a href="NewsKey/index.php" class="a_bt">文章关键字提取功能</a>]
	  <?
	  }
	  ?>
	  
	  [<a href="show_sub.php" class="a_bt">展示二级域名</a>]

	  [<a href="show_sub_nginx.php" class="a_bt">二级域名nginx规则</a>]

	  [<a href="show_sub_apache.php" class="a_bt">二级域名apache规则</a>]
	  
	  [<a href="search_same.php" class="a_bt" target="_blank">检查相同文章</a>]
//-->
	  </td>
    </tr>
  </table>
  <!--<br />
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
    <tr>
      <td height="22" align="left" class="head"><div align="center"><strong>静态网页生成设置</strong></div></td>
    </tr>
    <tr>
      <td height="24" align="left">
	  <form id="form1" name="form1" method="post" action="">
	  <table width="99%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table2">
        <tr>
          <td width="34%" height="28" bgcolor="#FFFFFF">文章列表页与内容页是否生成静态网页</td>
          <td width="66%" bgcolor="#FFFFFF"><input type="radio" value="0" name="webdbs[NewsMakeHtml]" />
不生成静态
  <input type="radio" value="1" name="webdbs[NewsMakeHtml]" />
生成真静态
<input type="radio" checked="checked" value="2" name="webdbs[NewsMakeHtml]" />
伪静态 </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">默认静态列表首页是</td>
          <td bgcolor="#FFFFFF"><input type="radio" value="2" name="webdbs[DefaultIndexHtml]" />
index.shtml
  <input type="radio" value="1" name="webdbs[DefaultIndexHtml]" />
index.html
<input type="radio" checked="checked" value="0" name="webdbs[DefaultIndexHtml]" />
index.htm   (一般选择index.htm) </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">是否禁止访问列表页与内容的动态页面即PHP页</td>
          <td bgcolor="#FFFFFF"><input type="radio" value="1" name="webdbs[ForbidShowPhpPage]" />
禁止访问动态页
  <input type="radio" checked="checked" value="0" name="webdbs[ForbidShowPhpPage]" />
允许访问动态页</td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">&nbsp;</td>
          <td bgcolor="#FFFFFF"><input type="submit" value="提交" name="Submit" />
            <input name="job" type="hidden" id="job" value="modify" />
            <input name="postdb[id]" type="hidden" id="id" value="<?=$id?>" /></td>
        </tr>
      </table>
        </form>
      </td>
    </tr>
  </table>//-->
  <br />
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
    <tr>
      <td height="22" align="left" class="head">所有栏目</td>
    </tr>
    <tr>
      <td height="6" align="left"><img width="1" height="1" /></td>
    </tr>
    <tr>
      <td align="center">
	  <FORM name="formlist" action="MakeHtml2.php" method="post">
  <table width="99%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td width="6%" height="30" align="center" background="images/titlebg.jpg">FID</td>
          <td width="25%" align="center" background="images/titlebg.jpg">栏目名称</td>
          <td width="6%" align="center" background="images/titlebg.jpg">静 态</td>
          <td width="11%" align="center" background="images/titlebg.jpg">类 型</td>
          <td width="42%" align="center" background="images/titlebg.jpg">个性静态页URL样式</td>
          <td width="10%" align="center" background="images/titlebg.jpg">管理操作</td>
          </tr>
		<?
	list_allsort('w6_sort');
	
	foreach($sortdb AS $key=>$rs){
	
	if($rs['hide'] == "1"){
	$rs['hide']="<font color=\"#0000FF\">隐藏</font>";
	}elseif($rs['hide'] == "0"){
	$rs['hide']="显示";
	}

?>
        <tr class=trA onMouseOver="this.className='trB'" 
        onmouseout="this.className='trA'">
          <td align="center" class="td"><?=$rs['id']?></td>
          <td align="left" class="td" style="color:<? if($rs['color']) echo $rs['color'];?>;">
		  
		  	<?
			if( !empty($rs['list_html']) ){
			echo '<div style="float: left;"><input type="checkbox" name="fiddb[]" value="'.$rs['id'].'" style="border:0px;" checked /></div>';
			}else{
			echo '<div style="margin-top: 4px;margin-left: 4px;margin-right: 3px;float: left;height: 11px;width: 11px;border: 1px solid #A39A89;background-color: #F0EFEC;"></div>';
			}
			?>

            <div style="float: left;"><?=$rs['icon']?>【<?=$rs['name']?>】</div>
			
		  </td>
          <td align="center" class="td" style="color:#0000FF">
          
          <?
          if( !empty($rs['list_html']) ){
		  ?>
          <a href="../../list.php?job=makeHtml&fid=<?=$rs['id']?>&updatapage=all" target="_blank" title="静态化本栏目列表页"><font color="#0000FF">A</font></a><span class="td" style="color:#0000FF">&nbsp;</span><span class="td" style="color:#0000FF">&nbsp;</span>&nbsp;<a href="../../MakeHtmlShow.php?job=makeHtml&fid=<?=$rs['id']?>&updatapage=all" target="_blank" title="静态化本栏目内页"><font color="#0000FF">B</font></a>
          <?
			}
			?>
            		
          </td>
          <td align="center" class="td">
		  <?
		  if($rs['type']=="0"){
		  echo '小栏目';
		  }elseif($rs['type']=="1"){
		  echo '大分类 <a href="sort_modify_batch.php?job=lower&id='.$rs['id'].'" title="批量修改此分类下的小栏目 &#10;&#10;注：只能修改一级深度分类设置"><font color="#0000FF">批</font></a>';
		  }elseif($rs['type']=="2"){
		  echo '单页文章';
		  }elseif($rs['type']=="3"){
		  echo '专题';
		  }
		  ?>
          </td>
          <td align="left" class="td">&nbsp;&nbsp;<?=$rs['list_html'];?></td>
          <td align="center" class="td"><a href="sort_modify.php?id=<?=$rs['id']?>">修改</a><a href="?job=del&amp;id=<?=$rs['id']?>"></a></td>
          </tr>
		<?
		}
		?>
        <tr>
          <td height="30" colspan="6" align="center">[<a href="javascript:CheckAll('all');">全选</a>] [<a href="javascript:CheckAll('');">反选</a>] 
                  <script language="JavaScript">
<!--
function CheckAll(va){
	form=document.formlist
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.name=='maketype'||e.name=='webdbs[TheSameMakeIndexHtml]')continue;
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
//-->
</script>
                  <input type="submit" name="Submit" value="开始生成静态">
            <input name="job" type="hidden" id="job" value="makeHtml" /></td>
        </tr>
      </table>
	  </form></td>
    </tr>
  </table>
</div>
</body>
</html>
