Beispiel #1
0
 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 &copy; 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;
 }
Beispiel #2
0
<?php

require_once 'pre.php';
Output::set_title("Audiowall:");
MainTemplate::set_sidebar(NULL);
Output::add_script("../js/jquery-ui-1.10.3.custom.min.js");
Output::add_script("aw.js");
Output::add_less_stylesheet("aw.less");
Output::add_stylesheet("aw.css");
$aw_set = AudiowallSets::get((int) $_REQUEST['id']);
if ($aw_set == null) {
    exit;
}
//var_dump($aw_set);
$aw_walls = $aw_set->get_walls();
//var_dump($aw_walls);
$styles = AudiowallStyles::get_all();
Output::set_title("Audiowall:<br /><span id=\"wall-name\" data-dps-set-id=\"" . $aw_set->get_id() . "\">" . $aw_set->get_name() . "</span>");
MainTemplate::set_subtitle("<span id=\"wall-description\">" . $aw_set->get_description() . "</span><span id=\"aw_edit_buttons\"><p class=\"text-success\">Changes saved!</p><a href=\"#\" class=\"btn btn-primary\">Edit</a><a href=\"#\" class=\"btn btn-success\">Save</a></span>");
?>
<div class="row">
  <div class="col-md-12">
  </div>
  <div class="col-md-5">
    <div class="list-group" id="walls-tabs">
       <?php 
$w = 0;
foreach ($aw_walls as $wall) {
    echo "<a id=\"walls-tab\" href=\"#page" . $wall->get_page() . "\" data-toggle=\"tab\" data-dps-wall-page=\"" . $wall->get_page() . "\" data-dps-wall-id=\"" . $wall->get_id() . "\" class=\"list-group-item";
    if ($w == 0) {
        echo " list-group-item-info";