add web domain

This commit is contained in:
Serghey Rodin 2012-05-28 18:19:49 +03:00
commit 2d12f47a73
18 changed files with 559 additions and 29 deletions

View file

@ -2,18 +2,19 @@
// Set timezone
date_default_timezone_set('UTC');
// Check user
// Check user session
if (!isset($_SESSION['user'])) {
$_SESSION['request_uri'] = $_SERVER['REQUEST_URI'];
header("Location: /login/");
exit;
}
if (!empty($_SESSION['look'])&& $_SESSION['look'] != 'admin') {
if (isset($_SESSION['look']) && ( $_SESSION['look'] != 'admin' )) {
$user = $_SESSION['look'];
} else {
$user = $_SESSION['user'];
}
define('VESTA_CMD', '/usr/bin/sudo /usr/local/vesta/bin/');
$i = 0;
@ -22,6 +23,7 @@ $i = 0;
function check_error($return_var){
if ( $return_var > 0 ) {
header("Location: /error/");
exit;
}
}