查看文件: search_shop.php
大小: 1.57 KB
类型: application/octet-stream
<?php require_once('Connections/BE2.php'); ?> <?php $menu2=isset($_GET['keyword'])?$_GET['keyword']:'-1'; mysql_select_db($database_BE2, $BE2); //$query_Rt2 =sprintf("SELECT a.* FROM product_data as a,company as b WHERE a.company_num=b.mid AND b.company_name='%s' ",$menu1); $query_Rt2 =sprintf("SELECT * FROM company WHERE company_title like '%s' ",'%'.$menu2.'%'); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <? if($totalRows_Rt2==1){ $html='/shop/'.$row_Rt2['company_title'].'.html'; echo "<script>location.href='".$html."';</script>"; } else if($totalRows_Rt2>1){ do { ?> <div class="row" style="border-width:1px;border-style:solid;border-color:#ccc;padding:15px;width:100%;margin-bottom:10px;"> <div class="col-1"> <? /* <a href="/ecard/<?= $row_Rt2['scode'] ?>" > <img class="img-fluid" src="/ecard/img/<?= "user_".sprintf("%07d",$row_Rt2['mem_auto']).'.'.$row_Rt2['mem_logo2']; ?>" title="<?= $row_Rt2['mem_user2']; ?>" width="100%"> </a> */ ?> </div> <div class="col-11"> <span><a href="/shop/<?= $row_Rt2['company_title'] ?>.html"> <?= $row_Rt2['company_title']; ?> 公司首頁</a> </span><br> <? /* <span style="margin-bottom:0px;" ><a href="/showproducts/<?= $row_Rt2['company_title'] ?>.html"><?= $row_Rt2['company_title'];?> 商品頁面 </a></span> */ ?> </div> </div> <? } while ($row_Rt2 = mysql_fetch_assoc($Rt2)); } mysql_free_result($Rt2); ?>
保存
取消
返回文件列表