<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
//模板组
$gid=(int)$_GET['gid'];
if(!$gid)
{
	if($ecms_config['sets']['deftempid'])
	{
		$gid=$ecms_config['sets']['deftempid'];
	}
	elseif($public_r['deftempid'])
	{
		$gid=$public_r['deftempid'];
	}
	else
	{
		$gid=1;
	}
}
$tempgroup="";
$tgname="";
$tgsql=$empire->query("select gid,gname,isdefault from {$dbtbpre}enewstempgroup order by gid");
while($tgr=$empire->fetch($tgsql))
{
	$tgselect="";
	if($tgr['gid']==$gid)
	{
		$tgname=$tgr['gname'];
		$tgselect=" selected";
	}
	$tempgroup.="<option value='".$tgr['gid']."'".$tgselect.">".$tgr['gname']."</option>";
}
if(empty($tgname))
{
	printerror("ErrorUrl","");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>菜单</title>
<link href="../../../data/menu/menu.css" rel="stylesheet" type="text/css">
<script src="../../../data/menu/menu.js" type="text/javascript"></script>
<SCRIPT lanuage="JScript">
function tourl(url){
	parent.main.location.href=url;
}
</SCRIPT>
</head>
<body onLoad="initialize()">
<table border='0' cellspacing='0' cellpadding='0' align='center' width='100%'>
  <tr>
    <td>
	<select name="selecttempgroup" onchange="self.location.href='left.php?ecms=template&gid='+this.options[this.selectedIndex].value">
	<?=$tempgroup?>
	</select>
	</td>
  </tr>
  </table>
<!-- 
<table border='0' cellspacing='0' cellpadding='0' align='center' width='100%'>
  <tr>
    <td  class="file2"><a href="#empirecms" onclick="window.open('../../template/EnewsBq.php','','width=600,height=600,scrollbars=yes,resizable=yes');">查看标签语法</a> 
    </td>
  </tr>
  <tr>
    <td  class="file2"><a href="#empirecms" onclick="window.open('../../template/MakeBq.php','','width=600,height=600,scrollbars=yes,resizable=yes');">自动生成标签</a> 
    </td>
  </tr>
  </table>
 -->

<table border='0' cellspacing='0' cellpadding='0'>

<?
if($r[dotemplate])
{
?>
  <tr> 
    <td id="prlisttemp" class="menu1" onclick="chengstate('listtemp')">
		<a >主要模板</a>
	</td>
  </tr>
  <tr id="itemlisttemp" style="display:none"> 
    <td class="list">
		<table border='0' cellspacing='0' cellpadding='0' width=100%>
        <tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=indextemp&gid=<?=$gid?>" target="main" >首页模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/ListListtemp.php?gid=<?=$gid?>" target="main" >管理列表模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/ListNewstemp.php?gid=<?=$gid?>" target="main" >管理内容模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../openpage/AdminPage.php?leftfile=<?=urlencode('../template/dttemppageleft.php')?>&title=<?=urlencode('动态页面模板管理')?>" target="main" >会员动态模板</a>
          </td>
        </tr>
      </table>
	</td>
  </tr>
<?
}
?>


<?
if($r[dotempvar])
{
?>
  <tr> 
    <td id="prtempvar" class="menu1" onclick="chengstate('tempvar')">
		<a >模板辅助</a>
	</td>
  </tr>
  <tr id="itemtempvar" style="display:none"> 
    <td class="list">
		<table border='0' cellspacing='0' cellpadding='0' width=100%>
		<tr> 
          <td class="file">
			<a href="../../template/ListBqtemp.php?gid=<?=$gid?>" target="main" >管理标签模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/ListTempvar.php?gid=<?=$gid?>" target="main" >管理模板变量</a>
          </td>
        </tr>
      </table>
	</td>
  </tr>
<?
}
?>

<?
if($r[dotemplate])
{
?>
  <tr> 
    <td id="prpubtemp" class="menu1" onclick="chengstate('pubtemp')">
		<a >其它模板</a>
	</td>
  </tr>
  <tr id="itempubtemp" style="display:none"> 
    <td class="list">
		<table border='0' cellspacing='0' cellpadding='0' width=100%>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=cptemp&gid=<?=$gid?>" target="main" >控制面板模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=gbooktemp&gid=<?=$gid?>" target="main" >留言板模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=searchformjs&gid=<?=$gid?>" target="main" >横向搜索JS模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=searchformjs1&gid=<?=$gid?>" target="main" >纵向搜索JS模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=downpagetemp&gid=<?=$gid?>" target="main" >最终下载页模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=downsofttemp&gid=<?=$gid?>" target="main" >下载地址模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=listpagetemp&gid=<?=$gid?>" target="main" >列表分页模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/ListPagetemp.php?gid=<?=$gid?>" target="main" >自定义页模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/ListSearchtemp.php?gid=<?=$gid?>" target="main" >管理搜索模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/EditPublicTemp.php?tname=loginjstemp&gid=<?=$gid?>" target="main" >JS调用登陆模板</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/ListPltemp.php?gid=<?=$gid?>" target="main" >评论页模板</a>
          </td>
        </tr>
      </table>
	</td>
  </tr>
<?
}
?>






<?
if($r[dotempgroup])
{
?>
  <tr> 
    <td id="prtempgroup" class="menu1" onclick="chengstate('tempgroup')">
		<a >高级管理</a>
	</td>
  </tr>
  <tr id="itemtempgroup" style="display:none"> 
    <td class="list">
		<table border='0' cellspacing='0' cellpadding='0' width=100%>
		<tr> 
          <td class="file">
			<a href="../../template/TempGroup.php" target="main" >导入/导出模板组</a>
          </td>
        </tr>
		<tr> 
          <td class="file">
			<a href="../../template/RepTemp.php?gid=<?=$gid?>" target="main" >批量替换模板字符</a>
          </td>
        </tr>

<?
if($r[dobq])
{
?>

		<tr> 
          <td class="file">
			<a href="../../template/ListBq.php?gid=<?=$gid?>" target="main" >管理标签</a>
          </td>
        </tr>
<?
}
?>
	    <tr> 
          <td class="file">
			<a href="#empirecms" onclick="window.open('../../template/EnewsBq.php','','width=600,height=600,scrollbars=yes,resizable=yes');">查看标签语法</a>
          </td>
        </tr>
      </table>
	</td>
  </tr>
<?
}
?>


</table>
</body>
</html>