本文整理汇总了PHP中PageGenerator类的典型用法代码示例。如果您正苦于以下问题:PHP PageGenerator类的具体用法?PHP PageGenerator怎么用?PHP PageGenerator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PageGenerator类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __my_header
function __my_header($label, $sidemenu, $item, $group)
{
$p = new PageGenerator($label);
if (!empty($item)) {
$sidemenu->forceActiveItem($item->action);
} else {
if ($group->type == 0) {
/* Highlight the "All groups" menu item on the left if the group is
not displayed on the menu bar */
$sidemenu->forceActiveItem('list');
} else {
$sidemenu->forceActiveItem('list_profiles');
}
}
$p->setSideMenu($sidemenu);
$p->display();
return $p;
}
示例2: _T
echo _T('Proxy status');
?>
</h2>
<div class="fixheight"></div>
<?
$arrayTMP = getStatutProxy();
foreach($arrayTMP as $key => $value) {
$info[]=$key;
if ($value) $extraInfo[]=_T("enabled");
else $extraInfo[]=_T("disabled");
}
$p = new PageGenerator();
$p->setSideMenu($sidemenu);
$p->displaySideMenu();
$n = new ListInfos($info,_T("Services"));
$n->setName(_T("Proxy status"));
$n->addExtraInfo($extraInfo,_T("Status"));
$n->display(0);
?>
<form method="post" action="main.php?module=proxy&submod=blacklist&action=restart">
<input name="goto" type="hidden" value="<?php
echo $root;
?>
main.php" />
示例3: str_replace
$placeHolderStr = "// append more files here";
$fileContent = '// @codekit-append "' . $fileName . '"';
$content = str_replace($placeHolderStr, $fileContent . "\n" . $placeHolderStr, $content);
file_put_contents($this->appJsFilePath, $content);
}
pr($content, "app.js after");
}
private function generateFile($file, $content)
{
file_put_contents($file, $content);
echo "generated file: " . $file . "<br>";
}
private function getJsFileContents()
{
$output = "'use strict';\n\nangular.module('{$this->moduleName}', ['ngRoute'])\n\n.config(['\$routeProvider', function(\$routeProvider) {\n \$routeProvider.when('/{$this->name}', {\n templateUrl: 'pages/{$this->name}/{$this->name}.html',\n controller: '{$this->moduleName}Ctrl'\n });\n}])\n\n.controller('{$this->moduleName}Ctrl', [function() {\n\n}]);";
return $output;
}
}
$generator = new PageGenerator("");
if (!empty($_POST['name'])) {
$generator = new PageGenerator($_POST['name']);
$generator->generate();
}
?>
<form method="post">
<input type="text" name="name" value="<?php
echo $generator->name;
?>
"/>
<button type="submit">Generate</button>
</form>
示例4: addComputer
if (checkComputerName($_POST["computername"])) {
if (isComputerNameAvailable($_POST["location_uuid"], $_POST["computername"])) {
addComputer($_POST);
if (!isXMLRPCError()) {
new NotifyWidgetSuccess(_("Computer successfully added"));
header("Location: " . urlStrRedirect("base/computers/index"));
exit;
}
} else {
$err = new ErrorMessage(_("The computer name is already taken."));
}
} else {
$err = new ErrorMessage(_("Invalid computer name."));
}
}
$p = new PageGenerator();
if ($_GET["action"] == "add") {
$title = _("Add a computer");
} else {
$title = _("Edit a computer");
$sidemenu->forceActiveItem("index");
}
$p->setTitle($title);
$p->setSideMenu($sidemenu);
$p->display();
if ($err) {
$err->display();
}
$formfields = array("computername", "computerdescription");
$f = new ValidatingForm();
$f->push(new Table());
示例5: sajax_init
$tpl->assign('group_desc', $short_group_desc);
sajax_init();
$ajax_functions = '';
/**
* now it is time to generate
* page contents
*/
include 'includes/PageGenerator.class.php';
/**
* these ones should be filled by blogs
* they'll be appended to template file
*/
$page_content = '';
$extra_head = '';
$thehelp_text = '';
$pg = new PageGenerator();
/**
* layouts are
* EqualColumns (LeftColumn, RightColumn)
* WithSidebar (MainColumn, Sidebar)
* FullColumn (Column)
*/
function populateJoinStep()
{
header('location:' . $service_host . '?function=join');
exit;
}
function warnPrivatePage($from = "")
{
global $service_host;
if (isAuthenticated()) {
示例6: _T
} else {
$sharesEnabled[] = "disabledRow";
$shareDescription = "(" . _T("Hidden", "samba4") . ") ";
}
$shareDescription = isset($share[$shareComponent["description"]]) ? $shareDescription . $share[$shareComponent["description"]] : "";
$sharesDescription[] = $shareDescription;
$sharesGuestAccess[] = isset($share[$shareComponent["guest_access"]]) ? $share[$shareComponent["guest_access"]] : "";
if (isset($protectedShares) and !in_array($share[$shareComponent["name"]], $protectedShares)) {
$editActions[] = new ActionItem(_T("Edit", "samba4"), "edit", "edit", "share");
$delActions[] = new ActionPopupItem(_T("Delete", "samba4"), "delete", "delete", "share");
} else {
$editActions[] = new EmptyActionItem();
$delActions[] = new EmptyActionItem();
}
}
$page = new PageGenerator(_T("Current list of shares", "samba4"));
$page->setSideMenu($sidemenu);
$page->display();
$list = new ListInfos($sharesName, _T("Share", "samba4"));
$list->setCssClass("shareName");
$list->setCssClasses($sharesEnabled);
$list->addExtraInfo($sharesPath, _T("Path", "samba4"));
$list->addExtraInfo($sharesDescription, _T("Description", "samba4"));
$list->addActionItemArray($editActions);
$list->addActionItemArray($delActions);
$list->addActionItem(new ActionPopupItem(_T("Archive", "samba4"), "backup", "backup", "share"));
$list->disableFirstColumnActionLink();
$list->display();
/* Private functions */
function _shareIsEnabled($share)
{
示例7: PageGenerator
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once "modules/base/includes/users-xmlrpc.inc.php";
require "graph/navbar.inc.php";
require "includes/statusSidebar.inc.php";
$p = new PageGenerator(_("License and support information"));
$p->displayTitle();
$subscription = getSubscriptionInformation(True);
$subscription['product_name'] = implode($subscription['product_name'], _(" and "));
if ($subscription['is_subsscribed']) {
$warn = array();
if ($subscription['too_much_users']) {
$warn[] = _('WARNING: The number of registered users is exceeding your license.');
}
if ($subscription['too_much_computers']) {
$warn[] = _('WARNING: The number of registered computers is exceeding your license.');
}
if (count($warn) > 0) {
$warn[] = _('Please contact your administrator for more information. If you are an administrator, please go to the license status page for more information.');
print sprintf("<div id=\"alert\">%s</div><br/>", implode($warn, '<br/>'));
}
示例8: foreach
<h3 class="handle"><?php
echo $mod->getDescription();
?>
</h3>
<?php
foreach (getSorted($mod->getSubmodules()) as $submod) {
display_submod($submod, $mod);
}
?>
</div>
<?php
}
$MMCApp =& MMCApp::getInstance();
$modules = getSorted($MMCApp->getModules());
$nb_modules = count($modules);
$p = new PageGenerator(_("Home"));
$p->display();
?>
<div id="home">
<?php
foreach ($modules as $key => $mod) {
display_mod($mod);
}
?>
</div>
<div class="clearer"></div>
</div>
<script src="jsframework/cookiejar.js"></script>
<script type="text/javascript">
Event.observe(window, 'load', function() {
示例9: array
* LMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once "modules/inventory/includes/xmlrpc.php";
require_once "modules/inventory/includes/html.php";
require_once "modules/base/includes/AjaxFilterLog.inc.php";
require "localSidebar.php";
require "graph/navbar.inc.php";
$params = array("part" => $table, "from" => 'inventory%2Finventory%2F' . strtolower($table));
foreach (array('uuid', 'hostname', 'gid', 'groupname', 'tab') as $get) {
if (isset($_GET[$get])) {
$value = $_GET[$get];
} else {
$value = '';
}
$params[$get] = $value;
}
$titles = array('index' => _T('Bios list', 'inventory'), 'summary' => _T('Summary', 'inventory'), 'hardware' => _T('Hardware and OS information list', 'inventory'), 'software' => _T('Software list', 'inventory'), 'network' => _T('Network card and configuration list', 'inventory'), 'controller' => _T('Controller list', 'inventory'), 'registry' => _T('Registry keys/values list', 'inventory'), 'drive' => _T('Drive list', 'inventory'), 'input' => _T('Input device list', 'inventory'), 'memory' => _T('Memory module list', 'inventory'), 'monitor' => _T('Monitor list', 'inventory'), 'port' => _T('Port list', 'inventory'), 'printer' => _T('Printer list', 'inventory'), 'sound' => _T('Sound list', 'inventory'), 'storage' => _T('Storage medium list', 'inventory'), 'videocard' => _T('Video card list', 'inventory'));
$p = new PageGenerator($titles[$_GET['action']]);
$p->setSideMenu($sidemenu);
$p->setNoFixHeight();
$p->display();
$ajax = new AjaxFilterInventory(urlStrRedirect("inventory/inventory/ajaxViewPart"), "container", $params);
$ajax->display();
$ajax->displayDivToUpdate();
示例10: AuditCodesManager
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
if ($__submod == "audit") {
require_once "localSidebar.php";
}
require "graph/navbar.inc.php";
require_once "modules/base/includes/logging-xmlrpc.inc.php";
require "modules/base/includes/AjaxFilterLog.inc.php";
require_once "includes/auditCodesManager.php";
$auditManager = new AuditCodesManager();
$p = new PageGenerator();
$p->setTitle(_("Event details"));
if (isset($_GET["logref"])) {
$item = "index" . $_GET["logref"];
} else {
$item = "index";
}
$sidemenu->forceActiveItem($item);
$p->setSideMenu($sidemenu);
$p->display();
$log = get_log_by_id($_GET["logid"]);
if ($log[0]["commit"]) {
$style = "audit_ok";
} else {
$style = "audit_nok";
}
示例11: display
function display()
{
parent::display();
$this->buildForm();
$this->form->display();
}