本文整理汇总了PHP中showsublinks函数的典型用法代码示例。如果您正苦于以下问题:PHP showsublinks函数的具体用法?PHP showsublinks怎么用?PHP showsublinks使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showsublinks函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_page
function render_page($license = false)
{
global $settings, $main_style;
//Header
echo "<table cellspacing='0' cellpadding='0' width='" . THEME_WIDTH . "' class='outer-border center'>\n<tr>\n";
echo "<td>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='full-header'>\n" . showbanners() . "</td>\n";
echo "</tr>\n</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='sub-header'>" . showsublinks(" <span class='bullet'>·</span> ", "white") . "</td>\n";
echo "<td align='right' class='sub-header'>" . showsubdate() . "</td>\n";
echo "</tr>\n</table>\n";
//Content
echo "<table cellpadding='0' cellspacing='0' width='100%' class='{$main_style}'>\n<tr>\n";
if (LEFT) {
echo "<td class='side-border-left' valign='top'>" . LEFT . "</td>";
}
echo "<td class='main-bg' valign='top'>" . U_CENTER . CONTENT . L_CENTER . "</td>";
if (RIGHT) {
echo "<td class='side-border-right' valign='top'>" . RIGHT . "</td>";
}
echo "</tr>\n</table>\n";
//Footer
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' class='footer'>" . stripslashes($settings['footer']) . "<br />\n";
if (!$license) {
echo showcopyright() . "<br /><br />\n";
}
echo showcounter() . "<br /><br />\n";
echo "</td>\n</tr>\n</table>\n";
echo "</td>\n</tr>\n</table>\n";
}
示例2: render_header
function render_header($header_content)
{
global $theme_width;
echo "<table align='center' cellspacing='0' cellpadding='0' width='{$theme_width}' class='outer-border'>\n<tr>\n<td>\n<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td class='full-header'>\n<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td background='" . THEME . "images/hbc.jpg' height='80'> {$header_content}</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td class='sub-header'>" . showsublinks("·", "white") . "</td>\n<td align='right' class='sub-header'>" . showsubdate() . "</td>\n</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
示例3: render_page
function render_page($license = false)
{
global $settings, $locale, $userdata, $aidlink, $theme_width, $bottom_navbar_string, $ver;
//Header
echo "<table cellpadding='0' cellspacing='0' width='{$theme_width}' align='center'><tr>";
echo "<td class='full-header'> </td>";
echo "<td class='sub-header'>" . showsublinks("", "white") . "";
echo "<td class='sub-headerright'> </td>";
echo "</tr></table>";
echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>";
echo "<td class='ad'> </td>";
echo "</tr></table>";
//Content
echo "<table cellpadding='0' cellspacing='0' width='{$theme_width}' align='center'><tr>\n";
if (LEFT) {
echo "<td class='side-border-left' valign='top'>" . LEFT . "</td>";
}
echo "<td class='main-bg' valign='top'>" . U_CENTER . CONTENT . L_CENTER . "</td>";
if (RIGHT) {
echo "<td class='side-border-right' valign='top'>" . RIGHT . "</td>";
}
echo "</tr>\n</table>\n";
//Footer
echo "<table cellpadding='0' cellspacing='0' width='{$theme_width}' align='center'>\n<tr>\n";
echo "<td><img src='" . THEME . "/images/pfboxfooterleft.jpg' align='right' alt='image' /></td>\n";
echo "<td align='left' class='bottom-footer' width='50%'>ArcSite CMS v{$ver} by The_Red<br/>Built Using <a target='_blank' href='http://www.php-fusion.co.uk/'>PHP-Fusion v7.00.07</a><br/></td>\n";
echo "<td align='right' class='bottom-footer' width='50%'>{$bottom_navbar_string}<br/>" . showcounter() . "</td>\n";
echo "<td><img src='" . THEME . "/images/pfboxfooterright.jpg' align='left' alt='image' /></td>\n";
echo "</tr>\n</table>\n";
}
示例4: render_page
function render_page($license = false)
{
global $settings, $main_style;
//Header
echo "<div class='outer-border {$main_style}' style='background-color:#fff;width:" . THEME_WIDTH . ";'>\n";
echo "<div class='floatfix'>\n";
echo "<div class='full-header floatfix'>\n\n" . showbanners() . "</div>\n";
echo "<div class='sub-header floatfix'>\n";
echo "<div style='float:left;'>" . showsublinks(" <span class='bullet'>·</span> ", "white") . "</div>\n";
echo "<div style='float:right;'>" . showsubdate() . "</div>\n";
echo "</div></div>\n";
//Content
if (LEFT) {
echo "<div id='side-border-left'>" . LEFT . "</div>\n";
}
if (RIGHT) {
echo "<div id='side-border-right'>" . RIGHT . "</div>\n";
}
echo "<div id='main-bg' class='clearfix'><div id='container'>" . U_CENTER . CONTENT . L_CENTER . "</div></div>\n";
//Footer
echo "<div class='footer clear' style='text-align:center;'>" . stripslashes($settings['footer']) . "<br />\n";
if ($license == false) {
echo showcopyright() . "<br /><br />\n";
}
echo showcounter() . "<br /><br />\n";
echo "</div>\n</div>\n";
}
示例5: render_page
function render_page($license = false)
{
global $aidlink, $locale, $settings, $colour_switcher, $fontsize_switcher, $main_style;
echo "\n\t<div id='main' style='width: " . THEME_WIDTH . ";'>\n\t\t<div id='uborder' class='clearfix'>\n\t\t\t<div id='ucornerl' class='flleft'></div>\n\t\t\t<div id='ucornerr' class='flright'></div>\n\t\t</div>\n\t\t<div id='borderr'>\n\t\t\t<div id='borderl'>\n\t\t\t\t<div id='cont' class='clearfix {$main_style}'>\n\t\t\t\t\t<div id='userbar' class='floatfix'>\n\t\t\t\t\t\t<ul id='anchors' class='flleft'><li><a href='#Content'>" . $locale['global_210'] . "</a></li></ul>\n\t\t\t\t\t\t<ul id='links' class='clearfix flright'>\n";
if (iMEMBER) {
echo "\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "edit_profile.php'>" . $locale['global_120'] . "</a></li>\n\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "messages.php'>" . $locale['global_121'] . "</a></li>\n\t\t\t\t\t\t\t" . (iADMIN ? "<li><a href='" . ADMIN . "index.php" . $aidlink . "' >" . $locale['global_123'] . "</a></li>" : "") . "\n\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "setuser.php?logout=yes'>" . $locale['global_124'] . "</a></li>\n";
} else {
echo "\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "login.php'>" . $locale['global_104'] . "</a></li>\n\t\t\t\t\t\t\t" . ($settings['enable_registration'] ? "<li><a href='" . BASEDIR . "register.php'>" . $locale['global_107'] . "</a></li>\n" : "");
}
echo "\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id='mainheader' class='clearfix'>" . showbanners() . "</div>\n\t\t\t\t\t<div id='subheader' class='clearfix'>" . preg_replace("^(li)( class='(first-link)')*(><a href='(\\.\\./)*" . preg_quote(START_PAGE) . "')^i", "\\1 class='active \\3'\\4", showsublinks("")) . "\n\t\t\t\t\t\t" . $colour_switcher->makeForm("flright") . " \n\t\t\t\t\t\t" . $fontsize_switcher->makeForm("flright") . "\n\t\t\t\t\t</div>\n\t\t\t\t\t" . (LEFT ? "<div id='side-border-left'>" . LEFT . "</div>" : "") . "\n\t\t\t\t\t" . (RIGHT ? "<div id='side-border-right'>" . RIGHT . "</div>" : "") . "\n\t\t\t\t\t<div id='main-bg'><div id='container'>" . U_CENTER . CONTENT . L_CENTER . "\n\t\t\t\t\t</div></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div id='lborder'>\n\t\t\t<div id='lcornerl' class='flleft'></div>\n\t\t\t<div id='lcornerr' class='flright'></div>\n\t\t</div>\n\t\t<div id='footer' class='clearfix'>\n\t\t\t" . (!$license ? "<div class='flleft' style='width: 50%'>" . showcopyright() . "<br />\n Theme designed by <a href='http://matonor.com'>Max Toball</a></div>" : "") . "\n\t\t\t<div class='flright' style='width: 50%; text-align: right;'>" . stripslashes($settings['footer']) . "</div>\n\t\t</div>\n\t\t<div id='subfooter' class='clearfix'>\n\t\t\t<div class='flleft' style='width: 50%'>" . sprintf($locale['global_172'], substr(get_microtime() - START_TIME, 0, 4)) . "</div>\n\t\t\t<div class='flright' style='width: 50%; text-align: right;'>" . showcounter() . "</div>\n\t\t</div>\n\t</div>";
}
示例6: render_page
function render_page($license = FALSE)
{
global $settings, $main_style, $locale, $mysql_queries_time;
//Header
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='full-header'>\n" . showbanners() . "</td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td class='sub-header'>" . showsublinks(" " . THEME_BULLET . " ", "white") . "</td>\n";
echo "<td align='right' class='sub-header'><div class='hidden-xs'>" . showsubdate() . "</div>\n</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
if ($main_style == "") {
$colspan = "";
} elseif ($main_style == "side-both") {
$colspan = "colspan='3'";
} else {
$colspan = "colspan='2'";
}
//Content
echo renderNotices(getNotices(array('all', FUSION_SELF)));
echo "<table cellpadding='0' cellspacing='0' width='100%' class='{$main_style}'>\n";
echo AU_CENTER ? "<tr><td class='main-bg' " . $colspan . " valign='top'>" . AU_CENTER . "</td>\n</tr>\n<tr>\n" : "<tr>\n";
if (LEFT) {
echo "<td class='side-border-left' valign='top'>" . LEFT . "</td>";
}
echo "<td class='main-bg' valign='top'>" . U_CENTER . CONTENT . L_CENTER . "</td>";
if (RIGHT) {
echo "<td class='side-border-right' valign='top'>" . RIGHT . "</td>";
}
echo BL_CENTER ? "</tr>\n<tr><td class='main-bg' " . $colspan . " valign='top'>" . BL_CENTER . "</td>\n</tr>\n<tr>\n" : "";
echo "</tr>\n</table>\n";
//Footer
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td align='left' class='sub-header'>" . showrendertime() . "</td>\n";
echo "<td align='right' class='sub-header'>" . showcounter() . "</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' class='main-footer'>" . stripslashes($settings['footer']);
if (!$license) {
echo "<br /><br />\n" . showcopyright();
}
echo "</td>\n";
echo "</tr>\n</table>\n";
/*foreach ($mysql_queries_time as $query) {
echo $query[0]." QUERY: ".$query[1]."<br />";
}*/
}
示例7: render_page
function render_page($license = false)
{
add_handler("theme_output");
global $settings, $main_style, $locale, $colour_switcher, $mysql_queries_time;
//Wrapper
echo "<div class='wrapper' style='width:" . THEME_WIDTH . ";'>\n";
//Header
echo "<div class='main-header'>\n" . showbanners() . "</div>\n";
echo "<div class='sub-header clearfix floatfix'>" . showsublinks("", "") . "</div>\n";
// Content
echo "<div class='main-bg'>\n";
if (LEFT) {
echo "<div id='side-left'>" . LEFT . "</div>\n";
}
if (RIGHT) {
echo "<div id='side-right'>" . RIGHT . "</div>\n";
}
echo "<div id='side-center' class='" . $main_style . "'>";
echo "<div class='upper'>" . U_CENTER . "</div>\n";
echo "<div class='content'>" . CONTENT . "</div>\n";
echo "<div class='lower'>" . L_CENTER . "</div>\n";
echo "</div>\n";
echo "<div class='clear'></div>\n";
echo "</div>\n";
//Footer
echo "<div class='sub-footer-top'></div>\n";
echo "<div class='sub-footer clearfix'>\n";
if ($settings['rendertime_enabled'] == 1 || $settings['rendertime_enabled'] == 2 && iADMIN) {
echo "<div class='flleft' style='padding-top: 8px;'>" . showrendertime() . "<br />" . showcounter() . "</div>\n";
} else {
echo "<div class='flleft' style='padding: 15px 0 6px 0;'>" . showcounter() . "</div>\n";
}
//echo "<div class='flright' style='padding: 15px 0 6px 0;'>".showsubdate()."</div>\n";
echo "<div style='padding: 15px 0 6px 0;'>" . $colour_switcher->makeForm("flright") . "</div>\n";
echo "</div>\n";
echo "<div class='main-footer clearfix'>\n";
echo "<div class='flleft'>\n";
if (!$license) {
echo showcopyright();
}
echo "<br />Theme designed by <a href='http://www.agxthemes.com'>Falcon</a></div>\n";
echo "<div class='flright' style='width: 50%; text-align: right;'>" . stripslashes($settings['footer']) . "</div>\n";
echo "</div>\n";
echo "</div>\n";
}
示例8: render_page
function render_page($license = FALSE)
{
//add_handler("theme_output");
global $settings, $main_style, $locale, $userdata, $aidlink, $mysql_queries_time;
// set variables
$brand = $settings['sitebanner'] ? "<img title='" . $settings['sitename'] . "' style='margin-left:-20px; width:100%; margin-top:-35px;' src='" . BASEDIR . $settings['sitebanner'] . "' />" : $settings['sitename'];
// set size - max of 12 min of 0
$side_grid_settings = array('desktop_size' => 2, 'laptop_size' => 3, 'tablet_size' => 3, 'phone_size' => 12);
// Render Theme
echo "<div class='container p-t-20 p-b-20'>\n";
echo "<div class='display-inline-block m-t-20 m-l-20' style='max-width: 280px;'>";
echo $brand;
echo "</div>\n";
echo showsublinks('', '', array('logo' => $brand)) . "\n";
// row 1 - go for max width
if (defined('AU_CENTER') && AU_CENTER) {
echo "<div class='row'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>" . AU_CENTER . "</div>\n</div>";
}
// row 2 - fluid setitngs depending on panel appearances
echo "<div class='row main-body'>\n";
if (defined('LEFT') && LEFT) {
echo "<div class='" . html_prefix($side_grid_settings) . " hidden-xs'>\n" . LEFT . "</div>\n";
}
// column left
echo "<div class='" . html_prefix(center_grid_settings($side_grid_settings)) . "'>\n";
$notices = getNotices();
if ($notices) {
echo renderNotices($notices);
}
echo U_CENTER . CONTENT . L_CENTER . "</div>\n";
// column center
if (defined('RIGHT') && RIGHT) {
echo "<div class='" . html_prefix($side_grid_settings) . "'>\n" . RIGHT . "</div>\n";
}
// column right
if (defined('LEFT') && LEFT) {
echo "<div class='" . html_prefix($side_grid_settings) . " hidden-sm hidden-md hidden-lg'>\n" . LEFT . "</div>\n";
}
// column left
echo "</div>\n";
// row 3
if (defined('BL_CENTER') && BL_CENTER) {
echo "<div class='row'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>" . BL_CENTER . "</div>\n</div>";
}
// footer
echo "<hr>\n";
echo "<div class='row'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>";
echo "<span>" . stripslashes(strip_tags($settings['footer'])) . "</span><br/>\n";
echo "<span>" . showcopyright() . "</span><br/>\n";
echo "<span>Bootstrap Theme by <a href='http://www.php-fusion.co.uk' target='_blank'>PHP-Fusion Inc</a></span><br/>\n";
echo "<span>";
if ($settings['visitorcounter_enabled']) {
echo showcounter();
}
if ($settings['rendertime_enabled'] == '1' || $settings['rendertime_enabled'] == '2') {
if ($settings['visitorcounter_enabled']) {
echo " | ";
}
echo showrendertime();
}
echo "</span>\n";
echo "</div>\n</div>\n";
echo "</div>\n";
}
示例9: showsublinks
/**
* Displays Site Links Navigation Bar
* @param string $sep - Custom seperator text
* @param string $class - Class
* @param array $options -
*
* Default $options parameters:
* id - unique navbar id
* container - true for container mode
* navbar_class - switch between navbar-default, navbar-inverse or custom class
* item_class - the default li class
* separator - default li separator
* callback_data - replace default data callback
*
* @param int $id - 0 for root , Sitelink_ID to show child only
* @return string
*/
function showsublinks($sep = "", $class = "", array $options = array(), $id = 0)
{
$default_options = array("id" => "", "container" => FALSE, "navbar_class" => "navbar-default", "item_class" => $class, "separator" => $sep, "callback_data" => array(), "links_per_page" => fusion_get_settings("links_per_page"), "grouping" => fusion_get_settings("links_grouping"), "show_banner" => false, "show_header" => false);
$options += $default_options;
if (empty($options['id'])) {
$options['id'] = md5(str_shuffle(str_replace(" ", "_", fusion_get_settings("sitename"))));
}
$pageInfo = pathinfo($_SERVER['REQUEST_URI']);
$start_page = $pageInfo['dirname'] !== "/" ? ltrim($pageInfo['dirname'], "/") . "/" : "";
$site_path = ltrim(fusion_get_settings("site_path"), "/");
$start_page = str_replace($site_path, "", $start_page);
$start_page .= $pageInfo['basename'];
if (fusion_get_settings("site_seo") && defined('IN_PERMALINK') && !isset($_GET['aid'])) {
global $filepath;
$start_page = $filepath;
}
$res =& $res;
if (empty($data) && empty($options['callback_data'])) {
$data = \PHPFusion\SiteLinks::get_SiteLinksData(array('link_position' => array(2, 3)));
// Is Equivalent to:
//$data = dbquery_tree_full(DB_SITE_LINKS, "link_id", "link_cat", "WHERE link_position >= 2".(multilang_table("SL") ? " AND link_language='".LANGUAGE."'" : "")." AND ".groupaccess('link_visibility')." ORDER BY link_cat ASC, link_order ASC");
} else {
$data = $options['callback_data'];
}
/**
* Change hierarchy data when grouping is on
*/
if ($options['grouping'] == true) {
if (count($data[0]) > $options['links_per_page']) {
$more_index = 9 * 10000000;
$base_data = $data[0];
$data[$more_index] = array_slice($base_data, $options['links_per_page'], 9, TRUE);
$data[0] = array_slice($base_data, 0, $options['links_per_page'], TRUE);
$more[$more_index] = array("link_id" => $more_index, "link_cat" => 0, "link_name" => fusion_get_locale("global_700"), "link_url" => "#", "link_icon" => "", "link_visibility" => 0, "link_position" => 2, "link_window" => 0, "link_order" => $options['links_per_page'], "link_language" => LANGUAGE);
$data[0] += $more;
}
}
$banner = fusion_get_settings("sitebanner") && $options['show_banner'] == true ? "<img src='" . BASEDIR . fusion_get_settings("sitebanner") . "' alt='" . fusion_get_settings("sitename") . "'/>" : fusion_get_settings("sitename");
if (empty($id)) {
$res = "<div id='" . $options['id'] . "' class='navbar " . $options['navbar_class'] . "' role='navigation'>\n";
$res .= $options['container'] ? "<div class='container'>\n" : "";
$res .= "<div class='navbar-header'>\n";
$res .= "<!---Menu Header Start--->\n";
$res .= "<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='#phpfusion-menu' aria-expanded='false'>\n\t\t\t\t\t<span class='sr-only'>Toggle navigation</span>\n\t\t\t\t\t<span class='icon-bar'></span>\n\t\t\t\t\t<span class='icon-bar'></span>\n\t\t\t\t\t<span class='icon-bar'></span>\n \t\t\t</button>\n";
if ($options['show_header']) {
$res .= "<a class='navbar-brand' href='" . BASEDIR . fusion_get_settings('opening_page') . "'>{$banner}</a>\n";
} else {
$res .= "<a class='navbar-brand visible-xs hidden-sm hidden-md hidden-lg' href='" . BASEDIR . fusion_get_settings('opening_page') . "'>" . fusion_get_settings("sitename") . "</a>\n";
}
$res .= "<!---Menu Header End--->\n";
$res .= "</div>\n";
$res .= "<div class='navbar-collapse collapse' id='" . $id . "-menu'>\n";
$res .= "<ul " . (fusion_get_settings("bootstrap") ? "class='nav navbar-nav primary'" : "id='main-menu' class='primary sm sm-simple'") . ">\n";
$res .= "<!---Menu Item Start--->\n";
}
if (!empty($data)) {
$i = 0;
$default_link_data = array("link_id" => 0, "link_name" => "", "link_cat" => 0, "link_url" => "", "link_icon" => "", "link_active" => FALSE, "link_title" => FALSE, "link_disabled" => FALSE, "link_window" => FALSE);
foreach ($data[$id] as $link_id => $link_data) {
$link_data += $default_link_data;
$link_data['link_name'] = parsesmileys(parseubb($link_data['link_name']));
$li_class = $options['item_class'];
if ($link_data['link_disabled']) {
$li_class = "disabled";
} else {
if ($link_data['link_title'] == TRUE) {
$li_class = "dropdown-header";
}
}
// Attempt to calculate a relative link
$secondary_active = FALSE;
if ($start_page !== $link_data['link_url']) {
$link_instance = \PHPFusion\BreadCrumbs::getInstance();
$link_instance->showHome(FALSE);
$reference = $link_instance->toArray();
if (!empty($reference)) {
foreach ($reference as $refData) {
if (!empty($link_data['link_url']) && !empty($refData['link']) && $link_data['link_url'] !== "index.php") {
if (stristr($refData['link'], str_replace("index.php", "", $link_data['link_url']))) {
$secondary_active = TRUE;
}
break;
// match found
//.........这里部分代码省略.........
示例10: showsublinks
/**
* Displays Site Links Navigation Bar
* @param string $sep - Custom seperator text
* @param string $class - Class
* @param array $options - Expansions 9.1
* @param int $id - 0 for root , Sitelink_ID to show child only
* @return string
*/
function showsublinks($sep = "", $class = "", array $options = array(), $id = 0)
{
$pageInfo = pathinfo($_SERVER['SCRIPT_NAME']);
$start_page = $pageInfo['dirname'] !== "/" ? ltrim($pageInfo['dirname'], "/") . "/" : "";
$site_path = ltrim(fusion_get_settings("site_path"), "/");
$start_page = str_replace($site_path, "", $start_page);
$start_page .= $pageInfo['basename'];
if (fusion_get_settings("site_seo") && defined('IN_PERMALINK') && !isset($_GET['aid'])) {
global $filepath;
$start_page = $filepath;
}
static $data = array();
$res =& $res;
if (empty($data)) {
$data = dbquery_tree_full(DB_SITE_LINKS, "link_id", "link_cat", "WHERE link_position >= 2" . (multilang_table("SL") ? " AND link_language='" . LANGUAGE . "'" : "") . " AND " . groupaccess('link_visibility') . " ORDER BY link_cat, link_order");
}
if ($id == 0) {
$res = "<div id='pf-navbar' class='navbar navbar-default' role='navigation'>\n";
$res .= "<div class='navbar-header'>\n";
$res .= "<!---Menu Header Start--->\n";
$res .= "<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='#phpfusion-menu' aria-expanded='false'>\n\t\t\t\t\t<span class='sr-only'>Toggle navigation</span>\n\t\t\t\t\t<span class='icon-bar'></span>\n\t\t\t\t\t<span class='icon-bar'></span>\n\t\t\t\t\t<span class='icon-bar'></span>\n \t\t\t</button>\n";
$res .= "<a class='navbar-brand visible-xs hidden-sm hidden-md hidden-lg' href='#'>" . fusion_get_settings("sitename") . "</a>\n";
$res .= "<!---Menu Header End--->\n";
$res .= "</div>\n";
$res .= "<div class='navbar-collapse collapse' id='phpfusion-menu'>\n";
$res .= "<ul " . (fusion_get_settings("bootstrap") ? "class='nav navbar-nav primary'" : "id='main-menu' class='primary sm sm-simple'") . ">\n";
$res .= "<!---Menu Item Start--->\n";
}
//else {
//$res .= "<ul".(fusion_get_settings("bootstrap") ? " class='dropdown-menu'" : "").">\n";
//}
if (!empty($data)) {
$i = 0;
foreach ($data[$id] as $link_id => $link_data) {
$li_class = $class;
// Attempt to calculate a relative link
$secondary_active = FALSE;
if ($start_page !== $link_data['link_url']) {
$link_instance = \PHPFusion\BreadCrumbs::getInstance();
$link_instance->showHome(FALSE);
$reference = $link_instance->toArray();
if (!empty($reference)) {
foreach ($reference as $refData) {
if (!empty($refData['link']) && $link_data['link_url'] !== "index.php") {
if (stristr($refData['link'], str_replace("index.php", "", $link_data['link_url']))) {
$secondary_active = TRUE;
}
break;
}
}
}
}
if ($link_data['link_name'] != "---" && $link_data['link_name'] != "===") {
$link_target = $link_data['link_window'] == "1" ? " target='_blank'" : "";
if ($i == 0 && $id > 0) {
$li_class .= ($li_class ? " " : "") . "first-link";
}
if ($start_page == $link_data['link_url'] || $secondary_active == TRUE || $start_page == fusion_get_settings("opening_page") && $i == 0 && $id === 0) {
$li_class .= ($li_class ? " " : "") . "current-link active";
}
if (preg_match("!^(ht|f)tp(s)?://!i", $link_data['link_url'])) {
$itemlink = $link_data['link_url'];
} else {
$itemlink = BASEDIR . $link_data['link_url'];
}
$has_child = false;
$l_1 = "";
$l_2 = "";
if (isset($data[$link_id])) {
$has_child = true;
$l_1 = "class='dropdown-toggle' data-toggle='dropdown' ";
$l_2 = " <i class='caret'></i>\n";
$li_class .= " dropdown";
}
$res .= "<li" . ($li_class ? " class='" . $li_class . "'" : "") . ">" . $sep . "\n";
$res .= "<a " . $l_1 . "href='" . $itemlink . "'" . $link_target . ">" . $link_data['link_name'] . $l_2 . "</a>\n";
if ($has_child) {
$res .= "<ul" . (fusion_get_settings("bootstrap") ? " class='dropdown-menu'" : "") . ">\n";
$res .= "<li>" . $sep . "\n";
$res .= "<a href='" . $itemlink . "'" . $link_target . ">" . $link_data['link_name'] . "</a>\n";
$res .= "</li>\n";
$res .= showsublinks($sep, $class, $options, $link_data['link_id']);
$res .= "</ul>\n";
}
$res .= "</li>\n";
} elseif ($link_data['link_cat'] > 0) {
echo "<li class='divider'></li>";
}
$i++;
}
}
if ($id == 0) {
//.........这里部分代码省略.........
示例11: close_grid
echo "<li class='pull-left m-r-10 m-l-10'><a href='" . BASEDIR . "register.php'>Register</a></li>\n";
} else {
if (iADMIN) {
echo "<li class='pull-left m-r-20'><a href='" . ADMIN . $aidlink . "'>Admin Panel</a></li>\n";
}
echo "<li class='pull-left m-r-20'><a href='" . BASEDIR . "profile.php?lookup=" . $userdata['user_id'] . "'>My Profile</a></li>\n";
echo "<li class='pull-left m-r-20'><a href='" . BASEDIR . "setuser.php?logout=yes'>Logout</a></li>\n";
}
echo "</ul>\n";
echo "</div>\n";
echo "</div>\n";
close_grid(1);
open_grid('section-2', 1);
echo "<div class='row'>\n";
echo "<div class='header-nav col-xs-12 col-sm-12 col-md-9 col-lg-9 p-r-0'>\n";
echo showsublinks('') . "\n";
echo "</div>\n";
echo "<div class='header-nav col-xs-12 col-sm-12 col-md-3 col-lg-3' style='padding-top:20px;'>\n";
echo "<form name='search_form', method='GET' action='" . BASEDIR . "search.php?stype=all'>\n";
echo form_text('', 'stext', 'stext', '', array('append_button' => 1, 'placeholder' => 'Search', 'class' => 'no-border'));
echo "</form>\n";
echo "</div>\n</div>\n";
close_grid();
echo "</div>\n";
open_grid('section-showcase', 1);
if ($settings['opening_page'] == FUSION_SELF) {
echo "<div class='text-center logo'> " . showbanners() . " </div>\n";
echo "<h2 class='text-center text-uppercase' style='letter-spacing:10px; font-weight:300; font-size:36px;'>" . $settings['sitename'] . "</h2>\n";
echo "<h4 class='text-center' style='font-size:19.5px; line-height:35px; font-weight:300; color:rgba(255,255,255,0.8'>" . $settings['siteintro'] . "</h4>\n";
echo "<div class='section-2-row row'>\n";
echo "<div class='col-sm-3 col-md-3 col-lg-3 section-2-tab text-center'>\n";
示例12: displayHeader
/**
* Septenary Header
*/
public function displayHeader()
{
global $aidlink;
$userdata = fusion_get_userdata();
$locale = self::$locale;
echo "<header id='top'>";
echo "<div class='overlay'>\n";
$this->open_grid('section-1', 1);
echo "<div class='row hidden-xs'>\n";
echo "<div id='logo' class='hidden-xs hidden-md col-lg-3 p-t-5 text-smaller'>\n</div>\n";
echo "<div class='col-xs-12 col-md-9 col-lg-9 text-right clearfix'>\n";
echo "<div class='display-inline-block' style='width:30%; float:right;'>\n";
echo openform('searchform', 'post', BASEDIR . 'search.php?stype=all', array('class' => 'm-b-10'));
echo form_text('stext', '', '', array('placeholder' => $locale['sept_006'], 'append_button' => TRUE, 'append_type' => "submit", "append_form_value" => $locale['sept_006'], "append_value" => "<i class='fa fa-search'></i> " . $locale['sept_006'], "append_button_name" => "search", 'class' => 'no-border m-b-0'));
echo closeform();
echo "</div>\n";
echo "<ul id='head_nav' class='display-inline-block'>\n";
$language_opts = '';
if (count(fusion_get_enabled_languages()) > 1) {
$language_opts = "<li class='dropdown'>\n";
$language_opts .= "<a class='dropdown-toggle pointer' data-toggle='dropdown' title='" . fusion_get_locale('UM101') . "'><i class='fa fa-globe fa-lg'></i> " . translate_lang_names(LANGUAGE) . " <span class='caret'></span></a>\n";
$language_opts .= "<ul class='dropdown-menu' role='menu'>\n";
$language_switch = fusion_get_language_switch();
if (!empty($language_switch)) {
foreach ($language_switch as $folder => $langData) {
$language_opts .= "<li class='text-left'><a href='" . $langData['language_link'] . "'>\n";
$language_opts .= "<img alt='" . $langData['language_name'] . "' class='m-r-5' src='" . $langData['language_icon_s'] . "'/>\n";
$language_opts .= $langData['language_name'];
$language_opts .= "</a></li>\n";
}
}
$language_opts .= "</ul>\n";
$language_opts .= "</li>\n";
}
if (!iMEMBER) {
echo "<li><a href='" . BASEDIR . "login.php'>" . $locale['sept_001'] . "</a></li>\n";
if (fusion_get_settings("enable_registration")) {
echo "<li><a href='" . BASEDIR . "register.php'>" . $locale['sept_002'] . "</a></li>\n";
}
echo $language_opts;
} else {
if (iADMIN) {
echo "<li>\n<a href='" . ADMIN . $aidlink . "&pagenum=0'>" . $locale['sept_003'] . "</a>\n</li>\n";
}
echo "<li>\n<a href='" . BASEDIR . "profile.php?lookup=" . $userdata['user_id'] . "'>" . $locale['sept_004'] . "</a>\n</li>\n";
echo $language_opts;
echo "<li>\n<a href='" . BASEDIR . "index.php?logout=yes'>" . $locale['sept_005'] . "</a></li>\n";
}
echo "</ul>\n";
echo "</div>\n";
echo "</div>\n";
$this->close_grid(1);
$this->open_grid('section-2', 1);
echo "<div class='header-nav'>\n";
echo showsublinks('') . "\n";
echo "</div>\n";
$this->close_grid();
echo "</div>\n";
$this->display_Showcase();
echo "</header>\n";
}