<!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" />
<meta name="keywords" content="<?php echo $this->keywords;?>" />
<meta name="description" content="<?php echo $this->desctiption;?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title><?php echo $this->title;?></title>
<script type="text/javascript" src="http://a.14000.com/assets/766ca666/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://a.14000.com/css/common.css" />
</head>
<body>

<?php 
$baseUrl = setting('basehost') . setting('path');
$webUrl = $baseUrl . 'web/';
?>

<script type="text/javascript">
$(function() {
	$('#logout').click(function(){
		$.ajax({
			type: 'GET',
			url: '<?php echo $webUrl;?>logout.html',
			success:function(msg) {
				json = eval('(' + msg + ')');
				$('#suser').html(json);
			}
		});
	});

	//设置首页
    $('#homepage').click(function() {
        if ($.browser.msie) {
            this.style.behavior = 'url(#default#homepage)';
            this.setHomePage('<?php echo $webUrl;?>');
        } else if ($.browser.mozilla) {
            try {
                netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
                var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                prefs.setCharPref('browser.startup.homepage', '<?php echo $webUrl;?>');
            } catch(e) {
                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");
            }
        }
    });
    //收藏本站
    $('#homemark').click(function() {
        var title = "<?php echo setting('webname');?>";
        var url = "<?php echo $webUrl;?>";
        // FF
        if(window.sidebar != null)
        {
            try
            {
                if(window.sidebar.addPanel != null)
                {
                    window.sidebar.addPanel(title, url, "");
                    return;
                }
            }
            catch(e)
            {
            }

            alert("请按Ctrl+D键收藏 !");
            return;
        }

        // IE
        if(window.external != null)
        {
            try
            {
                window.external.addFavorite(url, title);
                return;
            }
            catch(e){
            }

            try
            {
                window.external.addToFavoritesBar(url, title, "slice");
                return;
            }
            catch(e){
            }
        }

        alert("您的浏览器不支持此操作, 请使用浏览器的收藏夹进行添加 !");
        return;
    });
});
</script>
<div id="container">
<!-- 头部 -->
<div id="header">
	<div id="user"><a href="javascript:void(0);" id="homepage">设为首页</a> <a href="javascript:void(0);" id="homemark">收藏本站</a> <a target="_blank" href="<?php echo $webUrl;?>wap.html">手机访问</a> <span id="suser"><?php if ($this->getOwner()->uid()):?><?php $iorange = $this->getOwner()->iorange();?><?php echo $this->getOwner()->link($this->getOwner()->userName(), $webUrl.'user.html');?> <?php echo $this->getOwner()->link('书架',$webUrl.'user/progress.html');?> 站内信(<?php echo $iorange['user']['newpm'];?>) <?php echo $this->getOwner()->link('退出','#',array('id'=>'logout'));?><?php else:?><a href="<?php echo $webUrl;?>login.html">登陆</a> 注册<?php endif;?></span></div>
</div>

<!-- end -->
<div class="clear"></div><div id="logo"><?php echo printImage('logo_web.gif');?></div>
<!-- end -->
<div class="clear"></div>

<!-- 导航条 -->
<div class="site-nav">
	<div class="site-nav-items">
		<ul>
			<li><a href="<?php echo $webUrl;?>">首页</a></li>
			<li><a href="<?php echo $webUrl;?>user.html">我的<?php echo setting('webname');?></a></li>

			<li><a href="#">我的小组</a></li>
			<li><a href="<?php echo $this->getOwner()->url('system',array('s'=>'bbs'));?>">讨论区</a></li>
        </ul>
	</div>
</div>
<!-- end  -->

<div class="clear"></div>
<div class="brbr"></div>