查看文件: index1c.php
大小: 7.34 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <? mysql_select_db($database_BE2, $BE2); // address_id county district street $query_Rat2 = "SELECT distinct(district) FROM address where county='台北市' order by district"; $Rat2 = mysql_query($query_Rat2, $BE2) or die(mysql_error()); $row_Rat2 = mysql_fetch_assoc($Rat2); $totalRows_Rat2 = mysql_num_rows($Rat2); $district=$row_Rat2['district']; if (isset($_GET['district'])){$district=$_GET['district']; } mysql_select_db($database_BE2, $BE2); // address_id county district street $query_Rbt2 = "SELECT address_id,street FROM address where county='台北市' AND district='$district' order by street"; $Rbt2 = mysql_query($query_Rbt2, $BE2) or die(mysql_error()); $row_Rbt2 = mysql_fetch_assoc($Rbt2); $totalRows_Rbt2 = mysql_num_rows($Rbt2); $street_id=$row_Rbt2['address_id']; if (isset($_GET['street_id'])){$street_id=$_GET['street_id']; } $side='1'; //L ,R if (isset($_GET['side'])){ $side=$_GET['side']; } $side=($side==1)?1:2; $district=$row_Rat2['district']; /* stmap` ( `t1` `t2` 'add_id', `t3` '路號', `t4` '樓號', `t5` '圖檔', `t6` ' ' uid member id ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='樓層LOGO圖'; */ mysql_select_db($database_BE2, $BE2); // t3 單號,雙號 //$query_Rt2 = sprintf("SELECT a.*,b.company_title FROM stmap as a left join member WHERE t2='%s' AND mod(t3,%s) = 0;", $street_id,$side ); // mem_address street 路街 ,mem_address2 street_number 號 ,mem_address3 street_number3 樓 $query_Rt2 = sprintf("SELECT * FROM member WHERE mem_address='%s' AND mod(mem_address2,%s) = 0;",$street_id,$side ); echo $query_Rt2 ; $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <!DOCTYPE html> <html class="no-js" lang="utf-8"> <head> <meta content="charset=utf-8"> <title>FlexSlider 2</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <!-- Syntax Highlighter --> <!-- Demo CSS --> <link rel="stylesheet" href="/flexslider_css/css/demo.css" type="text/css" media="screen" /> <link rel="stylesheet" href="/flexslider_css/css/flexslider.css" type="text/css" media="screen" /> <!-- Modernizr --> <script src="/flexslider_css/js/modernizr.js"></script> <style> .my1 { position:relative; width: 130px; // background: green; top: -65px; right: 10px; left: 10px; } .bt{ // nn "position:absolute;border:2px green solid;bottom:0px;" //position:relative; //bottom: 0px; } </style> <meta charset="utf-8"> </head> <body class="loading"> <br> <br> <br><br> <div class="row"></div> <select name="city" id="city" class="form-control placeholder col-xs-12 col-sm-4 mb-4"> <option value="台北市">台北市</option> </select> <select name="district" id="district" class="form-control placeholder col-xs-12 col-sm-4 mb-4" onchange="Selectstreet();"> <? do { ?> <option value="<?= $row_Rat2['district']; ?>"><?= $row_Rat2['district']; ?></option> <?php } while ($row_Rat2 = mysql_fetch_assoc($Rat2)); ?> </select> <select name="street" id="street" class="form-control placeholder col-xs-12 col-sm-4 mb-4"> <? do { ?> <option value="<?= $row_Rbt2['address_id']; ?>"><?= $row_Rbt2['street']; ?></option> <?php } while ($row_Rbt2 = mysql_fetch_assoc($Rbt2)); ?> </select> <select name="side" id="side" class="form-control placeholder col-xs-12 col-sm-4 mb-4"> <option value="left">單號惻 </option> <option value="right">雙號惻 </option> </select> <table style="width:100%;top:20px"> <tr> <td style="background-color:#FFF"><div class="flexslider carousel"> <ul class="slides"> <? $numb=101; $max=3; for ( $i=1 ; $i<27 ; $i++ ) { ?> <li><div class="bt"> <? if($i==3 ||$i==9 || $i==11 || $i==17){ echo '<img src="/number_jpg/3f.jpg" /><img src="/number_jpg/2f.jpg" />';} else if($i==2 ||$i==5 ||$i==17){ echo '<img src="/number_jpg/0.jpg" /><img src="/number_jpg/2f.jpg" />';} else { echo '<img src="/number_jpg/0.jpg" /><img src="/number_jpg/0.jpg" />';} ?> <img src="/number_jpg/1f.jpg" width="108" height="100" /><img src="/number_jpg/<?= $numb?>.jpg" width="108" height="10" /> </div></li> <? $numb+=2 ; } ?> </ul> </div></td> </tr> </table> <br><br> <div class="clearfix hidden-xs"></div> <? /* <table width="100%"> <tr> <td ><div class="my1"> <img src="img/100/a1.jpg" /></div></td> <td> <div class="flexslider carousel"> <ul class="slides"> <? $maxhigh=5; for ( $i=1 ; $i<27 ; $i++ ) { ?> <li><div style="border:2px red solid;height:<?= ($maxhigh*50)+30 ?>px; "> <?= rand(1,10)<5?'<img class="bt" src="/number_jpg/2f.jpg"/>':''; ?> <img style="bottom:0px;" src="/number_jpg/1f.jpg" /><img style="position:absolute;bottom:0px;" src="/number_jpg/<?= $i?>.jpg" /></div></li> <? } ?> </ul> </div> </td> </tr> </table> */ ?> <!-- jQuery --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script> <!-- FlexSlider --> <script defer src="/flexslider_css/js/jquery.flexslider.js"></script> <script type="text/javascript"> $(window).load(function(){ $('.flexslider').flexslider({ animation: "slide", animationLoop: true, controlNav: true, itemWidth: 108, itemMargin: 0, pausePlay: false, start: function(slider){ $('body').removeClass('loading'); } }); }); function Selectstreet() { var county= $("#city").val(); // $(city).find(':selected')[0].id; var district = $("#district").val(); //.find(':selected')[0].id; $.ajax({ type: 'POST', url: 'SelectcityApi.php', data: { 'county': county,'district':district }, success: function (data) { // the next thing you want to do var $street = $('#street'); $street.empty(); $("select#street").html(data); // for (var i = 0; i < data.length; i++) { // $street.append('<option value=' + data[i].street + '>' + data[i].street + '</option>'); //} } }); } </script> <!-- Syntax Highlighter --> <!-- Optional FlexSlider Additions --> <script src="/flexslider_css/js/jquery.easing.js"></script> <script src="/flexslider_css/js/jquery.mousewheel.js"></script> <script defer src="/flexslider_css/js/demo.js"></script> </body> </html> <?php mysql_free_result($Rat2); mysql_free_result($Rbt2); mysql_free_result($Rt2); ?>
保存
取消
返回文件列表