Current Path : /var/www/html/social/
Upload File :
Current File : /var/www/html/social/destinations_details_old(15-6-16).php

<?php include_once('__includedFiles/header_top_files.php');?>
<?php include_once('__includedFiles/header_top.php');?>
<?php include_once('__includedFiles/dashboard_header.php');?>
<?php include_once('__includedFiles/dashboard_menu.php');?>
<?php $obj1=new Social();?>
<?php  $obj_frontc=new FrontController();
$InterstId=$_REQUEST['segementid'];
$destinationid=$_REQUEST['destination_id'];
$interst_detail=$obj1->get_interest_by_id($InterstId);
$destination_details=$obj1->get_destinationbyId($destinationid);
//print_r($destination_details);
?>
 <link href="css/styles.css" rel="stylesheet" />

   
    <link href="css/elastislide.css" rel="stylesheet" />

    
    <script src="js/slider/jquerypp.custom.js"></script>
    <script src="js/slider/modernizr.custom.17475.js"></script>

    <script src="js/slider/jquery.elastislide.js"></script>

    <script>
        $(document).ready(function () {
            $('#carousel').elastislide();
			          $(window).scroll(function () {
                var Height_of_Header = 100;
                if ($(window).scrollTop() > Height_of_Header) {
                    //begin to scroll
                   $(".rightfeeds").css("position", "absolute");
				  //  $(".rightfeeds").css("position", "fixed");
                   // $(".rightfeeds").css("top", 0);
                    $(".destinations #floatbar_home").css("position", "fixed");
                    $(".destinations #floatbar_home").css("top", 0);
                }
                else {
                    //lock it back into place
                    $(".rightfeeds").css("position", "absolute");
                    $(".destinations #floatbar_home").css("position", "absolute");
                }
            });
        });
    function been_there(destinationid)
	 { <?php if($_SESSION['userid']!=''){ ?>
		if(destinationid!='')
		   { 
		      $.ajax({
              url:"prediction_ajax.php?been_there=ok&destinationid="+destinationid,	 
              type:"GET",
              success:function(ddd){
				   $('#showthreid').hide('fast');
				   $('#alreadythreid').show('fast');
				   }
               }); 	
			}
			<? }else{?>
			var page_url_dest=$(location).attr('href');
				login_triger2(page_url_dest);
			<? }?>
		}
	function redirect_to(des_url)
	 {
		window.location.href=des_url;
		}	
    </script>
     <div class="side_detail destinations two">
       <?php include_once('__includedFiles/destination_left.php');?>
        <div style="clear:both"></div>
        <div class="main_wrapper destinations">


            <div class="topcontent">
                <div class="content_wrap">
                    <p class="placename"><?=$destination_details['name']?></p>
                    <div class="slider" style="width:636px !important; padding-left:0px; " >
                        <?php $gallery_imges=$obj1->destinationGalleryImg($destination_details['id']);
						  $noimes=count($gallery_imges);
						 
						  ?>
                        <ul id="carousel" class="elastislide-list">
                         <?php if($noimes>0){ foreach($gallery_imges as $galimg){?>
                            <li><a href="#"><img src="<?=baseurl?>searching_files/timthumb.php?src=<?=baseurl?>admin/<?=$galimg?>&h=205&w=300&zc=1" alt="image01" /></a></li>
                            <? }}else{?>
                            <li><a href="#"><img src="images_new/destination/centre-pics.png" alt="image06" /></a></li>
                            <? }?>
                        </ul>

                    </div> <!--Slider-->

                    <div class="leftcontent">
                        <p><?=$destination_details['description']?></p>

                    </div>
                    <div class="rightcontent">
                        <p><strong>Location:</strong> </p>

                        <p class="placename" style="font-size:14px;"><?=$destination_details['place']?></p>

                        <p><strong>How to reach:</strong></p>
                        <p><?=$destination_details['howtoreach']?></p>
                       
                        <p><strong>Activities to do:</strong></p>
                        <p><?=$destination_details['activiestodo']?></p>
                        <p><strong>Facilities:</strong></p>
                      <p><?=$destination_details['facilities']?></p>
                        
                        <div class="beenthere">
                        <?php 
						$duserss=$obj1->destination_users($destination_details['id']);
						  $no_duserss=count($duserss);
						  if($no_duserss>0)
						   {
						   if($no_duserss>5){
						     for($us=0;$us<5;$us++){
						       $duser=$duserss[$us];
						   ?>
                            <img src="<?=baseurl.'social/ProfileThumb/Thumb/'.$duser['user_img'];?>" style="height:30px; width:30px;" />
                            <? }}else{ foreach($duserss as $duser)
						       { ?>
                            <img src="<?=baseurl.'social/ProfileThumb/Thumb/'.$duser['user_img'];?>" style="height:30px; width:30px;" />
                            <? } } }?>
                             <p><?php if($no_duserss>5){ ?>+<?=($no_duserss-5)?> others <? }?> have been to this place</p>

                            <div class="btn">
                                <?php $btn_style_beenther=''; $btn_style_alreadybeenther='style="display:none"';
								 if($_SESSION['userid']!=''){ $check_for_beenthere=$obj1->check_beenthere($_SESSION['userid'],$destination_details['id']); 
								if($check_for_beenthere!=0)
								  {
									$btn_style_beenther='style="display:none"';
									$btn_style_alreadybeenther='style="display:block"';
									}
									
								}?>
                                <a href="javascript:void(0);" <?=$btn_style_beenther?> id="showthreid" onclick="return been_there(<?=$destination_details['id']?>);"> <img src="images_new/destination/been-there-icon.png" /></a>
                                <a href="javascript:void(0);" <?=$btn_style_alreadybeenther?> id="alreadythreid" >You have been there</a>
                            </div>
                        </div>

                    </div>

                    <div style="clear:both"></div>

                </div>

                <div class="rightfeeds" style="position:absolute;">
                    <div class="wrap headings">
                        <p>Upcoming Events</p>
                         <?php $limit2='LIMIT 0 , 3';
					   $upcomming_events=$obj1->upcomming_eventsBysegment($InterstId,$limit2);
					   $noupcommin_events=count($upcomming_events);
					   ?>
                        <a href="<?=baseurl.'social/event_listing.php?segment_tags[]='.$InterstId?>">view all</a>
                    </div>
                    <div class="wrap eventslist">
                      <?php if($noupcommin_events>0){ foreach($upcomming_events as $upc_events){
							 $gallry_arround121=$obj1->get_event_image($upc_events['id']);
							?>
                           <table>
                            <tr>
                                <td rowspan="5">
                                    <a href="<?=baseurl?>social/event_detail.php?eventid=<?=custome_encoding($upc_events['id']);?>" > <img src="<?=$gallry_arround121?>" style="height:84px; width:84px; border-radius:50%; padding-top:0px; margin:0px;" /></a>
                                </td>
                                <td><a href="<?=baseurl?>social/event_detail.php?eventid=<?=custome_encoding($upc_events['id']);?>" ><?=$upc_events['name']?></a></td>
                            </tr>
                            <tr>
                                <td><?php  if(date('d-m-Y',strtotime($upc_events['date_to']))!='01-01-1970'){ echo 'From  '; echo date('jS M, y',strtotime($upc_events['date_from'])); echo' &nbspto&nbsp'; echo date('jS M, y',strtotime($upc_events['date_to'])); } else{ echo 'On '; echo date('jS M, y',strtotime($upc_events['date_from']));}?></td>
                            </tr>
                            <tr>
                                <td><?=$upc_events['where_area']?></td>
                            </tr>
                               <!--End of first row-->

                            <tr><td><pre>  </pre></td></tr> <!--For spacing between rows-->
                          </table>
						  <? }}?>
                    </div>

                    <div style="clear:both"></div>
                    <div class="destinationslist">
                        <div class="wrap headings">
                            <p>Smilar Destinations</p>
                         <a href="<?=baseurl.'social/destinations.php?segementid='.$InterstId?>">view all</a>
                        <?php $limit4='LIMIT 0, 2'; $similar_destinations=$obj1->similar_destinations($InterstId,$destination_details['id'],$limit4);
						// print_r($similar_destinations); die;
						 ?>
                        </div>
                        <div class="images">
                             <?php if(count($similar_destinations)>0){ foreach($similar_destinations as $same_destination){ 
						
						 $destination_url=baseurl.'social/destinations_details.php?destination_id='.$same_destination['id'].'&segementid='.$same_destination['segmentid'];
						$Img_des=$obj1->getdestinationimg($same_destination['id']);
						if($Img_des==''){
							$Img_des=baseurl.'social/images_new/destination/centre-pics.png';}
				             	else{ 
							 $Img_des=baseurl.'admin/'.$Img_des; 
							 }
							 ?>
                                <img src="<?=baseurl?>searching_files/timthumb.php?src=<?=$Img_des?>&h=150&w=180&zc=1" style="height:150px;" onclick="return redirect_to('<?=$destination_url?>');" />
                                <p><?=$same_destination['name'] ?></p> 
     <? }}?>
                      
                        </div>
                    </div>
                </div>


                <div style="clear:both"></div>
  <?php $limit5="LIMIT 0,3"; $event_near_destinats=$obj1->event_near_destination($InterstId,$destination_details['id'],$destination_details['latitude'],$destination_details['longitude'],$limit5);
   $no_of_destination_events=count($event_near_destinats);
  ?>
                <div class="bottomcontent">
                    <p class="eventscount">Currently <?=$no_of_destination_events?> events for this place:</p>
                </div>

                <hr />

                <ul class="fafe_see_evets slides">
 <? if($no_of_destination_events>0){  foreach($event_near_destinats as $near_event){
	  $gallry_arround=$obj1->get_event_image($near_event['id']);
	 ?>
                    <li id="events_around_1">
                       
                            <div class="kafe_seetoprr">
                               <a href="<?=baseurl?>social/event_detail.php?eventid=<?=custome_encoding($near_event['id']);?>" > “<?=$near_event['name']?>”</a>
                            </div>
                            <span class="homim">
                            <a href="<?=baseurl?>social/event_detail.php?eventid=<?=custome_encoding($near_event['id']);?>" > <img src="<?=baseurl?>searching_files/timthumb.php?src=<?=$gallry_arround?>&h=108&w=240&zc=1" />
                        </a> </span>
                            <div class="events_datetimg">
                                <div class="kafe_evnadd">
                                    <p class="oneline"><i class="desti"></i>
                                    <?php if($near_event['custome_date']!=''){ echo $near_event['custome_date'];}
									else{ 
									if(date('d-m-Y',strtotime($near_event['date_to']))!='01-01-1970'){ 
									echo 'From  '; echo date('jS M, y',strtotime($near_event['date_from'])); echo' to '; echo date('jS M, y',strtotime($near_event['date_to'])); } 
									else{ echo 'On '; echo date('jS M, y',strtotime($near_event['date_from']));} }?>
                         
                                    </p>
                                    <div class="clear"></div>
                                    <span class="oneline"><i class="desti2"></i> <?=$near_event['where_area']?></span>
                                </div>

                            </div>
                        </a>
                        <div class="kafe_aroundyu">
     <?php $interests_ids_str_other=$obj1->get_event_segments($near_event['id']);
		   if(count($interests_ids_str_other>0)){
	   foreach($interests_ids_str_other as $interest_str){
	        	$inteterest_details1=$obj1->get_interest_by_id($interest_str);
		    ?>
	        <img width="45" height="47" src="../admin/segment_pics/<?=$inteterest_details1['icon_small'];?>" alt="<?=$inteterest_details1['name']?>" />
            <? }}?>
       </div>

                    </li>
                    <? }}?>
                    
                </ul>


                <!--detail page html end -->

            </div>

        </div>
        
    </div>
    
  
<div class="clear"></div>
<?php include_once('__includedFiles/dashboard_footer.php');?>

,