本文整理汇总了PHP中admin::get_display_name方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::get_display_name方法的具体用法?PHP admin::get_display_name怎么用?PHP admin::get_display_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::get_display_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin
$ins = new class_init_page($database, $_SESSION['USER_ID'], $_SERVER['SCRIPT_NAME']);
}
require_once LEPTON_PATH . '/framework/class.admin.php';
$admin = new admin('Start', 'start');
// Setup template object
$tpl = new Template(THEME_PATH . '/templates');
$tpl->debug = false;
$tpl->set_file('page', 'start.htt');
$tpl->set_block('page', 'main_block', 'main');
$tpl->set_block('main_block', 'show_preferences_block', 'show_preferences');
// first set all blocks to visible
$tpl->parse('show_preferences', 'show_preferences_block', true);
// Check register_globals:
$warning = ini_get('register_globals') ? 'This PHP installation is insecure because register_globals is on! Please contact your administrator.' : '';
// Insert values into the template object
$tpl->set_var(array('WELCOME_MESSAGE' => $MESSAGE['START_WELCOME_MESSAGE'], 'CURRENT_USER' => $MESSAGE['START_CURRENT_USER'], 'DISPLAY_NAME' => $admin->get_display_name(), 'ADMIN_URL' => ADMIN_URL, 'LEPTON_URL' => LEPTON_URL, 'THEME_URL' => THEME_URL, 'NO_CONTENT' => '<p> </p>', 'WARNING' => $warning));
// Insert permission values into the template object
$tpl->set_block('main_block', 'show_pages_block', 'show_pages');
if ($admin->get_permission('pages') != true) {
$tpl->set_var('DISPLAY_PAGES', 'display:none;');
$tpl->set_block('show_pages', '');
} else {
$tpl->parse('show_pages', 'show_pages_block', true);
}
$tpl->set_block('main_block', 'show_media_block', 'show_media');
if ($admin->get_permission('media') != true) {
$tpl->set_var('DISPLAY_MEDIA', 'display:none;');
$tpl->set_block('show_media', '');
} else {
$tpl->parse('show_media', 'show_media_block', true);
}
示例2: header
header('Location: ' . WB_URL . '/upgrade-script.php');
exit;
} else {
echo "<p style=\"text-align:center;\"> The <strong>upgrade script</strong> could not be start automatically.\n" . "Please click <a style=\"font-weight:bold;\" " . "href=\"" . WB_URL . "/upgrade-script.php\">on this link</a> to start the script!</p>\n";
exit;
}
}
$msg .= '' . $MESSAGE['START_UPGRADE_SCRIPT_EXISTS'] . '<br />';
}
// Setup template object, parse vars to it, then parse it
// Create new template object
$template = new Template(dirname($admin->correct_theme_source('start.htt')));
$template->set_file('page', 'start.htt');
$template->set_block('page', 'main_block', 'main');
// Insert values into the template object
$template->set_var(array('WELCOME_MESSAGE' => $MESSAGE['START_WELCOME_MESSAGE'], 'CURRENT_USER' => $MESSAGE['START_CURRENT_USER'], 'DISPLAY_NAME' => $admin->get_display_name(), 'ADMIN_URL' => ADMIN_URL, 'WB_URL' => WB_URL, 'THEME_URL' => THEME_URL, 'WB_VERSION' => WB_VERSION));
// Insert permission values into the template object
if ($admin->get_permission('pages') != true) {
$template->set_var('DISPLAY_PAGES', 'display:none;');
}
if ($admin->get_permission('media') != true) {
$template->set_var('DISPLAY_MEDIA', 'display:none;');
}
if ($admin->get_permission('preferences') != true) {
$template->set_var('DISPLAY_PREFERENCES', 'display:none;');
}
if ($admin->get_permission('addons') != true) {
$template->set_var('DISPLAY_ADDONS', 'display:none;');
}
if ($admin->get_permission('access') != true) {
$template->set_var('DISPLAY_ACCESS', 'display:none;');