Compare commits

..

3 Commits

58 changed files with 55 additions and 81 deletions

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( isset($_REQUEST['newid']) ) {
$newid = intval($_REQUEST['newid']);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( !isset($_REQUEST['queuename']) ) exit();

View File

@ -1,6 +1,6 @@
<?php
require 'config.php';
require '../config.php';
$command = 0x03;
$target = LEDTARGETID;

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( RESTRICTQUEUES && (substr($_SERVER['REMOTE_ADDR'], 0, strlen(LOCALNETWORK)) != LOCALNETWORK) ) {
exit();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( !isset($_REQUEST['id']) ) exit();
$id = intval($_REQUEST['id']);

2
ajax_dropsong.php → ajax/ajax_dropsong.php Executable file → Normal file
View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( RESTRICTQUEUES && (substr($_SERVER['REMOTE_ADDR'], 0, strlen(LOCALNETWORK)) != LOCALNETWORK) ) {
exit();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
$query = "DELETE FROM " . INSTANTQTABLE;
$sth = $globaldbh->prepare($query);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
$query = "SELECT songid FROM " . QUEUECONTENTSTABLE . " AS q LEFT JOIN " . SONGSTABLE . " AS s ON q.songid=s.id WHERE qid=:qid ORDER BY s.album, s.title";
$fields = array();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
$query = "SELECT id, songid FROM " . INSTANTQTABLE . " ORDER BY id";
$sth = $globaldbh->prepare($query);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
$queues = Queue::getList();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
header('Content-Type: application/json');
echo json_encode($_SESSION['queuetarget']);

View File

@ -1,6 +1,6 @@
<?php
require 'config.php';
require '../config.php';
$data = array();
$data['max'] = MAXVOLUME;

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
$data = array();
$data['volume'] = getSystemVolume();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( isset($_REQUEST['debug']) ) {
$debug = true;

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( !isset($_REQUEST['songid']) ) {
exit();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( isset($_REQUEST['searchfor']) ) {
$searchfor = $_REQUEST['searchfor'];

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( !isset($_REQUEST['newfreq']) ) exit();
$newfreq = intval($_REQUEST['newfreq']);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( !isset($_REQUEST['queue']) ) {
exit();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( isset($_REQUEST['volume']) ) {
$newvol = intval($_REQUEST['volume']);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
killPlayingSong();
exit();

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( isset($_REQUEST['queueid']) ) {
$queueid = intval($_REQUEST['queueid']);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
if ( isset($_REQUEST['show']) && ($_REQUEST['show'] == 'show') ) {
system("HOME=" . WEBUSERHOMEDIR . " && scripts/homeaudio_togglemute.pl -show", $retval);

View File

@ -1,6 +1,6 @@
<?php
require 'header.php';
require '../header.php';
$query = "SELECT value FROM " . SETTINGSTABLE . " WHERE parameter='CHRISTMAS'";
$sth = $globaldbh->prepare($query);

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 316 B

View File

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 323 B

View File

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 250 B

View File

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

View File

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

View File

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

View File

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

View File

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 276 B

View File

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 285 B

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -19,16 +19,16 @@ $queues = Queue::getList();
<link rel="apple-touch-icon" sizes="120x120" href="img/ic_MobileHA_iphone.png" />
<link rel="apple-touch-icon" sizes="152x152" href="img/ic_MobileHA_ipad-retina.png" />
<link rel="manifest" href="/manifest.json" />
<link rel='stylesheet' href='jquery-ui-1.11.2/jquery-ui.min.css' />
<link rel='stylesheet' href='minimal.css' media='screen' />
<link rel='stylesheet' href='tf201.css' media='screen and (width: 800px) and (orientation: portrait)' />
<link rel='stylesheet' href='tf201.css' media='screen and (width: 768px) and (orientation: portrait)' />
<link rel='stylesheet' href='mobile640.css' media='screen and (device-aspect-ratio: 40/71) and (orientation: portrait)' />
<link rel='stylesheet' href='desktop.css' media='screen and (min-width: 1300px) and (orientation: landscape)' />
<script type='text/javascript' src='jquery-1.11.1.min.js'></script>
<script type='text/javascript' src='jquery-ui-1.11.2/jquery-ui.min.js'></script>
<script type='text/javascript' src='jquery.touchSwipe.min.js'></script>
<script type='text/javascript' src='minimal.js'></script>
<link rel='stylesheet' href='core/jquery-ui-1.11.2/jquery-ui.min.css' />
<link rel='stylesheet' href='css/minimal.css' media='screen' />
<link rel='stylesheet' href='css/tf201.css' media='screen and (width: 800px) and (orientation: portrait)' />
<link rel='stylesheet' href='css/tf201.css' media='screen and (width: 768px) and (orientation: portrait)' />
<link rel='stylesheet' href='css/mobile640.css' media='screen and (device-aspect-ratio: 40/71) and (orientation: portrait)' />
<link rel='stylesheet' href='css/desktop.css' media='screen and (min-width: 1300px) and (orientation: landscape)' />
<script type='text/javascript' src='core/jquery-1.11.1.min.js'></script>
<script type='text/javascript' src='core/jquery-ui-1.11.2/jquery-ui.min.js'></script>
<script type='text/javascript' src='core/jquery.touchSwipe.min.js'></script>
<script type='text/javascript' src='js/minimal.js'></script>
<title>Mobile Home Audio</title>
</head>
<body>

View File

@ -79,7 +79,7 @@ function updateQueueSelects() {
var surprisemeVal = $("#surpriseme_sel").val();
var queuetargetVal = $("#queuetarget_sel").val();
$.ajax({
url: 'ajax_getqueuelist.php',
url: 'ajax/ajax_getqueuelist.php',
dataType: 'json',
success: function(data, stat, jqo) {
$("#queue_sel").html("<option value='0'>-- All Songs --</option>");
@ -108,7 +108,7 @@ function updateQueueSelects() {
function createQueue() {
$.ajax({
url: 'ajax_createqueue.php',
url: 'ajax/ajax_createqueue.php',
data: {queuename: $("#newqueue_input").val()},
dataType: 'json',
success: function(data, stat, jqo) {
@ -121,7 +121,7 @@ function createQueue() {
function changeQueueTarget() {
var newtarget = $('#queuetarget_sel').val();
$.ajax({
url: 'ajax_setqueuetarget.php',
url: 'ajax/ajax_setqueuetarget.php',
data: {queue: newtarget},
dataType: 'json',
success: function(data, stat, jqo) {
@ -142,7 +142,7 @@ function changeQueueTarget() {
function getQueueTarget() {
$.ajax({
url: 'ajax_getqueuetarget.php',
url: 'ajax/ajax_getqueuetarget.php',
dataType: 'json',
success: function(data, stat, jqo) {
$('#queuetarget_sel').val(data);
@ -165,7 +165,7 @@ function toggleChristmas(callingElement) {
callingElement.blur();
callingElement.addClass("buttonactive");
$.ajax({
url: 'ajax_togglexmas.php',
url: 'ajax/ajax_togglexmas.php',
dataType: 'json',
success: function(data, stat, jqo) {
callingElement.removeClass("buttonactive");
@ -190,7 +190,7 @@ function updateChristmasButton(active) {
function getSongList() {
gettingSongList = true;
$.ajax({
url: 'ajax_listsongs.php',
url: 'ajax/ajax_listsongs.php',
dataType: 'json',
success: function(data, stat, jqo) {
if ( data.volume != $('#volume_slider').slider("value") ) {
@ -213,7 +213,7 @@ function changeChristmasFreq(newfreq) {
return;
}
$.ajax({
url: 'ajax_setchristmasfreq.php',
url: 'ajax/ajax_setchristmasfreq.php',
data: {newfreq: newfreq}
});
}
@ -222,7 +222,7 @@ function getJukeboxList() {
if ( queueTarget == 0 ) {
gettingJukeboxList = true;
$.ajax({
url: 'ajax_getjukebox.php',
url: 'ajax/ajax_getjukebox.php',
dataType: 'html',
success: function(data, stat, jqo) {
$('#jukebox_contents').html(data);
@ -237,7 +237,7 @@ function getJukeboxList() {
function getCustomQueueList() {
$.ajax({
url: 'ajax_getcustomq.php',
url: 'ajax/ajax_getcustomq.php',
dataType: 'html',
success: function(data, stat, jqo) {
$('#customq_contents').html(data);
@ -250,7 +250,7 @@ function executeSearch() {
var searchfor = $('#searchbox').val();
if ( searchfor.length < 4 ) return false;
$.ajax({
url: 'ajax_searchsongs.php',
url: 'ajax/ajax_searchsongs.php',
dataType: 'html',
data: {searchfor: searchfor},
success: function(data, stat, jqo) {
@ -274,7 +274,7 @@ function dropCustomQSong(songid) {
$(elementID).css("color", "#1C1C1C");
$(elementID).css("background-color", "#D8D8D8");
$.ajax({
url: 'ajax_dropcustomqsong.php',
url: 'ajax/ajax_dropcustomqsong.php',
data: {songid: songid},
success: function(data, stat, jqo) {
getCustomQueueList();
@ -287,7 +287,7 @@ function addSongToQueue(songid) {
$(elementID).css("color", "#1C1C1C");
$(elementID).css("background-color", "#D8D8D8");
$.ajax({
url: 'ajax_queuesong.php',
url: 'ajax/ajax_queuesong.php',
data: {songid: songid},
success: function(data, stat, jqo) {
getJukeboxList();
@ -302,7 +302,7 @@ function dropJukeboxSong(id) {
$(elementID).css("color", "#1C1C1C");
$(elementID).css("background-color", "#D8D8D8");
$.ajax({
url: 'ajax_dropjukeboxsong.php',
url: 'ajax/ajax_dropjukeboxsong.php',
data: {id: id},
success: function(data, stat, jqo) {
getJukeboxList();
@ -312,7 +312,7 @@ function dropJukeboxSong(id) {
function getVolumeRange() {
$.ajax({
url: 'ajax_getvolrange.php',
url: 'ajax/ajax_getvolrange.php',
async: false,
dataType: 'json',
success: function(data, stat, jqo) {
@ -339,7 +339,7 @@ function toggleMute(callingElement, show) {
callingElement.addClass("buttonactive");
if ( typeof show === 'undefined' ) { show = ""; }
$.ajax({
url: 'ajax_togglemute.php',
url: 'ajax/ajax_togglemute.php',
data: {show: show},
dataType: 'json',
success: function(data, stat, jqo) {
@ -357,7 +357,7 @@ function skipSong (callingElement) {
if ( gettingJukeboxList || gettingSongList ) return false;
callingElement.addClass("buttonactive");
$.ajax({
url: 'ajax_skipsong.php',
url: 'ajax/ajax_skipsong.php',
async: false,
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
@ -373,7 +373,7 @@ function emptyJukebox (callingElement) {
callingElement.blur();
callingElement.addClass("buttonactive");
$.ajax({
url: 'ajax_emptyjukebox.php',
url: 'ajax/ajax_emptyjukebox.php',
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
getJukeboxList();
@ -390,7 +390,7 @@ function dropSong (callingElement) {
if ( gettingJukeboxList || gettingSongList ) return false;
callingElement.addClass("buttonactive");
$.ajax({
url: 'ajax_dropsong.php',
url: 'ajax/ajax_dropsong.php',
async: false,
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
@ -405,7 +405,7 @@ function dropSong (callingElement) {
function changeQueue () {
var qid = $('#queue_sel').val();
$.ajax({
url: 'ajax_changequeue.php',
url: 'ajax/ajax_changequeue.php',
data: {newid: qid},
async: false,
success: function (data, stat, jqo) {
@ -417,7 +417,7 @@ function changeQueue () {
function surpriseMe () {
var qid = $('#surpriseme_sel').val();
$.ajax({
url: 'ajax_surpriseme.php',
url: 'ajax/ajax_surpriseme.php',
data: {queueid: qid},
success: function(data, stat, jqo) {
getJukeboxList();
@ -433,7 +433,7 @@ function setSliderVolume (value) {
function setVolume () {
volume = $('#volume_slider').slider("value");
$.ajax({
url: 'ajax_setvolume.php',
url: 'ajax/ajax_setvolume.php',
data: {volume: volume},
dataType: 'text'
});
@ -441,36 +441,10 @@ function setVolume () {
function getVolume () {
$.ajax({
url: 'ajax_getvolume.php',
url: 'ajax/ajax_getvolume.php',
dataType: 'json',
success: function (data, stat, jqo) {
$('#volume_slider').slider("value", data.volume);
}
});
}
function setColor(color) {
$.ajax({
url: 'ajax_setcolor.php',
data: {color: color}
});
}
function setPattern(pattern) {
$.ajax({
url: 'ajax_setpattern.php',
data: {pattern: pattern}
});
}
function disableAuto() {
$.ajax({
url: 'ajax_disableauto.php'
});
}
function lightsOff() {
$.ajax({
url: 'ajax_lightsoff.php'
});
}