示例#1
0
 public function check_authentification()
 {
     // begin authenticate part
     if (AUTH_TYPE == 1) {
         if (!$AUTHENTICATE) {
             header("WWW-Authenticate: Basic realm=\"ADMIN " . CONF_SITE_NAME . "\"");
             header("HTTP/1.0 401 Unauthorized");
             $ft = new FastTemplate(ADMIN_TEMPLATE_CONTENT_PATH);
             $ft->define(array("main" => "template_firstpage.html", "content" => "authentication_failed.html"));
             $ft->multiple_assign_define("LANG_");
             $ft->multiple_assign_define("CONF_");
             $ft->parse("BODY", array("content", "main"));
             $ft->showDebugInfo(ERROR_DEBUG);
             $ft->FastPrint();
             exit;
         }
     } else {
         if (AUTH_TYPE == 2) {
             include_once INCLUDE_PATH . 'cls_session.php';
             $sess = new MYSession();
             if (!$sess->get(SESSION_ID)) {
                 $sess->set('session_url_before', $_SERVER['REQUEST_URI']);
                 header("Location: login.php");
                 exit;
             }
         }
     }
     // end authenticate part
 }
示例#2
0
include_once "../config.inc.php";
include_once INCLUDE_PATH . 'cls_session.php';
$sess = new MYSession();
include_once INCLUDE_PATH . "cls_fast_template.php";
include_once INCLUDE_LANGUAGE_PATH . $LANG . ".inc.php";
include_once INCLUDE_LANGUAGE_PATH . $LANG . ".admintool.inc.php";
include_once INCLUDE_PATH . "connection.php";
$stringutil = new String("nope");
$all_url_vars = array();
$all_url_vars = $stringutil->parse_all();
//$util=new Authenticate();
//$util->check_authentification();
if (empty($all_url_vars['action'])) {
    // unset session
    $url = $sess->get('session_url_before');
    session_destroy();
    //$sess = new MYSession();
    $sess->set('session_url_before', $url);
    $ft = new FastTemplate(ADMIN_TEMPLATE_CONTENT_PATH);
    $ft->define(array("main" => "template_firstpage.html", "content" => "login.html"));
    $ft->assign("MESSAGE", $all_url_vars['message']);
    $ft->multiple_assign_define("LANG_");
    $ft->multiple_assign_define("CONF_");
    $ft->parse("BODY", array("content", "main"));
    $ft->showDebugInfo(ERROR_DEBUG);
    $ft->FastPrint();
} else {
    if ($all_url_vars['userid'] == USER && $all_url_vars['password'] == PASSWORD) {
        $sess->set(SESSION_ID, SESSION_ID);
        if ($sess->get('session_url_before')) {
示例#3
0
include_once INCLUDE_PATH . "cls_fast_template.php";
include_once INCLUDE_PATH . "cls_string.php";
include_once INCLUDE_PATH . "cls_session.php";
//include_once (INCLUDE_PATH . "PhpBeautifier.inc.php");
$stringutil = new String();
$session = new MYSession();
$xml = new Xml();
$all_url_vars = $stringutil->parse_all();
$action = $all_url_vars["action"];
$items = $all_url_vars['items'];
/**
 * @author   - Kiss Szilard
 * @desc     - 
 * @vers     - 1.0
 **/
$functions = $session->get("functions", $functions);
$fields = $session->get("fields", $fields);
$projectname = $session->get("projectname");
$author = $session->get("author");
$date = $session->get("date");
$name = $session->get("name");
$classvar = $session->get("variable");
/**
 * @author   - Valics Lehel
 * @desc     - Lower and upper the project name (projectname field). 
 * @ex       - testproduct, TESTPRODUCT
 * @vers     - 1.0
 **/
$NAME = strtolower($session->get("name"));
$NAMEUPPER = strtoupper($session->get("name"));
/**