本文整理汇总了PHP中page::description方法的典型用法代码示例。如果您正苦于以下问题:PHP page::description方法的具体用法?PHP page::description怎么用?PHP page::description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类page
的用法示例。
在下文中一共展示了page::description方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page
if (!file_exists($link)) {
$html = "Seems like the .php is non existant. Is it deleted?";
} else {
//If deleting something
if (preg_match("/[\\.*]/", $main->getvar['page']) == 0) {
require $link;
$content = new page();
if (isset($main->getvar['sub'])) {
ob_start();
$content->content();
$html = ob_get_contents();
# Retrieve the HTML
ob_clean();
# Flush the HTML
} elseif (isset($content->navlist)) {
$html = $content->description();
} else {
ob_start();
$content->content();
$html = ob_get_contents();
# Retrieve the HTML
ob_clean();
# Flush the HTML
}
} else {
$html = "";
$email->staff("Possible Hacking Attempt", "A user has been logged trying to hack your copy of BNPanel, their IP is: " . $main->removeXSS($_SERVER['REMOTE_ADDR']));
}
}
}
$data = $main->table($header, $html);
示例2: acp
//.........这里部分代码省略.........
$sidebarlink_array['IMGURL'] = "information.png";
$sidebarlink_array['LINK'] = "?page=credits";
$sidebarlink_array['VISUAL'] = "Credits";
$sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sidebarlink_array);
$sidebarlink_array['IMGURL'] = "delete.png";
$sidebarlink_array['LINK'] = "?page=logout";
$sidebarlink_array['VISUAL'] = "Logout";
$sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sidebarlink_array);
$sidebar = style::replaceVar("tpl/sidebar.tpl", $sidebar_array);
//Page Sidebar
if ($content->navtitle) {
$subnav = $content->navtitle;
foreach ($content->navlist as $key => $value) {
$sub_sidebarlink_array['IMGURL'] = $value[1];
$sub_sidebarlink_array['LINK'] = "?page=" . $getvar['page'] . "&sub=" . $value[2];
$sub_sidebarlink_array['VISUAL'] = $value[0];
$sub_sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sub_sidebarlink_array);
}
$subsidebar = style::replaceVar("tpl/sidebar.tpl", $sub_sidebar_array);
}
if ($getvar['sub'] && $getvar['page'] != "type") {
foreach ($content->navlist as $key => $value) {
if ($value[2] == $getvar['sub']) {
if (!$value[0]) {
define("SUB", $getvar['page']);
$header = $getvar['page'];
} else {
define("SUB", $value[0]);
$header = $value[0];
}
}
}
}
if ($getvar['sub'] == "delete" && isset($getvar['do']) && !$_POST && !$getvar['confirm']) {
foreach ($postvar as $key => $value) {
$warning_array['HIDDEN'] .= '<input name="' . $key . '" type="hidden" value="' . $value . '" />';
}
$warning_array['HIDDEN'] .= " ";
$html = style::replaceVar("tpl/warning.tpl", $warning_array);
} elseif ($getvar['sub'] == "delete" && isset($getvar['do']) && $_POST && !$getvar['confirm']) {
if ($postvar['yes']) {
foreach ($getvar as $key => $value) {
if ($i) {
$i = "&";
} else {
$i = "?";
}
$url .= $i . $key . "=" . $value;
}
$url .= "&confirm=1";
main::redirect($url);
} elseif ($postvar['no']) {
main::done();
}
} else {
if (isset($getvar['sub'])) {
ob_start();
$content->content();
$html = ob_get_contents();
// Retrieve the HTML
ob_clean();
// Flush the HTML
} elseif ($content->navlist) {
$html .= $content->description();
// First, we gotta get the page description.
$html .= "<br /><br />";
// Break it up
// Now we should prepend some stuff here
$subsidebar2 .= "<strong>Page Submenu</strong><div class='break'></div>";
$subsidebar2 .= $subsidebar;
// Done, now output it in a sub() table
$html .= main::sub($subsidebar2, NULL);
// Initial implementation, add the SubSidebar(var) into the description, basically append it
} else {
ob_start();
$content->content();
$html = ob_get_contents();
// Retrieve the HTML
ob_clean();
// Flush the HTML
}
}
}
$staffuser = $dbh->staff($_SESSION['user']);
define("SUB", $header);
define("INFO", '<b>Welcome back, ' . strip_tags($staffuser['name']) . '</b><br />' . SUB);
echo '<div id="left">';
echo main::table($nav, $sidebar);
if ($content->navtitle) {
echo "<br />";
echo main::table($subnav, $subsidebar);
}
echo '</div>';
echo '<div id="right">';
echo main::table($header, $html);
echo '</div>';
$html_buff = ob_get_contents();
ob_clean();
return $html_buff;
}
示例3: acp
//.........这里部分代码省略.........
$subnav = $content->navtitle;
$sub = $db->query("SELECT * FROM `<PRE>acpnav`");
foreach ($content->navlist as $key => $value) {
$array2['IMGURL'] = $value[1];
$array2['LINK'] = "?page=" . $main->getvar['page'] . "&sub=" . $value[2];
$array2['VISUAL'] = $value[0];
$array3['LINKS'] .= $style->replaceVar("tpl/sidebarlink.tpl", $array2);
}
$subsidebar = $style->replaceVar("tpl/sidebar.tpl", $array3);
}
if ($main->getvar['sub'] && $main->getvar['page'] != "type") {
foreach ($content->navlist as $key => $value) {
if ($value[2] == $main->getvar['sub']) {
if (!$value[0]) {
define("SUB", $main->getvar['page']);
$header = $main->getvar['page'];
} else {
define("SUB", $value[0]);
$header = $value[0];
}
}
}
}
if ($main->getvar['sub'] == "delete" && isset($main->getvar['do']) && !$_POST && !$main->getvar['confirm']) {
foreach ($main->postvar as $key => $value) {
$array['HIDDEN'] .= '<input name="' . $key . '" type="hidden" value="' . $value . '" />';
}
$array['HIDDEN'] .= " ";
$html = $style->replaceVar("tpl/warning.tpl", $array);
} elseif ($main->getvar['sub'] == "delete" && isset($main->getvar['do']) && $_POST && !$main->getvar['confirm']) {
if ($main->postvar['yes']) {
foreach ($main->getvar as $key => $value) {
if ($i) {
$i = "&";
} else {
$i = "?";
}
$url .= $i . $key . "=" . $value;
}
$url .= "&confirm=1";
$main->redirect($url);
} elseif ($main->postvar['no']) {
$main->done();
}
} else {
if (isset($main->getvar['sub'])) {
ob_start();
$content->content();
$html = ob_get_contents();
# Retrieve the HTML
ob_clean();
# Flush the HTML
} elseif ($content->navlist) {
$html .= $content->description();
# First, we gotta get the page description.
$html .= "<br /><br />";
# Break it up
// Now we should prepend some stuff here
$subsidebar2 .= "<strong>Page Submenu</strong><div class='break'></div>";
$subsidebar2 .= $subsidebar;
// Done, now output it in a sub() table
$html .= $main->sub($subsidebar2, NULL);
# Initial implementation, add the SubSidebar(var) into the description, basically append it
if (isset($content->defaultNav)) {
header("Location: ?page=" . $main->getvar['page'] . "&sub=" . $content->navlist[$content->defaultNav][2]);
die;
}
} else {
ob_start();
$content->content();
$html = ob_get_contents();
# Retrieve the HTML
ob_clean();
# Flush the HTML
}
}
} else {
$html = "No.";
}
}
$staffuser = $db->staff($_SESSION['user']);
define("SUB", $header);
define("INFO", '<b>Welcome back, ' . strip_tags($staffuser['name']) . '</b><br />' . SUB);
echo '<div id="left">';
echo $main->table($nav, $sidebar);
if ($content->navtitle) {
echo "<br />";
echo $main->table($subnav, $subsidebar);
}
echo '</div>';
echo '<div id="right">';
echo $main->table($header, $html);
echo '</div>';
$data = ob_get_contents();
# Retrieve the HTML
ob_clean();
# Flush the HTML
return $data;
# Return the HTML
}
示例4: client
function client()
{
global $dbh, $postvar, $getvar, $instance;
ob_start();
// Stop the output buffer
if (!$getvar['page']) {
$getvar['page'] = "home";
}
$page = $dbh->select("clientnav", array("link", "=", $getvar['page']), array("id", "ASC"));
$header = $page['visual'];
$link = "pages/" . $getvar['page'] . ".php";
if (!file_exists($link)) {
$html = "That page doesn't exist.";
} else {
if (preg_match("/[\\.*]/", $getvar['page']) == 0) {
include $link;
$content = new page();
// Main Side Bar HTML
$nav = "Sidebar";
if (!$dbh->config("delacc")) {
$clientnav_query = $dbh->select("clientnav", array("link", "!=", "delete"), array("id", "ASC"), 0, 1);
} else {
$clientnav_query = $dbh->select("clientnav", 0, array("id", "ASC"), 0, 1);
}
while ($clientnav_data = $dbh->fetch_array($clientnav_query)) {
$sidebar_link_array['IMGURL'] = $clientnav_data['icon'];
$sidebar_link_array['LINK'] = "?page=" . $clientnav_data['link'];
$sidebar_link_array['VISUAL'] = $clientnav_data['visual'];
$sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sidebar_link_array);
}
// Types Navbar
$client = $dbh->client($_SESSION['cuser']);
$packtype = $instance->packtypes[type::packagetype($client['pid'])];
if ($packtype->clientNav) {
foreach ($packtype->clientNav as $key2 => $value) {
$sidebar_link_array['IMGURL'] = $value[2];
$sidebar_link_array['LINK'] = "?page=type&type=" . type::packagetype($client['pid']) . "&sub=" . $value[1];
$sidebar_link_array['VISUAL'] = $value[0];
$sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sidebar_link_array);
if ($getvar['page'] == "type" && $getvar['type'] == type::packagetype($client['pid']) && $getvar['sub'] == $value[1]) {
define("SUB", $value[3]);
$header = $value[3];
$getvar['myheader'] = $value[3];
}
}
}
$sidebar_link_array['IMGURL'] = "delete.png";
$sidebar_link_array['LINK'] = "?page=logout";
$sidebar_link_array['VISUAL'] = "Logout";
$sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sidebar_link_array);
$sidebar = style::replaceVar("tpl/sidebar.tpl", $sidebar_array);
//Page Sidebar
if ($content->navtitle) {
$subnav = $content->navtitle;
foreach ($content->navlist as $key => $value) {
$sidebar_link_array['IMGURL'] = $value[1];
$sidebar_link_array['LINK'] = "?page=" . $getvar['page'] . "&sub=" . $value[2];
$sidebar_link_array['VISUAL'] = $value[0];
$sub_sidebar_array['LINKS'] .= style::replaceVar("tpl/sidebar-link.tpl", $sidebar_link_array);
}
$subsidebar = style::replaceVar("tpl/sidebar.tpl", $sub_sidebar_array);
}
if ($getvar['sub'] == "delete" && isset($getvar['do']) && !$_POST && !$getvar['confirm']) {
foreach ($postvar as $key => $value) {
$warning_array['HIDDEN'] .= '<input name="' . $key . '" type="hidden" value="' . $value . '" />';
}
$warning_array['HIDDEN'] .= " ";
$html = style::replaceVar("tpl/warning.tpl", $warning_array);
} elseif ($getvar['sub'] == "delete" && isset($getvar['do']) && $_POST && !$getvar['confirm']) {
if ($postvar['yes']) {
foreach ($getvar as $key => $value) {
if ($i) {
$i = "&";
} else {
$i = "?";
}
$url .= $i . $key . "=" . $value;
}
$url .= "&confirm=1";
main::redirect($url);
} elseif ($postvar['no']) {
main::done();
}
} else {
if (isset($getvar['sub'])) {
ob_start();
$content->content();
$html = ob_get_contents();
// Retrieve the HTML
ob_clean();
// Flush the HTML
} elseif ($content->navlist) {
if ($content->description()) {
$html = $content->description() . "<br><br>";
}
$html .= "Select a sub-page from the sidebar.";
} else {
ob_start();
$content->content();
$html = ob_get_contents();
//.........这里部分代码省略.........