<?php include_once "php_partial/preprocessing.php";?>
<?php include_once "php_partial/db_query_v3.php";?>
<html>
<head>
  <title><?php include "php_partial/search_title.php";?></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="description" content="<?php echo $keyword; ?>租屋情報及租金行情，共有<?php echo $num_rows; ?>筆關於<?php echo $keyword; ?>的出租相關結果。全台灣最完整的租屋搜尋引擎，助您輕鬆找到理想好房。">
  <meta http-equiv="content-language" content="zh-TW">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap-theme.min.css">
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
  <style type="text/css">
    <?php include 'stylesheets/mixrent_style.css';?>
  </style>
  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
  <?php include "php_partial/google_analytic.php";?>
  <?php include "php_partial/google_ads_conversions.php";?>
  <?php include "php_partial/alexa_certify.php";?>
<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
  <?php include "php_partial/google_afs_head.php";?>
<?php
}
}
?>
</head>
<body>
  <div id="fb-root"></div>
  <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v2.0";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>
<?php
if ($detect->isMobile() && !$detect->isTablet()) {
    echo "<div id=\"search_box\" class=\"container-mobile\">";
} else {
    echo "<div id=\"search_box\" class=\"container\">";
}
?>
    <div class="row">
      <!-- Left Column Start -->
      <div class="col-md-3">
        <!-- logo row xs -->
        <div class="row">
          <div class="col-xs-12">
            <center>
              <p><a href="/" alt="MixRent"><img src="/mixrent_logo_new.png" width="220"></a> <span id="country_mark">台灣</span></p>
              <h6>一次搜尋所有租屋網站!</h6>
            </center>
          </div>
        </div>

        <br class="hidden-xs">

        <!-- search row xs -->
        <div class="row">
          <div class="col-xs-12 col-sm-6 col-md-12">
            <?php include_once "php_partial/search_form.php";?>
          </div>

<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
          <!-- adsense left -->
<?php
}
}
?>
	  <!-- text for desktop -->
          <!-- pic for mobile -->
<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
	  <div class="col-xs-12 col-sm-6 col-md-12">
            <?php include_once "php_partial/google_adsense_left.php";?>
          </div>
<?php
}
}
?>
          
          <div class="col-xs-12 col-sm-6 col-md-12">
            <div class="visible-md visible-lg">
            <?php include_once "php_partial/db_related_query.php";?>
           </div>
          </div>
        

          <!-- FB status -->
          <div class="col-xs-12 col-sm-6 col-md-12">
            <div class="visible-md visible-lg text-center">
            <?php include "php_partial/facebook_status.php";?>
            </div>
          </div>

<?php if (!$isMobile) {?>
          <!-- clickforce 240x400 -->
          <div class="col-xs-12 col-sm-6 col-md-12">
            <div class="visible-md visible-lg">
<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
	    <?php include_once "php_partial/google_adsense_160x600.php";?>
<?php
}
}
?>
	    </div>
          </div>
<?php }?>
        </div>
      </div>
      <!-- Left Column End -->

      <!-- Right Column Start -->
      <div class="col-md-9">
<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
	<?php include "php_partial/google_adsense_banner.php";?>
<?php
}
}
?>
	<!-- page info -->
        <?php include "php_partial/page_info.php";?>
        <!-- filter info -->
        <?php include "php_partial/filter_info.php";?>
        <!-- premium listing -->
        <?php include "php_partial/premium_listing.php";?>

        <!-- rental result here -->
<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
	<?php include "php_partial/google_afs_top.php";?> 
<?php
}
}
?>
	<?php include "php_partial/rental_result_list.php";?>
<?php   
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
        <?php include "php_partial/google_afs_async.php";?>
<?php
}
}
?>
	<?php include "php_partial/pagination.php";?>


        <!-- mobile only -->
<?php   
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
	<?php include "php_partial/google_adsense_footer.php";?>
<?php
}
}
?>
	<!-- TODO share to FB for xs-->
        <div class="visible-xs visible-sm">
          <div class="text-center">
            <hr />
            <br/>
            <?php include "php_partial/share_to_fb.php";?>
            <br/><br/>
            <?php include "php_partial/share_to_line.php";?>
            <br/><br >
          </div>
        </div>
      </div>
      <!-- Right Column End -->
    </div>
  </div>

<?php
if (!strstr($keyword, '萝莉')) {
if (!strstr($keyword, 'JVId')) {
?>
<?php
include "php_partial/onclick.php";
include "php_partial/js_loader2.php";
include "php_partial/js_loader_ad.php";

if ($detect->isMobile() && !$detect->isTablet()) {
    include 'footer-mobile.php';
} else {
    include 'footer-pc.php';
}
?>

<?php
}
}
?>

</body>
</html>
