Exemple #1
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "Sustainer Control Centre", "icon" => "home"), array("url" => LINK_ABS . $site_path_array[0] . "/schedule.php", "text" => "Sustainer Schedule", "icon" => "music"), array("url" => LINK_ABS . $site_path_array[0] . "/adverts.php", "text" => "Advert Manager", "icon" => "gbp"));
    foreach ($menu as &$item) {
        if ($site_path_array[1] == array_pop(explode("/", $item["url"]))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}
Exemple #2
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "Playlists Overview", "icon" => "home"), array("url" => LINK_ABS . $site_path_array[0] . "/index.php#add", "text" => "Add a new playlist", "icon" => "plus-sign"), array("url" => LINK_ABS . $site_path_array[0] . "/sustainer/", "text" => "Sustainer settings", "icon" => "edit"));
    foreach ($menu as &$item) {
        if ($site_path_array[1] == array_pop(explode("/", $item["url"]))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}
Exemple #3
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "Admin Overview", "icon" => "home"), array("url" => LINK_ABS . "faults", "text" => "Fault Reporting", "icon" => "book"), array("url" => LINK_ABS . $site_path_array[0] . "/users", "text" => "User Administration", "icon" => "user"), array("url" => LINK_ABS . $site_path_array[0] . "/groups", "text" => "Group Administration", "icon" => "indent-left"), array("url" => LINK_ABS . $site_path_array[0] . "/locations", "text" => "Location Configuration", "icon" => "globe"), array("url" => LINK_ABS . $site_path_array[0] . "/system", "text" => "System Configuration", "icon" => "cog"));
    foreach ($menu as &$item) {
        if ($site_path_array[1] == array_pop(explode("/", $item["url"]))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}
Exemple #4
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/users/users-viewers.php?setid=" . $_REQUEST['setid'], "text" => "Viewers", "icon" => "eye-open"), array("url" => LINK_ABS . $site_path_array[0] . "/users/users-editors.php?setid=" . $_REQUEST['setid'], "text" => "Editors", "icon" => "edit"), array("url" => LINK_ABS . $site_path_array[0] . "/users/users-admins.php?setid=" . $_REQUEST['setid'], "text" => "Admins", "icon" => "cog"));
    foreach ($menu as &$item) {
        if ($site_path_array[2] == str_replace("?setid=" . $_REQUEST['setid'], "", array_pop(explode("/", $item["url"])))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}
Exemple #5
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "My Files", "icon" => "home"), array("url" => LINK_ABS . $site_path_array[0] . "/system", "text" => "System Files", "icon" => "folder-open"), array("url" => LINK_ABS . $site_path_array[0] . "/packages", "text" => "Jingle Packages", "icon" => "book"));
    foreach ($menu as &$item) {
        if ($site_path_array[1] == array_pop(explode("/", $item["url"]))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}
Exemple #6
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "Library Overview", "icon" => "home"), array("url" => LINK_ABS . $site_path_array[0] . "/search", "text" => "Search Tracks", "icon" => "search"), array("url" => LINK_ABS . $site_path_array[0] . "/request", "text" => "Request Tracks", "icon" => "question-sign"), array("url" => LINK_ABS . $site_path_array[0] . "/censor", "text" => "Tag for Censorship", "icon" => "exclamation-sign"), array("url" => LINK_ABS . $site_path_array[0] . "/upload", "text" => "Upload Tracks", "icon" => "upload"));
    $requests = Requests::count();
    if ($requests > 0) {
        $menu[2]["badge"] = $requests;
    }
    $flagged = count(Tracks::get_flagged());
    if ($flagged > 0) {
        $menu[3]["badge"] = $flagged;
    }
    foreach ($menu as &$item) {
        if ($site_path_array[1] == array_pop(explode("/", $item["url"]))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}
Exemple #7
0
function menu()
{
    $site_path_array = explode("/", LINK_FILE);
    if (Session::is_developer()) {
        $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "System Status", "icon" => "home"), array("url" => LINK_ABS . $site_path_array[0] . "/fault.php", "text" => "My Fault Reports", "icon" => "list"), array("url" => LINK_ABS . $site_path_array[0] . "/assigned.php", "text" => "My Assigned Faults", "icon" => "inbox"), array("url" => LINK_ABS . $site_path_array[0] . "/report", "text" => "Report a Fault", "icon" => "flash"), array("url" => LINK_ABS . $site_path_array[0] . "/manage", "text" => "View Faults", "icon" => "list-alt"));
        $faults = Faults::get_open_faults();
        if ($faults > 0) {
            $menu[4]["badge"] = $faults;
        }
        $faults = Faults::get_open_faults_user(Session::get_id());
        if ($faults > 0) {
            $menu[2]["badge"] = $faults;
        }
    } else {
        $menu = array(array("url" => LINK_ABS . $site_path_array[0] . "/index.php", "text" => "System Status", "icon" => "home"), array("url" => LINK_ABS . $site_path_array[0] . "/fault.php", "text" => "My Fault Reports", "icon" => "list"), array("url" => LINK_ABS . $site_path_array[0] . "/report", "text" => "Report a Fault", "icon" => "flash"));
    }
    foreach ($menu as &$item) {
        if ($site_path_array[1] == array_pop(explode("/", $item["url"]))) {
            $item["active"] = true;
        }
    }
    return Bootstrap::list_group($menu);
}