本文整理匯總了PHP中module::setModulesDir方法的典型用法代碼示例。如果您正苦於以下問題:PHP module::setModulesDir方法的具體用法?PHP module::setModulesDir怎麽用?PHP module::setModulesDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類module
的用法示例。
在下文中一共展示了module::setModulesDir方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: module
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
// session checking
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/template_parser/simbio_template_parser.inc.php';
require LIB_DIR . 'module.inc.php';
// https connection (if enabled)
if ($sysconf['https_enable']) {
simbio_security::doCheckHttps($sysconf['https_port']);
}
// create the template object
$template = new simbio_template_parser($sysconf['admin_template']['dir'] . '/' . $sysconf['admin_template']['theme'] . '/index_template.html');
// page title
$page_title = $sysconf['library_name'] . ' :: Library Automation System';
// main menu
$module = new module();
$module->setModulesDir(MODULES_BASE_DIR);
$main_menu = $module->generateModuleMenu($dbs);
$current_module = '';
// get module from URL
if (isset($_GET['mod']) and !empty($_GET['mod'])) {
$current_module = trim($_GET['mod']);
}
// read privileges
$can_read = utility::havePrivilege($current_module, 'r');
// submenu
$sub_menu = $module->generateSubMenu(($current_module and $can_read) ? $current_module : '');
// start the output buffering for main content
ob_start();
// info
$info = __('Welcome To The Library Automation System, you are currently logged in as') . ' <strong>' . $_SESSION['realname'] . '</strong>';
//mfc
示例2: module
</div>
</fieldset>
<?php
/* main content */
ob_start();
?>
<form name="shortcut-form" class="shortcut-form submitViaAJAX" id="mainForm" method="post" action="<?php
echo MWB . 'system/shortcut.php';
?>
">
<div class="row">
<div class="col-md-5">
<select class="form-control shortcuts-list" name="shortcutsOptions" id="shortcuts-options" multiple="multiple" size="10">
<?php
$modules = new module();
$modules->setModulesDir(MDLBS);
$menus = $modules->getModuleMainMenu($dbs, true);
foreach ($menus as $main_menu) {
$_formated_module_name = ucwords(str_replace('_', ' ', $main_menu['name']));
echo '<optgroup label="' . strtoupper(__($_formated_module_name)) . '">';
if (isset($main_menu['childs']) && $main_menu['childs']) {
foreach ($main_menu['childs'] as $id => $main_menu_child) {
if ($main_menu_child[0] == 'Header') {
echo '<option disabled="disabled" class="option-disabled">' . $main_menu_child[1] . '</option>';
} else {
echo '<option value="' . $main_menu_child[0] . '|' . str_ireplace(MWB, '/', $main_menu_child[1]) . '" id="submenu_' . $id . '"> ' . $main_menu_child[0] . '</option>';
}
}
}
echo '</optgroup>';
}