<?php
require_once('inc/common.inc.php');
include_once('config/left.'.$kuWebsiteEditVersionLanguage.'.inc.php');
?>
<!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=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="<?php echo $adminCssPath; ?>admin.css">
<script src="<?php echo $adminJsPath; ?>jquery.js"></script>
<script language="javascript">
function fnOnMenuClick(menu)
{
    $("#menus > dl > dt").removeClass("current");
    $("#menus > dl > dd").css("display","none");
    $(menu).parent().addClass("current");
  $(menu).parent().next("dd").css("display","block");
}

</script>
</head>
<body style="overflow:hidden">
  <div id="sidebar">
    <div id="menus">
      <dl>
<?php if('content' == $tab)
{ 
  $strSql = "select * from {$configTableHead}menu where menutype=1 and fatherid = 0 and lang='{$kuWebsiteEditVersionLanguage}' order  by sortnum";
  $result = $dbInstance->query($strSql);
  while($row = $dbInstance->fetchArray($result))
  {
    if(1 == $row[menumodule]){$menu1[]=$row;}
    else if(2 == $row[menumodule]){$menu2[]=$row;}
    else if(3 == $row[menumodule]){$menu3[]=$row;}
    else if(4 == $row[menumodule]){$menu4[]=$row;}
    else if(5 == $row[menumodule]){$menu5[]=$row;}
    else if(6 == $row[menumodule]){$menu6[]=$row;}
    else if(7 == $row[menumodule]){$menu7[]=$row;}
    else if(8 == $row[menumodule]){$menu8[]=$row;}
  }
  
  foreach($menu1 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=about&menu=about_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></dt>
<?php
  }

  foreach($menu2 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=news&menu=news_add&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixAdd.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=news&menu=news_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
        </dd>
<?php 
  }
  foreach($menu3 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=product&menu=product_add&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixAdd.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=product&menu=product_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
        </dd>
<?php 
  }
  foreach($menu4 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=img&menu=img_add&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixAdd.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=img&path=img&menu=img_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
        </dd>
<?php 
  }
  foreach($menu5 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=download&menu=download_add&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixAdd.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=download&menu=download_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
        </dd>
<?php 
  }
  foreach($menu6 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=job&menu=job_add&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixAdd.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=job&menu=job_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=job&menu=resume_action"><?php echo $leftJobResumeManage; ?></a></p>
        </dd>
<?php 
  }
  foreach($menu7 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=message&menu=message&menuid=<?php echo $value[id]; ?>"><?php echo $value[menutitle].$leftMenuPrefixConfig; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=message&menu=message_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
        </dd>
<?php 
  }
  foreach($menu8 as $key=>$value)
  {
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $value[menutitle]; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=faq&menu=faq_add&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixAdd.$value[menutitle]; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=faq&menu=faq_action&menuid=<?php echo $value[id]; ?>"><?php echo $leftMenuPrefixManagement.$value[menutitle]; ?></a></p>
        </dd>
<?php 
  }
?>
        <dt><a onclick="fnOnMenuClick(this);" href="javascript:;"><?php echo $leftOnlineFeedback; ?></a></dt>
        <dd style="display:none" class="submenu">
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=plus&menu=feedback"><?php echo $leftOnlineFeedback.$leftMenuPrefixConfig; ?></a></p>
            <p><a target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=plus&menu=feedback_action"><?php echo $leftMenuPrefixManagement.$leftOnlineFeedback; ?></a></p>
        </dd>
<?php 
}
else if('block' == $tab){ ?>
    <?php
      for($i = 1; $i <= $kuWebsiteIndexNumber; $i++)
        {//loop the content blcks
             $temp = 'kuWebsiteIndexPageTitle'.$i;
             $kuWebsiteIndexPageTitle = $$temp;
             $sqlId = $i;
             $n++;
    ?>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=block_add&id=<?php echo $sqlId; ?>"><?php echo $kuWebsiteIndexPageTitle; ?></a></dt>
    <?php 
        }
    ?>  
<?php }else if('template' == $tab){ ?>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=skin"><?php echo $leftSystemFrontendSkin; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=skin_manage"><?php echo $labelSystemSkinManageTemplate; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=skin_add"><?php echo $leftSystemTemplateAdd; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=indexconfig"><?php echo $leftSystemIndexConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=server"><?php echo $leftSystemMessageSupport; ?></a></dt>
<?php }else if('advanced' == $tab){ ?>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=friendlink&menu=friendlink_add"><?php echo $leftMenuPrefixAdd.$leftFriendLinkTitle; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=friendlink&menu=friendlink_action"><?php echo $leftMenuPrefixManagement.$leftFriendLinkTitle; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=img"><?php echo $leftSystemImageConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=mail"><?php echo $leftSystemMailConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=parameter&module=3"><?php echo $leftSystemProductParam; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=parameter&module=4"><?php echo $leftSystemImageParam; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=parameter&module=5"><?php echo $leftSystemDownloadParam; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=parameter&module=11"><?php echo $leftSystemResumeParam; ?></a></dt>
<?php }else if('administrator' == $tab){ ?>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=database&menu=backup"><?php echo $leftAdminDatabaseBackup; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=database&menu=restore"><?php echo $leftAdminDatabaseRestore; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=zipwebsite"><?php echo $leftAdminWebsiteBackup; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=admin&menu=admin_action"><?php echo $leftAdminManagement; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=login&menu=edit_password"><?php echo $leftAdminEditPassword; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="_parent" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=login&menu=login&action=relogin"><?php echo $leftAdminChangeUser; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="_parent" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=login&menu=login_action&action=logout"><?php echo $leftAdminLogoutSystem; ?></a></dt>
<?php }else{ ?>
        <dt class="current"><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=basic"><?php echo $leftSystemBaseInfo; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=menu&menu=menu"><?php echo $leftSystemMenuManagemnt; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=flash"><?php echo $leftSystemFlashConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=flashindex"><?php echo $leftSystemIndexBanner; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=foot"><?php echo $leftSystemFooterConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=block"><?php echo $leftSystemBlockConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=friendlink&menu=friendlink_action"><?php echo $leftMenuPrefixManagement.$leftFriendLinkTitle; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=system&menu=seo"><?php echo $leftSystemSEOConfig; ?></a></dt>
        <dt><a onclick="fnOnMenuClick(this);" target="main" href="index.php?lang=<?php echo $kuWebsiteEditVersionLanguage; ?>&path=html&menu=html"><?php echo $leftHTMLSetting; ?></a></dt>
        <dt><a target="_blank" href="http://docs.kuwebs.com/user/"><?php echo $leftOnlineHelpBook; ?></a></dt>
        <dt><a target="_blank" href="http://bbs.kuwebs.com/"><?php echo $leftOnlineSupportor; ?></a></dt>
<?php } ?>
      </dl>
    </dd>
    <div id="copyright">
    <p>Powered by <a href="http://www.kuwebs.com" target="_blank">kuwebs.com</a></p>
    <p>&copy; 2011, <a href="http://www.kuwebs.com/" target="_blank">Kuwebs Inc.</a></p>
  </div>
  </div>
</body>
</html>
