    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>WMS</title>
        <link rel="stylesheet" type="text/css" href="static/easyui1552/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="static/easyui1552/themes/icon.css">
        <script type="text/javascript" src="static/easyui1552/jquery.min.js"></script>
        <script type="text/javascript" src="static/easyui1552/jquery.easyui.min.js"></script>
        <script type="text/javascript" src="static/easyui1552/locale/easyui-lang-zh_CN.js"></script>
        <script type="text/javascript" src="static/js/datagrid-groupview.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
        	$('#tabs').tabs({
        		fit : true,
        		border : false,
        	});

     	   var nav = new Array();  
        	$.each($("#nav ul"),function(k,j){
        		if($(j).attr('id')=='In' ||$(j).attr('id')=='Out'||$(j).attr('id')=='Manage'||$(j).attr('id')=='Kpi'||$(j).attr('id')=='Base' ){
      			  nav.push($(j));  
                }
    		});
//         	alert(nav.length);

        	$.each(nav,function(k,j){
// 				alert($(j).attr('id'));
        		$(j).tree({
            		url : '<?php echo $url.'html/nav'?>/'+$(this).attr("id"),
            		lines : true,   		
            		onLoadSuccess : function (node, data) {
//                 		console.log(data);
            			return true;
            		},
            		onLoadError:function(event,request, settings){
            			$.messager.alert('提示','导航栏获取失败','info');
               		},
            		onClick : function (node) {
//                 		console.log(node);
            			if (node.url) {
            				if ($('#tabs').tabs('exists', node.text)) {
            					$('#tabs').tabs('select', node.text);
            				} else {
            					$('#tabs').tabs('add', {
            						title : node.text,
            						closable : true,
            						href : '<?php echo $url?>' + node.url,
            					});
            				}
            			}
            		}           		
            	});
      		});//each end
        	
        });
    	
    	function sb(){
    		var islogin=$("#islogin").switchbutton("options").checked;
    		if(!islogin){
    			$.messager.alert('提示','已退出登录','info');
  			  	location.href = '<?php echo $url?>login/out';          
            }
        }
        </script>
    </head>
    <body>


    <div id="cc" class="easyui-layout" style="width:100%px;" data-options="fit:true">
        <div data-options="region:'north'" style="height:50px;background:#2d3e50;border:1px;">
            <div style="width:50px; position:relative;left:95%;top:10px;" onclick="return sb();">
                <input  id="islogin" class="easyui-switchbutton" checked>
            </div> 
        </div>
        <div data-options="region:'south',split:true" style="height:30px;"></div>
        <div data-options="region:'west',split:true,collapsed:true,
                hideExpandTool: true,
                expandMode: null,
                hideCollapsedContent: false,
                collapsedSize: 68,
                collapsedContent: function(){
                    return $('#titlebar');
                }
                " title="导航栏" style="width:200px;">             
            <div id="nav" class="easyui-accordion" style="width:100%;height:400px;border:0;">

                    <?php foreach($_SESSION['power'] as $_key=>$_value){?>
                        <div title="<?php echo $_value->nav_code?>" data-options="iconCls:'icon-ok'" style="padding:10px;">                 
                        	<ul id="<?php echo $_value->nav_code?>"></ul>                               
                        </div>
                    <?php }?>

            </div>
        </div>
        <div data-options="region:'center'">
            <div id="tabs">
                <div title="起始页"  style="padding:0 10px;display:block;" data-options="closable:true">
                			<p>欢迎来到wms后台管理系统！</p>
                			<p>系统架构：mysql，CI，jqueryUI</p>
                			<p>管理员账号密码：admin</p>
                			<p>数据库配置路径：application/config/database.php配置数据库，默认库名wms</p>
                			<p>系统配置首页：application/config/config.php 文件中$config['base_url'] = 'http://localhost/wms/'，请按照自己环境定义</p>
                			<p>sqlgun@qq.com 联系！</p>
                			<p>二次开发，有偿订制服务！</p>
                			<p>当前免费版已实现出入库及先进先出，库存分配功能，能正常使用！</p>
                </div>
            </div>
        </div>
    </div>
    <div id="titlebar" style="padding:2px;">
        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'layout-button-right'" onclick="$('#cc').layout('expand','west')"></a>
        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-picture',size:'large',iconAlign:'top'">Picture</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-shapes',size:'large',iconAlign:'top'">Shapes</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-smartart',size:'large',iconAlign:'top'">SmartArt</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-chart',size:'large',iconAlign:'top'">Chart</a>
    </div>
     
    </body>
    </html>