Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/admin/home.php
<?php
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/page.class.php';
require_once "../class/utils.class.php";
require_once '../class/class.phpmailer.php';
require_once "../include/startDb.php";
require_once "../include/auth.lib.php";

if ($utils->isIssetLang()) {
	include "lang/".$utils->getLang();
} else {
	include "lang/english.php";
}
define("OBJECT_ENABLE","e");
define("OBJECT_DISABLE","d");
//include "include/func_controls.inc.php";

list($status, $user) = auth_get_status();

if($status == AUTH_LOGGED & auth_get_option("TRANSICTION METHOD") == AUTH_USE_LINK){
	$link = "?uid=".$_GET['uid'];
}else	$link = '';
?>
<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<title><?=$utils->getSettingValue('title')?><?=HOME_TITLE?></title>
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<link rel="stylesheet" href="css/menu_multilevel.css" type="text/css" media="screen, projection"/>
		<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen">
		<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.1.custom.css" type="text/css"/>
		
		<script type="text/javascript" src="js/divsearch.js"></script>
		<script type="text/javascript" src="js/selectAllCheckBox.js"></script>
		<script type="text/javascript" src="js/menu_multilevel.js"></script>
		<script language="javascript" type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript">
		/* START TINYMCE */
		// General options
		tinyMCE.init({
			// General options
			mode : "specific_textareas",
			editor_selector: "tinymce",
			theme : "advanced",
			plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
			theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print",
			theme_advanced_buttons4 : "insertdate,inserttime,preview,|,forecolor,backcolor",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
			width: "650px",
			
			// Example content CSS (should be your site CSS)
			content_css : "css/content.css",

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",

			// Style formats
			style_formats : [
				{title : 'Bold text', inline : 'b'},
				{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
				{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
				{title : 'Example 1', inline : 'span', classes : 'example1'},
				{title : 'Example 2', inline : 'span', classes : 'example2'},
				{title : 'Table styles'},
				{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
			],

			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});
		/* END TINYMCE */
		</script>
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
		<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script> 
		<script type="text/javascript" src="validation.js"></script>
		<script type="text/javascript" src="js/jquery.msgBox.js"></script>
		<script type="text/javascript" src="js/jquery.lightbox.js"></script>
		<script>
			$(function() {
				$(".lightbox").lightbox({
				    fitToScreen: true,
				    imageClickClose: false
			    });
			});
		</script>

	</head>
	<body>
		
	 <div id="headerHomeAdmin"></div>
	
	
	
	<div align="center">
		<br />
		<div style="background: #FFFFFF; text-align: center;">
			<?=$utils->getSettingValue('title')?><?=HOME_TITLE?>
		</div>
		<br />
		<?php
		switch($status){
			case AUTH_LOGGED:
			?>
		<img alt="EZPhotoPress" src="../images/logo_admin.png" />
		<br />
		<b><<?=HOME_WELCOME?><?=$user["username"];?></b>
		<br>
		<a href="home.php" class="category"><?=HOME_HOME?></a> | <a href="logout.php<?=$link?>" class="category"><?=HOME_LOGOUT?></a> | <a href="<?=$utils->getSettingValue('site_url')?>" class="category" target="_blank"><?=HOME_VIEW?><?=$utils->getSettingValue('site_url')?></a>
		<br />
		<br />
 	<div class="table">
		<ul id="nav">
    <li><a href="#"><?=HOME_MENU_SETTINGS?></a>
    	<ul>
    		<li><a class="item2" href="home.php?id=admin&action=changeup"><?=HOME_MENU_SETTINGS_1?></a></li>	
			<li><a class="item2" href="home.php?id=admin&action=settings"><?=HOME_MENU_SETTINGS_2?></a></li>
			<li><a class="item2" href="home.php?id=admin&action=social"><?=HOME_MENU_SETTINGS_3?></a></li>
    	</ul>
    </li>
    <li><a href="#"><?=HOME_MENU_CATEGORIES?></a>
    	<ul>    		
        	<li><a class="item2" href="home.php?id=cate&action=new"><?=HOME_MENU_CATEGORIES_1?></a></li>
            <li><a class="item2" href="home.php?id=cate&action=manage&type=e"><?=HOME_MENU_CATEGORIES_2?></a></li>
            <li><a class="item2" href="home.php?id=cate&action=manage&type=d"><?=HOME_MENU_CATEGORIES_3?></a></li>
   		</ul>
    </li>
    <li><a href="#"><?=HOME_MENU_PROJECTS?></a>
    	<ul>    		
        	<li><a class="item2" href="home.php?id=projects&action=new"><?=HOME_MENU_PROJECTS_1?></a></li>
            <li><a class="item2" href="home.php?id=projects&action=manage&type=e"><?=HOME_MENU_PROJECTS_2?></a></li>
            <li><a class="item2" href="home.php?id=projects&action=manage&type=d"><?=HOME_MENU_PROJECTS_3?></a></li>
   		</ul>
    </li>
    <li><a href="#"><?=HOME_MENU_ABOUTME?></a>
    	<ul>
        	<li><a class="item2" href="home.php?id=page&action=manage"><?=HOME_MENU_ABOUTME_1?></a></li>
   		</ul>
    </li>
	<li><a href="#"><?=HOME_MENU_BLOG?></a>
		<ul>
			<li><a class="item2" href="home.php?id=blog&action=new"><?=HOME_MENU_BLOG_1?></a></li>
			<li><a class="item2" href="home.php?id=blog&action=manage&type=e"><?=HOME_MENU_BLOG_2?></a></li>
			<li><a class="item2" href="home.php?id=blog&action=manage&type=d"><?=HOME_MENU_BLOG_3?></a></li>
		</ul>
	</li>
</ul>
		
	</div>
<br>
		
<center>
		<?php
		$id = @$_GET['id'];
		$action = @$_GET['action'];

		if (isset($id)) {
			if ($id == "admin") {
				if ($action == "changeup") { //modify admin data
					include "settings/manageAdminData.php";
				} else if ($action == "settings") { // menage email used to send message from contact us page
					include "settings/settings.php";
				} else if ($action == "social") {
					include 'settings/socialNetworks.php';	
				}
			} else if ($id == "page") {
				$paid = @$_GET['paid'];
				if ($action == "manage") {
					include "pages/modifyPage.php";
				}
			} else if ($id == "cate") {
				$catid = @$_GET['catid'];
				$enable = @$_GET['enable'];
				$typeObject = @$_GET['type']; // object enable or disable
				if ($action == "new") { // add new category
					include "categories/addCategory.php"; 
				} else if ($action == "manage" ) { //manage costumers
					include "categories/manageCategories.php"; 
				} else if ($action == "modify") { // modify existing catregory
					include "categories/modifyCategory.php";	
				} else if ($action == "enable") { // enable / disable the category
					include 'categories/enableDisableCategory.php';	
				} else if ($action == "delete") {
					include 'categories/deleteCategory.php';
				}
			} else if ($id == "projects") {
				$pid = @$_GET['pid'];
				$enable = @$_GET['enable'];
				$typeObject = @$_GET['type']; // object enable or disable
				if ($action == "new") { //add new project
					include "projects/addProject.php";
				} else if ($action == "manage") { // manage projects
					include "projects/manageProjects.php";
				} else if ($action == "delete") { // delete project
					include "projects/deleteProject.php";
				} else if ($action == "enable") { // manage diaabled project
					include "projects/enableDisableProject.php";	
				} else if ($action == "modify") { // modify project
					include "projects/modifyProject.php";
				}
			} else if ($id == "blog") {
				$bid = @$_GET['bid']; // Post id
				$enable = @$_GET['enable'];
				$typeObject = @$_GET['type']; // object enable or disable
				if ($action == "new") { // add new Post
					include 'posts/addPost.php';
				} else if ($action == "modify") { // modify Post
					include 'posts/modifyPost.php';
				} else if ($action == "delete") { // delete Post
					include 'posts/deletePost.php';
				} else if ($action == "manage") { // mamage Posts
					include 'posts/managePosts.php';
				} else if ($action == "enable") { // manage diaabled project
					include "posts/enableDisablePost.php";	
				}
			}		
		}
		?>
		</center>
		
		<?php
			break;
			case AUTH_NOT_LOGGED:
				unset($db);
			?>
		<center>
			<img alt="EZPhotoPress" src="../images/logo.png" />
		</center>
		<br />
		<br />
		<form action="login.php<?=$link?>" method="post">
			<table cellspacing="2">
				<tr>
					<td style="text-align:right;"><?=HOME_USERNAME_LOGIN?></td>
					<td><input type="text" name="uname"></td>
				</tr>
				<tr>
					<td style="text-align:right;"><?=HOME_PASSWORD_LOGIN?></td>
					<td><input type="password" name="passw"></td>
				</tr>
				<tr>
					<td style="text-align:right;"><?=HOME_LANG_LOGIN?></td>
					<td>
					<select name="lang">
						<?php 
						foreach ($utils->getAllLangs() as $lang) {
							?>
							<option value="<?=$lang?>"><?=$lang?></option>
							<?php 
						}
						?>
					</select>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: center;"><input type="submit" name="action" value="login"></td>
				</tr>
				
				
				<tr>
					<td colspan="2" style="text-align: center;"><a href="../index.php" class="category"><?=HOME_HOME?></a></td>
				</tr>
			</table>
		</form>
		<?php
			break;
		}
		?>
	</div>
	<br />
	<br />
	<br />
	<br />
	<div id="footerHomeAdmin">
		&copy; <?php echo date('Y'); ?> <?=$utils->getSettingValue('site_url')?>
		<br>
		<br>
		<?=HOME_CREATOR?> <a href="http://www.mfarinato.com/" class="category" target="_blank">Mario Farinato</a> 
		&nbsp;&nbsp;&nbsp;&mdash;&nbsp;&nbsp;&nbsp;
		<?=HOME_DEVELOPER?> <a href="http://www.linkedin.com/pub/giacomo-campanelli/2a/858/268" class="category" target="_blank">Giacomo Campanelli</a> 
	</div>
	<br/>
</body>
</html>
Return current item: EZphotopress