本文整理汇总了PHP中admin::print_footer方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::print_footer方法的具体用法?PHP admin::print_footer怎么用?PHP admin::print_footer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::print_footer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$template->set_file('page', 'access.htt');
$template->set_block('page', 'main_block', 'main');
$template->set_block('main_block', 'users_block', 'user');
$template->set_block('main_block', 'groups_block', 'group');
// Insert values into the template object
$template->set_var(array('ADMIN_URL' => ADMIN_URL, 'THEME_URL' => THEME_URL, 'WB_URL' => WB_URL));
/**
* Insert permission values into the template object
* Deprecated - as we are using blocks.
*/
$display_none = "style=\"display: none;\"";
if ($admin->get_permission('users') != true) {
$template->set_var('DISPLAY_USERS', $display_none);
}
if ($admin->get_permission('groups') != true) {
$template->set_var('DISPLAY_GROUPS', $display_none);
}
// Insert section names and descriptions
$template->set_var(array('USERS' => $MENU['USERS'], 'GROUPS' => $MENU['GROUPS'], 'ACCESS' => $MENU['ACCESS'], 'USERS_OVERVIEW' => $OVERVIEW['USERS'], 'GROUPS_OVERVIEW' => $OVERVIEW['GROUPS']));
if ($admin->get_permission('users') == true) {
$template->parse('main_block', "users_block", true);
}
if ($admin->get_permission('groups') == true) {
$template->parse('main_block', "groups_block", true);
}
// Parse template object
$template->parse('main', 'main_block', false);
$template->pparse('output', 'page');
// Print admin footer
$admin->print_footer();
示例2: Process
/**
Does the actual rendering of the Tool
*/
public function Process($echo = false)
{
//Set the Enviroment
global $database, $admin, $TEXT, $MENU, $HEADING, $MESSAGE, $OVERVIEW;
// only for Droplet Module as its using strange Globals
global $twig;
//check and generate vars and initialize the object
$this->CheckVars();
// templateengine users like to have this in an Array
$VARS = $this->GetPubVars();
// PHP templater like all vars in a direct manner
extract($VARS);
// Loading language files
extract($this->GetLangVars($TEXT, $MENU, $HEADING, $MESSAGE, $OVERVIEW));
// Setting the Category name for breadcrumb
$categoryName = $HEADING['ADMINISTRATION_TOOLS'];
if ($this->toolType == "setting") {
$categoryName = $MENU['SETTINGS'];
}
if ($this->toolType == "backend") {
$categoryName = "Backend Pages";
}
// locally defined function for compatibility
// The following Stuff is now loaded
// framework/config.php
// functions.php
// framework/initialize.php
// framework/class.admin.php
// all module and core classes are registered in Autoloader
// Info.php whith slightly modified Vars
// Language Vars of this Template are in
// backend.js/css should be loaded by admin. (hopefully)
// ok lets start output buffer As those old stuff does print and echo imediately
// this makes it hard to filter later on.
// Output buffer for full page
ob_start();
// create admin-object but suppress headers if no page is set
// for example this offers opportunety to give back files for download
// this possibly creates output already
// class Admin gets a
if ($noPage) {
$admin = new admin($this->adminSection, $this->adminAccess, false, true, $operateBuffer = false);
} else {
$admin = new admin($this->adminSection, $this->adminAccess, true, true, $operateBuffer = true);
}
// Output buffer for module only
ob_start();
// for use in this class methods
$this->admin = $admin;
// show title if not function 'save' is requested
// only if we do not look at page listing
if (!$doSave and !$noPage and !preg_match("/backend/", $module_function)) {
print '<h4><a href="' . $returnToTools . 'title="' . $categoryName . '">' . $categoryName . '</a>' . ' » ' . $module_name . '</h4>' . "\n";
}
// eine Variable für this festlegen
$oWrapper = $this;
//Load actual tool
require WB_PATH . '/modules/' . $toolDir . '/tool.php';
// Fetch the Buffer for later filtering
$toolOutput = ob_get_clean();
// FILTER for OPF DASHBOARD just for this module(tool)
if (function_exists('opf_controller')) {
$toolOutput = opf_controller('backend', $toolOutput, $this->toolDir);
}
echo $toolOutput;
// output footer if we are not in no_page mode
if (!$noPage) {
$admin->print_footer($activateJsAdmin = false, $operateBuffer = true);
}
// Fetch the Buffer for later filtering
$fullOutput = ob_get_clean();
// FILTER for OPF DASHBOARD for whole page
if (function_exists('opf_controller')) {
$fullOutput = opf_controller('backend', $fullOutput);
}
// echo if set so
if (!$echo) {
return $fullOutput;
}
echo $fullOutput;
return false;
}