Advertisement
Guest User

Untitled

a guest
Mar 29th, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.31 KB | None | 0 0
  1.  
  2. <script language="JavaScript">
  3. function preloader()
  4. {
  5.      // counter
  6.      var i = 0;
  7.      // create object
  8.      imageObj = new Image();
  9.      // set image list
  10.      images = new Array();
  11.                     <?php $i = 0; foreach($lists->result() as $row) { $url = base_url().'images/'.$row->list_id.'/'.$row->name; ?>
  12.      images[<?php echo $i; ?>]="<?php echo $url; ?>"
  13.                     <?php $i++; } $num_rows = $lists->num_rows(); $total_rows = $num_rows-1; ?>
  14.      // start preloading
  15.      for(i=0; i<=<?php echo $total_rows; ?>; i++)
  16.      {
  17.           imageObj.src=images[i];
  18.      }
  19. }
  20.  
  21. $(document).ready(function(){
  22. $("#view_most").html('<img src="<?php echo base_url()."images/loader.gif"; ?>">');
  23. })
  24. </script>
  25. <?php $this->load->library('twitter');
  26. $tId = $this->twitter->get_userId();?>
  27.  
  28. <!-- Slider Kit launch -->
  29. <link href="<?php echo css_url(); ?>/sliderkit-demos.css" media="screen" rel="stylesheet" type="text/css" />
  30. <!-- Slider Kit styles -->
  31.  
  32. <div id="Home_Main" class="clearfix container_bg">
  33.     <!-- Main Left -->
  34.     <div id="HMain_Left" class="clsFloatLeft">
  35.         <div id="HSearch_Blk">
  36.             <h1><?php echo translate("Book Your Accommodation"); ?></h1>
  37.             <form action="<?php echo site_url('search')?>" id="search_form" method="post">
  38.                 <div class="clsHsearch_Inp">
  39.                     <label for="location" class="inner_text" id="location_label" style="display:none;"><?php echo translate("Where are you going?"); ?> </label>
  40.                     <input type="text" class="location rounded_left" autocomplete="off" id="location" name="location" />
  41.                 </div>
  42.                 <div id="HSear_Options" class="clearfix">
  43.                     <div class="HSer_CheckIn clsFloatLeft">
  44.                         <p><?php echo translate("Check in"); ?></p>
  45.                         <p><input type="text" id="checkin" class="HSer_Inp_bg checkin" name="checkin" value="mm/dd/yy" /></p>
  46.                     </div>
  47.                     <div class="HSer_CheckOut clsFloatLeft">
  48.                         <p><?php echo translate("Check out"); ?></p>
  49.                         <p><input type="text" id="checkout" class="HSer_Inp_bg checkout" name="checkout" value="mm/dd/yy" /></p>
  50.                     </div>
  51.                     <div class="HSer_Guest clsFloatLeft">
  52.                         <p><?php echo translate("Guests"); ?></p>
  53.                         <p class="Ser_Selec_bg">
  54.                                                                                                 <select name="number_of_guests" id="number_of_guests">
  55.                                                                                                     <?php for($i = 1; $i <= 16; $i++) { ?>
  56.                                                                                                  <option value="<?php echo $i; ?>"><?php echo $i; if($i == 16) echo '+'; ?> </option>
  57.                                                                                                 <?php } ?>
  58.                         </select>
  59.                         </p>
  60.                     </div>
  61.                     <div class="HSerach_Butt clsFloatLeft">
  62.                         <input type="submit" value="<?php echo translate("Search"); ?>" class="Serch_Button" name="Submit" />
  63.                     </div>
  64.                 </div>
  65.             </form>
  66.         </div>
  67.         <!-- Slider -->
  68.         <div id="selSlider">
  69.             <div id="SelSlider_inner">
  70.             <div class="sliderkit photosgallery-vertical delaycaptions-03">
  71.                 <div class="sliderkit-nav">
  72.                     <div class="sliderkit-nav-clip">
  73.                         <ul>
  74.                             <?php
  75.                                 foreach($lists->result() as $row)
  76.                                 {
  77.                                   $url = base_url().'images/'.$row->list_id.'/'.$row->name;
  78.        ?>
  79.                             <li><a href="javascript:void(0);" rel="nofollow" title="<?php echo $row->title ?>"><img src="<?php echo $url; ?>" alt="[Alternative text]" /></a></li>
  80.       <?php } ?>       
  81.                             </ul>
  82.                     </div>
  83.                     <div class="sliderkit-btn sliderkit-go-btn sliderkit-go-prev"><a rel="nofollow" href="javascript:void(0);" title="Previous photo"><span><?php echo translate("Previous photo"); ?></span></a></div>
  84.                     <div class="sliderkit-btn sliderkit-go-btn sliderkit-go-next">
  85.                         <a rel="nofollow" href="javascript:void(0);" title="Next photo"><span><?php echo translate("Next photo"); ?></span></a>
  86.                     </div>
  87.                     </div>
  88.                     <div class="sliderkit-panels">
  89.                     <?php
  90.                         foreach($lists->result() as $row)
  91.                         {
  92.                          $url = base_url().'images/'.$row->list_id.'/'.$row->name;
  93.       ?>
  94.       <div class="sliderkit-panel">
  95.                         <img src="<?php echo $url; ?>" alt="<?php echo $row->desc; ?>" />
  96.                         <div class="sliderkit-panel-textbox">
  97.                         <div class="sliderkit-panel-text">
  98.                         <h4><a href="<?php echo base_url().'rooms/'.$row->list_id; ?>"><?php echo $row->title; ?></a></h4>
  99.                         <p><?php echo substr(strstr($row->address, ','), 1); ?></p>
  100.       <p><?php echo get_currency_symbol().get_currency_value($row->price).' per night'; ?></p>
  101.      </div>
  102.                     <div class="sliderkit-panel-overlay"></div>
  103.                     </div>
  104.                  </div>
  105.      <?php } ?>
  106.                 </div>
  107.             </div>
  108.             </div>
  109.         </div>
  110.         <!-- End of slider -->
  111.         <div class="Box" id="HMost_View_Blk">
  112.             <div class="Box_Head">
  113.                 <ul class="clsMost_Link clearfix">
  114.                     <li><a id="most_viewed" class="HMost_Link_Act" href="javascript:void(0);"><?php echo translate("Most Viewed"); ?></a></li>
  115.                  <li><a id="most_booked" href="javascript:void(0);"><?php echo translate("Most Booked"); ?></a></li>
  116.                  <li class="clsBorder_No"><a id="most_reviewed" href="javascript:void(0);"><?php echo translate("Most Rated"); ?></a></li>
  117.                 </ul>
  118.             </div>
  119.             <div class="Box_Content clearfix" id="view_most">
  120.  
  121.             <div class="clear"></div>
  122.             </div>
  123.         </div>
  124.     </div>
  125.     <!-- End of Main Left -->
  126.     <!-- Main Right -->
  127.     <div id="HMain_Right" class="clsFloatRight">
  128.       <!-- Top Locations -->
  129.       <div class="Box" id="HTop_Links_Box">
  130.         <div class="Box_Head">
  131.             <h2><?php echo translate("Top Locations"); ?></h2>
  132.         </div>
  133.         <div class="Box_Content clearfix">
  134.             <div class="clsTopLinks_List clearfix">
  135.                  <div>
  136.                     <p class="clsBold"><?php echo $categories[1]->name; ?></p>
  137.                      <ul>
  138.                                                                                 <?php foreach($world->result() as $row) { ?>
  139.                         <li><a href="<?php echo site_url('search').'?location='.$row->name; ?>"><?php echo $row->name; ?></a></li>
  140.                                                                                     <?php } ?>
  141.                      </ul>
  142.                  </div>
  143.              </div>
  144.         </div>
  145.       </div>
  146.       <!-- End of Top Locations -->
  147.       <!-- How it Works -->
  148.       <div class="Box" id="HLatest_Add_Box">
  149.         <div class="Box_Head">
  150.             <h2><?php echo translate("Latest Ads"); ?></h2>
  151.         </div>
  152.         <div class="Box_Content">
  153.                                
  154.                                 <?php foreach($latest_ads->result() as $row) { ?>
  155.             <div class="clearfix clsLatest_AddList">
  156.                 <div class="clsLatAdd_left clsFloatLeft">
  157.                     <a href="<?php echo base_url().'rooms/'.$row->id; ?>">
  158.                                                                       <img src="<?php echo getListImage($row->id); ?>" height="41" width="41" alt="<?php echo $row->title; ?>" title="<?php echo $row->title; ?>" />
  159.                                                                     </a>
  160.                 </div>
  161.                 <div class="clsLatAdd_Right clsFloatRight">
  162.                     <p><a href="<?php echo base_url().'rooms/'.$row->id; ?>"><?php echo $row->title; ?></a></p>
  163.                     <p><?php echo substr(strstr($row->address, ','), 1); ?> </p>
  164.                     <p class="clsBold"><?php echo get_currency_symbol().get_currency_value($row->price).' per night'; ?></p>
  165.                 </div>
  166.             </div>
  167.                                     <?php } ?>
  168.            
  169.         </div>
  170.       </div>
  171.       <!-- End of How it Works -->
  172.       <!-- End of Latest Ads -->
  173.       <!-- Latest Ads -->
  174.       <!-- End of Latest Ads -->
  175.       <!-- Add -->
  176.       <!-- End of Add -->
  177.       <!-- Useful Links Box -->
  178.         <!-- End of Useful Links Box -->
  179.     </div>
  180.     <!-- End of Main Right -->
  181. </div>
  182.  
  183. <script type="text/javascript">
  184.  
  185. $(document).ready(function(){
  186.  
  187. preloader();
  188.  
  189. $("#most_viewed").click(function(){
  190.  
  191. $("#most_booked").removeClass("HMost_Link_Act");
  192. $("#most_reviewed").removeClass("HMost_Link_Act");
  193. $("#most_viewed").addClass("HMost_Link_Act");
  194.  $("#view_most").html('<img src="<?php echo base_url()."images/loader.gif"; ?>">');
  195.  $.ajax({ type: "POST",url: "<?php echo site_url('home/view_most'); ?>",async: true,data: "view=most_viewed", success: function(data)
  196.     {  
  197.                 if(data != 0)
  198.                 {
  199.                     $("#view_most").html(data);
  200.                 }
  201.                 else
  202.                     alert("Error");
  203.             }
  204.     });
  205.    
  206. })
  207.  
  208. $("#most_booked").click(function(){
  209.  
  210. $("#view_most").html('<img src="<?php echo base_url()."images/loader.gif"; ?>">');
  211. $("#most_reviewed").removeClass("HMost_Link_Act");
  212. $("#most_viewed").removeClass("HMost_Link_Act");
  213. $("#most_booked").addClass("HMost_Link_Act");
  214.  
  215.  $.ajax({ type: "POST",url: "<?php echo site_url('home/view_most'); ?>",async: true,data: "view=most_booked", success: function(data)
  216.     {  
  217.                 if(data != 0)
  218.                 {
  219.                     $("#view_most").html(data);
  220.                 }
  221.                 else
  222.                     alert("Error");
  223.             }
  224.     });
  225.    
  226. })
  227.  
  228. $("#most_reviewed").click(function(){
  229.  
  230. $("#most_reviewed").addClass("HMost_Link_Act");
  231. $("#most_viewed").removeClass("HMost_Link_Act");
  232. $("#most_booked").removeClass("HMost_Link_Act");
  233.  
  234.     $("#view_most").html('<img src="<?php echo base_url()."images/loader.gif"; ?>">');
  235.  $.ajax({ type: "POST",url: "<?php echo site_url('home/view_most'); ?>",async: true,data: "view=most_reviewed", success: function(data)
  236.     {  
  237.                 if(data != 0)
  238.                 {
  239.                     $("#view_most").html(data);
  240.                 }
  241.                 else
  242.                     alert("Error");
  243.             }
  244.     });
  245.    
  246. })
  247.  
  248.  $.ajax({ type: "POST",url: "<?php echo site_url('home/view_most'); ?>",async: true,data: "view=most_viewed", success: function(data)
  249.     {  
  250.                 if(data != 0)
  251.                 {
  252.                     $("#view_most").html(data);
  253.                 }
  254.                 else
  255.                     alert("Error");
  256.             }
  257.     });
  258.    
  259. })
  260.  
  261.  
  262.             $(window).load(function(){
  263.                             $(".delaycaptions-03").sliderkit({
  264.                                             circular:true,
  265.                                             keyboard:true,
  266.                                             shownavitems:4,
  267.                                             verticalnav:true,
  268.                                             navclipcenter:true,
  269.                                             panelfxspeed:500,
  270.                                             fastchange:true,
  271.                                             auto:true,
  272.                                             delaycaptions:{
  273.                                                             delay:300,
  274.                                                             position:"left",
  275.                                                             transition:"sliding",
  276.                                                             duration:300
  277.                                             },
  278.                                             debug:1
  279.                             });
  280.                            
  281.             });
  282.  
  283.         window.fbAsyncInit = function() {
  284.             FB.init({
  285.                 appId  : 'Reservation Resources',
  286.                 status : true, // check login status
  287.                 cookie : true, // enable cookies to allow the server to access the session
  288.                 xfbml  : true  // parse XFBML
  289.             });
  290.  
  291.             FB.getLoginStatus(function(response) {
  292.                 if (response && (response.status !== "unknown")) {
  293.                     jQuery.cookie("fbs", response.status);
  294.                 } else {
  295.                     jQuery.cookie("fbs", null);
  296.                 }
  297.             });
  298.            
  299.             jQuery(document).trigger('fbInit');
  300.         };
  301.  
  302.         (function() {
  303.             var e = document.createElement('script');
  304.             e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
  305.             e.async = true;
  306.             document.getElementById('fb-root').appendChild(e);
  307.         }());
  308.  
  309.  
  310.     jQuery(document).ready(function() {
  311. Translations.review = "review";
  312. Translations.reviews = "reviews";
  313. Translations.night = "night";
  314.  
  315. var opts = {};
  316.  
  317. CogzidelHomePage.init(opts);
  318. CogzidelHomePage.defaultSearchValue = "Where are you going?";
  319. });
  320.  
  321. if ((navigator.userAgent.indexOf('iPhone') == -1) && (navigator.userAgent.indexOf('iPod') == -1) && (navigator.userAgent.indexOf('iPad') == -1)) {
  322. jQuery(window).load(function() {
  323.     LazyLoad.js([
  324.         "<?php echo base_url(); ?>js/jquery.autocomplete_custom.pack.js",
  325.         "<?php echo base_url(); ?>js/en_autocomplete_data.js"],
  326.         function() {
  327.             jQuery("#location").autocomplete(autocomplete_terms, {
  328.                 minChars: 1, width: 301, max:20, matchContains: false, autoFill: true,
  329.                 formatItem: function(row, i, max) {
  330.                     return Cogzidel.Utils.decode(row.k);
  331.                 },
  332.                 formatMatch: function(row, i, max) {
  333.                     return Cogzidel.Utils.decode(row.k);
  334.                 },
  335.                 formatResult: function(row) {
  336.                     return Cogzidel.Utils.decode(row.k);
  337.                 }
  338.             });
  339.         }
  340.     );
  341. });
  342. }
  343.  
  344.     jQuery(document).ready(function() {
  345.         Cogzidel.init({userLoggedIn: false});
  346.     });
  347.  
  348.     Cogzidel.FACEBOOK_PERMS = "email,user_birthday,user_likes,user_education_history,user_hometown,user_interests,user_activities,user_location";
  349. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement