<?php if (!defined('ROOT')){ echo 'Deny ...'; exit; } extract($data); ?>
<!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>TOP</title>
        <link href="<?php echo $base_url; ?>static/css/style.css" rel="stylesheet" type="text/css" />
        <script language="JavaScript" src="<?php echo $base_url; ?>static/js/jquery.js"></script>
        <script type="text/javascript">
            $(function () {
                //顶部导航切换
                $(".nav li a").click(function () {
                    $(".nav li a.selected").removeClass("selected")
                    $(this).addClass("selected");
                });
            });
        </script>
    </head>
    <body style="background:url(<?php echo $base_url; ?>static/images/topbg.gif) repeat-x;">
        <div class="topleft">
            <a href="<?php echo $base->get_url(array('c' => 'frame')); ?>" target="_top"><img src="<?php echo $base_url; ?>static/images/logo.png" title="系统首页" /></a>
        </div>        
        <ul class="nav">            
            <?php
            if ($channels){
                foreach ($channels as $c){
                    $icon = ROOT.$c['path'].'/icon.png';
                    $path_url = $host.$c['path'].'/';
                    $icon_url = file_exists($icon) ? $path_url.'icon.png' :  $base_url.'static/images/icon0'.rand(1, 5).'.png';
            ?>
            <li><a href="<?php echo $path_url.'index.php?c=frame&m=left&'.$hashString;?>" class="<?php if ($selected == $c['id']){?>selected<?php }?>" target="leftFrame"><img src="<?php echo $icon_url; ?>" /><h2><?php echo $c['name'];?></h2></a></li>
            <?php }}?>
        </ul>            
        <div class="topright">    
            <ul>
                <li><span style="margin-top: -1px;"><img src="<?php echo $base_url;?>static/images/help.png" title="帮助" class="helpimg"/></span><a href="http://JsonClouds.Com/help/" target="_top">帮助</a></li>
                <li><a href="http://JsonClouds.Com/help/" target="_top">关于</a></li>
                <li><a href="<?php echo $base->get_model_url(array('c' => 'main', 'm' => 'loginout')); ?>" target="_top">退出</a></li>
            </ul>     
            <div class="user">
                <span><?php echo $admin['username'];?></span>
                <i>消息</i>
                <b>5</b>
            </div>        
        </div>
    </body>
</html>
