Location: PHPKode > projects > ActualAnalyzer > direct.php
<?php

/*------------------------------------------------------------------------*/
// Product: ActualAnalyzer
// Script: direct.php
// Source: http://www.actualscripts.com/
// Copyright: (c) 2002-2006 ActualScripts, Company. All rights reserved.
//
// YOU DON'T NEED TO EDIT ANYTHING IN THIS SCRIPT.
// SEE LICENSE AGREEMENT FOR MORE DETAILS
/*------------------------------------------------------------------------*/

if(!isset($rf)) $rf='./';

//block external code
if(isset($_GET['rf'])||isset($_POST['rf'])) die('Access is denied.');

if(!file_exists($rf.'common/error.php')) die('Configuration error. Incorrect value "$rf=".');

require $rf.'common/error.php';
require $rf.'common/global.php';
require $rf.'common/config.php';
require $rf.'common/auth.php';
require $rf.'common/dbaccess.php';

//errors
$err = new error($rf);

//config
$conf = new config($rf);
if($err->flag) {
  $err->reason('direct.php||constructor of config class has failed');
  $err->log_out();
}

//database functions
require $rf.'common/db/'.$conf->db.'.php';

if(isset($_GET['action'])||isset($_POST['action'])||isset($_POST['uname'])||isset($_POST['unamef'])) $action=true;
else $action=false;

if($action) {
  //authentication
  $login = new auth($rf,'direct',_ADMINAREA);
  if($err->flag) {
    $err->reason('direct.php||constructor of auth class has failed');
    $err->log_out();
    $err->scr_out();
    exit;
  }
}

//database access
$dbaccess = new dbaccess($rf);
if($err->flag) {
  $err->reason('direct.php||constructor of dbaccess class has failed');
  $err->log_out();
}

//get ID's of groups/pages
if($action) {
  $dbaccess->getids();
  if($err->flag) {
    $err->reason('direct.php||can\'t get id\'s of groups/pages');
    $err->log_out();
  }
}

?>
Return current item: ActualAnalyzer