View file kernel/kernel.php

File size: 2.16Kb
<?php
 ##################################################################
 ## Development by CoMMoN web site author http://mirmastera.ru   ##
 ## fportal web site scripts http://fportal.tk                   ##
 ## All rights reserved authors                                  ##
 ##################################################################
//Получение настроек системы
  //Имя системы
  $system_q_name = $mysql -> query("SELECT `value` FROM `".PREFIX."system` WHERE `name` = 'name';"); 
  $system_name = one($system_q_name);
  define('SYSTEM_NAME', $system_name);
  //Описание сайта
  $system_q_des = $mysql -> query("SELECT `value` FROM `".PREFIX."system` WHERE `name` = 'des';"); 
  $system_des = one($system_q_des);
  define('SYSTEM_DES', $system_des);
  //Ключевые слова
  $system_q_key = $mysql -> query("SELECT `value` FROM `".PREFIX."system` WHERE `name` = 'key';"); 
  $system_key = one($system_q_key);
  define('SYSTEM_KEY', $system_key);               
  //Оформление
  $system_q_style = $mysql -> query("SELECT `value` FROM `".PREFIX."system` WHERE `name` = 'style';"); 
  $system_style = one($system_q_style);
  //define('STYLE', $system_style); 
  //Копирайт
  $system_q_copy = $mysql -> query("SELECT `value` FROM `".PREFIX."system` WHERE `name` = 'copy';"); 
  $system_copy = one($system_q_copy);
  define('SYSTEM_COPY', $system_copy);
  //Security key
  define('SKEY', 'fpt');
  
  //дрес сайта
  define('HOME','http://'.$_SERVER['HTTP_HOST']);
  ##################################################### PostANDGet
  define('ID', !empty($_GET['id']) ? intval($_GET['id']) : 0);
  //define('MODE', !empty($_GET['mode']) ? htmlspecialchars($_GET['mode']) : null);
  //define('ACT', !empty($_GET['act']) ? htmlspecialchars($_GET['act']) : null);
  define('DO', !empty($_GET['do']) ? htmlspecialchars($_GET['do']) : null);
  ##################################################### 
    if (isset($_COOKIE['theme']))
	{ 
	$cookie = $_COOKIE['theme']; 
	}

	if ($cookie == 'web')
	{ 
	define('STYLE', 'webstyle'); 
	}
	else 
	{ 
	define('STYLE', 'default');  
	}
?>