private static function getMainEntries($order) { // If we have a registered system, change the layout. if (!function_exists('sysadmin_get_license')) { $dir = FreePBX::create()->Config->get_conf_setting('AMPWEBROOT'); if (file_exists($dir . "/admin/modules/sysadmin/functions.inc.php")) { // Woo. Lets load it! include $dir . "/admin/modules/sysadmin/functions.inc.php"; } } $reged = function_exists('sysadmin_get_license') && sysadmin_get_license(); $sections = array(); foreach (glob(dirname(__DIR__) . '/sections/*.class.php') as $file) { $class = "\\FreePBX\\modules\\Dashboard\\Sections\\" . str_replace('.class', '', pathinfo($file, PATHINFO_FILENAME)); if (!class_exists($class)) { include $file; } $class = new $class(); foreach ($class->getSections($order) as $section) { //avoid duplicate orders while (isset($sections[$section['order']])) { $section['order']++; } $sections[$section['order']] = array("group" => $section['group'], "title" => $section['title'], "width" => $section['width'], "rawname" => $class->rawname, "section" => $section['section']); } } ksort($sections); return array_values($sections); }
function _deploymentid() { if (function_exists('sysadmin_get_license')) { $lic = sysadmin_get_license(); if (isset($lic['deploymentid'])) { return trim($lic['deploymentid']); } } return false; }