<?php 
$countPost = count($this->data);

include 'views/inc/header.php'; ?>
<?php if( Session::get( 'authenticated' ) ) : ?>
<style>
	
	body {
		background-position: <?php echo $this->infoSession->bg_position; ?> 55px;
		background-attachment: <?php echo $this->infoSession->bg_attachment; ?>;
		
		<?php if( $this->infoSession->bg_attachment == 'fixed' ): ?>
		background-repeat: repeat repeat; 
		<?php else: ?>
		background-repeat: no-repeat; 
		<?php endif; ?>
		
		background-color: <?php echo $this->infoSession->bg_color; ?>;
		
		<?php if( $this->infoSession->bg != '' ): ?>
		background-image: url(<?php echo URL_BASE.'public/backgrounds/'.$this->infoSession->bg; ?>);
		<?php endif; ?>
	}
	
	body a,
	body a:hover { color: <?php echo $this->infoSession->color_link; ?>; }
	
	.icons { background-color: <?php echo $this->infoSession->color_link; ?>;}
</style>
<?php endif;//<<<---------- * Session Active * -------->>>> ?>

<link href="<?php echo $_layoutParams['root_css']; ?>colorbox.css" rel="stylesheet" />
</head>
<!-- Body -->
	<body data-max="<?php echo MAX_LENGTH; ?>" data-accept="<?php echo $_SESSION['LANG']['accept']; ?>" data-cancel="<?php echo $_SESSION['LANG']['cancel']; ?>">
		
<?php include 'views/inc/navigation.php'; ?>

 <!-- container -->  
    <div class="container container-auth">
    	
    	<!-- row -->  
    	<div class="row col-pb">
     
		     <!-- col-md-* -->  
		     <div class="col-md-4">
		     	
			<div class="popout"></div>
			
	<button type="button" class="btn btn-info btn-block btn-border btn-lg show-toogle" data-toggle="collapse" data-target=".navleft-collapse">
		   <i class="fa fa-bars"></i>
		</button>
		
		<div class="collapse navleft-collapse">
			
			<div class="list-group">
     	  
		  <!-- **** list-group-item **** -->	
		  <a href="<?php echo URL_BASE; ?>search/?q=<?php echo str_replace( '#', '%23', htmlentities( strip_tags( $_GET['q'] ), ENT_NOQUOTES, "UTF-8" ) ) ?>"  class="list-group-item <?php if( isset($_GET['q'] ) && !isset( $_GET['user'] ) ) { echo 'active'; } ?>">
		  	<span class="icon-newspaper myicon-right"></span> <?php echo $_SESSION['LANG']['posts']; ?>
		  	
		  	<span class="pull-right">
			  		<i class="fa fa-chevron-right "></i>
			  	</span>
		  	</a><!-- **** ./ list-group-item **** -->
		  	
		  	<!-- **** list-group-item **** -->	
		  <a href="<?php echo URL_BASE; ?>search/?user=true&q=<?php echo str_replace( '#', '%23', htmlentities( strip_tags( $_GET['q'] ), ENT_NOQUOTES, "UTF-8" ) ) ?>"  class="list-group-item <?php if( isset( $_GET['user'] )  ) { echo 'active'; } ?>">
		  	<span class="icon-user myicon-right"></span> <?php echo $_SESSION['LANG']['people']; ?>
		  	
		  	<span class="pull-right">
			  		<i class="fa fa-chevron-right "></i>
			  	</span>
		  	</a><!-- **** ./ list-group-item **** -->	

		</div><!-- * list-group * -->
		
		<?php 
				   //<---- * advertising * --->
				   include 'views/inc/advertising.php';
				   ?>
				   
				   <?php
				   if( Session::get( 'authenticated' ) ) :
				   //<---- * who_follow * --->
				   include 'views/inc/who_to_follow.php';
				   
				   endif;
				   //<---- * trending * --->
				   include 'views/inc/trending.php'; 
				   
				   include 'views/inc/footer_session.php';
				    ?>
			 </div><!-- navleft-collapse -->
</div><!--/col-md-* -->
			
			<div class="col-md-8">
				 <?php include 'views/inc/search_listing.php'; ?>
			</div>
 			
 			
		</div><!-- *** row *** -->
	</div><!-- **************** container **************** -->
	

   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.easing.1.3.js"></script>
    <script src="<?php echo $_layoutParams['root_js']; ?>jquery-ui-1.10.3.custom.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.ui.touch-punch.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>bootstrap.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>bootstrap-switch.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.autosize.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>functions.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>count.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.form.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>timeago/jqueryTimeago_<?php echo $_SESSION['lang']; ?>.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.colorbox.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.scroll.user.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>bootbox.min.js"></script>
   
   
   <?php if( !isset( $_GET['user'] ) ):?>
   <script src="<?php echo $_layoutParams['root_js']; ?>search.timeline.js"></script>
   <?php endif; ?>
   
   <?php if( !Session::get( 'authenticated' ) ) : ?>
   <script src="<?php echo $_layoutParams['root_js']; ?>login.sign.up.js"></script>
   <?php endif; ?>
   
   <script type="text/javascript">
   
   bootbox.setDefaults({
  /**
   * @optional String
   * @default: en
   * which locale settings to use to translate the three
   * standard button labels: OK, CONFIRM, CANCEL
   */
  locale: "<?php echo $_SESSION['lang']; ?>"
  
});

//=== COUNTER
	$(document).on('mouseenter','#reply_post', function(event){

   		 if ($(this).data('hascharcount') == undefined) {
			$(this).data('hascharcount', true).charCount({ allowed: <?php echo MAX_LENGTH; ?>, warning: 10 });
		}
		
   	});

   $(".galeryAjax").colorbox({
   	fixed: false,
   	maxHeight: 550
   	});
   	
   	$('.posts').scrollPagination({
		nop     : 10,
		offset  : 0,
		error   : '',
		delay   : 500,
		              
		scroll  : true, 
		query   : 0,
		file    : '<?php echo $this->_file; ?>',
		_userId : '<?php echo trim( addslashes( strip_tags( $_GET['q'] ) ) ); ?>',
		totalGlobal : <?php echo $countPost; ?> });


  </script>
	</body>
</html>
