fogproject  1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.
  Fossies Dox: fogproject-1.5.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

loadglobals.class.php
Go to the documentation of this file.
1 <?php
22 class LoadGlobals extends FOGBase
23 {
29  private static $_loadedglobals;
35  private static function _init()
36  {
37  global $sub;
38  if (self::$_loadedglobals) {
39  return;
40  }
41  $GLOBALS['FOGFTP'] = new FOGFTP();
42  $GLOBALS['FOGCore'] = new FOGCore();
44  $GLOBALS['DB'] = DatabaseManager::getDB();
45  if (!$GLOBALS['DB']) {
46  return;
47  }
49  if (session_status() != PHP_SESSION_NONE) {
50  $GLOBALS['currentUser'] = new User((int)$_SESSION['FOG_USER']);
51  } else {
52  $GLOBALS['currentUser'] = new User(0);
53  }
54  $GLOBALS['HookManager'] = FOGCore::getClass('HookManager');
55  $GLOBALS['HookManager']
56  ->load();
57  $GLOBALS['EventManager'] = FOGCore::getClass('EventManager');
58  $GLOBALS['EventManager']
59  ->load();
60  $GLOBALS['FOGURLRequests'] = FOGCore::getClass('FOGURLRequests');
61  $subs = array(
62  'configure',
63  'authorize',
64  'requestClientInfo'
65  );
66  if (in_array($sub, $subs)) {
67  new DashboardPage();
68  unset($subs);
69  exit;
70  }
71  self::$_loadedglobals = true;
72  unset($subs);
73  }
79  public function __construct()
80  {
81  self::_init();
82  parent::__construct();
83  }
84 }
exit
exit
Definition: download.php:102
FOGBase\getClass
static getClass($class, $data='', $props=false)
Definition: fogbase.class.php:439
FOGCore
Definition: fogcore.class.php:23
FOGFTP
Definition: fogftp.class.php:23
DashboardPage
Definition: dashboardpage.class.php:23
DatabaseManager\establish
static establish()
Definition: databasemanager.class.php:31
LoadGlobals\_init
static _init()
Definition: loadglobals.class.php:35
LoadGlobals\$_loadedglobals
static $_loadedglobals
Definition: loadglobals.class.php:29
FOGBase
Definition: fogbase.class.php:25
DatabaseManager\getDB
static getDB()
Definition: databasemanager.class.php:181
FOGCore\setEnv
static setEnv()
Definition: fogcore.class.php:191
LoadGlobals\__construct
__construct()
Definition: loadglobals.class.php:79
LoadGlobals
Definition: loadglobals.class.php:23
User
Definition: user.class.php:23