<?php 


/** 
***************************************************
*欢迎使用免费版SiteTeam企业建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.SiteTeam.cn 
***************************************************
**/



 if(!defined('IN_SITETEAM')) {exit('Access Denied');}?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SiteTeam Administrator's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">

<link rel="stylesheet" href="admin/images/admincp.css" type="text/css" media="all" />
<script src="admin/js/common.js" type="text/javascript"></script>
</head>
<body style="margin: 0px" scroll="no">
<div id="append_parent"></div>
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
  <tr>
    <td colspan="2" height="90"><div class="mainhd">
        <div class="logo">SiteTeam Administrator's Control Panel</div>
        <div class="uinfo">
          <p>您好, <em>
            <?=$admin?>
            </em> [ <a href="admin.php?action=logout" target="_top">退出</a> ]</p>
          <p class="btnlink"><?php if (isset($site_index_url) && !empty($site_index_url)) {?><a href="<?=("http://{$site_url}" . SITE_PATH . "/?{$site_index_url}.html")?>" target="_blank">网站首页</a><?php }else{?><a href="http://<?=$site_url?><?=SITE_PATH?>" target="_blank">网站首页</a><?php }?></p>
        </div>
        <div class="navbg"></div>
        <div class="nav">
          <ul id="topmenu">
            <li><em><a href="#" id="header_index" onClick="toggleMenu('index', 'http://www.chenhucheng.com/soft/welcome.php');">开始</a></em></li>
			<li><em><a href="#" id="header_article" onClick="toggleMenu('article', 'admin.php?action=article&operation=list');">文章管理</a></em></li>
            <?php if(empty($setting['sys_product_close']) || $setting['sys_product_close'] != '4'){?><li><em><a href="#" id="header_product" onClick="toggleMenu('product', 'admin.php?action=product&operation=list');"><?=$site_product_name?></a></em></li><?php }?>
			<li><em><a href="#" id="header_keywords" onClick="toggleMenu('keywords', 'admin.php?action=keywords&operation=setting');">关键词工具</a></em></li>
          </ul>
          <div class="currentloca">
            <p id="admincpnav"></p>
          </div>
          <div class="navbd"></div>
        </div>
      </div></td>
  </tr>
  <tr>
    <td valign="top" width="160" class="menutd">
		<div id="leftmenu" class="menu">
        <ul id="menu_index" style="display: none">
          <li><a href="admin.php?action=setting" target="main">基本设置</a></li>
		  <?php if(isset($site_index_url) && !empty($setting['site_index_url'])){?>
		  <li><a href="admin.php?action=start" target="main">网站封面</a></li>
		  <?php }?>
          <li><a href="admin.php?action=first" target="main">首页设置</a></li>
		  
		  <li><a href="admin.php?action=article&operation=setting" target="main">文章系统设置</a></li>
		  <li><a href="admin.php?action=article&operation=category" target="main">文章分类设置</a></li>
		  
		  <?php if(empty($setting['sys_product_close']) || $setting['sys_product_close'] != '4'){?>
		  <li><a href="admin.php?action=product&operation=setting" target="main"><?=$site_product_name?>设置</a></li>
		  <li><a href="admin.php?action=product&operation=category" target="main"><?=$site_product_name?>分类</a></li>
		  <?php }?>
		  <li><a href="admin.php?action=attachments&operation=list" target="main">附件管理</a></li>
		  <li><a href="./update.php" target="main">网站升级</a></li>
        </ul>

        <ul id="menu_article" style="display: none">
          <?php $category = get_article_category($site_url); $sortid = array(); foreach ($category as $k=>$v) { $sortid[$k] = array_key_exists("sortid", $v) ? $v['sortid'] : 1; } array_multisort($sortid, SORT_NUMERIC, SORT_DESC, $category); ?>
		  <?php if (is_array($category) && count($category) > 0) foreach ($category as $k => $v) {?>
		  <li><a href="admin.php?action=article&operation=list&category=<?=$k?>" target="main"><?php (strlen($v['name'])>18) ? print(str_sub($v['name'], 14)) : print($v['name']); ?></a></li>
		  <?php }?>
        </ul>
		
        <ul id="menu_product" style="display: none">
          <?php $category = get_product_category($site_url); $sortid = array(); foreach ($category as $k=>$v) { $sortid[$k] = array_key_exists("sortid", $v) ? $v['sortid'] : 1; } array_multisort($sortid, SORT_NUMERIC, SORT_DESC, $category); ?>
		  <?php if (is_array($category) && count($category) > 0) foreach ($category as $k => $v) {?>
		  <li><a href="admin.php?action=product&operation=list&category=<?=$k?>" target="main"><?php (strlen($v['name'])>18) ? print(str_sub($v['name'], 14)) : print($v['name']); ?></a></li>
		  <?php }?>
        </ul>
		
		<ul id="menu_keywords" style="display: none">
		  <li><a href="admin.php?action=keywords&operation=setting"  target="main"><span>关键词系统设置</span></a></li>

		  <li><a href="admin.php?action=keywords&operation=internal_list"  target="main"><span>内链关键词列表</span></a></li>
		  <li><a href="admin.php?action=keywords&operation=interna_update" target="main"><span>更新全站内联索引</span></a></li>
		  <li><a href="admin.php?action=keywords&operation=interna_delete" target="main"><span>删除全站内链索引</span></a></li>
		  
		  <li><a href="admin.php?action=keywords&operation=external_list"  target="main"><span>外链关键词列表</span></a></li>
		  <li><a href="admin.php?action=keywords&operation=external_update" target="main"><span>更新全站外联索引</span></a></li>
		  <li><a href="admin.php?action=keywords&operation=external_delete" target="main"><span>删除全站外链索引</span></a></li>
        </ul>
      </div></td>
    <td valign="top" width="100%"class="mask"><iframe src="#" name="main" width="100%" height="100%" frameborder="0"scrolling="yes" style="overflow: visible;"></iframe></td>
  </tr>
</table>
<div class="copyright">

</div>
<div id="cpmap_menu" class="custom" style="display:none">
  <div class="cside">
    <h3><span class="ctitle1">常用操作</span><a href="#" onClick="toggleMenu('misc', 'misc&operation=custommenu');hideMenu();" class="cadmin">管理</a></h3>
    <ul class="cslist" id="custommenu">
    </ul>
  </div>
  <div class="cmain" id="cmain"></div>
  <div class="cfixbd"></div>
</div>
<script type="text/JavaScript">
	var headers = new Array('index', 'article', 'product', 'keywords');
	function toggleMenu(key, url) {
		for(var k in headers) {
			if($('menu_' + headers[k])) {
				$('menu_' + headers[k]).style.display = headers[k] == key ? '' : 'none';
			}
		}
		var lis = $('topmenu').getElementsByTagName('li');
		for(var i = 0; i < lis.length; i++) {
			if(lis[i].className == 'navon') lis[i].className = '';
		}
		$('header_' + key).parentNode.parentNode.className = 'navon';
		if(url) {
			parent.main.location = url;
			var hrefs = $('menu_' + key).getElementsByTagName('a');
			for(var j = 0; j < hrefs.length; j++) {
				hrefs[j].className = hrefs[j].href.substr(hrefs[j].href.indexOf('admincp.php?action=') + 19) == url ? 'tabon' : (hrefs[j].className == 'tabon' ? '' : hrefs[j].className);
			}
		}
		return false;
	}

	toggleMenu('index', 'admin.php?action=setting');
</script>



</body>
</html>
