<?php
include("loginkey.php");//引入公共变量文件
include("include/config.php");//引入公共变量文件
include("include/common.php");//引入公共函数文件
?>
<!DOCTYPE html>
<html>
<head>
	<title><?=rinput(websitename)?>-后台管理系统</title>
<meta name="Keywords" content="<?=rinput(websitekey)?>" />
<meta name="Description" content="<?=rinput(websitedes)?>" />  
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	
    <!-- bootstrap -->
    <link href="css/bootstrap/bootstrap.css" rel="stylesheet" />
    <link href="css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
    <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />

    <!-- libraries -->
    <link href="css/lib/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
    <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />

    <!-- global styles -->
    <link rel="stylesheet" type="text/css" href="css/layout.css" />
    <link rel="stylesheet" type="text/css" href="css/elements.css" />
    <link rel="stylesheet" type="text/css" href="css/icons.css" />

    <!-- this page specific styles -->
    <link rel="stylesheet" href="css/compiled/index.css" type="text/css" media="screen" />    

 
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>

    <!-- navbar头部导航 -->
<?php
 include("header.php");
 ?>
    <!-- end navbar头部导航 -->

    <!-- sidebar左侧导航开始 -->
 
<?php
 include("leftmenu.php");
 ?> 
    <!-- end sidebar左侧导航结果 -->


	<!-- main container -->
    <div class="content">

        <div id="pad-wrapper">
      
       

            <div class="row-fluid">
             <div class="span10">
                            <div class="alert alert-info">
                            
                              <div style="font-size:14px;">  <i class="icon-exclamation-sign"></i>
                                数据库备份：<form action="sys_backbase.php" method="post">
                                <p>备份路径：<input class="span5" type="text" name="basebackurl" value="<?php echo dirname(__FILE__);?>/backbase/" />&nbsp;未特殊需要请不要更改备份路径</P>
                                 <p>服务器地址：<input class="span4" type="text" name="mylocalhost" value="" />&nbsp;一般为localhost</P>
                                <p>连接用户名：<input class="span3" type="text" name="myroot" value="" />
                                连接密码：<input class="span3" type="text" name="mypwd" value="" /></P>
                                <p>数据库名：<input class="span3" type="text" name="mydbname" value="" />
                               数据库编码：<input class="span1" type="text" name="mybm" value="utf8" />&nbsp;
                               　<input type="submit" value="开始备份" class="btn-glow primary signup"/></p>
                              
                               </form>
                                   </div>
                                
                            </div>
                              <div class="alert alert-success">
                            
                              <div style="font-size:14px;">  <i class="icon-exclamation-sign"></i>
                                数据库恢复：<font color=red>非技术人员请谨慎操作！</font><form action="sys_restorebase.php" method="post">
                                <p>数据库文件：<input class="span5" type="text" name="mybaseurl" value="./backbase/backup/" />&nbsp;请填写正确的源文件路径</P>
                                 <p>服务器地址：<input class="span4" type="text" name="mylocalhost" value="" />&nbsp;一般为localhost</P>
                                <p>连接用户名：<input class="span3" type="text" name="myroot" value="" />
                                连接密码：<input class="span3" type="text" name="mypwd" value="" /></P>
                                <p>数据库名：<input class="span3" type="text" name="mydbname" value="" />
                               数据库编码：<input class="span1" type="text" name="mybm" value="utf8" />&nbsp;
                               　<input type="submit" value="开始恢复" class="btn-glow primary signup"/></p>
                                </form>
                                <p>默认文件夹下备份文件列表：<br/>
                                 <?php
                                listDirFiles('./backbase/backup/');
                                ?>
                                   </p> </div>
                                
                            </div>
                            
                            
                            
                        </div>
                       
                       
                    </div>
           
                <!-- end table sample -->
           
          </div>
       
    </div>

<div>LIMAOCMS　Copyright @ 2016. All rights reserved.</div>
	<!-- scripts -->
    <script src="js/jquery-latest.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery-ui-1.10.2.custom.min.js"></script>
    <!-- knob -->
    <script src="js/jquery.knob.js"></script>
    <!-- flot charts -->
    <script src="js/jquery.flot.js"></script>
    <script src="js/jquery.flot.stack.js"></script>
    <script src="js/jquery.flot.resize.js"></script>
    <script src="js/theme.js"></script>

    <script type="text/javascript">
        $(function () {

            // jQuery Knobs
            $(".knob").knob();



            // jQuery UI Sliders
            $(".slider-sample1").slider({
                value: 100,
                min: 1,
                max: 500
            });
            $(".slider-sample2").slider({
                range: "min",
                value: 130,
                min: 1,
                max: 500
            });
            $(".slider-sample3").slider({
                range: true,
                min: 0,
                max: 500,
                values: [ 40, 170 ],
            });

            

            // jQuery Flot Chart
            var visits = [[1, 50], [2, 40], [3, 45], [4, 23],[5, 55],[6, 65],[7, 61],[8, 70],[9, 65],[10, 75],[11, 57],[12, 59]];
            var visitors = [[1, 25], [2, 50], [3, 23], [4, 48],[5, 38],[6, 40],[7, 47],[8, 55],[9, 43],[10,50],[11,47],[12, 39]];

            var plot = $.plot($("#statsChart"),
                [ { data: visits, label: "Signups"},
                 { data: visitors, label: "Visits" }], {
                    series: {
                        lines: { show: true,
                                lineWidth: 1,
                                fill: true, 
                                fillColor: { colors: [ { opacity: 0.1 }, { opacity: 0.13 } ] }
                             },
                        points: { show: true, 
                                 lineWidth: 2,
                                 radius: 3
                             },
                        shadowSize: 0,
                        stack: true
                    },
                    grid: { hoverable: true, 
                           clickable: true, 
                           tickColor: "#f9f9f9",
                           borderWidth: 0
                        },
                    legend: {
                            // show: false
                            labelBoxBorderColor: "#fff"
                        },  
                    colors: ["#a7b5c5", "#30a0eb"],
                    xaxis: {
                        ticks: [[1, "JAN"], [2, "FEB"], [3, "MAR"], [4,"APR"], [5,"MAY"], [6,"JUN"], 
                               [7,"JUL"], [8,"AUG"], [9,"SEP"], [10,"OCT"], [11,"NOV"], [12,"DEC"]],
                        font: {
                            size: 12,
                            family: "Open Sans, Arial",
                            variant: "small-caps",
                            color: "#697695"
                        }
                    },
                    yaxis: {
                        ticks:3, 
                        tickDecimals: 0,
                        font: {size:12, color: "#9da3a9"}
                    }
                 });

            function showTooltip(x, y, contents) {
                $('<div id="tooltip">' + contents + '</div>').css( {
                    position: 'absolute',
                    display: 'none',
                    top: y - 30,
                    left: x - 50,
                    color: "#fff",
                    padding: '2px 5px',
                    'border-radius': '6px',
                    'background-color': '#000',
                    opacity: 0.80
                }).appendTo("body").fadeIn(200);
            }

            var previousPoint = null;
            $("#statsChart").bind("plothover", function (event, pos, item) {
                if (item) {
                    if (previousPoint != item.dataIndex) {
                        previousPoint = item.dataIndex;

                        $("#tooltip").remove();
                        var x = item.datapoint[0].toFixed(0),
                            y = item.datapoint[1].toFixed(0);

                        var month = item.series.xaxis.ticks[item.dataIndex].label;

                        showTooltip(item.pageX, item.pageY,
                                    item.series.label + " of " + month + ": " + y);
                    }
                }
                else {
                    $("#tooltip").remove();
                    previousPoint = null;
                }
            });
        });
    </script>

</body>
</html>