Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 28 additions & 26 deletions dryden/loader.inc.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<?php

/**
* Module loader script for detecting and displaying the correct module using the Dryden framework, this handles the autolaoding of classes.
* @package zpanelx
* @subpackage dryden -> core
* @author Bobby Allen (ballen@zpanelcp.com)
* @copyright ZPanel Project (http://www.zpanelcp.com/)
* @link http://www.zpanelcp.com/
* @license GPL (http://www.gnu.org/licenses/gpl.html)
*/
global $starttime;
$mtime = explode(' ', microtime());
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;

function __autoload($class_name) {
$path = 'dryden/' . str_replace('_', '/', $class_name) . '.class.php';
if (file_exists($path)) {
require_once $path;
}
}

<?php

/**
* Module loader script for detecting and displaying the correct module using the Dryden framework, this handles the autolaoding of classes.
* @package zpanelx
* @subpackage dryden -> core
* @author Bobby Allen (ballen@zpanelcp.com)
* @copyright ZPanel Project (http://www.zpanelcp.com/)
* @link http://www.zpanelcp.com/
* @license GPL (http://www.gnu.org/licenses/gpl.html)
*/
global $starttime;
$mtime = explode(' ', microtime());
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;

function __autoload($class_name) {
$path = 'dryden/' . str_replace('_', '/', $class_name) . '.class.php';
if (file_exists($path)) {
require_once $path;
}
}

spl_autoload_register('__autoload');

if (isset($_GET['module'])) {
$CleanModuleName = fs_protector::SanitiseFolderName($_GET['module']);

Expand All @@ -33,6 +35,6 @@ function __autoload($class_name) {
if (file_exists($ModulePath)) {
require_once $ModulePath;
}
}

?>
}
?>