本文整理汇总了PHP中sidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP sidebar函数的具体用法?PHP sidebar怎么用?PHP sidebar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sidebar函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init_sidebar
/**
* @todo: 初始化sidebar(左侧菜单)
* @author Saki <ilulu4ever816@gmail.com>
* @date 2014-12-4 下午2:26:55
* @version V1.0
*/
public function init_sidebar()
{
$sidebar = sidebar();
$active_bar = 'home';
$this->assign('sidebar', $sidebar);
$this->assign('active_bar', $active_bar);
//默认选中
}
示例2: sidebar
function sidebar($sidebar)
{
$buffer = null;
foreach ($sidebar as $name => $link) {
if (is_array($link)) {
$buffer .= '<div class="accordion panel panel-default">
<div class="accordion-header panel-heading">
<h3 class="panel-title">' . $name . '</h3>
</div>';
$buffer .= '<div class="accordion-collapse panel-body"><ul>' . sidebar($link) . '</ul></div></div>';
} else {
$buffer .= '<li><a href="' . $link . '">' . $name . '</a></li>';
}
}
return $buffer;
}
示例3: top_header
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body class="skin-blue">
<div class="wrapper">
<?php
top_header();
//function in include/dashboardFunctions.php
?>
<?php
sidebar();
//function in include/dashboardFunctions.php
?>
<?php
editDeleteSubCategory();
//function in include/adminFunctions.php
?>
<?php
footer();
//function in include/dashboardFunctions.php
?>
</div><!-- ./wrapper -->
<!-- jQuery 2.1.3 -->
示例4: sidebar
<button type="button" class="btn btn-lg btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-lg btn-success">Save changes</button>
</div>
</div>
</div>
</div>
');
?>
<?php
include 'notifications.php';
?>
<div class="container-fluid">
<div class="row">
<?php
echo sidebar();
?>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 kbc-main">
<div class="container-fluid kbc-main-content">
<div class="row kbc-search kbc-search-row">
<span class="kbc-icon-search"></span>
<input type="text" placeholder="Search" class="form-control">
</div>
<div class="table table-striped table-hover">
<div class="thead">
<div class="tr">
<span class="th">Name</span>
<span class="th">Last Run</span>
<span class="th">Duration</span>
示例5: print_page
public static function print_page($content)
{
$start_time = microtime(true);
if (strlen(LINK_PATH) > 0) {
$sitePathArray = explode("/", LINK_PATH);
for ($i = 0; $i < count($sitePathArray); $i++) {
$file = FILE_ROOT . implode("/", array_slice($sitePathArray, 0, $i + 1)) . "/sidebar.php";
if (file_exists($file)) {
include $file;
MainTemplate::set_sidebar(sidebar());
MainTemplate::set_menu(menu());
}
}
unset($sitePathArray, $i, $file);
}
$main_menu = new Menu();
$main_menu->add_many(array("music", "Music Library", "music"), array("playlists", "Playlists", "th-list"), array("audiowalls", "Audiowalls", "th"), array("files", "Files", "folder-open"), array("showplans", "Show Planning", "tasks"));
if (Session::is_admin()) {
$main_menu->add("admin", "Admin", "cog");
}
$site_path_array = explode("/", LINK_PATH);
$main_menu->set_active($site_path_array[0]);
header("Content-Type: text/html; charset=utf-8");
$return = "<!DOCTYPE html> \n<html> \n\t<head> \n\t\t<title>RaW Digiplay";
if (Output::get_title() != 'Untitled Page') {
$return .= " - " . Output::get_title();
}
$return .= "</title> \n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n\t\t<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js\"></script>\n\t\t<script type=\"text/javascript\" src=\"" . LINK_ABS . "js/bootstrap.min.js\"></script>\n\t\t";
if (isset($_REQUEST["theme"])) {
$return .= "<link rel=\"stylesheet\" href=\"//netdna.bootstrapcdn.com/bootswatch/3.0.0/" . $_REQUEST["theme"] . "/bootstrap.min.css\">\n";
} else {
$return .= "<link rel=\"stylesheet\" href=\"" . LINK_ABS . "css/bootstrap.min.css\">\n";
}
if (count(Output::get_stylesheets()) > 0) {
foreach (Output::get_stylesheets() as $src) {
$return .= "<link href=\"" . $src . "\" rel=\"stylesheet\" type=\"text/css\">\n";
}
}
if (count(Output::get_scripts()) > 0) {
foreach (Output::get_scripts() as $src) {
$return .= "<script src=\"" . $src . "\" type=\"text/javascript\"></script>\n";
}
}
if (count(Output::get_feeds()) > 0) {
foreach (Output::get_feeds() as $feed) {
$return .= "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"" . $feed['title'] . "\" href=\"" . $feed['url'] . "\">\n";
}
}
if (self::$barebones == false) {
$return .= "\n\t\t\t<link rel=\"stylesheet\" href=\"" . LINK_ABS . "css/style.css\">\n\t\t\t<script src=\"" . LINK_ABS . "js/main.js\" type=\"text/javascript\"></script>\n\t\t\t";
}
$return .= "\t</head>\n\t<body" . (self::$body_class ? " class=\"" . self::$body_class . "\"" : "") . ">";
if (self::$barebones == false) {
$return .= "\n\t\t<div id=\"wrap\">\n\t\t\t<nav class=\"navbar navbar-inverse navbar-fixed-top\" role=\"navigation\">\n\t\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"navbar-header\">\n\t\t\t\t\t<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-dps-collapse\">\n \t\t\t\t\t\t<span class=\"sr-only\">Toggle navigation</span>\n \t\t\t\t\t\t<span class=\"icon-bar\"></span>\n \t\t\t\t\t\t<span class=\"icon-bar\"></span>\n \t\t\t\t\t\t<span class=\"icon-bar\"></span>\n \t\t\t\t\t</button>\n\t \t\t\t\t<a class=\"navbar-brand hidden-sm\" href=\"" . LINK_ABS . "\">Digiplay</a>\n\t\t\t\t\t<div class=\"navbar-spinner hidden\">\n\t\t\t\t\t\t<svg class=\"spinner\" width=\"25px\" height=\"25px\" viewBox=\"0 0 66 66\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t<circle class=\"path\" fill=\"none\" stroke-width=\"8\" stroke-linecap=\"round\" cx=\"33\" cy=\"33\" r=\"29\"></circle>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"navbar-collapse collapse navbar-dps-collapse\">" . $main_menu->output(LINK_ABS, 6, "nav navbar-nav");
if (Session::is_user()) {
$return .= "\n\t\t\t\t\t<ul class=\"nav search-pull-right hidden-sm\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<form class=\"navbar-form\" action=\"" . LINK_ABS . "music/search\" method=\"GET\" role=\"search\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t \t\t\t\t\t<input type=\"text\" class=\"form-control search-query\" placeholder=\"Search Tracks\" name=\"q\" autocomplete=\"off\">\n\t \t\t\t\t</div>\n\t \t\t\t</form>\n\t \t\t</li>\n\t \t\t<li>\n\t\t \t\t\t<ul id=\"quick-search\" class=\"dropdown-menu pull-right\"></ul>\n\t\t \t\t</li>\n\t\t \t</ul>\n\t\t \t";
}
$return .= "\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t\t" . (isset(self::$feature_html) ? "<div class=\"jumbotron" . (isset(self::$feature_image) ? " feature-image\" style=\"background-image: url('" . self::$feature_image . "')\"" : "\"") . "><div class=\"container\">" . self::$feature_html . "</div></div>" : "") . "<div class=\"container\">";
if (Output::get_title() != 'Untitled Page') {
$return .= "\n\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t<h2>" . Output::get_title();
if (isset(self::$subtitle)) {
$return .= " <small>" . self::$subtitle . "</small>";
}
$return .= "</h2>\n\t\t\t\t</div>";
}
$return .= "\n\t\t\t\t<div class=\"row\">";
if (isset(self::$sidebar) || isset(self::$menu)) {
$return .= "\n\t\t\t\t<div class=\"col-md-3\">";
if (isset(self::$menu)) {
$return .= self::$menu;
}
if (isset(self::$sidebar)) {
$return .= "\t\n\t\t\t\t\t<div class=\"panel panel-noborder visible-md visible-lg\">\n\t\t\t\t\t\t<div class=\"panel-body\">" . self::$sidebar . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>";
}
$return .= "\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-md-9\">";
} else {
$return .= "\n\t\t\t\t<div class=\"col-md-12\">";
}
}
$return .= $content;
if (self::$barebones == false) {
$return .= "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>";
if (Session::is_user()) {
$return .= Bootstrap::modal("logout-modal", "You'll lose any unsaved changes on this page.", "Log out?", "<a class=\"btn btn-primary\" href=\"" . LINK_ABS . "ajax/logout.php\">Yes, log out</a>");
}
$return .= "\n\t\t<div id=\"push\"></div>\n\t</div>\n\t\t<footer class=\"jumbotron\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-sm-8\">\n\t\t\t\t\t\t<p class=\"text-muted credit\">";
if (Session::is_user()) {
$return .= "Logged in as " . Session::get_username() . ". <a href=\"#logout-modal\" data-toggle=\"modal\">Logout</a>. ";
} else {
$return .= "Not logged in. ";
}
$return .= "Copyright © 2011-" . date("y") . " Radio Warwick\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-sm-4\">\n\t\t\t\t\t\t<a href=\"" . LINK_ABS . "\"><img src=\"" . LINK_ABS . "img/footer_logo.png\" alt=\"RaW 1251AM\" class=\"pull-right\"/></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</footer>";
}
$return .= "\n\t<!-- Page generated in " . (microtime(true) - START_TIME) . " seconds. " . DigiplayDB::get_querycount() . " database queries ran in " . DigiplayDB::get_querytime() . " seconds. -->\n\t</body> \n</html>";
return $return;
}
示例6: array
<?php
$sidebardata = array(array('name' => '管理', 'style' => 'alert-info', 'data' => array(array('icon' => '', 'url' => web_url("/database/room"), 'text' => '房間管理'))));
echo sidebar($sidebardata, $active);
示例7: sidebar
<img id="headericon" src="images/abcplayer_96.png" alt="" />
<h1><a href="index.php">ABC Player</a></h1>
<div class="description">for <i>The Lord of the Rings Online</i></div>
</div>
<div id="mainarea">
<div id="sidebar">
<div id="sidebarnav">
<?php
sidebar('index.php', 'Home');
?>
<?php
sidebar('changelog.php', 'Release Notes');
?>
<?php
sidebar('contact.php', 'Contact Me');
?>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KPX5YZW5SALAG">
<img src="images/btn_donate_SM.gif" alt="Donate" title="PayPal - The safer, easier way to pay online!" width="74" height="21" border="0" />
</a>
</div>
<?php
/*
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div id="donate">
<input type="hidden" name="cmd" value="_s-xclick"/>
<input type="hidden" name="hosted_button_id" value="KPX5YZW5SALAG"/>
<input type="image" src="images/btn_donate_SM.gif" name="submit" alt="Donate" title="PayPal - The safer, easier way to pay online!" width="74" height="21" />
<img alt="" src="images/pixel.gif" width="1" height="1"/>
</div>
</form>
示例8: start_content
function start_content()
{
echo '<div id="content_section">';
echo '<div class="frame">';
echo '<div id="main_content_section">';
echo '<table class="main_table">';
echo '<tr>';
echo '<td id="sidebar">';
//user();
sidebar("");
echo '<div class="sidenode">';
twitter();
echo '</div>';
// side_ad();
echo '</td>';
echo '<td id="main_content">';
}
示例9: sidebar
if (is_file("./" . $_SESSION[$guid]["address"])) {
//Include the page
include "./" . $_SESSION[$guid]["address"];
} else {
include "./error.php";
}
}
}
?>
</div>
<?php
if ($sidebar != "false") {
?>
<div id="sidebar">
<?php
sidebar($connection2, $guid);
?>
</div>
<br style="clear: both">
<?php
}
?>
</div>
<div id="footer">
<?php
print _("Powered by");
?>
<a target='_blank' href="http://gibbonedu.org">Gibbon</a> v<?php
print $version;
if ($_SESSION[$guid]["cuttingEdgeCode"] == "Y") {
print "dev";
示例10: sidebar
<div class="catalog">
<div class="container">
<div class="wrap clearfix">
<h2>Каталог</h2>
<ul class="links">
<li><a href="#">Новинки </a></li>
<li><a href="#">Акции</a></li>
<li><a href="#"> Я рекомендую</a></li>
</ul>
</div>
<div class="row">
<div id="accordion" class="col-xs-12 col-sm-3 accordion">
<?php
echo sidebar($sidebar);
?>
</div>
<div class="col-xs-12 col-sm-9 items">
<div class="item col-xs-12 col-sm-4">
<img src="img/item.jpg" alt="">
<div>Доктор Нонна на НТВ в программе "Наши со Львом Новоженовым"</div>
<div class="wrap">
<span class="price pull-left">280 грн.</span>
<a class="button pull-right" href="">Купить</a>
</div>
</div>
<div class="item col-xs-12 col-sm-4">
<img src="img/item.jpg" alt="">
示例11: bodyContent
function bodyContent()
{
$content = '
<div id="content">
' . sidebar() . '
' . mainbar() . '
</div>';
return $content;
}
示例12: sidebar
<tr>
<td colspan="5">
<div class="row">
<div class="col-xs-4"><button class="btn btn-primary btn-block">New row</button></div>
<div class="col-xs-4 pull-right"><input type="submit" class="btn btn-secondary btn-block" value="Save" /></div>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<?php
sidebar("sidebar");
?>
</div>
<script>
$('#tbl-entries table tfoot button').on('click',function(event) {
event.preventDefault();
$('#tbl-entries table tbody').append('<tr>' + $('#tbl-entries table tbody tr:first-child').html() + '<tr>');
$('.datepicker').datepicker();
});
$('.datepicker').datepicker();
</script>
示例13: pfinish
function pfinish()
{
global $body;
global $pstart_args;
if ($pstart_args->nocache) {
header("Cache-Control: no-store, no-cache, must-revalidate," . " post-check=0, pre-check=0");
header("Pragma: no-cache");
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
}
$ajax = 0;
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
$ajax = 1;
}
if ($ajax) {
echo $body;
exit;
}
$ret = "";
$ret .= "<!DOCTYPE html PUBLIC" . " '-//W3C//DTD XHTML 1.0 Transitional//EN'" . " 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>" . "\n";
$ret .= "<html xmlns='http://www.w3.org/1999/xhtml'>\n";
$ret .= "<head>\n";
if ($pstart_args->insert_html_head_template) {
$ret .= html_head();
}
if ($pstart_args->extra_head) {
$ret .= $pstart_args->extra_head;
}
if ($pstart_args->page_header->page_title_html) {
$ret .= sprintf("<title>%s</title>\n", $pstart_args->page_header->page_title_html);
}
if ($pstart_args->page_header->page_description_html) {
$ret .= sprintf("<meta name='description'" . " content='%s' />\n", $pstart_args->page_header->page_description_html);
}
if ($pstart_args->page_header->page_keywords_html) {
$ret .= sprintf("<meta name='keywords'" . " content='%s' />\n", $pstart_args->page_header->page_keywords_html);
}
if ($pstart_args->facebook->meta_title_html) {
$ret .= sprintf("<meta property='og:title'" . " content='%s' />\n", $pstart_args->facebook->meta_title_html);
}
if ($pstart_args->facebook->meta_description_html) {
$ret .= sprintf("<meta property='og:description'" . " content='%s' />\n", $pstart_args->facebook->meta_description_html);
}
if ($pstart_args->facebook->meta_type_html) {
$ret .= sprintf("<meta property='og:type'" . " content='%s' />\n", $pstart_args->facebook->meta_type_html);
}
if ($pstart_args->facebook->meta_url_html) {
$ret .= sprintf("<meta property='og:url'" . " content='%s' />\n", $pstart_args->facebook->meta_url_html);
}
if ($pstart_args->facebook->meta_image_html) {
$ret .= sprintf("<meta property='og:image'" . " content='%s' />\n", $pstart_args->facebook->meta_image_html);
}
if ($pstart_args->facebook->meta_site_name_html) {
$ret .= sprintf("<meta property='og:site_name'" . " content='%s' />\n", $pstart_args->facebook->meta_site_name_html);
}
if ($pstart_args->facebook->meta_admins_html) {
$ret .= sprintf("<meta property='og:admins'" . " content='%s' />\n", $pstart_args->facebook->meta_admins_html);
}
$ret .= "</head>\n";
$c = "";
if (@$pstart_args->body_class) {
$c = sprintf("class='%s'", $pstart_args->body_class);
}
$i = "";
if (@$pstart_args->body_id) {
$i = sprintf("id='%s'", $pstart_args->body_id);
}
$ret .= "<body {$c} {$i}>\n";
$rp = $pstart_args->require_password;
if ($rp->password && $rp->password_seq) {
require_password($rp->password, $rp->password_seq);
}
$ret .= "<div id='container' class='line'>\n";
$container_class = "";
if ($pstart_args->body->fluid_layout) {
$container_class = sprintf("class='%s'", "fluid");
}
$ret .= "<div id='container-inner' {$container_class}>\n";
if ($pstart_args->insert_banner_header_template) {
$ret .= banner_header();
}
if ($pstart_args->content_wrapper) {
$ret .= "<div id='content'>\n" . "<div id='content-inner'>\n";
}
$ret .= main_nav();
if ($pstart_args->alpha_wrapper) {
$alpha_class = "";
if (!$pstart_args->insert_sidebar_template) {
$alpha_class = sprintf("class='%s'", "no-sidebar");
}
$ret .= "<div id='alpha' {$alpha_class}>\n";
$ret .= "<div id='alpha-inner'>\n";
}
global $prev_flash;
if ($prev_flash) {
$ret .= "<div class='flash_alert'>\n";
$ret .= $prev_flash;
$ret .= "</div>\n";
}
echo $ret;
global $body;
//.........这里部分代码省略.........