查看文件: index1.php
大小: 8.66 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <? $county='台北市'; if (isset($_GET['county'])){$county=$_GET['county']; } $district='一江街'; mysql_select_db($database_BE2, $BE2); // address_id county district street $query_Rat2 = sprintf("SELECT distinct(district) FROM address where county='%s' order by district",$county); $Rat2 = mysql_query($query_Rat2, $BE2) or die(mysql_error()); $row_Rat2 = mysql_fetch_assoc($Rat2); $totalRows_Rat2 = mysql_num_rows($Rat2); if (isset($_GET['district'])){$district=$_GET['district']; } mysql_select_db($database_BE2, $BE2); // address_id county district street $query_Rbt2 = sprintf("SELECT address_id,street FROM address where county='%s' AND district='%s' order by street",$county,$district); $Rbt2 = mysql_query($query_Rbt2, $BE2) or die(mysql_error()); $row_Rbt2 = mysql_fetch_assoc($Rbt2); $totalRows_Rbt2 = mysql_num_rows($Rbt2); $street=$row_Rbt2['street']; if (isset($_GET['street'])){$street=$_GET['street']; $street_name=$row_Rbt2['street']; } mysql_select_db($database_BE2, $BE2); // address_id county district street $query_Rgt2 = sprintf("SELECT address_id FROM address where county='%s' AND district='%s' AND street='%s' limit 1",$county,$district,$street); $Rgt2 = mysql_query($query_Rgt2, $BE2) or die(mysql_error()); $row_Rgt2 = mysql_fetch_assoc($Rgt2); $select_stid=$row_Rgt2['address_id']; mysql_free_result($Rgt2); $side=0; //L ,R if (isset($_GET['side'])){ $side=$_GET['side']=='單號側'?1:0; } //$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 mem_logo<>'' AND mod(mem_address2,2) = %s order by mem_address2 ASC",$select_stid,$side ); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); echo $query_Rt2; ?> <!DOCTYPE html> <html > <head> <meta > <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; } .thinkcss{position:relative;width:108px;height:500px; } .diva{position:absolute;width:50px;height:100px;bottom:0;left:120px;background:#00F} .divb{position:absolute;width:50px;height:150px;bottom:0;left:180px;background:#00F} .bt8{position:absolute;bottom :464px;} .bt7{position:absolute;bottom :314px;} .bt6{position:absolute;bottom :264px;} .bt5{position:absolute;bottom :214px;} .bt4{position:absolute;bottom :182px;} .bt3{position:absolute;bottom :132px;} .bt2{position:absolute;bottom :82px;} .bt1{position:absolute;bottom :32px } .bt0{position:absolute;bottom :0px; right:0px;} </style> <meta charset="utf-8"> </head> <body class="loading"> <br> <br> <br><br> <div class="row"></div> <form class="form-horizontal" action="" method="GET"> <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']; ?>" <?= ($district==$row_Rat2['district'])?'selected="selected"':'';?>><?= $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" onChange="set_street_id"> <? do { ?> <option value="<?= $row_Rbt2['street']; ?>" <?= ($street==$row_Rbt2['street'])?'selected="selected"':'';?> ><?= $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="單號側" <?= ($side==1)?'selected="selected"':'';?> >單號側</option> <option value="雙號側" <?= ($side==0)?'selected="selected"':'';?>>雙號側</option> </select> <button type="submit" class="btn btn-lg btn-primary col-xs-12">送出</button> </form> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"><h3><?= $county."-".$district."-".$street."-" ?><?= ($side==1)?"單號側":"雙號側" ?></h3></div> <table style="width:100%;top:20px"> <tr> <td style="background-color:#FFF"><div class="flexslider carousel"> <ul class="slides"> <? // $numb=101; // $max=3; $numb=$row_Rt2['mem_address2']; while($row_Rt2 = mysql_fetch_assoc($Rt2)) { ?> <li><div class="thinkcss"> <? $numb=$row_Rt2['mem_address2']; ?> <img src="/logo_img/st_<?= sprintf("%07d",$row_Rt2['mem_auto']) ?>.jpg" class="bt1" /><img src="/number_jpg/<?= $numb?>.jpg" class="bt0" /> </div></li> <? } /* for ( $i=1 ; $i<27 ; $i++ ) { ?> <li><div class="thinkcss"> <? if($i==3 ||$i==9 || $i==11 || $i==17){ echo '<img src="/number_jpg/3f.jpg" class="bt3" /><img src="/number_jpg/2f.jpg" class="bt2" />';} else if($i==2 ||$i==5 ||$i==17){ echo '<img src="/number_jpg/2f.jpg" class="bt2" />';} ?> <img src="/number_jpg/1f.jpg" class="bt1" /><img src="/number_jpg/<?= $numb?>.jpg" class="bt0" /> </div></li> <? $numb+=2 ; } */ ?> </ul> </div></td> </tr> </table> <br><br> <div class="clearfix hidden-xs"></div> <div class="row"></div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"><h3><?= $county."-".$district."-".$street."-" ?><?= ($side==1)?"單號側":"雙號側" ?></h3></div> <!-- 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: 'SelectcityApi2.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); ?>
保存
取消
返回文件列表