Exemple #1
0
    }
}
require_once 'libs-php/htmltable.class.php';
require_once 'blockdevices.lib.php';
// define some constants referenced in fbegin.inc
define('INCLUDE_TBLSTYLE', true);
define('INCLUDE_JSCRIPTS', 'dashboard.js');
//check_update();
// check if some important applications running
$statusMsg = null;
if (pbx_exec("core show version") == 1) {
    // TODO: display this info somewere...
    $statusMsg = _("Asterisk hasn't started yet. Please wait for a few minutes. If it won't start you need to reboot TeeBX.");
}
// init a table object
$tbl = new htmlTable('id=table01|class=home');
// fill the table caption
$tbl->caption(_('System Information'));
// a tbody is mandatory
$tbl->tbody();
// show system informations
// name
$tbl->tr();
$tbl->td(_('Name'), 'class=tblrowlabel');
$tbl->td($config['system']['hostname'] . '.' . $config['system']['domain']);
// version information
$verInfo = '<strong>' . $prodInfo['prod'] . '&nbsp;' . $prodInfo['buid'] . '</strong>' . '&nbsp;' . _('on') . '&nbsp;' . $g['platform'];
$verDetails = '';
if ($prodInfo['rev'] != '') {
    $verDetails .= _('source revision') . ' ' . $prodInfo['rev'] . ', ';
}
Exemple #2
0
        }
        $tblStorage->td($fsFree);
        $tblStorage->td($fsUsed);
        $tblStorage->td($fsTotal);
        $tblStorage->td($usage);
        // attached services
        $tblStorage->td('');
    }
} else {
    $tblStorage->tr();
    $tblStorage->td(_('No additional storage configured.'), 'colspan=8');
}
//
// report all system devices
// init another table object
$tblDiskRep = new htmlTable('id=table02|class=report');
// fill the table caption
$tblDiskRep->caption(_('Disk Report'));
// table section heading
$tblDiskRep->thead();
$tblDiskRep->tr();
$tblDiskRep->th(_('Free disks'), 'class=bodytitle|colspan=3');
$tblDiskRep->tr();
$tblDiskRep->th(_('Device name'), 'class=colheader');
$tblDiskRep->th(_('Size'), 'class=colheader|colspan=2');
//
// section body
$tblDiskRep->tbody();
$freeDisks = getFreeDisks($config, $disksInfo);
if (!empty($freeDisks)) {
    foreach (array_keys($freeDisks) as $key) {
Exemple #3
0
        $permissions = $dAcl . '|' . $dGroup . '|_con_' . $dCon;
        $admin = $modData['isAdmin'];
        if (isset($modData['isContext'])) {
            $depends = $modData['isContext'];
        }
    }
}
$objHead = new htmlHeading();
$objHead->str = $addHeading;
if ($mode == 'edit') {
    $objHead->str = $editHeading;
}
$objHead->type = 1;
$str = $objHead->show();
$str .= '<p><b>' . $moduleLabel . ':</b>&nbsp;&nbsp;' . $moduleName . '</p>';
$objTable = new htmlTable();
$objTable->width = '99%';
$objTable->cellpadding = 5;
$objHead->str = $linkLabel;
$objHead->type = 3;
$objTable->startRow();
$objTable->addCell($objHead->show(), '', '', '', '', 'colspan="4"');
$objTable->endRow();
// Available side menus
$objDrop = new dropdown('menu');
if ($page) {
    $objLabel = new label($pageLabel, 'input_menu');
    $objDrop->extra = 'onChange = "javascript:changeOptions()"';
    $objDrop->addOption('lecturer', 'lecturer');
    $objDrop->addOption('admin', 'admin');
    $objDrop->addOption('manage', 'manage');