<?php

defined('_JEXEC') or die('Restricted access');

class ConfigCMS{
	
	const SITE_TITLE = "Unite Gallery Admin";
	const ROLE_ADMIN = "admin";
	const ROLE_EDITOR = "editor";
	
	public static $pathBase;
	public static $pathSite;
	public static $pathImages;
	public static $pathViews;
	public static $pathBaseRelative;
	public static $pathFront;
	public static $isAdmin = false;
	
	public static $urlBase;		//admin base
	public static $urlAjaxFront;
	
	public static $urlCache;
	public static $urlTemplate;
	public static $urlSite;		//url site
	public static $urlImages;
	
	public static $tableUsers;
	
	
	/**
	 * init the config
	 */
	public static function initConfig(){
		
		if(defined("IS_CMS_ADMIN") == true && IS_CMS_ADMIN == true)
			self::$isAdmin = true;
		
		self::$tableUsers = DB_PRF."users";
		
		self::$urlBase = Uri::getUrlAdmin();
		
		self::$urlAjaxFront = self::$urlBase."ajax.php?action=ajax";
		
		self::$urlSite = Uri::getUrlSite();
		
		self::$urlImages = self::$urlSite.DIR_IMAGES."/";
		
		self::$urlCache = self::$urlBase."cache/";
		
		self::$urlTemplate = self::$urlBase."template/";
		
		self::$pathBase = realpath(dirname(__FILE__)."/..")."/";
		
		self::$pathBaseRelative = Uri::getPathRelative(self::$pathBase);
		
		self::$pathFront = self::$pathBaseRelative."front.php";
		
		self::$pathSite = realpath(self::$pathBase."../")."/";
		
		self::$pathImages = self::$pathSite."images/";
		
		self::$pathViews = self::$pathBase."views/";
		
	}
	
	/**
	 * print config
	 */
	public static function printConfig(){
		
		$methods = get_class_vars( "ConfigCMS" );
		
		dmp("maxim");
		dmp($methods);
		exit();
	}
	
	
}

ConfigCMS::initConfig();

//ConfigCMS::printConfig();

?>