Sindbad~EG File Manager

Current Path : /home/sarayaglobal/saraya.ug/modules/mod_flexible_timeline/tmpl/
Upload File :
Current File : /home/sarayaglobal/saraya.ug/modules/mod_flexible_timeline/tmpl/horizontal.php

<?php
 /*
 * @package Joomla 3.4
 * Flexible Odometer module
 * @copyright Copyright (C) Adrien Roussel https://www.nordmograph.com/extensions
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 */
defined('_JEXEC') or die('Restricted access');
$juri 			= JURI::base();

asort($list);
if($debug){
	error_reporting(E_ALL);
	ini_set("display_errors", 1);
	var_dump($list);
}

echo '<section class="cd-horizontal-timeline">
	<div class="timeline">
		<div class="events-wrapper">
			<div class="events">
				<ol>';
				$i = 0;
				
				foreach($list as $item)
				{
					$y = substr($item->date, 0, 4);
					$mo = substr($item->date, 5, 2);
					$d = substr($item->date, 8, 2);
					$h = substr($item->date, 11, 2);
					$mi = substr($item->date, 14, 2);
					$data_date = $d.'/'.$mo.'/'.$y;
					
					if($mode!='static'){
						$date_obj = new DateTime( $item->date );
						$formatted_date = date_format($date_obj, $date_format);
					}
					else
						$formatted_date = $item->date;
					
					echo '<li ><a href="#0" data-date="'.$data_date.'" ';
					if($i==0)
						echo ' selected  ' ;
					echo '>'.$formatted_date.'</a></li>';
					$i++;
				}
				echo '</ol>

				<span class="filling-line" aria-hidden="true"></span>
			</div> <!-- .events -->
		</div> <!-- .events-wrapper -->
			
		<ul class="cd-timeline-navigation">
			<li><a href="#0" class="prev inactive">Prev</a></li>
			<li><a href="#0" class="next">Next</a></li>
		</ul> <!-- .cd-timeline-navigation -->
	</div> <!-- .timeline -->

	<div class="events-content">
		<ol>';
		
	
		
		$j = 0;
		foreach($list as $item)
		{
			$y = substr($item->date, 0, 4);
			$mo = substr($item->date, 5, 2);
			$d = substr($item->date, 8, 2);
			$h = substr($item->date, 11, 2);
			$mi = substr($item->date, 14, 2);
			$data_date = $d.'/'.$mo.'/'.$y;
			
			if($mode!='static'){
						$date_obj = new DateTime( $item->date );
						$formatted_date = date_format($date_obj, $date_format);
			}
			else
				$formatted_date = $item->date;
			
			
			if($enable_url && $mode!='static')
			{
				$url = str_replace('[ID]', $item->id , $url_format );
				$url = str_replace('[CATID]', @$item->catid , $url );
				$url = str_replace('[ALIAS]', JFilterOutput::stringURLSafe(@$item->alias) , $url );
			}
			if($mode=='static')
				$url = $item->url;
			
			
			
			
			if(strlen($item->title) > $title_limit)
				$item_title = substr($item->title,0,strpos(substr($item->title,0,$title_limit),' ')).' ...';
			else
				$item_title 		= $item->title;
			if($striptags)
				$item_description = strip_tags($item->description);
			else
				$item_description = $item->description;

			if(strlen($item_description) > $description_limit)
			{
				$item_description = substr($item_description,0,$description_limit -4);
				$splitted = explode(" ",$item_description);
				$keys = array_keys($splitted);
				$lastKey = end($splitted);
				$countlastkey = strlen($lastKey);
				$item_description = substr_replace($item_description.' ','...',-($countlastkey+1),-1);
			}
				
			echo '<li ';
			if($j=='0')
				echo 'class="selected" ';
			echo 'data-date="'.$data_date.'">
					<h3>';
					if($enable_url OR ($mode=='static' && $url!='') )
					{
						echo '<a href="'.JRoute::_($url).'" ';
						if(strpos($url , 'http' )!==false)
							echo ' target="blank" ';
						echo '>';
						
					}
					echo strip_tags($item_title);
					if($enable_url OR ($mode=='static' && $url!='') )
						echo '</a>';
					echo'</h3>
					<em>'.$formatted_date.'</em>
					<p>'.$item_description.'</p>';
			if($item->latitude !='' && $item->longitude!='')
	{
		//map
		$src1 =	'//maps.googleapis.com/maps/api/staticmap?size='.$map_width.'x'.$map_height;		
		$src1 .='&center='.$item->latitude.','.$item->longitude.'&zoom='.$zoom1;
		$src1 .=	'&maptype='.strtolower($maptype).'';
		$src1 .=	'&markers=size:normal';
		$src1 .=	'%7Ccolor:'.$marker_color;
		$src1 .= '%7C' . $item->latitude . "," . $item->longitude;
		if($static_client!='' && $static_signature!='')
			$src1 	.= '&client='.$static_client.'&signature='.$static_signature;
		elseif($static_key!='')
			$src1 	.= '&key='.$static_key;
			
		$src2 =	'//maps.googleapis.com/maps/api/staticmap?size='.$map_width.'x'.$map_height;		
		$src2 .='&center='.$item->latitude.','.$item->longitude.'&zoom='.$zoom2;
		$src2 .=	'&maptype='.strtolower($maptype).'';	
		$src2 .=	'&markers=size:normal';
		$src2 .=	'%7Ccolor:'.$marker_color;
		$src2 .= '%7C' . $item->latitude . "," . $item->longitude;
		if($static_client!='' && $static_signature!='')
			$src2 	.= '&client='.$static_client.'&signature='.$static_signature;
		elseif($static_key!='')
			$src2 	.= '&key='.$static_key;
			
		$src3 =	'//maps.googleapis.com/maps/api/staticmap?size='.$map_width.'x'.$map_height;		
		$src3 .='&center='.$item->latitude.','.$item->longitude.'&zoom='.$zoom3;
		$src3 .=	'&maptype='.strtolower($maptype).'';	
		$src3 .=	'&markers=size:normal';
		$src3 .=	'%7Ccolor:'.$marker_color;
		$src3 .= '%7C' . $item->latitude . "," . $item->longitude;
		if($static_client!='' && $static_signature!='')
			$src3 	.= '&client='.$static_client.'&signature='.$static_signature;
		elseif($static_key!='')
			$src3 	.= '&key='.$static_key;
			
		$gmap_url = 'https://maps.google.com/?ie=UTF8&hq=&ll='.$item->latitude.','.$item->longitude.'&z='.$zoom3;
		if($maplink=='gmap')
			echo '<a href="'.$gmap_url.'" target="_blank">';
		echo '<div id="map'.$module->id.'-'.$item->id.'"  width="'.$map_width.'" height="'.$map_height.'"  ';
		if($maplink=='zoom3')
			echo ' class="hasTooltip zoom3" title="'.JText::_('MOD_FLEXTIMELINE_CLICKTOZOOMIN').'" ';
		echo '></div>';
		if($maplink=='gmap')
			echo '</a>';
		$css = '#map'.$module->id.'-'.$item->id.'{
					width:'.$map_width.'px;
					height:'.$map_height.'px;
					background: url("'.$src1.'") no-repeat left top;
				}
				#map'.$module->id.'-'.$item->id.':hover{
					background: url("'.$src2.'") no-repeat left top;
				}';
		if($maplink=='zoom3')
		{
				$css .= '#map'.$module->id.'-'.$item->id.':active{
					background: url("'.$src3.'") no-repeat left top;
				}';
		}
		$doc->addStyleDeclaration( $css );
	}
	
			echo '</li>';
			$j++;
			
			
		}
		echo '</ol>
	</div> <!-- .events-content -->
</section>';

	echo '<script src="'.$juri.'modules/mod_flexible_timeline/js/horizontal_main.js"></script>';

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists