<?php
include("loginkey.php");//引入公共变量文件
include("include/config.php");//引入公共变量文件
include("include/common.php");//引入公共函数文件
include("include/page.class.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" />    

      <link href="css/pagecss.css" type="text/css" rel="stylesheet" />
    <!--[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 style="margin:10px auto;font-size:18px;">商品列表
 
 <script language="javascript" type="text/javascript">
function cbao(s)
{
	if(s!=0){
	location.href = "shop_list_select.php?nm_type="+s;
 }
}
</script> 
                    
                     <select id="mySelect" style="height:35px;" onchange="cbao(this.options[this.options.selectedIndex].value)">
                 <?php
                                       $nmsql="select * from limao_nm where lm_nmid=0";
                                       $rs = limaors($nmsql);
                                       $row = array();
                                       while($row=mysql_fetch_object($rs)){
                                       ?>
                         <option value="<?=rinput($row->lm_nmid);?>" />☆☆☆☆<?=rinput($row->lm_nmname);?>☆☆☆☆
                                       
                                                                             
                                        <?php
                                       $rjnmsql="select * from limao_nm where lm_nmid=".intval($row->lm_id)." and lm_error=2";
                                       $rjrs = limaors($rjnmsql);
                                       $rjrow = array();
                                       while($rjrow=mysql_fetch_object($rjrs)){
                                       ?>
                       <option value="<?=rinput($rjrow->lm_id);?>" />┈┈┄<?=rinput($rjrow->lm_nmname);?>┈┈┈
                
                    <?
                              }
                            }
                                ?>
                </select>
                     
                     </div>                   
                                      

                    <div class="row-fluid">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th class="span3">
                                        
                                        商品主题
                                    </th>
                                    <th class="span2">
                                        <span class="line"></span>可售数量*单价
                                    </th>
                                    <th class="span2">
                                        <span class="line"></span>发布时间
                                    </th>
                                    <th class="span2">
                                        <span class="line"></span>状态
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                              <?php
                              $typestring = "&nmtype=all";
                              $asql ="select * from limao_shop order by lm_id desc";
                              $PageSize = 10;
                              $mypage = new fpage($asql,$PageSize,$typestring);
                              $result = $mypage->showCurPage();
                                 	while($adata = mysql_fetch_object($result)){
                              ?>
                                
                                <tr class="first">
                                    <td>
                                        <img src="<?=rinput(webupimgurl).rinput($adata->lm_img);?>" width="50px" height="50px"/> &nbsp;  <a href="#" target="_blank"><?=rinput($adata->lm_title);?></a>
                                          
                                    </td>
                                    <td class="description">
                                        <?=rinput($adata->lm_numeric);?> <?=rinput($adata->lm_dw);?>* <?=rinput($adata->lm_dj);?>
                                    </td>
                                     <td class="description">
                                       <?=rinput($adata->lm_date);?>
                                    </td>
                                    <td>                                      
                                        <a href="shop_modif.php?id=<?=rinput($adata->lm_id);?>" class="btn-flat primary">修改</a>  &nbsp;
                                       <a href="shop_del_ok.php?lm_id=<?=rinput($adata->lm_id);?>" class="btn-flat danger">删除</a>
                                      
                                    </td>
                                </tr>
                               
                                <?
                              
                            }
                                ?>
                                                            
                                                              
                               
                               
                            </tbody>
                        </table>
                        
                          <div class="page1"><?=$mypage->getfoot();?></div>
                        
                    </div>
               
                <!-- end products table -->
                     
                       
                    </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>