ok

Mini Shell

Direktori : /home/institutonamaste/www/class/
Upload File :
Current File : /home/institutonamaste/www/class/class-entidades.php

<?php
class Entidades{

	private $tb = "entidades";
		
	public function __construct()
	{		
		$p 	 = (isset($_GET["p"])) ? $_GET["p"] : 1;
		$qnt = 12;
		$ini = ($p*$qnt) - $qnt;
		$break = 0; 
		
		$sql = DBRead($this->tb, "WHERE status = '1' LIMIT $ini, $qnt", "titulo, img, video, site, instagran, facebook, youtube, linkedin, twiter, telefone, email");			
		while($row = mysqli_fetch_object($sql))
		{
			$doc .= '
			<div class="col-md-4 col-sm-6 col-12 block">
				<div class="image">
					<a href="'.$row->site.'" alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank">
						<img src="'.IMG.'entidades/'.$row->img.'" alt="'.$row->titulo.'" title="'.$row->titulo.'"/>
					</a>	
				</div><!-- image -->
					
				<div class="box">';
				
					if(!empty($row->video)){
						/*<h5>VĂ­deo Depoimento</h5>*/
						
						$doc .= '
						<a href="https://www.youtube.com/embed/'.$row->video.'?rel=0" class="tube" frameborder="0" data-title="'.$row->titulo.'" data-toggle="lightbox" data-width="60%">
							<img src="https://i1.ytimg.com/vi/'.$row->video.'/mqdefault.jpg">
							<i class="fa fa-youtube-play" aria-hidden="true"></i>							
						</a>';
					}
					
					$doc .= '	
					<h5>Mais Info</h5>
						
					<div class="icons">';
						$doc .= (!empty($row->site)) 	 ? '<a href="'.$row->site.'" 		alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank"><i class="fa fa-mouse-pointer" 	aria-hidden="true"></i></a>' : '';
						$doc .= (!empty($row->instagran))? '<a href="'.$row->instagran.'" 	alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank"><i class="fa fa-instagram" 		aria-hidden="true"></i></a>' : '';
						$doc .= (!empty($row->facebook)) ? '<a href="'.$row->facebook.'" 	alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank"><i class="fa fa-facebook" 		aria-hidden="true"></i></a>' : '';
						$doc .= (!empty($row->youtube))  ? '<a href="'.$row->youtube.'" 	alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank"><i class="fa fa-youtube-play" 	aria-hidden="true"></i></a>' : '';
						$doc .= (!empty($row->linkedin)) ? '<a href="'.$row->linkedin.'" 	alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank"><i class="fa fa-linkedin" 		aria-hidden="true"></i></a>' : '';
						$doc .= (!empty($row->twiter)) 	 ? '<a href="'.$row->twiter.'" 		alt="'.$row->titulo.'" title="'.$row->titulo.'" target="_blank"><i class="fa fa-twitter" 		aria-hidden="true"></i></a>' : '';
					$doc .= '
					</div><!-- icons -->
						
					<div class="info">
						<a href="tel:'.$row->telefone.'">'.$row->telefone.'</a>
						<a href="mailto:'.$row->email.'">'.$row->email.'</a>
					</div>	
				</div><!-- box -->	
			</div>';
			
			$break++;
			if(($break % 3) == 0)
				$doc .= '<hr/>';
		}
			
		echo $doc;	
		
		echo Paginacao($qnt, $p, '?', "WHERE status = '1'", $this->tb);			
		
	}		
}
?>

Zerion Mini Shell 1.0