Пример #1
0
@session_start();
@set_time_limit("3600");
@error_reporting(E_ALL ^ E_NOTICE);
define("_VALID_MOS", 1);
#load configuration
$config_file = "cloner.config.php";
require_once $config_file;
require_once "restore/TAR.php";
require_once "cloner.functions.php";
require_once "admin.cloner.html.php";
require_once "common.php";
#Doing some basic authentification
if (!isset($_SESSION['clone']) && $task != 'dologin') {
    $task = 'login';
    HTML_cloner::header();
    HTML_cloner::Login();
    HTML_cloner::footer();
    exit;
} elseif ($task == 'dologin') {
    if ($_REQUEST['username'] == $_CONFIG['jcuser'] && md5($_REQUEST['password']) == $_CONFIG['jcpass']) {
        if (function_exists('session_register')) {
            @session_register('clone');
        }
        $_SESSION['clone'] = 1;
        mosRedirect('index2.php?option=' . $option, "Welcome to XCloner backend");
    } else {
        mosRedirect('index2.php?option=' . $option, "Incorrect username and/or password");
    }
}
############GLOBALS in effect
$GLOBALS['lang_dir'] = $lang_dir;
Пример #2
0
@error_reporting(E_ALL ^ E_NOTICE);
define("_VALID_MOS", 1);
//load configuration
$config_file = "cloner.config.php";
require_once $config_file;
require_once "restore/TAR.php";
require_once "cloner.functions.php";
require_once "admin.cloner.html.php";
require_once "common.php";
$option = "xcloner";
//Doing some basic authentification
if (!isset($_SESSION['clone']) && $task != 'dologin') {
    $task = 'login';
    $html = new HTML_cloner();
    $html->header();
    $html->Login();
    $html->footer();
    exit;
} elseif ($task == 'dologin') {
    if ($_REQUEST['username'] == $_CONFIG['jcuser'] && md5($_REQUEST['password']) == $_CONFIG['jcpass']) {
        if (function_exists('session_register')) {
            @session_register('clone');
        }
        $_SESSION['clone'] = 1;
        mosRedirect('index2.php?option=' . $option, "Welcome to XCloner backend");
    } else {
        mosRedirect('index2.php?option=' . $option, "Incorrect username and/or password");
    }
}
//###########GLOBALS in effect
$GLOBALS['lang_dir'] = $lang_dir;