function secondery_nav_generator($active = '') { global $link, $setting, $lang, $mb; echo ' <div class="secondery_nav" id="secondery_nav"> <div id="nav" class="secondery_nav_wrap"> <ul class="left"> <li class="expand"> <a href="javascript:void(0)" onclick="expand_second_menu()"><i class="fa fa-bars"></i></a> </li>'; foreach ($mb['main_menu']['help']['sub_menu'] as $item) { if (isset($item['href']) && !isset($item['hide'])) { echo '<li><a href="' . $item['href'] . '" ', strpos($item['href'], $_SERVER['REDIRECT_URL']) ? 'class="active_menu_link"' : '', '>' . $item['icon'] . ' ' . $item['title'] . '</a></li>'; } } echo '</ul><ul class="right>" '; if ($active == 'release-note') { $releasenotedata = getVersionInfo(0, "byAllReleases"); echo '<li class="input_wrap"> <select name="release_note_jump" id="release_note_jump" onfocus=""> <option value="top_jump">' . $lang['jumpto_release'] . '</option>'; if (count($releasenotedata) > 0) { foreach ($releasenotedata as $key => $value) { echo '<option>' . str_replace(".", "-", $value['version']) . '</option>'; } } echo ' </select> </li>'; } echo '</ul></div></div>'; }
$json_response = true; $admin_only = true; //only admin require_once $_SERVER['DOCUMENT_ROOT'] . '/functions.php'; if (isset($_GET['stable'])) { $release_type = "stable"; } elseif (isset($_GET['beta'])) { $release_type = "beta"; } elseif (isset($_GET['patch'])) { $release_type = "patch"; } elseif (isset($_GET['update']) && isset($_GET['id'])) { $release_type = "update"; $id = $_GET['id']; $data = getVersionInfo($id, "byId")[0]; //Request version info by ID $currentVersion = getVersionInfo(0, "byCurrentVersion")[0]; //Get the current } if ($release_type == "update") { ?> <div class="main_content_wrapper col_2_1"> <div class="sub_content_wrapper"> <form action="<?php echo $link['url']; ?> includes/admin.tasks.php" method="post" id="release_submit" data-autosubmit> <div class="box_content"> <div class="show_info custom"> <h3><?php echo $lang['mbr_submit_h_2']; ?>
notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require 'guiconfig.inc'; $prodInfo = getVersionInfo(); if (is_file('/offload/livecd')) { //$local_version = trim(file_get_contents("/etc/version")); $livecd_version = trim(file_get_contents("/offload/livecd")); if (strlen($livecd_version) > 0) { if ($prodInfo['buid'] != $livecd_version) { die(sprintf(_("TeeBX is in update mode. You either have to remove the Live CD or install the newer version of TeeBX. (Installed is %s, Live CD version is %s)"), $prodInfo['buid'], $livecd_version)); } } } require_once 'libs-php/htmltable.class.php'; require_once 'blockdevices.lib.php'; // define some constants referenced in fbegin.inc define('INCLUDE_TBLSTYLE', true); define('INCLUDE_JSCRIPTS', 'dashboard.js'); //check_update();
/** * @return string */ public function GetDeclaration_WholeClass() { $currentUser = getenv('USERNAME') ?: getenv('USER'); $currentDateTime = date("F j, Y, g:i a"); $version = getVersionInfo(); return <<<CLASS_DECLARATION <?php /** * Created by "Helping Developers With Class". * Version: {$version['version']} * GIT: {$version['git']} * User: {$currentUser} * Class Creation: {$currentDateTime} */ require_once(DIR_ROOT . '/lib/classes/tables/GeneratedClass.php'); Class {$this->table} EXTENDS GeneratedClass { const CHAR_ESCAPE_FIELD_VALUE = "{$this->char_escapeValue}" ; const CHAR_ESCAPE_FIELD_NAME_PRE = "{$this->char_escapeNamePre}"; const CHAR_ESCAPE_FIELD_NAME_POST = "{$this->char_escapeNamePost}"; protected \$fields_excluded_locally = array(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //BEGIN UPDATEABLE SECTION //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {$this->GetDeclaration_UpdateablePart()} //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //END UPDATEABLE SECTION //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public function load(\$primaryKeyData){ parent::load(\$primaryKeyData); } public function save(\$listOfFields = "*"){ parent::save(\$listOfFields); } } CLASS_DECLARATION; }
//Save current page url into session for login/logout redirect............ well it does not work anyway! could be a SMF Bug. if (!strpos(currentUrl(), 'login') && !strpos(currentUrl(), 'logout') && !strpos(currentUrl(), 'includes') && !strpos(currentUrl(), 'styles') && !strpos(currentUrl(), 'img') && !strpos(currentUrl(), 'kb')) { $_SESSION['login_url'] = currentUrl(); $_SESSION['logout_url'] = currentUrl(); $_SESSION['old_url'] = currentUrl(); $_SESSION['redirect'] = currentUrl(); } $_SESSION['previous_page'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : $link['url']; // var_dump($_SESSION['redirect']); //Get user avatar or use the default avatar $user_avatar = $context['user']['avatar'] != null ? $context['user']['avatar']['href'] : $link['url'] . 'img/usersmall.jpg'; //Get the musicbee satble and beta release data $releaseData['stable'] = getVersionInfo(0, 'byCurrentVersion')[0]; $releaseData['beta'] = getVersionInfo(1, 'byCurrentVersion')[0]; //Contains EVERYTHING in single multidimensional array! DO NOT REMOVE IT! $mb = array('website' => array('ver' => '1.9.0', 'show_warning' => false, 'is_test' => false, 'github_link' => 'https://github.com/Avik-B/mb_web/'), 'charset' => 'UTF-8', 'user' => array('id' => $context['user']['id'], 'is_logged' => $context['user']['is_logged'], 'is_guest' => $context['user']['is_guest'], 'is_admin' => $context['user']['is_admin'], 'is_mod' => $context['user']['is_mod'], 'is_elite' => false, 'is_newbie' => false, 'rank_name' => null, 'need_approval' => true, 'can_mod' => $context['user']['can_mod'], 'username' => $context['user']['name'], 'email' => $context['user']['email'], 'name' => $context['user']['name'], 'messages' => $context['user']['messages'], 'unread_messages' => $context['user']['unread_messages'], 'avatar' => $user_avatar), 'session_var' => $context['session_var'], 'session_id' => $context['session_id'], 'current_time' => array('date' => date("F j, Y"), 'date_time' => date("F j, Y, g:i a")), 'main_menu' => array('dashboard' => array('title' => $lang['dashboard'], 'href' => $link['addon']['dashboard'], 'restriction' => 'login', 'sub_menu' => array()), 'member-panel' => array('title' => '<img src="' . $user_avatar . '" class="user_avatar">', 'href' => $link['forum'] . '?action=profile', 'restriction' => 'login', 'sub_menu' => array('user-profile' => array('title' => '' . sprintf($lang['hey_username'], $context['user']['name']) . '', 'href' => $link['forum'] . '?action=profile'), 'line1' => array('title' => $lang['line']), 'admin-panel' => array('title' => $lang['web_admin'], 'href' => $link['addon']['dashboard'] . '#admin_setting', 'icon' => $lang['20'], 'restriction' => 'admin'), 'forum-admin' => array('title' => $lang['forum_admin'], 'href' => $link['admin']['forum-panel'], 'icon' => $lang['21'], 'restriction' => 'admin'), 'line2' => array('title' => $lang['line']), 'sign-out' => array('title' => $lang['sign_out'], 'href' => $link['logout'], 'icon' => $lang['23']))), 'download' => array('title' => $lang['download'], 'href' => $link['download'], 'sub_menu' => array()), 'add-ons' => array('title' => $lang['addons'], 'href' => $link['addon']['home'], 'sub_menu' => array('1' => array('title' => $lang['skins'], 'href' => $link['addon']['home'] . "s/?type=1", 'icon' => $lang['24'], 'desc' => $lang['description_1'], 'id' => 1), '2' => array('title' => $lang['plugins'], 'href' => $link['addon']['home'] . "s/?type=2", 'icon' => $lang['25'], 'desc' => $lang['description_2'], 'id' => 2), '3' => array('title' => $lang['visualizer'], 'href' => $link['addon']['home'] . "s/?type=3", 'icon' => $lang['26'], 'desc' => $lang['description_3'], 'id' => 3), '4' => array('title' => $lang['theater_mode'], 'href' => $link['addon']['home'] . "s/?type=4", 'icon' => $lang['28'], 'desc' => $lang['description_5'], 'id' => 4), '5' => array('title' => $lang['misc'], 'href' => $link['addon']['home'] . "s/?type=5", 'icon' => $lang['29'], 'desc' => $lang['description_6'], 'id' => 5))), 'forum' => array('title' => $lang['forum'], 'href' => $link['forum'], 'sub_menu' => array()), 'help' => array('title' => $lang['help'], 'href' => $link['faq'], 'sub_menu' => array('faq' => array('title' => $lang['faq'], 'href' => $link['faq'], 'icon' => $lang['faq_icon']), 'api' => array('title' => $lang['dev_api'], 'href' => $link['api'], 'icon' => $lang['code_icon']), 'line2' => array('title' => $lang['line']), 'release-note' => array('title' => $lang['release-note'], 'href' => $link['release-note'], 'icon' => $lang['note_icon']), 'press' => array('title' => $lang['press'], 'href' => $link['press'], 'icon' => $lang['press_icon']), 'line3' => array('title' => $lang['line']), 'bug' => array('title' => $lang['report_bug'], 'href' => $link['bugreport'], 'icon' => $lang['bug_icon'], 'hide' => true), 'wiki' => array('title' => $lang['mb_wiki'], 'href' => $setting['wikiaLink'], 'icon' => $lang['wiki_icon'], 'target' => '_blank', 'hide' => true)))), 'musicbee_download' => array('stable' => array('appname' => isset($releaseData['stable']['appname']) ? $releaseData['stable']['appname'] : "NA", 'version' => isset($releaseData['stable']['version']) ? $releaseData['stable']['version'] : "NA", 'release_date' => isset($releaseData['stable']['release_date']) ? $releaseData['stable']['release_date'] : "NA", 'supported_os' => isset($releaseData['stable']['supported_os']) ? $releaseData['stable']['supported_os'] : "NA", 'download' => array('available' => isset($releaseData['stable']['available']) ? $releaseData['stable']['available'] : 0, 'installer' => array('link1' => isset($releaseData['stable']['DownloadLink']) ? $releaseData['stable']['DownloadLink'] : "NA", 'link2' => isset($releaseData['stable']['MirrorLink1']) ? $releaseData['stable']['MirrorLink1'] : null, 'link3' => isset($releaseData['stable']['MirrorLink2']) ? $releaseData['stable']['MirrorLink2'] : null), 'portable' => array('link1' => isset($releaseData['stable']['PortableLink']) ? $releaseData['stable']['PortableLink'] : "NA"))), 'beta' => array('appname' => isset($releaseData['beta']['appname']) ? $releaseData['beta']['appname'] : "NA", 'version' => isset($releaseData['beta']['version']) ? $releaseData['beta']['version'] : "NA", 'release_date' => isset($releaseData['beta']['release_date']) ? $releaseData['beta']['release_date'] : "NA", 'supported_os' => isset($releaseData['beta']['supported_os']) ? $releaseData['beta']['supported_os'] : "NA", 'download' => array('available' => isset($releaseData['beta']['available']) ? $releaseData['beta']['available'] : 0, 'link1' => isset($releaseData['beta']['DownloadLink']) ? $releaseData['beta']['DownloadLink'] : "NA"), 'message' => isset($releaseData['beta']['message']) ? $releaseData['beta']['message'] : null), 'patch' => getVersionInfo(2, 'byCurrentVersion')[0]), 'help' => Help::getHelp(), 'view_range' => array('addon_view_range' => 20, 'dashboard_all_view_range' => 20, 'release_all_view_range' => 20)); //var_dump($mb['musicbee_download']); /** * Maybe we don't wan't anyone except admin to see this, show error to anyone else. Or maybe * this is only available for logged in users. No guest is allowed kicked them to error page */ if (!$mb['user']['is_admin'] && !empty($admin_only)) { header('Location: ' . $link['kb'] . '?code=' . $errorCode['ADMIN_ACCESS']); } elseif (!$mb['user']['can_mod'] && !empty($mod_only)) { if (!empty($json_response)) { die('{"status": "0", "data": "' . $lang['dashboard_err_1'] . '"}'); } else { header('Location: ' . $link['kb'] . '?code=' . $errorCode['MOD_ACCESS']); } } elseif ($mb['user']['is_guest'] && !empty($no_guests)) { if (!empty($json_response)) {
</li> <li> <label for="mbSupportedVer"> <p><?php echo $lang['dashboard_submit_header_7']; ?> </p> </label> <input id="mbSupportedVer" name="mbSupportedVer" type="hidden" value=""/> <select id="multipleVer"> <?php foreach (getVersionInfo(0, "byAllReleases") as $ver) { if ($ver['dashboard_availablity'] == 1) { if ($viewType == 2) { if ($ver['ID_ALLVERSIONS'] == $data['supported_mbversion']) { $selected_mb_text = "selected"; } else { $selected_mb_text = ""; } } else { $selected_mb_text = ""; //if not matched then remove the selected text } echo '<option value="' . $ver['ID_ALLVERSIONS'] . '" ' . $selected_mb_text . '>' . $ver['appname'] . '</option>'; } } ?>
/** * Copyright (c) 2016 AvikB, some rights reserved. * Copyright under Creative Commons Attribution-ShareAlike 3.0 Unported, * for details visit: https://creativecommons.org/licenses/by-sa/3.0/ * * @Contributors: * Created by AvikB for noncommercial MusicBee project. * Spelling mistakes and fixes from community members. * */ ?> <?php //Get release note data $releasenoteData = getVersionInfo(0, "byAllReleases"); ?> <!DOCTYPE html> <html> <head> <title><?php echo $lang['releasenote_title']; ?> </title> <meta name="description" content="<?php echo $lang['releasenote_desc']; ?> "> <!--include common meta tags and stylesheets -->