public function player($vocal_markers = true) { Output::add_script(LINK_ABS . "js/wavesurfer.min.js"); Output::add_script(LINK_ABS . "js/wavesurfer.timeline.js"); Output::add_script(LINK_ABS . "js/wavesurfer_init.js"); if ($vocal_markers) { Output::add_script(LINK_ABS . "js/wavesurfer.regions.js"); } $html = "\n\t\t<script> \$(function () { wv_create('" . $this->id . "'); wavesurfer[" . $this->id . "].load('" . LINK_ABS . "audio/preview/" . $this->id . ".mp3') }); </script>\n\t\t<div class=\"row audio-player\" id=\"" . $this->id . "\" " . ($vocal_markers ? "data-vocal-start=\"" . $this->get_vocal_start() . "\" data-vocal-end=\"" . $this->get_vocal_end() . "\"" : "") . ">\n\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t<div class=\"well well-sm\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<button class=\"btn btn-primary playpause\" id=\"playpause\" disabled>\n\t\t\t\t\t\t\t\t" . Bootstrap::glyphicon("play") . "\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<h6><small><span class=\"elapsed\">00:00</span> / <span class=\"duration\">00:00</span></small></h6>\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t\t<button class=\"btn btn-sm btn-info zoom\">\n\t\t\t\t\t\t\t\t\t\t" . Bootstrap::glyphicon("search") . "\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div id=\"waveform" . $this->get_id() . "\">\n\t\t\t\t\t\t\t\t<div id=\"progress-div\" class=\"progress progress-striped\">\n\t\t\t\t\t\t\t\t\t<div class=\"progress-bar\">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>"; return $html; }
<?php $session = Session::get_user(); $aw = AudiowallSets::get_by_id(pg_escape_string($_REQUEST['setid'])); $sessionpermissions = $aw->get_user_permissions($session->get_id()); if ($sessionpermissions[2] == '1' || Session::is_group_user('Audiowalls Admin')) { $ownerid = DigiplayDB::select("user_id FROM aw_sets_owner WHERE set_id = '" . $aw->get_id() . "'"); if (isset($ownerid)) { $user = Users::get_by_id($ownerid); $username = $user->get_display_name(); } else { $username = ""; } require_once 'pre.php'; Output::add_script("../aw.js"); Output::set_title("Audiowall Users"); MainTemplate::set_subtitle("<span style=\"margin-right:20px;\">Set: " . $aw->get_name() . "</span><span style=\"margin-right:20px;\">Owner: " . $username . "</span><span id=\"editor_edit_buttons\"><a href=\"#\" class=\"btn btn-success\">Add Viewer</a></span>"); echo "<style type=\"text/css\">\n\ttable { font-size:1.2em; }\n\tthead { display:none; }\n\t.description { font-size:0.8em; font-style:italic; }\n\t.hover-info { display:none; }\n\t.table tbody tr.success td { background-color: #DFF0D8; }\n\t</style>"; echo "<table class=\"table table-striped\" cellspacing=\"0\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t<th style=\"width:65px\"></th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead><tbody>"; $aw_set = AudiowallSets::get_by_id($_REQUEST['setid']); $users = $aw_set->get_users_with_permissions(); if (!is_null($users) && count($users) > 1) { foreach ($users as $user) { $userclass = Users::get_by_id($user->get_id()); $username = $userclass->get_username(); $permissions = $aw_set->get_user_permissions($user->get_id()); if ($permissions[0] == "1" && $permissions[1] == '0') { echo "<tr><td><strong>" . $username . "</strong></td>"; echo "<td class=\"delete-aw-btn\" style=\"width:65px\"><a href=\"#\" class=\"btn btn-danger\">Delete</a></td>"; echo "</td></tr>"; }
<?php Output::set_title("System Files"); MainTemplate::set_subtitle("Browse and manage files in the database"); Output::add_stylesheet(LINK_ABS . "css/ui.fancytree.css"); Output::add_script(LINK_ABS . "js/jquery-ui-1.10.3.custom.min.js"); Output::add_script(LINK_ABS . "js/jquery.fancytree.js"); Output::add_script(LINK_ABS . "js/jquery.fancytree.glyphicon.js"); echo "\n <script>\n \$().ready(function() {\n \$('#files').fancytree({\n source: { url: '" . LINK_ABS . "ajax/file-tree.php?id=1', cache: false },\n extensions: ['glyphicon'],\n lazyload: function(event, data) {\n var node = data.node;\n data.result = { url: '" . LINK_ABS . "ajax/file-tree.php?id='+node.data.id }\n }\n });\n });\n </script>\n\n <div id=\"files\"></div>"; ?>
<?php Output::set_title("Sustainer Schedule"); Output::add_script(LINK_ABS . "js/jquery-ui-1.10.3.custom.min.js"); Output::add_stylesheet(LINK_ABS . "css/select2.min.css"); Output::add_script(LINK_ABS . "js/select2.min.js"); Output::require_group("Sustainer Admin"); MainTemplate::set_subtitle("Change the schedule of the sustainer service"); echo "<style type=\"text/css\">\r\n\ttd.timeslot { text-align: center; }\r\n </style>\r\n\r\n\r\n\t<script type=\"text/javascript\">\r\n\$(function() {\r\n\r\n\t\t\$('#update-playlist').click(function() {\r\n\t\t\t\$.ajax({\r\n\t\t\t\turl: '" . LINK_ABS . "ajax/update-sustainer-slots.php',\r\n\t\t\t\tdata: { updateid: \$('.update-id').val(), playlistid: \$('#playlist-id').val() },\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\terror: function(xhr,text,error) {\r\n\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\r\n\t\t\t\t\talert(value.error);\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: function(data,text,xhr) {\r\n\t\t\t\t\twindow.location.reload(true); \r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t\$('#save-prerecord').click(function() {\r\n\t\t\t\$.ajax({\r\n\t\t\t\turl: '" . LINK_ABS . "ajax/add-update-prerecord.php',\r\n\t\t\t\tdata: { updateid: \$('.update-id').val(), prerecordid: \$('#prerecord-id').val() },\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\terror: function(xhr,text,error) {\r\n\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\r\n\t\t\t\t\talert(value.error);\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: function(data,text,xhr) {\r\n\t\t\t\t\twindow.location.reload(true); \r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t\$('#delete-prerecord').click(function() {\r\n\t\t\t\$.ajax({\r\n\t\t\t\turl: '" . LINK_ABS . "ajax/add-update-prerecord.php',\r\n\t\t\t\tdata: { updateid: \$('.update-id').val(), prerecordid: 0 },\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\terror: function(xhr,text,error) {\r\n\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\r\n\t\t\t\t\talert(value.error);\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: function(data,text,xhr) {\r\n\t\t\t\t\twindow.location.reload(true); \r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t\$('#prerecord-id').select2({\r\n\t\t ajax: {\r\n\t\t url: '" . LINK_ABS . "ajax/prerecord-search.php',\r\n\t\t dataType: 'json',\r\n\t\t delay: 250,\r\n\t\t data: function (params) {\r\n\t\t return {\r\n\t\t q: params.term\r\n\t\t };\r\n\t\t },\r\n\t\t processResults: function (data, page) {\r\n\t\t // parse the results into the format expected by Select2.\r\n\t\t // since we are using custom formatting functions we do not need to\r\n\t\t // alter the remote JSON data\r\n\t\t return {\r\n\t\t results: data.data\r\n\t\t };\r\n\t\t },\r\n\t\t cache: true\r\n\t\t },\r\n\t\t escapeMarkup: function (markup) { return markup; }, // let our custom formatter work\r\n\t\t minimumInputLength: 1,\r\n\t\t templateResult: formatRepo, // omitted for brevity, see the source of this page\r\n\t\t templateSelection: formatRepoSelection\r\n\t\t});\r\n\r\n\t\tfunction formatRepo (repo) {\r\n\t\t\tif (repo.loading) return repo.title;\r\n\t\t return repo.title + ' by <i>' + repo.by + '</i>';\r\n\t\t }\r\n\r\n\t function formatRepoSelection (repo) {\r\n\t \treturn repo.title;\r\n\t }\r\n\r\n\t \$('#playlist-id').select2()\r\n\r\n});\r\n</script>"; $colours = array('2ecc71', 'e67e22', '3498db', 'e74c3c', '9b59b6', '34495e', '1abc9c', 'f1c40f'); $timeslots = array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'); $slots = SustainerSlots::get_all(); $i = 0; echo "<table class=\"table table-striped table-bordered\">\r\n\t<thead>\r\n\t<tr>\r\n\t<th></th>\r\n\t<th>Monday</th>\r\n\t<th>Tuesday</th>\r\n\t<th>Wednesday</th>\r\n\t<th>Thursday</th>\r\n\t<th>Friday</th>\r\n\t<th>Saturday</th>\r\n\t<th>Sunday</th>\r\n\t</tr>\r\n\t</thead>\r\n\t<tbody>"; $i = 0; foreach ($slots as $slot) { if ($i < 1) { echo "<tr>\r\n\t\t\t<td>" . $slot->get_time() . ":00</td>"; } $thisPlaylist = Playlists::get_by_id($slot->get_playlist_id()); $thisPlaylistColour = $thisPlaylist->get_colour() == "" ? 'FFFFFF' : $thisPlaylist->get_colour(); echo "<td class='timeslot' id='slot-" . $slot->get_day() . "-" . $slot->get_time() . "' style='background-color: #" . $thisPlaylistColour . ";'>"; echo $slot->get_audio_id() == NULL ? '' : "<span class=\"glyphicon glyphicon-time\" aria-hidden=\"true\"></span>"; echo "</td>"; $i++; if ($i > 6) { echo "</tr>"; $i = 0; } } echo "</tbody>\r\n\t</table>";
<?php Output::set_title("Requested Tracks"); Output::add_stylesheet(LINK_ABS . "css/music.css"); Output::add_script(LINK_ABS . "js/bootstrap-popover.js"); MainTemplate::set_subtitle("Want to play a track, but it's not in the database? Request it here"); if (isset($_REQUEST["name"]) && isset($_REQUEST["artistname"])) { $request = new Request(); $request->set_name($_REQUEST["name"]); $request->set_artist_name($_REQUEST["artistname"]); $request->set_user(Session::get_user()); $request->save(); } if (isset($_REQUEST["delete"])) { if (!Session::is_group_user("Music Admin")) { echo Bootstrap::alert_message_basic("error", "You are trying to delete a request, but you do not have the requred privelidges!", "Error!"); } else { $request = Requests::get_by_id($_REQUEST["delete"]); if ($request) { $request->delete(); } } } echo "\n<h3 style=\"margin-top: -4px\">Request a track</h3>\n<form action=\"\" method=\"post\" name=\"request-track\" class=\"form-inline\">\n\t<div class=\"form-group\">\n\t\t<input type=\"text\" name=\"artistname\" placeholder=\"Artist...\" class=\"form-control\">\n\t</div>\n\t<div class=\"form-group\">\n\t\t<input type=\"text\" name=\"name\" placeholder=\"Title...\" class=\"form-control\">\n\t</div>\n\t<div class=\"form-group\">\n\t\t<input type=\"submit\" value=\"Request\" class=\"btn btn-primary\">\n\t</div>\n</form>"; if ($requested = Requests::get_all()) { echo "\n<table class=\"table table-striped\" cellspacing=\"0\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th class=\"artist\">Artist</th>\n\t\t\t<th class=\"title\">Title</th>\n\t\t\t<th class=\"date nowrap\">Date Requested</th>\n\t\t\t<th class=\"requester nowrap\">Requester</th>\n\t\t\t" . (Session::is_group_user("Music Admin") ? "\n\t\t\t<th class=\"icon\"></th>" : "") . "\n\t\t</tr>\n\t</thead>"; foreach ($requested as $request) { echo "\n\t<tr id=\"" . $request->get_id() . "\">\n\t\t<td class=\"artist\">" . $request->get_artist_name() . "</td>\n\t\t<td class=\"title\">" . $request->get_name() . "</td>\n\t\t<td class=\"date nowrap\">" . date("d/m/Y H:i", $request->get_date()) . "</td>\n\t\t<td class=\"requester nowrap\">" . $request->get_user()->get_username() . "</td>\n\t\t" . (Session::is_group_user("Music Admin") ? "<td class=\"icon\"><a href=\"" . LINK_ABS . "music/request/?delete=" . $request->get_id() . "\" class=\"request-delete\" title=\"Delete this request\" rel=\"twipsy\">" . Bootstrap::glyphicon("remove-sign") . "</td>" : "") . "\n\t</tr>"; } echo "\n</table>"; } else {
<?php Output::set_title("Sustainer Control Centre"); Output::add_script(LINK_ABS . "js/jquery-ui-1.10.3.custom.min.js"); Output::require_group("Sustainer Admin"); MainTemplate::set_subtitle("Perform common sustainer tasks"); if (isset($_POST['trackid']) || isset($_GET['trackid'])) { $query = "SELECT * FROM audio WHERE id=:trackid"; $parameters = array(':trackid' => $_REQUEST['trackid']); $result = DigiplayDB::query($query, $parameters); if ($result->rowCount() != 1) { echo Bootstrap::alert_message_basic("danger", "Couldn't find track ID in the digiplay audio DB."); } else { $track = $result->fetch(); $query = "SELECT * FROM sustschedule order by id asc limit 1"; $result = DigiplayDB::query($query); $scheduleslot = $result->fetch(); if ($track['id'] != $scheduleslot['audioid']) { $query = "UPDATE sustschedule SET audioid=:trackid, trim_start_smpl=0, trim_end_smpl = :tracklength, fade_in = 0, fade_out = :tracklength WHERE id = :scheduleslot"; $parameters = array(':trackid' => $track['id'], ':tracklength' => $track['length_smpl'], ':scheduleslot' => $scheduleslot['id']); DigiplayDB::query($query, $parameters); $query = "INSERT INTO sustlog (audioid,userid,timestamp) VALUES (:audioid,:userid,:timestamp)"; date_default_timezone_set("Europe/London"); $parameters = array(':audioid' => $track['id'], ':userid' => Session::get_id(), ':timestamp' => time()); DigiplayDB::query($query, $parameters); echo Bootstrap::alert_message_basic("info", "Track Scheduled."); } else { echo Bootstrap::alert_message_basic("warning", "This track is already at the top of the queue."); } } }
<?php Output::set_title("Studio Playout"); Output::add_stylesheet(LINK_ABS . "css/studio.css"); MainTemplate::set_body_class("playout"); Output::add_script(LINK_ABS . "js/observer.js"); Output::add_script(LINK_ABS . "js/wavesurfer.js"); Output::add_script(LINK_ABS . "js/webaudio.js"); Output::add_script(LINK_ABS . "js/drawer.js"); Output::add_script(LINK_ABS . "js/drawer.svg.js"); Output::add_script(LINK_ABS . "js/studio_player.js"); if (isset($_REQUEST["key"])) { $location = Locations::get_by_key($_REQUEST["key"]); $key = $_REQUEST["key"]; } else { if (isset($_REQUEST["location"])) { $location = Locations::get_by_id($_REQUEST["location"]); $key = $location->get_key(); } else { exit("No location specified!"); } } if (!isset($_REQUEST["mode"])) { $mode = "mp3"; } else { $mode = $_REQUEST["mode"]; } echo "\r\n<script>\r\n\tvar key = 'key=" . $key . "&';\r\n\tvar timers = [];\r\n\tvar connect_timeout;\r\n\tvar websocket;\r\n\tvar connection = false;\r\n\r\n\tfunction disableLoad() {\r\n\t\t\$('.load').attr('disabled', 'disabled');\r\n\t}\r\n\r\n\tfunction enableLoad(url) {\r\n\t\t\$('.load').removeAttr('disabled');\t\r\n\t\t\$('.load').attr('data-url', url);\r\n\t}\r\n\r\n\t\$(function (){\r\n\t\tsetInterval(function() {\r\n\t\t\t\$.ajax({\r\n\t\t\t\turl: 'functions.php?'+key+'action=check-next',\r\n\t\t\t\tdataType: 'json'\r\n\t\t\t}).done(function(data) {\r\n\t\t\t\tif(data.response == 'true') {\r\n\t\t\t\t\tenableLoad('" . LINK_ABS . "audio/get/'+data.md5+'." . $mode . "?'+key);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdisableLoad();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}, 1000);\r\n\t});\r\n</script>\r\n<div class=\"wrap\">\r\n\t<div class=\"container\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-7\" id=\"players\">"; for ($p = 1; $p <= 3; $p++) { echo "\r\n\t\t\t\t<div class=\"player\">\r\n\t\t\t\t\t<div class=\"panel panel-default\">\r\n\t\t\t\t\t\t<script> \r\n\t\t\t\t\t\t\t\$(function () { \r\n\t\t\t\t\t\t\t\tplayer" . $p . " = wv_create('player" . $p . "');\r\n\r\n\t\t\t\t\t\t\t\t\$('#player" . $p . " .load').on('click', function(e) { \r\n\t\t\t\t\t\t\t\t\tdisableLoad();\r\n\t\t\t\t\t\t\t\t\tplayer" . $p . ".load(\$(this).attr('data-url'));\r\n\t\t\t\t\t\t\t\t\t\$.ajax({\r\n\t\t\t\t\t\t\t\t\t\turl: 'functions.php?'+key+'action=load-player',\r\n\t\t\t\t\t\t\t\t\t\tdataType: 'json'\r\n\t\t\t\t\t\t\t\t\t}).done(function(data) {\r\n\t\t\t\t\t\t\t\t\t\tconsole.log(data);\r\n\t\t\t\t\t\t\t\t\t\t\$('#player" . $p . "').find('.title').html(data.title);\r\n\t\t\t\t\t\t\t\t\t\t\$('#player" . $p . "').find('.artist').html(data.artist);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\$('.timemode button').on('click', function() {\r\n\t\t\t\t\t\t\t\t\tif(\$(this).html() == 'ELAPSED') {\r\n\t\t\t\t\t\t\t\t\t\t\$(this).html('REMAIN');\r\n\t\t\t\t\t\t\t\t\t\t\$(this).parents('.transport').find('.elapsed').hide();\r\n\t\t\t\t\t\t\t\t\t\t\$(this).parents('.transport').find('.remain').show();\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\$(this).html('ELAPSED');\r\n\t\t\t\t\t\t\t\t\t\t\$(this).parents('.transport').find('.remain').hide();\r\n\t\t\t\t\t\t\t\t\t\t\$(this).parents('.transport').find('.elapsed').show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}); \r\n\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t\t\t<span>Player " . $p . "</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"panel-body\">\r\n\t\t\t\t\t\t\t<div class=\"row audio-player\" id=\"player" . $p . "\">\r\n\t\t\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"row meta\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-9\">\r\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"title\">Title</span><br />\r\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"artist\">Artist</span>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-3\">\r\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-info btn-block load\" disabled>Load</button>\r\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-warning btn-block load\" disabled>Log</button>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div id=\"waveformplayer" . $p . "\" class=\"waveform\">\r\n\t\t\t\t\t\t\t\t\t\t<div id=\"progress-div\" class=\"progress progress-striped\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"progress-bar\">\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"transport\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-4\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-danger stop\" disabled>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . Bootstrap::glyphicon("stop") . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-success playpause\" disabled>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . Bootstrap::glyphicon("play") . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-5\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elapsed time\" style=\"display: none\">00:00.00</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"remain time\">00:00.00</span>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-3 timemode\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span>Time mode:</span><br />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary btn-sm btn-block\">REMAIN</button>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>"; }
<?php Output::set_title("Music Upload"); Output::add_script(LINK_ABS . "js/jquery.ui.widget.js"); Output::add_script(LINK_ABS . "js/tmpl.min.js"); Output::add_script(LINK_ABS . "js/jquery.fileupload.js"); Output::add_script(LINK_ABS . "js/jquery.fileupload-ui.js"); MainTemplate::set_subtitle("Drag and drop music to add to the file importer"); echo "\r\n<script>\r\n\$(function () {\r\n\t'use strict';\r\n\r\n\t\$('#fileupload').fileupload();\r\n\r\n\t\$('#fileupload').fileupload('option', {\r\n\t\tacceptFileTypes: /(\\.|\\/)(wav|mp3|aac|flac|m4a|ogg|pcm|wma|aif)\$/i,\r\n\t\turl: '" . LINK_ABS . "ajax/file-upload.php',\r\n\t\tlimitConcurrentUploads: 3\r\n\t});\r\n\t\t\r\n\t// Load existing files:\r\n\t\$.ajax({\r\n\t\turl: \$('#fileupload').fileupload('option', 'url'),\r\n\t\tdataType: 'json',\r\n\t\tcontext: \$('#fileupload')[0]\r\n\t}).done(function (result) {\r\n\t\t\$(this).fileupload('option', 'done')\r\n\t\t\t.call(this, null, {result: result});\r\n\t});\r\n});\r\n</script>\r\n\t<form id=\"fileupload\" action=\"" . LINK_ABS . "ajax/file-upload.php\" method=\"POST\" enctype=\"multipart/form-data\">\r\n\t\t<div class=\"row fileupload-buttonbar\">\r\n\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t<span class=\"btn btn-success fileinput-button\">\r\n\t\t\t\t\t" . Bootstrap::glyphicon("plus icon-white") . "\r\n\t\t\t\t\t<span>Add files</span>\r\n\t\t\t\t\t<input type=\"file\" name=\"files[]\" multiple>\r\n\t\t\t\t</span>\r\n\t\t\t\t<button type=\"submit\" class=\"btn btn-primary start\">\r\n\t\t\t\t\t" . Bootstrap::glyphicon("upload icon-white") . "\r\n\t\t\t\t\t<span>Start upload</span>\r\n\t\t\t\t</button>\r\n\t\t\t\t<button type=\"reset\" class=\"btn btn-warning cancel\">\r\n\t\t\t\t\t" . Bootstrap::glyphicon("ban-circle icon-white") . "\r\n\t\t\t\t\t<span>Cancel upload</span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-md-6 fileupload-progress\">\r\n\t\t\t\t<div class=\"progress-extended\"> </div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"fileupload-loading\"></div>\r\n\t\t<br>\r\n\t\t<table class=\"table table-striped\"><tbody class=\"files\"></tbody></table>\r\n\t</form>\r\n\r\n<script>\r\n</script>\r\n<script id=\"template-upload\" type=\"text/x-tmpl\">\r\n{% for (var i=0, file; file=o.files[i]; i++) { %}\r\n\t<tr class=\"template-upload\">\r\n\t\t<td class=\"name col-md-5\"><span>{%=file.name%}</span></td>\r\n\t\t{% if (file.error) { %}\r\n\t\t\t<td class=\"error\" colspan=\"2\"><span class=\"label label-important\">Error</span> {%=file.error%}</td>\r\n\t\t{% } else if (o.files.valid && !i) { %}\r\n\t\t\t<td class=\"col-md-3\">\r\n\t\t\t\t<div class=\"progress progress-striped active\"><div class=\"progress-bar\"></div></div>\r\n\t\t\t</td>\r\n\t\t\t<td class=\"size col-md-2\"><span>{%=o.formatFileSize(file.size)%}</span></td>\r\n\t\t\t<td class=\"start\">{% if (!o.options.autoUpload) { %}\r\n\t\t\t\t<button class=\"btn btn-primary pull-right\">\r\n\t\t\t\t\t<span>Start</span>\r\n\t\t\t\t</button>\r\n\t\t\t{% } %}</td>\r\n\t\t{% } else { %}\r\n\t\t\t<td colspan=\"2\"></td>\r\n\t\t{% } %}\r\n\t\t<td class=\"cancel col-md-1\">{% if (!i) { %}\r\n\t\t\t<button class=\"btn btn-warning pull-right\">\r\n\t\t\t\t<span>Cancel</span>\r\n\t\t\t</button>\r\n\t\t{% } %}</td>\r\n\t</tr>\r\n{% } %}\r\n</script>\r\n<script id=\"template-download\" type=\"text/x-tmpl\">\r\n{% for (var i=0, file; file=o.files[i]; i++) { %}\r\n\t<tr class=\"template-download\">\r\n\t\t{% if (file.error) { %}\r\n\t\t\t<td></td>\r\n\t\t\t<td class=\"name col-md-7\" colspan=\"2\"><span>{%=file.name%}</span></td>\r\n\t\t\t<td class=\"error\"><span class=\"label label-important\">Error</span> {%=file.error%}</td>\r\n\t\t\t<td class=\"size col-md-2\"><span>{%=o.formatFileSize(file.size)%}</span></td>\r\n\t\t{% } else { %}\r\n\t\t\t<td class=\"name col-md-7\" colspan=\"2\">\r\n\t\t\t\t<a href=\"{%=file.url%}\" title=\"{%=file.name%}\" download=\"{%=file.name%}\">{%=file.name%}</a>\r\n\t\t\t</td>\r\n\t\t\t<td class=\"size col-md-2\"><span>{%=o.formatFileSize(file.size)%}</span></td>\r\n\t\t{% } %}\r\n\t</tr>\r\n{% } %}\r\n</script>\r\n\r\n"; echo Bootstrap::alert_message_basic("info", "<a href=\"" . LINK_ABS . "music/import\">Click here to go import the files to Digiplay.</a>", "Finished uploading?");
<?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";
<?php Output::set_title("Jingle Packages"); MainTemplate::set_subtitle("Create and manage groups of jingles"); Output::add_script(LINK_ABS . 'js/bootbox.min.js'); Output::add_script(LINK_ABS . 'js/bootstrap.typeahead.min.js'); Output::require_group("Files Admin"); if (isset($_GET['archive']) && ($package = JinglePackages::get_by_id($_GET['archive']))) { if ($package->get_archived() == false) { $package->set_archived(true); } else { $package->set_archived(false); } $package->save(); } else { if (isset($_GET['delete']) && ($package = JinglePackages::get_by_id($_GET['delete']))) { $package->delete(); } } if (isset($_GET['show_archived']) && $_GET['show_archived'] == 'true') { $show_archived = true; } else { $show_archived = false; } ?> <script> $().ready(function() { <?php echo $show_archived ? 'var archive_str = \'&show_archived=true\';' : 'var archive_str = \'\';'; ?>
<?php Output::set_title("Track Detail"); MainTemplate::set_subtitle("View and edit track metadata"); Output::add_stylesheet(LINK_ABS . "css/bootstrap-select.css"); Output::add_script(LINK_ABS . "js/bootstrap-select.js"); if (!isset($_GET['id'])) { exit("<h3>No track specified</h3><h4>You must access this via another page, to get metadata for a specified track.</h4>"); } if (!($track = Tracks::get($_GET["id"]))) { exit("<h3>Invalid track ID</h3><h4>If you got to this page via a link from somewhere else on the site, there may be a bug. A bug you should bug the techies about!</h4>"); } if (!Session::is_group_user("Music Admin")) { $disabled = " disabled"; } else { $disabled = ""; } echo "\n\t<script>\n\t\t\$(function () {\n\t\t\t\$('.track-detail-form').submit(function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsubmit = \$(this).find('button[type=\"submit\"]');\n\t\t\t\tsubmit.find('span').removeClass('glyphicon-save').addClass('glyphicon-refresh');\n\t\t\t\t\$.ajax({\n\t\t\t\t\turl: '" . LINK_ABS . "ajax/track-detail-update.php',\n\t\t\t\t\tdata: \$(this).serialize(),\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\terror: function(xhr,text,error) {\n\t\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\n\t\t\t\t\t\tsubmit.find('span').removeClass('glyphicon-refresh').addClass('glyphicon-save');\n\t\t\t\t\t\t\$('h3').after('" . Bootstrap::alert_message_basic("danger", "'+value.error+'", "Error!") . "');\n\t\t\t\t\t\tconsole.error(value.detail);\n\t\t\t\t\t\t\$('.alert-message').alert();\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function(data,text,xhr) {\n\t\t\t\t\t\tvalues = \$.parseJSON(data);\n\t\t\t\t\t\tsubmit.find('span').removeClass('glyphicon-refresh').addClass('glyphicon-save');\n\t\t\t\t\t\t\$('h3').after('" . Bootstrap::alert_message_basic("success", "Track details altered.", "Success!", false) . "');\n\t\t\t\t\t\t\$('[id=new_artist]').val('');\n\t\t\t\t\t\t\$('[id=artist\\\\[\\\\]]').parent('.col-md-10').remove();\n\t\t\t\t\t\tartists_str = '';\n\t\t\t\t\t\tfirst = true;\n\t\t\t\t\t\t\$.each(values.artists, function(i, val) {\n\t\t\t\t\t\t\tartists_str += '<div class=\"col-md-10'+(first? '' : ' col-md-offset-2')+'\"><input type=\"text\" id=\"artist[]\" name=\"artist[]\" class=\"form-control" . $disabled . "\" value=\"'+val+'\"></div>';\n\t\t\t\t\t\t\tfirst = false;\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\$('[for=artist]').after(artists_str);\n\t\t\t\t\t\t\$('[id=new_keyword]').val('');\n\t\t\t\t\t\t\$('.keyword').parent().remove();\n\t\t\t\t\t\tkeywords_str = '';\n\t\t\t\t\t\t\$.each(values.keywords, function(i, val) {\n\t\t\t\t\t\t\tkeywords_str += '<div class=\"input-group\"><span class=\"input-group-addon\"><a class=\"keyword-remove\" href=\"" . LINK_ABS . "ajax/del-keywords.php?track_id=" . $track->get_id() . "&keyword='+val+'\">" . Bootstrap::glyphicon("remove-sign") . "</a></span><input type=\"text\" class=\"form-control\" disabled value=\"'+val+'\"></div></div>'\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\$('.for-keywords').html(keywords_str);\n\t\t\t\t\t\tsetTimeout(function() {\n \t\t\t\t\t\t\$('.alert').hide('fast', function(){\n \t\t\t\t\t\t\$(this).remove(); \n \t\t\t\t});},4000);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t\$('.keyword-remove').on(\"click\", function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tparent = \$(this).parent().parent();\n\t\t\t\t\$.get(\$(this).attr('href'), function(data) {\n\t\t\t\t\tif(data == \"success\") {\n\t\t\t\t\t\tparent.remove();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\$('h3').after('" . Bootstrap::alert_message_basic("danger", "'+data+'", "Error!") . "');\n\t\t\t\t\t\t\$('.alert-message').show('fast').alert();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t\$('[id=flag]').click(function() {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tt = \$(this);\n\t\t\t\tt.find('.censor-flag').removeClass('glyphicon-warning-sign').addClass('glyphicon-refresh');\n\t\t\t\t\$.ajax({\n\t\t\t\t\turl: '" . LINK_ABS . "ajax/flag.php',\n\t\t\t\t\tdata: 'id=" . $track->get_id() . "&flag=toggle',\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\terror: function(xhr,text,error) {\n\t\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\n\t\t\t\t\t\t\$('h3').after('" . Bootstrap::alert_message_basic("danger", "'+value.error+'", "Error!") . "');\n\t\t\t\t\t\t\$('.alert-message').alert();\n\t\t\t\t\t\tt.find('.censor-flag').removeClass('glyphicon-refresh').addClass('glyphicon-warning-sign');\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function(data,text,xhr) {\n\t\t\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\n\t\t\t\t\t\t\tt.find('.censor-flag').removeClass('glyphicon-refresh').addClass('glyphicon-warning-sign');\n\t\t\t\t\t\t\tif(value.response == 'flagged') {\n\t\t\t\t\t\t\t\tt.addClass('active');\n\t\t\t\t\t\t\t\tresponse = 'This track has been flagged for censorship and will be reviewed in due course.';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tt.removeClass('active');\n\t\t\t\t\t\t\t\tresponse = 'This track has been unflagged.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\$('h3').after('" . Bootstrap::alert_message_basic("warning", "'+response+'", "Success!", false) . "'); \n\t\t\t\t\t\t\tsetTimeout(function() {\n\t \t\t\t\t\t\t\$('.alert').hide('fast', function(){\n\t \t\t\t\t\t\t\$(this).remove(); \n\t \t\t\t\t});},4000);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n" . (Session::is_group_user("Playlist Editor") ? "\n\t\t\tvar item;\n\t\t\t\$('.playlist-add').click(function() {\n\t\t\t\titem = \$(this);\n\t\t\t\tplaylists = \$(this).attr('data-playlists-in').split(',');\n\t\t\t\t\$('.playlist-select').parent().removeClass('active');\n\t\t\t\t\$('.playlist-select').find('span').removeClass('glyphicon-minus').addClass('glyphicon-plus');\n\t\t\t\t\$('.playlist-select').each(function() {\n\t\t\t\t\tif(\$.inArray(\$(this).attr('data-playlist-id'),playlists) > -1) {\n\t\t\t\t\t\t\$(this).find('span').removeClass('icon-plus').addClass('glyphicon-minus');\n\t\t\t\t\t\t\$(this).parent().addClass('active');\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t});\n\n\t\t\t\$('.playlist-select').click(function() {\n\t\t\t\tobj = \$(this);\n\t\t\t\tif(\$(this).parent().hasClass('active')) {\n\t\t\t\t\t\$(this).find('span').removeClass('glyphicon-minus').addClass('glyphicon-refresh');\n\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\turl: '" . LINK_ABS . "ajax/track-playlist-update.php',\n\t\t\t\t\t\tdata: 'trackid='+item.attr('data-dps-id')+'&playlistid='+obj.attr('data-playlist-id')+'&action=del',\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\terror: function(xhr,text,error) {\n\t\t\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\n\t\t\t\t\t\t\tobj.find('span').removeClass('glyphicon-refresh').addClass('glyphicon-minus');\n\t\t\t\t\t\t\talert(value.error);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function(data,text,xhr) {\n\t\t\t\t\t\t\tvalues = \$.parseJSON(data);\n\t\t\t\t\t\t\tobj.find('span').removeClass('glyphicon-refresh').addClass('glyphicon-plus');\n\t\t\t\t\t\t\tobj.parent().removeClass('active');\n\t\t\t\t\t\t\titem.attr('data-playlists-in',values.playlists.join(','));\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t\$(this).find('span').removeClass('glyphicon-plus').addClass('glyphicon-refresh');\n\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\turl: '" . LINK_ABS . "ajax/track-playlist-update.php',\n\t\t\t\t\t\tdata: 'trackid='+item.attr('data-dps-id')+'&playlistid='+obj.attr('data-playlist-id')+'&action=add',\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\terror: function(xhr,text,error) {\n\t\t\t\t\t\t\tvalue = \$.parseJSON(xhr.responseText);\n\t\t\t\t\t\t\tobj.find('span').removeClass('glyphicon-refresh').addClass('glyphicon-plus');\n\t\t\t\t\t\t\talert(value.error);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function(data,text,xhr) {\n\t\t\t\t\t\t\tvalues = \$.parseJSON(data);\n\t\t\t\t\t\t\tobj.find('span').removeClass('glyphicon-refresh').addClass('glyphicon-minus');\n\t\t\t\t\t\t\tobj.parent().addClass('active');\n\t\t\t\t\t\t\titem.attr('data-playlists-in',values.playlists.join(','));\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\$(this).parent().addClass('active');\n\t\t\t\t\t\$(this).find('span').removeClass('glyphicon-plus').addClass('glyphicon-minus');\n\t\t\t\t}\n\t\t\t});\t\t\n" : "") . "\n\t\t});\n\t</script>\n\t<h3>Edit Track: " . $track->get_id() . " <small>Added " . date("d/m/Y H:i", $track->get_import_date()) . "</small></h3>\n\t" . (Session::is_group_user("Music Admin") ? "" : Bootstrap::alert_message_basic("info", "You can't edit the details of this track, because you aren't a Music Admin.", "Notice:")); echo $track->player() . "\n\t<form class=\"track-detail-form\" action=\"\" method=\"post\">\n\t\t<fieldset>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-7 form-horizontal\">\n\t\t\t\t\t<input type=\"hidden\" id=\"id\" name=\"id\" value=\"" . $track->get_id() . "\">\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"control-label col-md-2\" for=\"title\">Title</label>\n\t\t\t\t\t\t<div class=\"col-md-10\">\n\t\t\t\t\t\t\t<input type=\"text\" id=\"title\" name=\"title\" class=\"form-control\" " . $disabled . " value=\"" . $track->get_title() . "\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"control-label col-md-2\" for=\"artist\">Artists</label>"; $first = true; foreach ($track->get_artists() as $key => $artist) { echo "\n\t\t\t\t\t\t<div class=\"col-md-10" . (!$first ? " col-md-offset-2" : "") . "\">\n\t\t\t\t\t\t\t<input type=\"text\" id=\"artist[]\" name=\"artist[]\" class=\"form-control\" " . $disabled . " value=\"" . $artist->get_name() . "\">\n\t\t\t\t\t\t</div>"; $first = false; } echo "\n\t\t\t\t\t\t<div class=\"col-md-10 col-md-offset-2\">\n\t\t\t\t\t\t\t<input type=\"text\" id=\"new_artist\" name=\"new-artist\" class=\"form-control\" " . $disabled . " placeholder=\"Add new artist...\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"control-label col-md-2\" for=\"album\">Album</label>\n\t\t\t\t\t\t<div class=\"col-md-10\">\n\t\t\t\t\t\t\t<input type=\"text\" id=\"album\" name=\"album\" class=\"form-control\" " . $disabled . " value=\"" . $track->get_album()->get_name() . "\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"control-label col-md-2\" for=\"year\">Year</label>\n\t\t\t\t\t\t<div class=\"col-md-10\">\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"year\" name=\"year\" " . $disabled . " value=\"" . $track->get_year() . "\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"control-label col-md-2\" for=\"length\">Length</label>\n\t\t\t\t\t\t<div class=\"col-md-10\">\n\t\t\t\t\t\t\t<p class=\"form-control-static\">" . Time::format_succinct($track->get_length()) . "</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"control-label col-md-2\" for=\"origin\">Origin</label>\n\t\t\t\t\t\t<div class=\"col-md-10\">\n\t\t\t\t\t\t\t<input type=\"text\" id=\"origin\" name=\"origin\" class=\"form-control\" " . $disabled . " value=\"" . $track->get_origin() . "\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<div class=\"col-md-10 col-md-offset-2\">\n\t\t\t\t\t\t\t<div class=\"checkbox\">\n\t\t\t\t\t\t\t\t<label for=\"censored\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"censored\" name=\"censored\" " . $disabled . " " . ($track->is_censored() ? "checked" : "") . ">\n\t\t\t\t\t\t\t\t\tExplicit\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<div class=\"col-md-10 col-md-offset-2\">\n\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary btn-block\">\n\t\t\t\t\t\t\t\t" . Bootstrap::glyphicon("save save") . "\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-md-5 form\">\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label for=\"notes\">Notes</label>\n\t\t\t\t\t\t<textarea class=\"form-control\" id=\"notes\" name=\"notes\" " . $disabled . ">" . $track->get_notes() . "</textarea>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label for=\"keyword\">Keywords</label>\n\t\t\t\t\t\t<div class=\"for-keywords\">"; foreach ($track->get_keywords() as $keyword) { echo "\n\t\t\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-addon\"><a class=\"keyword-remove\" href=\"" . LINK_ABS . "ajax/del-keywords.php?track_id=" . $track->get_id() . "&keyword=" . $keyword->get_text() . "\">" . Bootstrap::glyphicon("remove-sign") . "</a></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" disabled value=\"" . $keyword->get_text() . "\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t"; } echo "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t<span class=\"input-group-addon\">" . Bootstrap::glyphicon("tag") . "</span>\n\t\t\t\t\t\t\t<input type=\"text\" id=\"new_keyword\" name=\"new_keyword\" class=\"form-control\" " . $disabled . " placeholder=\"Add new keyword...\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label for=\"type\">Audio Type</label>\n\t\t\t\t\t\t<select class=\"selectpicker\" id=\"type\" name=\"type\" data-width=\"100%\" " . $disabled . ">"; foreach (AudioTypes::get_all() as $audiotype) { if ($audiotype->get_id() == $track->get_type()->get_id()) {