HEX
Server: Apache
System: Linux c119.dattaweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: c1190199 (57165)
PHP: 7.4.33
Disabled: mail, system, shell, exec, system_exec, shell_exec, mysql_pconnect, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd, eval, dl, imap_mail, libvirt_connect, gnupg_init, unsetenv, apache_setenv, pcntl_exec, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_get_handler, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_getpriority, pcntl_setpriority, pcntl_async_signals, opcache_get_status, opcache_reset, opcache_get_configuration
Upload Files
File: /home/c1190199/public_html/wp-content/themes/infocus/lib/includes/template-portfolio-gallery.php
<?php
/*
Template Name: Portfolio Gallery View
*/
get_header(); 
require(WEBTREATS_INCLUDES . "/var.php");
?>

<script type="text/javascript">
/* <![CDATA[ */
	document.write('<style type="text/css">.noscript { display:none; }</style>');
	jQuery.noConflict();
	
	function portfolio_img_hover() {
		jQuery(".portfolio_img_holder").hover(
			function() {
					jQuery(this).find('.hover_fade').stop().animate({opacity:0.4},400);
				},
				function() {
					jQuery(this).find('.hover_fade').stop().animate({opacity:1},400);
				});
	}

	// preload ajax-loader.gif
	jQuery.preloadImages("<?php echo get_template_directory_uri();?>/images/ajax-loader.gif");
		
	// ajax page GET function
	jQuery(document).ready(function() {
	
	// image loader
	jQuery(this).delay(500,function() {
		
		// id of the div containers
		var $imgContainerId = "div[id^='image_loader_']";
		
		// grab the images
		var $images = jQuery($imgContainerId+' span img');
		
		// image length
		var $max = $images.length;
		
		// remove them from DOM to prevent normal load
		jQuery('.rm_portfolio_img').remove();

		// loading div object
		var $loadDiv = null;
		
		// start loading
		if($max>0) {
			LoadImage(0,$max);
		}

	// loading function handler
	function LoadImage(index,$max) {
		if(index<$max) {

			// add list to div
			jQuery('<span id="img'+(index+1)+'"></span>').each(function() {
			   jQuery(this).appendTo('#image_loader_'+(index+1)+' a.load_portfolio_img');
			});

			// new image object
			var $img = new Image();
			
			// current image
			var $curr = jQuery("#img"+(index+1));
			
			// load current image
			jQuery($img).load(function () {
				
				// hide it first + .hide() failed in safari
				jQuery(this).css('display','none');
				
				//add alt attr & hover fade
				jQuery(this).attr({alt: ""});
				jQuery(this).addClass('hover_fade');
			 
				// remove loading class from div and insert the image into it
				jQuery($curr).append(this);
				
				// fade it in
				jQuery(this).fadeIn(500,function() {

					jQuery('#image_loader_'+(index+1)).find('.loading_gallery').remove();
					jQuery('#image_loader_'+(index+1)).find('.roll_over').css('display','block');

					if(index == ($max-1)) {
						// activate hover class
						   portfolio_img_hover();
						}else{
						  // we are loading next item
						  LoadImage(index+1,$max);
						}
				});
			}).error(function () {
				// if loading error remove div
				jQuery($curr).remove();
				// try to load next item
				LoadImage(index+1,$max);
			}).attr('src', jQuery($images[index]).attr('src'));
	   	  }
    	}
    });
	
});	
/* ]]> */
</script>

<?php 	
$teaser_text = get_post_meta($post->ID, 'teaser_text', true);
$teaser_text_custom = get_post_meta($post->ID, 'teaser_text_custom', true);
if ($teaser_text == 'disable' || $header_teaser == 'disable') {
	$header_disable = true;	} 
?>
	
<div id="intro_blurb"<?php if ($header_disable){echo ' style="display:none;"';}?>>
	<div class="inner">
		<div id="intro_blurb_title"><span><?php the_title(); ?></span></div>
			<div id="blurb">

			<?php
			//Header Teaser Text Options
			if (!$teaser_text || $teaser_text == 'default') {

				if ($header_teaser == 'customtext' && $teaser_custom) {
					echo stripslashes($teaser_custom);
				}
				if ($header_teaser == 'twitter' && !$twitter_id) {
					echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
				}
				if ($header_teaser == 'twitter' && $twitter_id) {
					$usernames = $twitter_id; $limit = '1'; $type = 'teaser';
					parse_cache_feed($usernames, $limit, $type);
				}

			}else{

				if ($teaser_text == 'custom' && !$teaser_text_custom) {
					echo stripslashes($teaser_custom);
				}
				if ($teaser_text == 'custom' && $teaser_text_custom) {
					echo stripslashes($teaser_text_custom);
				}
				if ($teaser_text == 'twitter' && !$twitter_id) {
					echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
				}
				if ($teaser_text == 'twitter' && $twitter_id) {
					$usernames = $twitter_id; $limit = '1'; $type = 'teaser';
					parse_cache_feed($usernames, $limit, $type);
				}
			}
			?> 
		</div>
	</div><!-- inner -->						
</div><!-- intro_blurb -->					

<div class="clearboth"></div>

<div id="breadcrumbs">
	<div class="inner">
		<?php if (!$breadcrumb_disable){ if (class_exists('simple_breadcrumb')) { $bc = new simple_breadcrumb; }} ?>
	</div><!-- inner -->							
</div><!-- breadcrumbs -->

<div id="body_block">
	<div class="inner">
		<div id="primary_full">
			<div class="content">
				
			<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
				<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
						
					<?php if ($header_disable) { ?>
					<h1><?php the_title(); ?></h1>
					<?php } ?>							

					<div class="entry">
						<?php the_content(); ?>
					</div>
						
				</div> <!-- .post -->
						
			<?php endwhile; endif; ?>
							
	<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

	query_posts("paged=$paged&cat=$portfolio_cat&posts_per_page=$portfolio_max");
	$counter = 0; $counter_last = 0;

	if(have_posts()) : while(have_posts()) : the_post();
	
	$date = get_post_meta($post->ID, 'portfolio_date',true);
	$portfolio_link = get_post_meta($post->ID, 'portfolio_link',true);
	$portfolio_gallery = get_post_meta($post->ID, 'portfolio_gallery_img',true);
	$portfolio_full = get_post_meta($post->ID, 'portfolio_full_img',true);
	$teaser_text = get_post_meta($post->ID, 'portfolio_teaser_text',true);
	$portfolio_video = get_post_meta($post->ID, 'portfolio_video_link', true);
	$read_more_disable = get_post_meta($post->ID, 'portfolio_read_disable',true);
	$portfolio_video_link = ($portfolio_video) ? $portfolio_video : $portfolio_full;
	$rollover_class = ($portfolio_video) ? ' rollover_play' : ' rollover';
	
	if($portfolio_gallery){
		$gallery_image_url = webtreats_image_resize($height='151',$width='276',$portfolio_gallery);
	}else{
		$gallery_image_url = webtreats_image_resize($height='151',$width='276',$portfolio_full);
	}
	?>
 	
	<?php if($portfolio_full) { $counter++; $counter_last++; ?>
		<div class="one_third<?php if($counter_last == 3) { echo " last"; } ?>">
			<div id="image_loader_<?php echo $counter; ?>">
				<div class="portfolio_img_holder">
					<div class="loading_gallery"></div>
					<a class="load_portfolio_img" rel="lightbox" href="<?php echo $portfolio_video_link; ?>">
						<span class="rm_portfolio_img noscript"><img src="<?php echo $gallery_image_url; ?>" alt="" /></span>
						<span class="roll_over<?php echo $rollover_class; ?>"></span>
					</a>
				</div>
					
			<?php if(!$read_more_disable) { ?>
			<h3 class="portfolio"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
			<?php }else{ ?>
			<h3 class="portfolio"><?php the_title(); ?>		
			<?php } ?>
			
			<?php if($date) { ?>
			<br/><span class="date"><?php echo $date;?></span>
			<?php } ?>
			</h3>
		
			<?php if($teaser_text) { ?>
			<p class="portfolio"><?php echo $teaser_text; ?></p>
			<?php } ?>
				
			<?php if(!$read_more_disable) { ?>
			<span><a class="button_link" href="<?php the_permalink(); ?>"><span>Ver Detalles</span></a></span>
			<?php } ?>
		
			<?php if($portfolio_link) { ?>
			<span><a class="button_link" target="_blank" href="<?php echo $portfolio_link; ?>"><span>Visitar Sitio</span></a></span>
			<?php } ?>
				
				</div>
			<div class="clearboth"></div>
		</div>
		<?php if($counter_last == 3) { echo '<div class="clearboth"></div>'; $counter_last = 0; } ?>
	<?php } ?>
		
	<?php endwhile; endif; ?>
	<div id="comments">
		<?php comments_template(); ?>
	</div>

	<div class="clearboth"></div>
	<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>

	</div> <!-- content -->
</div> <!-- primary_full -->

<?php get_footer(); ?>