Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/pages/single_project.php
<?php
session_start();
$typeContent = $_SESSION['typeContent']; 
$idContent = $_SESSION['idContent'];
if (isset($typeContent) && isset($idContent)) {
	require_once "../class/mysql.class.php";
	require_once "../class/utils.class.php";
	require_once "../config.php";
	require_once "../include/startDb.php";
	?>
	<!DOCTYPE HTML>
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Mario Farinato - Doctor in Art Music and Theatre</title>
	<style type="text/css">
		/* popup page */
		div.backgroundPopup {
			width: 100%;
			background: rgba(3, 3, 3, 0.15);
		}
	</style>
	</head>
	<body>
		<!-- projects -->
		<div class="backgroundPopup">
			<div style="width: 99$; text-align: center;">
	    		<a href="javascript: window.close()" style="text-align: center; text-decoration: none; font-weight: normal; color: #FF0000;">
	      			[ X ] Close
	      		</a>
	      	</div>
	        <h1>Projects</h1>
	        <?php 
	      	//get all projects
	      	$sql = "select p.id as id,p.title as title,p.body as body,c.name as name,c.path_img as cat_image from projects as p ";
			$sql .= "left join categories as c on p.id_category = c.id ";
			$sql .= "where p.id = ".$idContent;
			$result = $db->query($sql);
			$row = $result->fetch();
			?>
			<!-- title -->
			<h2>
				Category: <?=stripslashes($row['name'])?>
				<br>
				<?=stripslashes($row['title'])?> 
			</h2>
			<p class="nomargin">
	        	<img <?=stripslashes($row['cat_image'])?>" alt="" class="image"/>
	        	<?=stripslashes($row['body'])?>
	        </p>
        </div>
	</body>
	</html>
<?php 
}
$_SESSION['typeContent'] = '';
$_SESSION['idContent'] = ''; 
?>
Return current item: EZphotopress