Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/index.php
<?php
/**
For the full job, template changes and admin area:
Creator: Mario Farinato < http://www.mfarinato.com >
Developer: Giacomo Campanelli < http://www.linkedin.com/pub/giacomo-campanelli/2a/858/268 >
*/
session_start();

if ( !(file_exists("config.php") && is_file("config.php"))) {
	header("Location: ./install/index.php");
} else {
	require_once 'config.php';;
}

require_once "class/mysql.class.php";
require_once "class/utils.class.php";
require_once 'class/class.phpmailer.php';
require_once "include/startDb.php";

define('SITEURL',$utils->getSettingValue('site_url'));
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$utils->getSettingValue('title')?></title>
<link rel="stylesheet" href="<?=SITEURL?>css/style.css" type="text/css" media="screen"/>
<link href="<?=SITEURL?>css/scrollbar.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?=SITEURL?>scripts/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="<?=SITEURL?>scripts/pop-ups.js" type="text/javascript"></script>
<script src="<?=SITEURL?>scripts/nav.js" type="text/javascript"></script>

<script language="JavaScript">
	function pop() {
		var left = (screen.width/2)-(600/2);
		var top = (screen.height/2)-(600/2);
		<?php 
		//if isset parameters, try to load the content
		$typeContent = @$_GET['type'];
		$idContent = @$_GET['id'];
		$exists = 0;
		if (isset($typeContent) && $typeContent != "" && isset($idContent) && $idContent != "") {
			$_SESSION['typeContent'] = $typeContent;
			$_SESSION['idContent'] = $idContent;
			//verify type of content
			if (trim($typeContent) == "p") { // project
				?>
				var W1 = window.open ('<?=SITEURL?>pages/single_project.php','Mario Farinato - Doctor in Art Music and Theatre', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=600,top='+top+', left='+left);					
				<?php 
				$exists = 1;
			} else if (trim($typeContent) == "b") { // article
				?>
				var W1 = window.open ('<?=SITEURL?>pages/single_article.php','Mario Farinato - Doctor in Art Music and Theatre', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=600,top='+top+', left='+left);					
				<?php 
				$exists = 1;
			}
		} 
		?>
	}
</script>
</head>
<?php 
if ($exists == 0) {
?>
<body>
<?php 
} else {
	?>
<body onload="pop()">
	<?php
}
?>
	<hgroup>
	  <h1><?=$utils->getSettingValue('title')?></h1>
	  <h4><?=$utils->getSettingValue('motto')?></h4>
	</hgroup>
	<nav>
	  <ul id="menu" class="menu">
	    <li> <a href="#" id="about"> <img src="<?=SITEURL?>images/about-us.jpg" alt=""/> <span class="active"></span> <span class="wrap"> <span class="link">About me</span> <span class="descr">Know me</span> </span> </a> </li>
	    <li> <a href="#" id="projects"> <img src="<?=SITEURL?>images/project.png" alt=""/> <span class="active"></span> <span class="wrap"> <span class="link">Projects</span> <span class="descr">My work</span> </span> </a> </li>
	    <li> <a href="#" id="contact"> <img src="<?=SITEURL?>images/contact-us.jpg" alt=""/> <span class="active"></span> <span class="wrap"> <span class="link">Contact</span> <span class="descr">Get in touch</span> </span> </a> </li>
	    <li > <a href="#" id="blog"> <img src="<?=SITEURL?>images/blog.jpg" alt=""/> <span class="active"></span> <span class="wrap"> <span class="link">Blog</span> <span class="descr">Daily musings</span> </span> </a> </li>
	  </ul>
	</nav>
	
	<section id="background">
		<section id="overlay"></section>
		<a href="#" class="nextButtonImage" title="next"></a>
		<a href="#" class="prevButtonImage" title="previous"></a>
		<?php 
		//set the image background for first time 
		if ($utils->getFirstProject($db,FALSE) != NULL && $utils->getFirstProject($db,FALSE) != "") {
			?>
			<img src="<?=SITEURL?><?php echo $utils->getFirstProject($db,FALSE)?>" alt="<?=$utils->getFirstProject($db,TRUE)?>" title="<?=$utils->getFirstProject($db,TRUE)?>" id="bgimg" />
			<?php
		} else {
			?>
			<img src="<?=SITEURL?>images/ezphotopress.png" alt="Welcome to EzPhotoPress" title="Welcome to EzPhotoPress" id="bgimg" />
			<?php
		}
		?>
	</section>
	
	<div id="preloader">
		<img src="<?=SITEURL?>images/loading_dark.gif" width="32" height="32" alt="" />
	</div>
	<div id="img_title"></div>
	<div id="toolbar">
		<a href="#" title="Maximize" onClick="ImageViewMode('full');return false">
			<img src="<?=SITEURL?>images/toolbar_fs_icon.png" width="50" height="50" alt="" />
		</a>
	</div>
	<div id="thumbnails_wrapper">
		<div id="outer_container">
			<div class="thumbScroller">
				<div class="container">
					<?php 
					//add all projects using thumbnail
					$query = $utils->getProjectsForThumbs();
					while ($row = $query->fetch()) {
						?>
						<div class="content">
							<div>
								<a href="<?=stripslashes($row['image'])?>">
									<img src="<?=SITEURL.stripslashes($row['thumb'])?>" title="<?=stripslashes($row['name'])." - ".stripslashes($row['title'])?>" alt="<?=stripslashes($row['name'])." - ".stripslashes($row['title'])?>" class="thumb" />
								</a>
							</div>
						</div>
						<?php 
					}
					?>
				</div>
			</div>
		</div>
	</div>
	
	
	
	<!-- about us -->
	<article id="popupAbout" class="popupAbout">
	 	<div class="customScrollBox">
	    	<div class="container">
	      		<div class="content"> 
	      			<a id="popupAboutClose">
	      				<img src="<?=SITEURL?>images/cross.png" width="20" alt="" />
	      			</a>
	        		<?php
	        		$row = $utils->getAboutMePage();
	        		/*$query = $db->query("select * from pages limit 1");
	        		$row = $query->fetch();*/ 
	        		?>
	        		<h1><?=stripslashes($row['title'])?></h1>
	        		<p>
	        			<?=stripslashes($row['body'])?>
	       			</p>
	      		</div>
	    	</div>
	    	<div class="dragger_container">
	      		<div class="dragger"></div>
	    	</div>
	    	<a class="scrollUpBtn" href="#"></a> <a class="scrollDownBtn" href="#"></a> 
	    </div>
	</article>
	
	<!-- projects -->
	<article id="popupProjects" class="popupProjects">
		<div class="customScrollBox">
	    	<div class="container">
	      		<div class="content">
	      			<a id="popupProjectsClose">
	      				<img src="<?=SITEURL?>images/cross.png" width="20" alt="" />
	      			</a>
	        		<h1>Projects</h1>
	        		<?php 
	      			//get all projects
	        		$query = $utils->getProjects();
					while ($row = $query->fetch()) {
						?>
						<!-- title -->
						<h2>
							Category: <?=stripslashes($row['name'])?>
							<br>
							<?=stripslashes($row['title'])?> 
						</h2>
						<p class="nomargin">
	        				<img src="<?=SITEURL.stripslashes($row['cat_image'])?>" alt="" class="image"/>
	        				<?=stripslashes($row['body'])?>
	        				<br>
	        			</p>
	        			<!-- AddThis Button BEGIN -->
						<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
						<a href="http://www.addthis.com/bookmark.php" class="addthis_button" addthis:url="http://www.mfarinato.com/p/<?=$row['id']?>.php" addthis:title="<?=stripslashes($row['title'])?>" addthis:description="<?=stripslashes($row['title'])?>"></a>
						</div>
						<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f422d475f6ffa74"></script>
						<!-- AddThis Button END -->
	        			
	        			<div class="border"></div>
						<?php 
					}
	      			?>
	      		</div>
	    	</div>
	    	<div class="dragger_container">
	      		<div class="dragger"></div>
	    	</div>
	    	<a class="scrollUpBtn" href="#"></a>
	    	<a class="scrollDownBtn" href="#"></a>
	    </div>
	</article>
	
	<!-- contact us -->
	<article id="popupContact" class="popupContact">
		<div class="customScrollBox">
	    	<div class="container">
	      		<div class="content">
	      			<a id="popupContactClose">
	      				<img src="<?=SITEURL?>images/cross.png" width="20" alt="" />
	      			</a>
	        		<h1>Contact</h1>
	        		<p></p>
	        		<?php include ABSPATH.'include/sendEmail.php';?>
	        		<form method="post" action="<?=SITEURL?>index.php">
	        			<input type="hidden" name="ctrl" value="<?=md5($_CONFIG['secret'])?>">
	          			<label for="name">Name:</label>
	          			<input type="text" name="name" id="name" required placeholder="Name" />
	          			<label for="name">Subject:</label>
	          			<input type="text" name="subject" id="subject" required placeholder="Subject" />
	          			<label for="email">Email:</label>
	          			<input type="email" name="email" id="email" required placeholder="hide@address.com" />
	          			<label for="message">Message:</label>
	          			<textarea name="message" id="message" required></textarea>
	          			<input type="submit" name="submit" value="Send Message" />
	        		</form>
	        		<br />
      				<!-- <iframe width="425" height="300" class="map" src="<?=$utils->getSettingValue('gmaps')?>"></iframe> -->
      				<?=$utils->getSettingValue('gmaps')?>
      				<br>
	        		<div id="social_networks_buttons">
	        			<?php 
	        			$facebook = $utils->getSettingValue('facebook');
	        			$flickr = $utils->getSettingValue('flickr');
	        			$linkedin = $utils->getSettingValue('linkedin');
	        			$myspace = $utils->getSettingValue('myspace');
	        			$twitter = $utils->getSettingValue('twitter');
	        			
	        			if (isset($facebook) && $facebook != '') {
	        				?>
	        				<a href="<?=$facebook?>" target="_blank"><img src="<?=SITEURL?>images/facebook.png" alt="Facebook" /></a>	
	        				<?php 
	        			}
	        			
	        			if (isset($flickr) && $flickr != '') {
	        				?>
	        				<a href="<?=$flickr?>" target="_blank"><img src="<?=SITEURL?>images/flickr.png" alt="Flicker" /></a>
	        				<?php 
	        			}
	        			
	        			if (isset($linkedin) && $linkedin != '') {
	        				?>
	        				<a href="<?=$linkedin?>" target="_blank"><img src="<?=SITEURL?>images/linkedin.png" alt="Linkedin" /></a>
	        				<?php 
	        			}
	        			
	        			if (isset($myspace) && $myspace != '') {
	        				?>
	        				<a href="<?=$myspace?>" target="_blank"><img src="<?=SITEURL?>images/myspace.png" alt="Myspace" /></a>
	        				<?php 
	        			}
	        			
	        			if (isset($twitter) && $twitter != '') {
	        				?>
	        				<a href="<?=$twitter?>" target="_blank"><img src="<?=SITEURL?>images/twitter.png" alt="Twitter" /></a>
	        				<?php 
	        			}
	        			?>
	        		</div>
	      		</div>
	    	</div>
	    	<div class="dragger_container">
	      		<div class="dragger"></div>
	    	</div>
	    	<a class="scrollUpBtn" href="#"></a> <a class="scrollDownBtn" href="#"></a>
	    </div>
	</article>
	
	<!-- blog -->
	<article id="popupBlog" class="popupBlog">
	 	<div class="customScrollBox">
	    	<div class="container">
	      		<div class="content">
	      			<a id="popupBlogClose"><img src="<?=SITEURL?>images/cross.png" width="20" alt="" /></a>
	        		<h1>Blog</h1>
	        		<?php 
	        		$query = $utils->getBlogArticles();
	        		while ($row = $query->fetch()) {
	        			?>
	        			<h2><?=stripslashes($row['title'])?></h2>
	        			<?php 
	        			//date
	        			$day = date('d',strtotime($row['create_date']));
	        			$month = date('M',strtotime($row['create_date']));
	        			$year = date('Y',strtotime($row['create_date']));
	        			?>
	        			<div class="blogDate">
	        				<span class="day"><?=$day?></span>
	        				<span class="month"><?=$month?></span>
	        				<span class="year"><?=$year?></span>
	        			</div>
	        			<p><?=stripslashes($row['body'])?></p>
	        			<!-- AddThis Button BEGIN -->
						<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
						<a href="http://www.addthis.com/bookmark.php" class="addthis_button" addthis:url="http://www.mfarinato.com/b/<?=$row['code']?>.php" addthis:title="<?=stripslashes($row['title'])?>" addthis:description="<?=stripslashes($row['title'])?>"></a>
						</div>
						<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f422d475f6ffa74"></script>
						<!-- AddThis Button END -->
	        			<div class="border"></div>
	        			<?php 
	        		}
	        		?>
	     		</div>
	    	</div>
	    	<div class="dragger_container">
	      		<div class="dragger"></div>
	    	</div>
	    	<a class="scrollUpBtn" href="#"></a> <a class="scrollDownBtn" href="#"></a>
	    </div>
	</article>
	
	<script type="text/javascript" src="<?=SITEURL?>scripts/gallery.js"></script> 
	<script type="text/javascript" src="<?=SITEURL?>scripts/jquery.mCustomScrollbar.js"></script>
</body>
</html>
Return current item: EZphotopress