Initial commit to Git from Subversion
36
.gitignore
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# OS generated files
|
||||||
|
.DS_Store
|
||||||
|
.DS_Store?
|
||||||
|
._*
|
||||||
|
.Trashes
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# The active config file copied from config-dist.php
|
||||||
|
config.php
|
||||||
|
|
||||||
|
# Test files
|
||||||
|
test*.php
|
||||||
|
|
||||||
|
# Images in the art/ folder
|
||||||
|
art/*.png
|
||||||
|
art/*.jpg
|
||||||
|
art/*.gif
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# SQLite
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
# sass generated files
|
||||||
|
.sass-cache/
|
||||||
|
install/.sass-cache/
|
||||||
|
compressed
|
||||||
|
*.map
|
||||||
|
|
||||||
|
# IDE generated
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Authorize.net SDK
|
||||||
|
vendor/
|
2
.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Comment this line out in production systems
|
||||||
|
php_flag opcache.enable off
|
12
ajax_changequeue.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( isset($_REQUEST['newid']) ) {
|
||||||
|
$newid = intval($_REQUEST['newid']);
|
||||||
|
$didchange = Queue::changeActiveQueue($newid);
|
||||||
|
if ( $didchange ) killPlayingSong();
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
16
ajax_createqueue.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['queuename']) ) exit();
|
||||||
|
|
||||||
|
$newqueue = new Queue();
|
||||||
|
$newqueue->setName(str_replace('"', '', $_REQUEST['queuename']));
|
||||||
|
$newqueue->save();
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
20
ajax_disableauto.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'config.php';
|
||||||
|
|
||||||
|
$command = 0x03;
|
||||||
|
$target = LEDTARGETID;
|
||||||
|
$unique = mt_rand(1, 2000000000);
|
||||||
|
|
||||||
|
$target = ($target > 0 ) ? 2 ** ($target - 1) : 0;
|
||||||
|
$data = pack("CQL", $command, $target, $unique);
|
||||||
|
|
||||||
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);
|
||||||
|
for ( $i=0; $i<3; $i++ ) {
|
||||||
|
socket_sendto($sock, $data, strlen($data), 0, LEDADDRESS, 6565);
|
||||||
|
if ( $i < 2 ) usleep(10000);
|
||||||
|
}
|
||||||
|
socket_close($sock);
|
||||||
|
|
||||||
|
?>
|
23
ajax_dropcustomqsong.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( RESTRICTQUEUES && (substr($_SERVER['REMOTE_ADDR'], 0, strlen(LOCALNETWORK)) != LOCALNETWORK) ) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['songid']) ) exit();
|
||||||
|
$songid = intval($_REQUEST['songid']);
|
||||||
|
|
||||||
|
$query = "DELETE FROM " . QUEUECONTENTSTABLE . " WHERE songid=:songid AND qid=:qid";
|
||||||
|
$fields = array();
|
||||||
|
$fields[':songid'] = $songid;
|
||||||
|
$fields[':qid'] = $_SESSION['queuetarget'];
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
//echo "<pre>";
|
||||||
|
//echo "Q: $query\n";
|
||||||
|
//var_dump($fields);
|
||||||
|
$sth->execute($fields);
|
||||||
|
|
||||||
|
exit();
|
||||||
|
?>
|
15
ajax_dropjukeboxsong.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['id']) ) exit();
|
||||||
|
$id = intval($_REQUEST['id']);
|
||||||
|
|
||||||
|
$query = "DELETE FROM " . INSTANTQTABLE . " WHERE id=:id";
|
||||||
|
$fields = array();
|
||||||
|
$fields[':id'] = $id;
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
|
||||||
|
exit();
|
||||||
|
?>
|
25
ajax_dropsong.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( RESTRICTQUEUES && (substr($_SERVER['REMOTE_ADDR'], 0, strlen(LOCALNETWORK)) != LOCALNETWORK) ) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT id, songid FROM " . INSTANTQTABLE . " ORDER BY id LIMIT 1";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
|
||||||
|
if ( false !== ($row = $sth->fetch()) ) {
|
||||||
|
killPlayingSong();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "DELETE FROM " . QUEUECONTENTSTABLE . " WHERE qid=(SELECT id FROM " . QUEUESTABLE . " WHERE active='true' AND type='user') AND songid=(SELECT songid FROM " . RECENTSTABLE . " ORDER BY timeplayed DESC LIMIT 1)";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
|
||||||
|
killPlayingSong();
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
10
ajax_emptyjukebox.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
$query = "DELETE FROM " . INSTANTQTABLE;
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
30
ajax_getcustomq.php
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
require_once 'getid3/getid3.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();
|
||||||
|
$fields[':qid'] = $_SESSION['queuetarget'];
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$firstsong = true;
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$songid = $row['songid'];
|
||||||
|
$song = new Song($songid);
|
||||||
|
echo "<div id='customq_{$songid}' class='songlist_song_container' onClick='dropCustomQSong({$songid});'>\n";
|
||||||
|
echo " <div class='songlist_img_container'><img class='songlist_img' src='{$song->getArtFile(ARTURL)}'></div>\n";
|
||||||
|
echo " <div class='songlist_details_container'>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Song:</span> {$song->getTitle(HTMLSAFE)}</p>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Artist:</span> {$song->getArtist(HTMLSAFE)}</p>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Album:</span> {$song->getAlbum(HTMLSAFE)}</p>\n";
|
||||||
|
echo " </div>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
echo "<hr class='songlist'>\n";
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
27
ajax_getjukebox.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
require_once 'getid3/getid3.php';
|
||||||
|
|
||||||
|
$query = "SELECT id, songid FROM " . INSTANTQTABLE . " ORDER BY id";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$data = array();
|
||||||
|
$firstsong = true;
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$id = $row['id'];
|
||||||
|
$song = new Song($row['songid']);
|
||||||
|
echo "<div id='juke_{$id}' class='songlist_song_container' onClick='dropJukeboxSong({$id});'>\n";
|
||||||
|
echo " <div class='songlist_img_container'><img class='songlist_img' src='{$song->getArtFile(ARTURL)}'></div>\n";
|
||||||
|
echo " <div class='songlist_details_container'>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Song:</span> {$song->getTitle(HTMLSAFE)}</p>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Artist:</span> {$song->getArtist(HTMLSAFE)}</p>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Album:</span> {$song->getAlbum(HTMLSAFE)}</p>\n";
|
||||||
|
echo " </div>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
echo "<hr class='songlist'>\n";
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
22
ajax_getqueuelist.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
$queues = Queue::getList();
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
foreach ( $queues as $queue ) {
|
||||||
|
$newdata = array();
|
||||||
|
$newdata['id'] = $queue->getID();
|
||||||
|
$newdata['name'] = $queue->getName(HTMLSAFE);
|
||||||
|
$newdata['type'] = $queue->getType();
|
||||||
|
$newdata['active'] = $queue->getActive();
|
||||||
|
$data['queues'][] = $newdata;
|
||||||
|
}
|
||||||
|
$data['queuetarget'] = $_SESSION['queuetarget'];
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
9
ajax_getqueuetarget.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($_SESSION['queuetarget']);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
13
ajax_getvolrange.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'config.php';
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data['max'] = MAXVOLUME;
|
||||||
|
$data['min'] = MINVOLUME;
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
10
ajax_getvolume.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data['volume'] = getSystemVolume();
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
20
ajax_lightsoff.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'config.php';
|
||||||
|
|
||||||
|
$command = 0x00;
|
||||||
|
$target = LEDTARGETID;
|
||||||
|
$unique = mt_rand(1, 2000000000);
|
||||||
|
|
||||||
|
$target = ($target > 0 ) ? 2 ** ($target - 1) : 0;
|
||||||
|
$data = pack("CQL", $command, $target, $unique);
|
||||||
|
|
||||||
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);
|
||||||
|
for ( $i=0; $i<3; $i++ ) {
|
||||||
|
socket_sendto($sock, $data, strlen($data), 0, LEDADDRESS, 6565);
|
||||||
|
if ( $i < 2 ) usleep(10000);
|
||||||
|
}
|
||||||
|
socket_close($sock);
|
||||||
|
|
||||||
|
?>
|
68
ajax_listsongs.php
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
require_once 'getid3/getid3.php';
|
||||||
|
|
||||||
|
if ( isset($_REQUEST['debug']) ) {
|
||||||
|
$debug = true;
|
||||||
|
} else {
|
||||||
|
$debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
|
||||||
|
if ( $debug ) echo "<pre>";
|
||||||
|
$query = "SELECT value FROM " . SETTINGSTABLE . " WHERE parameter='CHRISTMAS'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$row = $sth->fetch();
|
||||||
|
$data['christmas'] = ($row['value'] == 'true') ? true : false;
|
||||||
|
|
||||||
|
$query = "SELECT value FROM " . SETTINGSTABLE . " WHERE parameter='CHRISTMASFREQ'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$row = $sth->fetch();
|
||||||
|
$data['christmasfreq'] = $row['value'];
|
||||||
|
|
||||||
|
$query = "SELECT songid FROM " . RECENTSTABLE . " ORDER BY timeplayed DESC limit 15";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$data['volume'] = getSystemVolume();
|
||||||
|
system("HOME=/home/web && scripts/homeaudio_togglemute.pl -show", $retval);
|
||||||
|
$data['muted'] = ($retval == 0) ? false : true;
|
||||||
|
$data['songplaying'] = "";
|
||||||
|
$data['songlist'] = "";
|
||||||
|
$firstsong = true;
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$song = new Song($row['songid']);
|
||||||
|
if ( $firstsong ) {
|
||||||
|
$data['songplaying'] .= "<div class='playing_art'><img class='playing_img' src='{$song->getArtFile(ARTURL)}'></div>\n";
|
||||||
|
$data['songplaying'] .= "<div class='playing_details'>\n";
|
||||||
|
$data['songplaying'] .= " <p class='nomargin'><span class='playing_label'>Title:</span> {$song->getTitle(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songplaying'] .= " <p class='nomargin'><span class='playing_label'>Artist:</span> {$song->getArtist(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songplaying'] .= " <p class='nomargin'><span class='playing_label'>Album:</span> {$song->getAlbum(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songplaying'] .= " <p class='nomargin'><span class='playing_label'>Year:</span> {$song->getYear(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songplaying'] .= "</div>\n";
|
||||||
|
$firstsong = false;
|
||||||
|
} else {
|
||||||
|
$data['songlist'] .= "<div class='songlist_song_container'>\n";
|
||||||
|
$data['songlist'] .= " <div class='songlist_img_container'><img class='songlist_img' src='{$song->getArtFile(ARTURL)}'></div>\n";
|
||||||
|
$data['songlist'] .= " <div class='songlist_details_container'>\n";
|
||||||
|
$data['songlist'] .= " <p class='nomargin'><span class='playing_label'>Title:</span> {$song->getTitle(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songlist'] .= " <p class='nomargin'><span class='playing_label'>Artist:</span> {$song->getArtist(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songlist'] .= " <p class='nomargin'><span class='playing_label'>Album:</span> {$song->getAlbum(HTMLSAFE)}</p>\n";
|
||||||
|
$data['songlist'] .= " </div>\n";
|
||||||
|
$data['songlist'] .= "</div>\n";
|
||||||
|
$data['songlist'] .= "<hr class='songlist'>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( $debug ) {
|
||||||
|
var_dump($data);
|
||||||
|
echo "</pre>";
|
||||||
|
} else {
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
28
ajax_queuesong.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['songid']) ) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$songid = intval($_REQUEST['songid']);
|
||||||
|
|
||||||
|
if ( $_SESSION['queuetarget'] == 0 ) {
|
||||||
|
$query = "INSERT INTO " . INSTANTQTABLE . " (songid) VALUES(:songid)";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields[':songid'] = $songid;
|
||||||
|
$sth->execute($fields);
|
||||||
|
} else {
|
||||||
|
if ( RESTRICTQUEUES && (substr($_SERVER['REMOTE_ADDR'], 0, strlen(LOCALNETWORK)) != LOCALNETWORK) ) exit();
|
||||||
|
$query = "INSERT INTO " . QUEUECONTENTSTABLE . " (qid, songid) VALUES(:qid, :songid)";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields[':qid'] = $_SESSION['queuetarget'];
|
||||||
|
$fields[':songid'] = $songid;
|
||||||
|
$sth->execute($fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
27
ajax_searchsongs.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( isset($_REQUEST['searchfor']) ) {
|
||||||
|
$searchfor = $_REQUEST['searchfor'];
|
||||||
|
} else {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$songs = Song::getSearchList($searchfor);
|
||||||
|
|
||||||
|
foreach ( $songs as $song ) {
|
||||||
|
echo "<div id='search_{$song->getID()}' class='songlist_song_container' onClick='addSongToQueue({$song->getID()});'>\n";
|
||||||
|
echo " <div class='songlist_img_container'><img class='songlist_img' src='{$song->getArtFile(ARTURL)}'></div>\n";
|
||||||
|
echo " <div class='songlist_details_container'>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Song:</span> {$song->getTitle(HTMLSAFE)}</p>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Artist:</span> {$song->getArtist(HTMLSAFE)}</p>\n";
|
||||||
|
echo " <p class='nomargin'><span class='playing_label'>Album:</span> {$song->getAlbum(HTMLSAFE)}</p>\n";
|
||||||
|
echo " </div>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
echo "<hr class='songlist'>\n";
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
17
ajax_setchristmasfreq.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['newfreq']) ) exit();
|
||||||
|
$newfreq = intval($_REQUEST['newfreq']);
|
||||||
|
if ( ($newfreq < 1) || ($newfreq > 5) ) exit();
|
||||||
|
|
||||||
|
$query = "UPDATE " . SETTINGSTABLE . " SET value=:value WHERE parameter='CHRISTMASFREQ'";
|
||||||
|
$fields = array();
|
||||||
|
$fields[':value'] = $newfreq;
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
26
ajax_setcolor.php
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'config.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['color']) ) exit();
|
||||||
|
$hex = $_REQUEST['color'];
|
||||||
|
|
||||||
|
$command = 0x01;
|
||||||
|
$target = LEDTARGETID;
|
||||||
|
$unique = mt_rand(1, 2000000000);
|
||||||
|
$red = hexdec(substr($hex, 0, 2));
|
||||||
|
$green = hexdec(substr($hex, 2, 2));
|
||||||
|
$blue = hexdec(substr($hex, 4, 2));
|
||||||
|
|
||||||
|
$target = ($target > 0 ) ? 2 ** ($target - 1) : 0;
|
||||||
|
$data = pack("CQLLCCC", $command, $target, $unique, 1000, $red, $green, $blue);
|
||||||
|
|
||||||
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);
|
||||||
|
for ( $i=0; $i<3; $i++ ) {
|
||||||
|
socket_sendto($sock, $data, strlen($data), 0, LEDADDRESS, 6565);
|
||||||
|
if ( $i < 2 ) usleep(10000);
|
||||||
|
}
|
||||||
|
socket_close($sock);
|
||||||
|
|
||||||
|
?>
|
79
ajax_setpattern.php
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'config.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['pattern']) ) exit();
|
||||||
|
$pattern = $_REQUEST['pattern'];
|
||||||
|
|
||||||
|
$command = 0x02;
|
||||||
|
$target = LEDTARGETID;
|
||||||
|
$unique = mt_rand(1, 2000000000);
|
||||||
|
|
||||||
|
$target = ($target > 0 ) ? 2 ** ($target - 1) : 0;
|
||||||
|
$data = pack("CQL", $command, $target, $unique);
|
||||||
|
|
||||||
|
$goodPattern = false;
|
||||||
|
|
||||||
|
if ( $pattern == "crazy" ) {
|
||||||
|
// The first pack here sets the milliseconds duration for ramping between colors followed by the number of colors
|
||||||
|
$data .= pack("LC", 50, 1);
|
||||||
|
// Now we stack on the colors. R, G, B values from 0.0 to 1.0 and the final parameter being how long to rest on this color
|
||||||
|
$data .= pack("CCCL", 0, 0, 0, 0);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "crazymellow" ) {
|
||||||
|
$data .= pack("LC", 8000, 1);
|
||||||
|
$data .= pack("CCCL", 0, 0, 0, 0);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "christmas" ) {
|
||||||
|
$data .= pack("LC", 1000, 2);
|
||||||
|
$data .= pack("CCCL", 255, 0, 0, 2000);
|
||||||
|
$data .= pack("CCCL", 0, 255, 0, 2000);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "julyfourth" ) {
|
||||||
|
$data .= pack("LC", 1000, 3);
|
||||||
|
$data .= pack("CCCL", 255, 0, 0, 2000);
|
||||||
|
$data .= pack("CCCL", 127, 127, 127, 2000);
|
||||||
|
$data .= pack("CCCL", 0, 0, 255, 2000);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "easter" ) {
|
||||||
|
$data .= pack("LC", 1000, 3);
|
||||||
|
$data .= pack("CCCL", 255, 3, 192, 2000);
|
||||||
|
$data .= pack("CCCL", 8, 255, 247, 2000);
|
||||||
|
$data .= pack("CCCL", 255, 252, 5, 2000);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "halloween" ) {
|
||||||
|
$data .= pack("LC", 1000, 2);
|
||||||
|
$data .= pack("CCCL", 255, 24, 0, 1000);
|
||||||
|
$data .= pack("CCCL", 0, 0, 0, 250);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "thanksgiving" ) {
|
||||||
|
$data .= pack("LC", 1000, 2);
|
||||||
|
$data .= pack("CCCL", 0x4d, 0x1e, 0, 2000);
|
||||||
|
$data .= pack("CCCL", 0xcf, 0x53, 0, 2000);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "mellow" ) {
|
||||||
|
$data .= pack("LC", 10000, 5);
|
||||||
|
$data .= pack("CCCL", 0x00, 0x8f, 0x0d, 0);
|
||||||
|
$data .= pack("CCCL", 0x8b, 0x00, 0x08, 0);
|
||||||
|
$data .= pack("CCCL", 0x06, 0x01, 0x8f, 0);
|
||||||
|
$data .= pack("CCCL", 0x8f, 0x02, 0x54, 0);
|
||||||
|
$data .= pack("CCCL", 0x3e, 0x8f, 0x8c, 0);
|
||||||
|
$goodPattern = true;
|
||||||
|
} elseif ( $pattern == "test" ) {
|
||||||
|
$goodPattern = true;
|
||||||
|
$data .= pack("LC", 1000, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $goodPattern ) {
|
||||||
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);
|
||||||
|
for ( $i=0; $i<3; $i++ ) {
|
||||||
|
socket_sendto($sock, $data, strlen($data), 0, LEDADDRESS, 6565);
|
||||||
|
if ( $i < 2 ) usleep(10000);
|
||||||
|
}
|
||||||
|
socket_close($sock);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
24
ajax_setqueuetarget.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['queue']) ) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$newtarget = intval($_REQUEST['queue']);
|
||||||
|
|
||||||
|
$query = "SELECT id FROM " . QUEUESTABLE . " WHERE id=:newtarget";
|
||||||
|
$fields = array();
|
||||||
|
$fields[':newtarget'] = $newtarget;
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
|
||||||
|
if ( ($newtarget == 0) || (false !== ($row = $sth->fetch())) ) {
|
||||||
|
$_SESSION['queuetarget'] = $newtarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($_SESSION['queuetarget']);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
14
ajax_setvolume.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( isset($_REQUEST['volume']) ) {
|
||||||
|
$newvol = intval($_REQUEST['volume']);
|
||||||
|
if ( $newvol > MAXVOLUME ) $newvol = MAXVOLUME;
|
||||||
|
if ( $newvol < MINVOLUME ) $newvol = MINVOLUME;
|
||||||
|
setSystemVolume($newvol);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
8
ajax_skipsong.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
killPlayingSong();
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
22
ajax_surpriseme.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
if ( isset($_REQUEST['queueid']) ) {
|
||||||
|
$queueid = intval($_REQUEST['queueid']);
|
||||||
|
} else {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$fields = array();
|
||||||
|
if ( $queueid == 0 ) {
|
||||||
|
$query = "INSERT INTO " . INSTANTQTABLE . " (songid) SELECT id FROM " . SONGSTABLE . " WHERE id NOT IN (SELECT songid FROM " . INSTANTQTABLE . ") AND genre <> 'Christmas' ORDER BY RAND() LIMIT " . SONGSPERSURPRISE;
|
||||||
|
} else {
|
||||||
|
$query = "INSERT INTO " . INSTANTQTABLE . " (songid) SELECT songid FROM " . QUEUECONTENTSTABLE . " WHERE songid NOT IN (SELECT songid FROM " . INSTANTQTABLE . ") AND qid=:qid ORDER BY RAND() LIMIT " . SONGSPERSURPRISE;
|
||||||
|
$fields[':qid'] = $queueid;
|
||||||
|
}
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
//echo "<pre>"; print_r($songs); echo "</pre>"; exit();
|
||||||
|
|
||||||
|
?>
|
20
ajax_togglemute.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( isset($_REQUEST['show']) && ($_REQUEST['show'] == 'show') ) {
|
||||||
|
system("HOME=/home/web && scripts/homeaudio_togglemute.pl -show", $retval);
|
||||||
|
} else {
|
||||||
|
system("HOME=/home/web && scripts/homeaudio_togglemute.pl", $retval);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
if ( $retval == 0 ) {
|
||||||
|
$data['muted'] = false;
|
||||||
|
} else {
|
||||||
|
$data['muted'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
30
ajax_togglexmas.php
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
$query = "SELECT value FROM " . SETTINGSTABLE . " WHERE parameter='CHRISTMAS'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$row = $sth->fetch();
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
if ( $row['value'] == 'true' ) {
|
||||||
|
$newvalue = 'false';
|
||||||
|
$christmas = false;
|
||||||
|
} else {
|
||||||
|
$newvalue = 'true';
|
||||||
|
$christmas = true;
|
||||||
|
}
|
||||||
|
$data['christmas'] = $christmas;
|
||||||
|
|
||||||
|
$query = "UPDATE " . SETTINGSTABLE . " SET value=:value WHERE parameter='christmas'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields['value'] = $newvalue;
|
||||||
|
$sth->execute($fields);
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
?>
|
3
art/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Album Art Folder
|
||||||
|
|
||||||
|
This folder is where album art will be extracted from audio files for display in the web interface.
|
188
class_queue.php
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Queue {
|
||||||
|
private $id = 0;
|
||||||
|
private $type = "";
|
||||||
|
private $name = "";
|
||||||
|
private $active = false;
|
||||||
|
private $length = 0;
|
||||||
|
private $songcount = 0;
|
||||||
|
|
||||||
|
public function setID($id = 0) {
|
||||||
|
if ( $id != intval($id) ) return false;
|
||||||
|
$this->id = intval($id);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getID() {
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setType($type = "") {
|
||||||
|
if ( !in_array($type, VALID_QUEUE_TYPES) ) return false;
|
||||||
|
$this->type = $type;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getType() {
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isAutomatic() {
|
||||||
|
return (($this->type == QUEUETYPE_AUTO ) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName($name = "") {
|
||||||
|
$name = "" . $name;
|
||||||
|
if ( $name == "" ) return false;
|
||||||
|
$this->name = $name;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->name);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->name, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setActive($active = null) {
|
||||||
|
if ( is_null($active) ) return false;
|
||||||
|
if ( !is_bool($active) ) $active = ($active == "true") ? true : false;
|
||||||
|
switch ($active) {
|
||||||
|
case true:
|
||||||
|
$this->active = true;
|
||||||
|
break;
|
||||||
|
case false:
|
||||||
|
$this->active = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getActive($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case BOOLEANDB:
|
||||||
|
return ($this->active) ? "true" : "false";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->active;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLength($format = 0, $flag = 0) {
|
||||||
|
global $globaldbh;
|
||||||
|
if ( $this->getID() == 0 ) return 0;
|
||||||
|
if ( ($this->length == 0) or ($flag == FORCE) ) {
|
||||||
|
$query = "SELECT SUM(length) AS total FROM " . QUEUECONTENTSTABLE . " AS qc LEFT JOIN " . SONGSTABLE . " AS s ON qc.songid=s.id WHERE qid=:qid";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields[':qid'] = $this->getID();
|
||||||
|
$sth->execute($fields);
|
||||||
|
$length = 0;
|
||||||
|
if ( $row = $sth->fetch() ) {
|
||||||
|
$length = $row['total'];
|
||||||
|
}
|
||||||
|
$this->length = $length;
|
||||||
|
}
|
||||||
|
if ( $format == PRETTYLENGTH ) {
|
||||||
|
$hours = floor($this->length / 3600);
|
||||||
|
$minutes = floor(($this->length - ($hours * 3600)) / 60);
|
||||||
|
if ( $hours > 0 ) {
|
||||||
|
return $hours . "h:" . $minutes . "m";
|
||||||
|
} else {
|
||||||
|
return $minutes . "m";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return $this->length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSongCount($flag = 0) {
|
||||||
|
global $globaldbh;
|
||||||
|
if ( $this->getID() == 0 ) return 0;
|
||||||
|
if ( ($this->songcount == 0) or ($flag == FORCE) ) {
|
||||||
|
$query = "SELECT COUNT(songid) AS songcount FROM " . QUEUECONTENTSTABLE . " WHERE qid=:qid";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields[':qid'] = $this->getID();
|
||||||
|
$sth->execute($fields);
|
||||||
|
$row = $sth->fetch();
|
||||||
|
$this->songcount = $row['songcount'];
|
||||||
|
}
|
||||||
|
return $this->songcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function changeActiveQueue($qid = 0) {
|
||||||
|
global $globaldbh;
|
||||||
|
$qid = intval($qid);
|
||||||
|
if ( $qid <= 0 ) return false;
|
||||||
|
$query = "SELECT id FROM " . QUEUESTABLE . " WHERE id=:id";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields[':id'] = $qid;
|
||||||
|
$sth->execute($fields);
|
||||||
|
if ( $row = $sth->fetch() ) {
|
||||||
|
$query = "UPDATE " . QUEUESTABLE . " SET active='false'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$query = "UPDATE " . QUEUESTABLE . " SET active='true' WHERE id=:id";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getList($flag = 0) {
|
||||||
|
global $globaldbh;
|
||||||
|
$query = "SELECT id FROM " . QUEUESTABLE;
|
||||||
|
if ( $flag == AUTOQUEUES ) $query .= " WHERE type='" . QUEUETYPE_AUTO . "'";
|
||||||
|
$query .= " ORDER BY name";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$thelist = array();
|
||||||
|
$sth->execute();
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$thelist[] = new Queue($row['id']);
|
||||||
|
}
|
||||||
|
return $thelist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function save() {
|
||||||
|
global $globaldbh;
|
||||||
|
$query = "INSERT INTO " . QUEUESTABLE . " (name) VALUES(:name) ON DUPLICATE KEY UPDATE name=:name";
|
||||||
|
$fields = array();
|
||||||
|
$fields[':name'] = $this->getName();
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct($id = 0) {
|
||||||
|
global $globaldbh;
|
||||||
|
$query = "SELECT id, type, name, active FROM " . QUEUESTABLE . " WHERE id=:id";
|
||||||
|
$fields = array();
|
||||||
|
$fields[':id'] = intval($id);
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute($fields);
|
||||||
|
if ( $row = $sth->fetch() ) {
|
||||||
|
$this->setID($row['id']);
|
||||||
|
$this->setType($row['type']);
|
||||||
|
$this->setName($row['name']);
|
||||||
|
$this->setActive($row['active']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
221
class_song.php
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Song {
|
||||||
|
private $id = 0;
|
||||||
|
private $path = "";
|
||||||
|
private $song = "";
|
||||||
|
private $timesplayed = 0;
|
||||||
|
private $genre = "";
|
||||||
|
private $title = "";
|
||||||
|
private $artist = "";
|
||||||
|
private $album = "";
|
||||||
|
private $year = "";
|
||||||
|
private $length = 0;
|
||||||
|
private $artfile = "";
|
||||||
|
private $parsed = false;
|
||||||
|
|
||||||
|
public function getID() {
|
||||||
|
return intval($this->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPath($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->path);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->path, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->path;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSong($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->song);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->song, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
case NOEXT:
|
||||||
|
return htmlspecialchars(substr($this->song, 0, -4));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->song;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTimesPlayed() {
|
||||||
|
return intval($this->timesplayed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGenre($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->genre);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->genre, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->genre;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->title);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->title, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->title;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getArtist($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->artist);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->artist, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->artist;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAlbum($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->album);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->album, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->album;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getYear($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->year);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->year, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->year;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLength() {
|
||||||
|
return intval($this->length);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getArtFile($flag = 0) {
|
||||||
|
global $artbygenre;
|
||||||
|
switch ($flag) {
|
||||||
|
case ARTURL:
|
||||||
|
if ( $this->artfile == "" ) {
|
||||||
|
if ( array_key_exists($this->getGenre(), $artbygenre) ) {
|
||||||
|
$ret = "img/" . $artbygenre[$this->getGenre()];
|
||||||
|
} else {
|
||||||
|
$ret = "img/no_art.jpg";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$ret = "art/" . $this->artfile;
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
break;
|
||||||
|
case HTMLSAFE:
|
||||||
|
return htmlspecialchars($this->artfile);
|
||||||
|
break;
|
||||||
|
case HTMLFORMSAFE:
|
||||||
|
return htmlspecialchars($this->artfile, ENT_QUOTES);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->artfile;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getParsed($flag = 0) {
|
||||||
|
switch ($flag) {
|
||||||
|
case BOOLEANDB:
|
||||||
|
return ($this->parsed) ? "true" : "false";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return $this->parsed;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getSearchList($searchfor = "" ) {
|
||||||
|
global $globaldbh;
|
||||||
|
$thelist = array();
|
||||||
|
$searchfor = trim($searchfor);
|
||||||
|
$searchfor = str_replace('%', "", $searchfor);
|
||||||
|
$terms = explode(" ", $searchfor);
|
||||||
|
$likematch = "%";
|
||||||
|
foreach ( $terms as $term ) {
|
||||||
|
$likematch .= $term . "%";
|
||||||
|
}
|
||||||
|
//$likematch = "%" . $searchfor . "%";
|
||||||
|
$searchfor = str_replace(array("'", "+", "-"), "", $searchfor);
|
||||||
|
$searchfor = "+" . preg_replace("/\s+/", " +", $searchfor);
|
||||||
|
if ( $searchfor == "" ) return $thelist;
|
||||||
|
$query = "SELECT id FROM " . SONGSTABLE . " WHERE CONCAT(path, song, artist) LIKE :likematch ORDER BY path, song LIMIT " . intval(SEARCHLIMIT);
|
||||||
|
//$query = "SELECT id FROM " . SONGSTABLE . " WHERE MATCH (song, path, artist, album, title) AGAINST (:searchfor IN BOOLEAN MODE) OR CONCAT(path, song) LIKE :likematch ORDER BY path, song LIMIT " . intval(SEARCHLIMIT);
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
//$fields[':searchfor'] = $searchfor;
|
||||||
|
$fields[':likematch'] = $likematch;
|
||||||
|
$sth->execute($fields);
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$thelist[] = new Song($row['id']);
|
||||||
|
}
|
||||||
|
return $thelist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct($reqid = 0) {
|
||||||
|
global $globaldbh;
|
||||||
|
$reqid = intval($reqid);
|
||||||
|
$query = "SELECT id, path, song, timesplayed, genre, title, artist, album, year, length, artfile, parsed FROM " . SONGSTABLE . " WHERE id=:id";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$fields = array();
|
||||||
|
$fields[':id'] = $reqid;
|
||||||
|
$sth->execute($fields);
|
||||||
|
if ( $row = $sth->fetch() ) {
|
||||||
|
$this->id = $row['id'];
|
||||||
|
$this->path = $row['path'];
|
||||||
|
$this->song = $row['song'];
|
||||||
|
$this->timesplayed = $row['timesplayed'];
|
||||||
|
$this->genre = $row['genre'];
|
||||||
|
$this->title = $row['title'];
|
||||||
|
$this->artist = $row['artist'];
|
||||||
|
$this->album = $row['album'];
|
||||||
|
$this->year = $row['year'];
|
||||||
|
$this->length = $row['length'];
|
||||||
|
$this->artfile = $row['artfile'];
|
||||||
|
$this->parsed = ($row['path'] == 'true') ? true : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
32
config_dist.php
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
define('DBHOST', 'localhost');
|
||||||
|
define('DBUSER', 'root');
|
||||||
|
define('DBPASS', '');
|
||||||
|
define('DBNAME', 'musicnew');
|
||||||
|
|
||||||
|
define('ENABLELEDBUTTONS', false);
|
||||||
|
|
||||||
|
define('SONGSPERSURPRISE', 10);
|
||||||
|
define('SEARCHLIMIT', 50);
|
||||||
|
|
||||||
|
// LOCALNETWORK can be a partial (for a subnet) or a full IP address.
|
||||||
|
// When RESTRICTQUEUES is true, only change requests from the listed
|
||||||
|
// address/scope will be accepted.
|
||||||
|
define('LOCALNETWORK', '192.168.1.');
|
||||||
|
define('RESTRICTQUEUES', false);
|
||||||
|
|
||||||
|
/* ---------------------- Below here be dragons ---------------------- */
|
||||||
|
|
||||||
|
define('ALBUMSTABLE', 'albums');
|
||||||
|
define('INSTANTQTABLE', 'instantq');
|
||||||
|
define('QUEUESTABLE', 'queues');
|
||||||
|
define('RECENTSTABLE', 'recently');
|
||||||
|
define('SONGSTABLE', 'songs');
|
||||||
|
define('QUEUECONTENTSTABLE', 'queuecontents');
|
||||||
|
define('SETTINGSTABLE', 'settings');
|
||||||
|
|
||||||
|
define('MAXVOLUME', 28);
|
||||||
|
define('MINVOLUME', 0);
|
||||||
|
|
||||||
|
?>
|
48
constants.php
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
define("DEFAULTFLAG", 0);
|
||||||
|
define("HTMLSAFE", 1000001);
|
||||||
|
define("HTMLFORMSAFE", 1000002);
|
||||||
|
define("ICONMENUSIZE", 1000003);
|
||||||
|
define("NOEXT", 1000004);
|
||||||
|
define("TIMESTAMP", 1000101);
|
||||||
|
define("PRETTYDATE", 1000102);
|
||||||
|
define("SHORTDATE", 1000103);
|
||||||
|
define("BOOLEANDB", 1000201);
|
||||||
|
|
||||||
|
define("AUTOQUEUES", 1000301);
|
||||||
|
define("QUEUETYPE_AUTO", "auto");
|
||||||
|
define("QUEUETYPE_USER", "user");
|
||||||
|
define("QUEUETYPE_YEAR", "year");
|
||||||
|
|
||||||
|
define("PRETTYSIZE", 1000401);
|
||||||
|
define("FORCE", 1000501);
|
||||||
|
define("LOGDISPLAY", 1000601);
|
||||||
|
define("ARTURL", 1000701);
|
||||||
|
define("PRETTYLENGTH", 1000801);
|
||||||
|
|
||||||
|
const VALID_QUEUE_TYPES = array("auto", "user", "year");
|
||||||
|
|
||||||
|
// Not really constants, but useful golbally.
|
||||||
|
$extbymimetypes = array(
|
||||||
|
'image/jpeg' => 'jpg',
|
||||||
|
'image/png' => 'png',
|
||||||
|
'image/gif' => 'gif'
|
||||||
|
);
|
||||||
|
|
||||||
|
$artbygenre = array(
|
||||||
|
'Christmas' => 'Christmas.jpg',
|
||||||
|
'Classical' => 'Classical.jpg',
|
||||||
|
'Comedy - Misc' => 'Comedy.jpg',
|
||||||
|
'Country' => 'Country.jpg',
|
||||||
|
'Dance - Techno' => 'Dance.jpg',
|
||||||
|
'Hard Rock - Metal' => 'HardRock.jpg',
|
||||||
|
'Incoming' => 'Incoming.jpg',
|
||||||
|
'Jazz-Blues' => 'Jazz.jpg',
|
||||||
|
'Lite' => 'Lite.jpg',
|
||||||
|
'RnB-Rap' => 'Rap.jpg',
|
||||||
|
'Rock' => 'Rock.jpg',
|
||||||
|
'Soundtracks' => 'Soundtracks.jpg'
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
10
curthumb.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( !isset($_REQUEST['mimetype']) ) exit();
|
||||||
|
$mimetype = $_REQUEST['mimetype'];
|
||||||
|
|
||||||
|
header("Content-type: {$mimetype}");
|
||||||
|
readfile("/tmp/curthumb");
|
||||||
|
|
||||||
|
exit();
|
||||||
|
?>
|
53
desktop.css
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
body::-webkit-scrollbar {
|
||||||
|
width: 0 !important;
|
||||||
|
}
|
||||||
|
div.mainbody {
|
||||||
|
min-height: 1240px;
|
||||||
|
font-size: 24pt;
|
||||||
|
max-width: 650px;
|
||||||
|
}
|
||||||
|
div.playing_contents {
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
div.volume_slider {
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
select.queue_select {
|
||||||
|
font-size: 30pt !important;
|
||||||
|
}
|
||||||
|
select.surpriseme_sel {
|
||||||
|
font-size: 30pt !important;
|
||||||
|
}
|
||||||
|
select.christmas_freq {
|
||||||
|
font-size: 30pt !important;
|
||||||
|
}
|
||||||
|
div.history_contents {
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
div.queue_contents {
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
div.search_contents {
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
div.search_input {
|
||||||
|
font-size: 25pt;
|
||||||
|
}
|
||||||
|
#search input[type=text] {
|
||||||
|
font-size: 30pt;
|
||||||
|
}
|
||||||
|
#search input[type=button], input[type=text] {
|
||||||
|
font-size: 25pt;
|
||||||
|
}
|
||||||
|
#playing input[type=button] {
|
||||||
|
font-size: 30pt;
|
||||||
|
}
|
||||||
|
#control p {
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
#control input[type=button] {
|
||||||
|
font-size: 30pt;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav li {
|
||||||
|
font-size: 75%;
|
||||||
|
}
|
21
functions.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function killPlayingSong() {
|
||||||
|
system("killall -q mpg321");
|
||||||
|
}
|
||||||
|
|
||||||
|
function setSystemVolume($newvol = null) {
|
||||||
|
if ( is_null($newvol) ) return false;
|
||||||
|
system("HOME=/home/web && /usr/bin/amixer -q sset Master " . $newvol);
|
||||||
|
file_put_contents("/tmp/curvol", $newvol);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSystemVolume() {
|
||||||
|
$curvol = file_get_contents("/tmp/curvol");
|
||||||
|
//$curvol = trim(shell_exec("HOME=/home/web && /usr/bin/amixer sget Master | grep \"Front Left:\" | awk '{print $4}'"));
|
||||||
|
return $curvol;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
25
header.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'constants.php';
|
||||||
|
require 'config.php';
|
||||||
|
require 'class_queue.php';
|
||||||
|
require 'class_song.php';
|
||||||
|
require 'functions.php';
|
||||||
|
|
||||||
|
// Make our PDO database connection which will be used in all scripts
|
||||||
|
$globaldbh = new PDO("mysql:host=" . DBHOST . ";dbname=" . DBNAME, DBUSER, DBPASS);
|
||||||
|
|
||||||
|
if ( php_sapi_name() != "cli" ) {
|
||||||
|
|
||||||
|
// Start the session
|
||||||
|
session_name('homeaudio');
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// This session variable contains the ID of the current queueing target
|
||||||
|
if ( !isset($_SESSION['queuetarget']) ) {
|
||||||
|
$_SESSION['queuetarget'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
BIN
img/Christmas.jpg
Executable file
After Width: | Height: | Size: 102 KiB |
BIN
img/Classical.jpg
Executable file
After Width: | Height: | Size: 112 KiB |
BIN
img/Comedy.jpg
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
img/Country.jpg
Executable file
After Width: | Height: | Size: 38 KiB |
BIN
img/Dance.jpg
Executable file
After Width: | Height: | Size: 103 KiB |
BIN
img/HardRock.jpg
Executable file
After Width: | Height: | Size: 72 KiB |
BIN
img/Incoming.jpg
Executable file
After Width: | Height: | Size: 67 KiB |
BIN
img/Jazz.jpg
Executable file
After Width: | Height: | Size: 127 KiB |
BIN
img/Lite.jpg
Executable file
After Width: | Height: | Size: 55 KiB |
3
img/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Application Images
|
||||||
|
|
||||||
|
This folder contains images used as icons and default album art.
|
BIN
img/Rap.jpg
Executable file
After Width: | Height: | Size: 68 KiB |
BIN
img/Rock.jpg
Executable file
After Width: | Height: | Size: 67 KiB |
BIN
img/Soundtracks.jpg
Executable file
After Width: | Height: | Size: 82 KiB |
BIN
img/ic_MobileHA.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
img/ic_MobileHA_hires.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
img/ic_MobileHA_ipad-retina.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
img/ic_MobileHA_ipad.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
img/ic_MobileHA_iphone.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
img/ic_MobileHA_large.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
img/no_art.jpg
Normal file
After Width: | Height: | Size: 51 KiB |
142
index.php
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'header.php';
|
||||||
|
|
||||||
|
$queues = Queue::getList();
|
||||||
|
//$autoqueues = Queue::getList(AUTOQUEUES);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0, width=device-width, user-scalable=no">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<link rel="icon" sizes="128x128" href="img/ic_MobileHA.png" />
|
||||||
|
<link rel="icon" sizes="196x196" href="img/ic_MobileHA_hires.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" href="img/ic_MobileHA_ipad.png" />
|
||||||
|
<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='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>
|
||||||
|
<title>Mobile Home Audio</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='mainbody' class='mainbody'>
|
||||||
|
<div id='tabs'>
|
||||||
|
<ul>
|
||||||
|
<li><a href='#playing'>Playing</a></li>
|
||||||
|
<li><a href='#control'>Control</a></li>
|
||||||
|
<li><a href='#history'>History</a></li>
|
||||||
|
<li><a id='queuetab' href='#jukebox'>Jukebox</a></li>
|
||||||
|
<li><a href='#search'>Search</a></li>
|
||||||
|
<li><a href='#lists'>Lists</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id='playing'>
|
||||||
|
<div id='playing_contents' class='playing_contents'></div>
|
||||||
|
<div id='playing_buttons' class='playing_contents'>
|
||||||
|
<p><input type='button' id='skipsong_playing_btn' value='Skip Song'></p>
|
||||||
|
<p><input type='button' id='mute_playing_btn' value='Mute'></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='control'>
|
||||||
|
<div class='volume_slider_container'>
|
||||||
|
<p><input type='button' class='vol_btn' value='Min' id='min_btn'> Volume <input type='button' class='vol_btn' value='Max' id='max_btn'></p>
|
||||||
|
</div>
|
||||||
|
<div class='volume_slider'>
|
||||||
|
<div id='volume_slider'></div>
|
||||||
|
</div>
|
||||||
|
<p><input type='button' id='mute_btn' value='Mute'></p>
|
||||||
|
<p><input type='button' id='skipsong_btn' value='Skip Song'></p>
|
||||||
|
<p><input type='button' id='dropsong_btn' value='Drop Song'></p>
|
||||||
|
<p><input type='button' id='emptyjukebox_btn' value='Empty Jukebox'></p>
|
||||||
|
<p><input type='button' id='christmas_btn' value='Christmas: Inactive' class='christmas_btn'>
|
||||||
|
<select id='christmas_freq' class='christmas_freq'>
|
||||||
|
<option value='1'>1</option>
|
||||||
|
<option value='2'>2</option>
|
||||||
|
<option value='3'>3</option>
|
||||||
|
<option value='4'>4</option>
|
||||||
|
<option value='5'>5</option>
|
||||||
|
</select>
|
||||||
|
</p>
|
||||||
|
<hr class='songlist'>
|
||||||
|
<p>Active Queue:</p>
|
||||||
|
<div class='category_container'>
|
||||||
|
<div class='category_sel'>
|
||||||
|
<select id='queue_sel' class='queue_select'>
|
||||||
|
<option value='0'>-- All Songs --</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class='category_go'>
|
||||||
|
<input type='button' id='category_go_btn' class='category_go_btn' value='Go'>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class='songlist'>
|
||||||
|
<p><input type='button' id='surpriseme_btn' value='Surprise Me'></p>
|
||||||
|
<p><select id='surpriseme_sel' class='surpriseme_sel'>
|
||||||
|
<option value='0'>-- All Songs --</option>
|
||||||
|
</select></p>
|
||||||
|
</div>
|
||||||
|
<div id='history'>
|
||||||
|
<div id='history_contents' class='history_contents'></div>
|
||||||
|
</div>
|
||||||
|
<div id='jukebox'>
|
||||||
|
<div id='jukebox_contents' class='queue_contents'></div>
|
||||||
|
<div id='customq_contents' class='queue_contents'></div>
|
||||||
|
</div>
|
||||||
|
<div id='search'>
|
||||||
|
<div id='search_input' class='search_input'>
|
||||||
|
<input type='button' name='clearsearch_btn' id='clearsearch_btn' value='Clear' class='clear_search_btn'>
|
||||||
|
<input id='searchbox' class='searchtext' type='text' placeholder='Search for...'>
|
||||||
|
</div>
|
||||||
|
<div id='search_contents' class='search_contents'></div>
|
||||||
|
</div>
|
||||||
|
<div id='lists'>
|
||||||
|
<div id='lists_contents' class='lists_contents'>
|
||||||
|
<p>Queue Songs To:</p>
|
||||||
|
<p><select id='queuetarget_sel' class='surpriseme_sel'>
|
||||||
|
<option value='0'>Jukebox</option>
|
||||||
|
</select></p>
|
||||||
|
<p>Create Playlist:</p>
|
||||||
|
<p>
|
||||||
|
<input id='newqueue_input' class='searchtext' style='width: 70%;' type='text' placeholder='Playlist Name'>
|
||||||
|
<input type='button' id='newqueue_btn' class='newqueue_btn' value='Create'>
|
||||||
|
</p>
|
||||||
|
<hr class='songlist'>
|
||||||
|
<div id='led_buttons' <?php if ( !ENABLELEDBUTTONS ) echo "class='hidden'"; ?>>
|
||||||
|
<p>LED Control:</p>
|
||||||
|
<p>
|
||||||
|
<input type='button' id='led_crazy_btn' value='Go Crazy' class='led_btn'>
|
||||||
|
<input type='button' id='led_christmas_btn' value='Christmas' class='led_btn'>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type='button' id='led_julyfourth_btn' value='4th of July' class='led_btn'>
|
||||||
|
<input type='button' id='led_easter_btn' value='Easter' class='led_btn'>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type='button' id='led_halloween_btn' value='Halloween' class='led_btn'>
|
||||||
|
<input type='button' id='led_mellow_btn' value='Be Mellow' class='led_btn'>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type='button' id='led_crazymellow_btn' value='Mellow Random' class='led_btn'>
|
||||||
|
<input type='button' id='led_disableauto_btn' value='Disable Auto' class='led_btn'>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type='button' id='led_lightsoff_btn' value='Lights Off' class='led_btn'>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
jquery-1.11.1.min.js
vendored
Normal file
9789
jquery-ui-1.11.2/external/jquery/jquery.js
vendored
Executable file
BIN
jquery-ui-1.11.2/images/ui-bg_flat_25_000000_40x100.png
Executable file
After Width: | Height: | Size: 205 B |
BIN
jquery-ui-1.11.2/images/ui-bg_flat_30_cccccc_40x100.png
Executable file
After Width: | Height: | Size: 220 B |
BIN
jquery-ui-1.11.2/images/ui-bg_flat_50_5c5c5c_40x100.png
Executable file
After Width: | Height: | Size: 230 B |
BIN
jquery-ui-1.11.2/images/ui-bg_glass_40_ffc73d_1x400.png
Executable file
After Width: | Height: | Size: 316 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-hard_20_0972a5_1x100.png
Executable file
After Width: | Height: | Size: 323 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-hard_20_787878_1x100.png
Executable file
After Width: | Height: | Size: 250 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-soft_33_003147_1x100.png
Executable file
After Width: | Height: | Size: 352 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-soft_33_3a3a3a_1x100.png
Executable file
After Width: | Height: | Size: 277 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-soft_35_222222_1x100.png
Executable file
After Width: | Height: | Size: 277 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-soft_44_444444_1x100.png
Executable file
After Width: | Height: | Size: 277 B |
BIN
jquery-ui-1.11.2/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
Executable file
After Width: | Height: | Size: 276 B |
BIN
jquery-ui-1.11.2/images/ui-bg_loop_25_000000_21x21.png
Executable file
After Width: | Height: | Size: 285 B |
BIN
jquery-ui-1.11.2/images/ui-icons_222222_256x240.png
Executable file
After Width: | Height: | Size: 6.8 KiB |
BIN
jquery-ui-1.11.2/images/ui-icons_4b8e0b_256x240.png
Executable file
After Width: | Height: | Size: 4.4 KiB |
BIN
jquery-ui-1.11.2/images/ui-icons_a83300_256x240.png
Executable file
After Width: | Height: | Size: 4.4 KiB |
BIN
jquery-ui-1.11.2/images/ui-icons_cccccc_256x240.png
Executable file
After Width: | Height: | Size: 6.8 KiB |
BIN
jquery-ui-1.11.2/images/ui-icons_ffffff_256x240.png
Executable file
After Width: | Height: | Size: 6.2 KiB |
513
jquery-ui-1.11.2/index.html
Executable file
|
@ -0,0 +1,513 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="us">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery UI Example Page</title>
|
||||||
|
<link href="jquery-ui.css" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font: 62.5% "Trebuchet MS", sans-serif;
|
||||||
|
margin: 50px;
|
||||||
|
}
|
||||||
|
.demoHeaders {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
||||||
|
#dialog-link {
|
||||||
|
padding: .4em 1em .4em 20px;
|
||||||
|
text-decoration: none;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#dialog-link span.ui-icon {
|
||||||
|
margin: 0 5px 0 0;
|
||||||
|
position: absolute;
|
||||||
|
left: .2em;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
#icons {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#icons li {
|
||||||
|
margin: 2px;
|
||||||
|
position: relative;
|
||||||
|
padding: 4px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
float: left;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
#icons span.ui-icon {
|
||||||
|
float: left;
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
.fakewindowcontain .ui-widget-overlay {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Welcome to jQuery UI!</h1>
|
||||||
|
|
||||||
|
<div class="ui-widget">
|
||||||
|
<p>This page demonstrates the widgets and theme you selected in Download Builder. Please make sure you are using them with a compatible jQuery version.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>YOUR COMPONENTS:</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Accordion -->
|
||||||
|
<h2 class="demoHeaders">Accordion</h2>
|
||||||
|
<div id="accordion">
|
||||||
|
<h3>First</h3>
|
||||||
|
<div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
|
||||||
|
<h3>Second</h3>
|
||||||
|
<div>Phasellus mattis tincidunt nibh.</div>
|
||||||
|
<h3>Third</h3>
|
||||||
|
<div>Nam dui erat, auctor a, dignissim quis.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Autocomplete -->
|
||||||
|
<h2 class="demoHeaders">Autocomplete</h2>
|
||||||
|
<div>
|
||||||
|
<input id="autocomplete" title="type "a"">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Button -->
|
||||||
|
<h2 class="demoHeaders">Button</h2>
|
||||||
|
<button id="button">A button element</button>
|
||||||
|
<form style="margin-top: 1em;">
|
||||||
|
<div id="radioset">
|
||||||
|
<input type="radio" id="radio1" name="radio"><label for="radio1">Choice 1</label>
|
||||||
|
<input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">Choice 2</label>
|
||||||
|
<input type="radio" id="radio3" name="radio"><label for="radio3">Choice 3</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Tabs -->
|
||||||
|
<h2 class="demoHeaders">Tabs</h2>
|
||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">First</a></li>
|
||||||
|
<li><a href="#tabs-2">Second</a></li>
|
||||||
|
<li><a href="#tabs-3">Third</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
|
||||||
|
<div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div>
|
||||||
|
<div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller-->
|
||||||
|
<h2 class="demoHeaders">Dialog</h2>
|
||||||
|
<p><a href="#" id="dialog-link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p>
|
||||||
|
|
||||||
|
<h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2>
|
||||||
|
<div style="position: relative; width: 96%; height: 200px; padding:1% 2%; overflow:hidden;" class="fakewindowcontain">
|
||||||
|
<p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p>
|
||||||
|
|
||||||
|
<!-- ui-dialog -->
|
||||||
|
<div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div>
|
||||||
|
<div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all">
|
||||||
|
<div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;">
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ui-dialog -->
|
||||||
|
<div id="dialog" title="Dialog Title">
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="demoHeaders">Framework Icons (content color preview)</h2>
|
||||||
|
<ul id="icons" class="ui-widget ui-helper-clearfix">
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li>
|
||||||
|
<li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Slider -->
|
||||||
|
<h2 class="demoHeaders">Slider</h2>
|
||||||
|
<div id="slider"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Datepicker -->
|
||||||
|
<h2 class="demoHeaders">Datepicker</h2>
|
||||||
|
<div id="datepicker"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Progressbar -->
|
||||||
|
<h2 class="demoHeaders">Progressbar</h2>
|
||||||
|
<div id="progressbar"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Progressbar -->
|
||||||
|
<h2 class="demoHeaders">Selectmenu</h2>
|
||||||
|
<select id="selectmenu">
|
||||||
|
<option>Slower</option>
|
||||||
|
<option>Slow</option>
|
||||||
|
<option selected="selected">Medium</option>
|
||||||
|
<option>Fast</option>
|
||||||
|
<option>Faster</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Spinner -->
|
||||||
|
<h2 class="demoHeaders">Spinner</h2>
|
||||||
|
<input id="spinner">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Menu -->
|
||||||
|
<h2 class="demoHeaders">Menu</h2>
|
||||||
|
<ul style="width:100px;" id="menu">
|
||||||
|
<li>Item 1</li>
|
||||||
|
<li>Item 2</li>
|
||||||
|
<li>Item 3
|
||||||
|
<ul>
|
||||||
|
<li>Item 3-1</li>
|
||||||
|
<li>Item 3-2</li>
|
||||||
|
<li>Item 3-3</li>
|
||||||
|
<li>Item 3-4</li>
|
||||||
|
<li>Item 3-5</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Item 4</li>
|
||||||
|
<li>Item 5</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Tooltip -->
|
||||||
|
<h2 class="demoHeaders">Tooltip</h2>
|
||||||
|
<p id="tooltip">
|
||||||
|
<a href="#" title="That's what this widget is">Tooltips</a> can be attached to any element. When you hover
|
||||||
|
the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Highlight / Error -->
|
||||||
|
<h2 class="demoHeaders">Highlight / Error</h2>
|
||||||
|
<div class="ui-widget">
|
||||||
|
<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
|
||||||
|
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
||||||
|
<strong>Hey!</strong> Sample ui-state-highlight style.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="ui-widget">
|
||||||
|
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
|
||||||
|
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
|
||||||
|
<strong>Alert:</strong> Sample ui-state-error style.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="external/jquery/jquery.js"></script>
|
||||||
|
<script src="jquery-ui.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$( "#accordion" ).accordion();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var availableTags = [
|
||||||
|
"ActionScript",
|
||||||
|
"AppleScript",
|
||||||
|
"Asp",
|
||||||
|
"BASIC",
|
||||||
|
"C",
|
||||||
|
"C++",
|
||||||
|
"Clojure",
|
||||||
|
"COBOL",
|
||||||
|
"ColdFusion",
|
||||||
|
"Erlang",
|
||||||
|
"Fortran",
|
||||||
|
"Groovy",
|
||||||
|
"Haskell",
|
||||||
|
"Java",
|
||||||
|
"JavaScript",
|
||||||
|
"Lisp",
|
||||||
|
"Perl",
|
||||||
|
"PHP",
|
||||||
|
"Python",
|
||||||
|
"Ruby",
|
||||||
|
"Scala",
|
||||||
|
"Scheme"
|
||||||
|
];
|
||||||
|
$( "#autocomplete" ).autocomplete({
|
||||||
|
source: availableTags
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#button" ).button();
|
||||||
|
$( "#radioset" ).buttonset();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#tabs" ).tabs();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#dialog" ).dialog({
|
||||||
|
autoOpen: false,
|
||||||
|
width: 400,
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: "Ok",
|
||||||
|
click: function() {
|
||||||
|
$( this ).dialog( "close" );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Cancel",
|
||||||
|
click: function() {
|
||||||
|
$( this ).dialog( "close" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Link to open the dialog
|
||||||
|
$( "#dialog-link" ).click(function( event ) {
|
||||||
|
$( "#dialog" ).dialog( "open" );
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#datepicker" ).datepicker({
|
||||||
|
inline: true
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#slider" ).slider({
|
||||||
|
range: true,
|
||||||
|
values: [ 17, 67 ]
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#progressbar" ).progressbar({
|
||||||
|
value: 20
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#spinner" ).spinner();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#menu" ).menu();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#tooltip" ).tooltip();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$( "#selectmenu" ).selectmenu();
|
||||||
|
|
||||||
|
|
||||||
|
// Hover states on the static widgets
|
||||||
|
$( "#dialog-link, #icons li" ).hover(
|
||||||
|
function() {
|
||||||
|
$( this ).addClass( "ui-state-hover" );
|
||||||
|
},
|
||||||
|
function() {
|
||||||
|
$( this ).removeClass( "ui-state-hover" );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
1225
jquery-ui-1.11.2/jquery-ui.css
vendored
Executable file
16582
jquery-ui-1.11.2/jquery-ui.js
vendored
Executable file
7
jquery-ui-1.11.2/jquery-ui.min.css
vendored
Executable file
13
jquery-ui-1.11.2/jquery-ui.min.js
vendored
Executable file
833
jquery-ui-1.11.2/jquery-ui.structure.css
vendored
Executable file
|
@ -0,0 +1,833 @@
|
||||||
|
/*!
|
||||||
|
* jQuery UI CSS Framework 1.11.2
|
||||||
|
* http://jqueryui.com
|
||||||
|
*
|
||||||
|
* Copyright 2014 jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://api.jqueryui.com/category/theming/
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Layout helpers
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-helper-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.ui-helper-hidden-accessible {
|
||||||
|
border: 0;
|
||||||
|
clip: rect(0 0 0 0);
|
||||||
|
height: 1px;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
.ui-helper-reset {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 100%;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
.ui-helper-clearfix:before,
|
||||||
|
.ui-helper-clearfix:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
.ui-helper-clearfix:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.ui-helper-clearfix {
|
||||||
|
min-height: 0; /* support: IE7 */
|
||||||
|
}
|
||||||
|
.ui-helper-zfix {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
filter:Alpha(Opacity=0); /* support: IE8 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-front {
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Interaction Cues
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-state-disabled {
|
||||||
|
cursor: default !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Icons
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* states and images */
|
||||||
|
.ui-icon {
|
||||||
|
display: block;
|
||||||
|
text-indent: -99999px;
|
||||||
|
overflow: hidden;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc visuals
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* Overlays */
|
||||||
|
.ui-widget-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.ui-draggable-handle {
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.ui-resizable {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.ui-resizable-handle {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 0.1px;
|
||||||
|
display: block;
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.ui-resizable-disabled .ui-resizable-handle,
|
||||||
|
.ui-resizable-autohide .ui-resizable-handle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.ui-resizable-n {
|
||||||
|
cursor: n-resize;
|
||||||
|
height: 7px;
|
||||||
|
width: 100%;
|
||||||
|
top: -5px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.ui-resizable-s {
|
||||||
|
cursor: s-resize;
|
||||||
|
height: 7px;
|
||||||
|
width: 100%;
|
||||||
|
bottom: -5px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.ui-resizable-e {
|
||||||
|
cursor: e-resize;
|
||||||
|
width: 7px;
|
||||||
|
right: -5px;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.ui-resizable-w {
|
||||||
|
cursor: w-resize;
|
||||||
|
width: 7px;
|
||||||
|
left: -5px;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.ui-resizable-se {
|
||||||
|
cursor: se-resize;
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
right: 1px;
|
||||||
|
bottom: 1px;
|
||||||
|
}
|
||||||
|
.ui-resizable-sw {
|
||||||
|
cursor: sw-resize;
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
left: -5px;
|
||||||
|
bottom: -5px;
|
||||||
|
}
|
||||||
|
.ui-resizable-nw {
|
||||||
|
cursor: nw-resize;
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
left: -5px;
|
||||||
|
top: -5px;
|
||||||
|
}
|
||||||
|
.ui-resizable-ne {
|
||||||
|
cursor: ne-resize;
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
right: -5px;
|
||||||
|
top: -5px;
|
||||||
|
}
|
||||||
|
.ui-selectable {
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.ui-selectable-helper {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 100;
|
||||||
|
border: 1px dotted black;
|
||||||
|
}
|
||||||
|
.ui-sortable-handle {
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.ui-accordion .ui-accordion-header {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
margin: 2px 0 0 0;
|
||||||
|
padding: .5em .5em .5em .7em;
|
||||||
|
min-height: 0; /* support: IE7 */
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
.ui-accordion .ui-accordion-icons {
|
||||||
|
padding-left: 2.2em;
|
||||||
|
}
|
||||||
|
.ui-accordion .ui-accordion-icons .ui-accordion-icons {
|
||||||
|
padding-left: 2.2em;
|
||||||
|
}
|
||||||
|
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
|
||||||
|
position: absolute;
|
||||||
|
left: .5em;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
.ui-accordion .ui-accordion-content {
|
||||||
|
padding: 1em 2.2em;
|
||||||
|
border-top: 0;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ui-autocomplete {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.ui-button {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
line-height: normal;
|
||||||
|
margin-right: .1em;
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
overflow: visible; /* removes extra width in IE */
|
||||||
|
}
|
||||||
|
.ui-button,
|
||||||
|
.ui-button:link,
|
||||||
|
.ui-button:visited,
|
||||||
|
.ui-button:hover,
|
||||||
|
.ui-button:active {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
/* to make room for the icon, a width needs to be set here */
|
||||||
|
.ui-button-icon-only {
|
||||||
|
width: 2.2em;
|
||||||
|
}
|
||||||
|
/* button elements seem to need a little more width */
|
||||||
|
button.ui-button-icon-only {
|
||||||
|
width: 2.4em;
|
||||||
|
}
|
||||||
|
.ui-button-icons-only {
|
||||||
|
width: 3.4em;
|
||||||
|
}
|
||||||
|
button.ui-button-icons-only {
|
||||||
|
width: 3.7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* button text element */
|
||||||
|
.ui-button .ui-button-text {
|
||||||
|
display: block;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
.ui-button-text-only .ui-button-text {
|
||||||
|
padding: .4em 1em;
|
||||||
|
}
|
||||||
|
.ui-button-icon-only .ui-button-text,
|
||||||
|
.ui-button-icons-only .ui-button-text {
|
||||||
|
padding: .4em;
|
||||||
|
text-indent: -9999999px;
|
||||||
|
}
|
||||||
|
.ui-button-text-icon-primary .ui-button-text,
|
||||||
|
.ui-button-text-icons .ui-button-text {
|
||||||
|
padding: .4em 1em .4em 2.1em;
|
||||||
|
}
|
||||||
|
.ui-button-text-icon-secondary .ui-button-text,
|
||||||
|
.ui-button-text-icons .ui-button-text {
|
||||||
|
padding: .4em 2.1em .4em 1em;
|
||||||
|
}
|
||||||
|
.ui-button-text-icons .ui-button-text {
|
||||||
|
padding-left: 2.1em;
|
||||||
|
padding-right: 2.1em;
|
||||||
|
}
|
||||||
|
/* no icon support for input elements, provide padding by default */
|
||||||
|
input.ui-button {
|
||||||
|
padding: .4em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* button icon element(s) */
|
||||||
|
.ui-button-icon-only .ui-icon,
|
||||||
|
.ui-button-text-icon-primary .ui-icon,
|
||||||
|
.ui-button-text-icon-secondary .ui-icon,
|
||||||
|
.ui-button-text-icons .ui-icon,
|
||||||
|
.ui-button-icons-only .ui-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
.ui-button-icon-only .ui-icon {
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -8px;
|
||||||
|
}
|
||||||
|
.ui-button-text-icon-primary .ui-button-icon-primary,
|
||||||
|
.ui-button-text-icons .ui-button-icon-primary,
|
||||||
|
.ui-button-icons-only .ui-button-icon-primary {
|
||||||
|
left: .5em;
|
||||||
|
}
|
||||||
|
.ui-button-text-icon-secondary .ui-button-icon-secondary,
|
||||||
|
.ui-button-text-icons .ui-button-icon-secondary,
|
||||||
|
.ui-button-icons-only .ui-button-icon-secondary {
|
||||||
|
right: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* button sets */
|
||||||
|
.ui-buttonset {
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
.ui-buttonset .ui-button {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: -.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* workarounds */
|
||||||
|
/* reset extra padding in Firefox, see h5bp.com/l */
|
||||||
|
input.ui-button::-moz-focus-inner,
|
||||||
|
button.ui-button::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker {
|
||||||
|
width: 17em;
|
||||||
|
padding: .2em .2em 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-header {
|
||||||
|
position: relative;
|
||||||
|
padding: .2em 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-prev,
|
||||||
|
.ui-datepicker .ui-datepicker-next {
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
width: 1.8em;
|
||||||
|
height: 1.8em;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-prev-hover,
|
||||||
|
.ui-datepicker .ui-datepicker-next-hover {
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-prev {
|
||||||
|
left: 2px;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-next {
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-prev-hover {
|
||||||
|
left: 1px;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-next-hover {
|
||||||
|
right: 1px;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-prev span,
|
||||||
|
.ui-datepicker .ui-datepicker-next span {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -8px;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-title {
|
||||||
|
margin: 0 2.3em;
|
||||||
|
line-height: 1.8em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-title select {
|
||||||
|
font-size: 1em;
|
||||||
|
margin: 1px 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker select.ui-datepicker-month,
|
||||||
|
.ui-datepicker select.ui-datepicker-year {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
.ui-datepicker table {
|
||||||
|
width: 100%;
|
||||||
|
font-size: .9em;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 0 0 .4em;
|
||||||
|
}
|
||||||
|
.ui-datepicker th {
|
||||||
|
padding: .7em .3em;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker td {
|
||||||
|
border: 0;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
.ui-datepicker td span,
|
||||||
|
.ui-datepicker td a {
|
||||||
|
display: block;
|
||||||
|
padding: .2em;
|
||||||
|
text-align: right;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-buttonpane {
|
||||||
|
background-image: none;
|
||||||
|
margin: .7em 0 0 0;
|
||||||
|
padding: 0 .2em;
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||||
|
float: right;
|
||||||
|
margin: .5em .2em .4em;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: .2em .6em .3em .6em;
|
||||||
|
width: auto;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* with multiple calendars */
|
||||||
|
.ui-datepicker.ui-datepicker-multi {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi .ui-datepicker-group {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi .ui-datepicker-group table {
|
||||||
|
width: 95%;
|
||||||
|
margin: 0 auto .4em;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||||
|
width: 33.3%;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||||
|
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||||
|
border-left-width: 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
.ui-datepicker-row-break {
|
||||||
|
clear: both;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RTL support */
|
||||||
|
.ui-datepicker-rtl {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||||
|
right: 2px;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-next {
|
||||||
|
left: 2px;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||||
|
right: 1px;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||||
|
left: 1px;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||||
|
clear: right;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-group {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||||
|
border-right-width: 0;
|
||||||
|
border-left-width: 1px;
|
||||||
|
}
|
||||||
|
.ui-dialog {
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
padding: .2em;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-titlebar {
|
||||||
|
padding: .4em 1em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-title {
|
||||||
|
float: left;
|
||||||
|
margin: .1em 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 90%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-titlebar-close {
|
||||||
|
position: absolute;
|
||||||
|
right: .3em;
|
||||||
|
top: 50%;
|
||||||
|
width: 20px;
|
||||||
|
margin: -10px 0 0 0;
|
||||||
|
padding: 1px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-content {
|
||||||
|
position: relative;
|
||||||
|
border: 0;
|
||||||
|
padding: .5em 1em;
|
||||||
|
background: none;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-buttonpane {
|
||||||
|
text-align: left;
|
||||||
|
border-width: 1px 0 0 0;
|
||||||
|
background-image: none;
|
||||||
|
margin-top: .5em;
|
||||||
|
padding: .3em 1em .5em .4em;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-dialog-buttonpane button {
|
||||||
|
margin: .5em .4em .5em 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.ui-dialog .ui-resizable-se {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
right: -5px;
|
||||||
|
bottom: -5px;
|
||||||
|
background-position: 16px 16px;
|
||||||
|
}
|
||||||
|
.ui-draggable .ui-dialog-titlebar {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
.ui-menu {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
display: block;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu-item {
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
padding: 3px 1em 3px .4em;
|
||||||
|
cursor: pointer;
|
||||||
|
min-height: 0; /* support: IE7 */
|
||||||
|
/* support: IE10, see #8844 */
|
||||||
|
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu-divider {
|
||||||
|
margin: 5px 0;
|
||||||
|
height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
line-height: 0;
|
||||||
|
border-width: 1px 0 0 0;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-state-focus,
|
||||||
|
.ui-menu .ui-state-active {
|
||||||
|
margin: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* icon support */
|
||||||
|
.ui-menu-icons {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.ui-menu-icons .ui-menu-item {
|
||||||
|
padding-left: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* left-aligned */
|
||||||
|
.ui-menu .ui-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: .2em;
|
||||||
|
margin: auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* right-aligned */
|
||||||
|
.ui-menu .ui-menu-icon {
|
||||||
|
left: auto;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.ui-progressbar {
|
||||||
|
height: 2em;
|
||||||
|
text-align: left;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.ui-progressbar .ui-progressbar-value {
|
||||||
|
margin: -1px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.ui-progressbar .ui-progressbar-overlay {
|
||||||
|
background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
|
||||||
|
height: 100%;
|
||||||
|
filter: alpha(opacity=25); /* support: IE8 */
|
||||||
|
opacity: 0.25;
|
||||||
|
}
|
||||||
|
.ui-progressbar-indeterminate .ui-progressbar-value {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-menu {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-menu .ui-menu {
|
||||||
|
overflow: auto;
|
||||||
|
/* Support: IE7 */
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding-bottom: 1px;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1.5;
|
||||||
|
padding: 2px 0.4em;
|
||||||
|
margin: 0.5em 0 0 0;
|
||||||
|
height: auto;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-open {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-button {
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-button span.ui-icon {
|
||||||
|
right: 0.5em;
|
||||||
|
left: auto;
|
||||||
|
margin-top: -8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
.ui-selectmenu-button span.ui-selectmenu-text {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.4em 2.1em 0.4em 1em;
|
||||||
|
display: block;
|
||||||
|
line-height: 1.4;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.ui-slider {
|
||||||
|
position: relative;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.ui-slider .ui-slider-handle {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
width: 1.2em;
|
||||||
|
height: 1.2em;
|
||||||
|
cursor: default;
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.ui-slider .ui-slider-range {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
font-size: .7em;
|
||||||
|
display: block;
|
||||||
|
border: 0;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* support: IE8 - See #6727 */
|
||||||
|
.ui-slider.ui-state-disabled .ui-slider-handle,
|
||||||
|
.ui-slider.ui-state-disabled .ui-slider-range {
|
||||||
|
filter: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-slider-horizontal {
|
||||||
|
height: .8em;
|
||||||
|
}
|
||||||
|
.ui-slider-horizontal .ui-slider-handle {
|
||||||
|
top: -.3em;
|
||||||
|
margin-left: -.6em;
|
||||||
|
}
|
||||||
|
.ui-slider-horizontal .ui-slider-range {
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.ui-slider-horizontal .ui-slider-range-min {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.ui-slider-horizontal .ui-slider-range-max {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-slider-vertical {
|
||||||
|
width: .8em;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.ui-slider-vertical .ui-slider-handle {
|
||||||
|
left: -.3em;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-bottom: -.6em;
|
||||||
|
}
|
||||||
|
.ui-slider-vertical .ui-slider-range {
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.ui-slider-vertical .ui-slider-range-min {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
.ui-slider-vertical .ui-slider-range-max {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.ui-spinner {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.ui-spinner-input {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
color: inherit;
|
||||||
|
padding: 0;
|
||||||
|
margin: .2em 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: .4em;
|
||||||
|
margin-right: 22px;
|
||||||
|
}
|
||||||
|
.ui-spinner-button {
|
||||||
|
width: 16px;
|
||||||
|
height: 50%;
|
||||||
|
font-size: .5em;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
cursor: default;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
/* more specificity required here to override default borders */
|
||||||
|
.ui-spinner a.ui-spinner-button {
|
||||||
|
border-top: none;
|
||||||
|
border-bottom: none;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
/* vertically center icon */
|
||||||
|
.ui-spinner .ui-icon {
|
||||||
|
position: absolute;
|
||||||
|
margin-top: -8px;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.ui-spinner-up {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.ui-spinner-down {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TR overrides */
|
||||||
|
.ui-spinner .ui-icon-triangle-1-s {
|
||||||
|
/* need to fix icons sprite */
|
||||||
|
background-position: -65px -16px;
|
||||||
|
}
|
||||||
|
.ui-tabs {
|
||||||
|
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||||
|
padding: .2em;
|
||||||
|
}
|
||||||
|
.ui-tabs .ui-tabs-nav {
|
||||||
|
margin: 0;
|
||||||
|
padding: .2em .2em 0;
|
||||||
|
}
|
||||||
|
.ui-tabs .ui-tabs-nav li {
|
||||||
|
list-style: none;
|
||||||
|
float: left;
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
margin: 1px .2em 0 0;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
|
||||||
|
float: left;
|
||||||
|
padding: .5em 1em;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
||||||
|
margin-bottom: -1px;
|
||||||
|
padding-bottom: 1px;
|
||||||
|
}
|
||||||
|
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
|
||||||
|
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
|
||||||
|
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.ui-tabs .ui-tabs-panel {
|
||||||
|
display: block;
|
||||||
|
border-width: 0;
|
||||||
|
padding: 1em 1.4em;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
.ui-tooltip {
|
||||||
|
padding: 8px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 9999;
|
||||||
|
max-width: 300px;
|
||||||
|
-webkit-box-shadow: 0 0 5px #aaa;
|
||||||
|
box-shadow: 0 0 5px #aaa;
|
||||||
|
}
|
||||||
|
body .ui-tooltip {
|
||||||
|
border-width: 2px;
|
||||||
|
}
|
5
jquery-ui-1.11.2/jquery-ui.structure.min.css
vendored
Executable file
410
jquery-ui-1.11.2/jquery-ui.theme.css
vendored
Executable file
|
@ -0,0 +1,410 @@
|
||||||
|
/*!
|
||||||
|
* jQuery UI CSS Framework 1.11.2
|
||||||
|
* http://jqueryui.com
|
||||||
|
*
|
||||||
|
* Copyright 2014 jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://api.jqueryui.com/category/theming/
|
||||||
|
*
|
||||||
|
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=%23444444&bgTextureHeader=highlight_soft&bgImgOpacityHeader=44&borderColorHeader=%23333333&fcHeader=%23ffffff&iconColorHeader=%23ffffff&bgColorContent=%23000000&bgTextureContent=flat&bgImgOpacityContent=25&borderColorContent=%23555555&fcContent=%23ffffff&iconColorContent=%23cccccc&bgColorDefault=%23222222&bgTextureDefault=highlight_soft&bgImgOpacityDefault=35&borderColorDefault=%23444444&fcDefault=%23eeeeee&iconColorDefault=%23cccccc&bgColorHover=%233a3a3a&bgTextureHover=highlight_soft&bgImgOpacityHover=33&borderColorHover=%23d3d3d3&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%23787878&bgTextureActive=highlight_hard&bgImgOpacityActive=20&borderColorActive=%23cccccc&fcActive=%23ffffff&iconColorActive=%23222222&bgColorHighlight=%23eeeeee&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=80&borderColorHighlight=%23cccccc&fcHighlight=%23000000&iconColorHighlight=%234b8e0b&bgColorError=%23ffc73d&bgTextureError=glass&bgImgOpacityError=40&borderColorError=%23ffb73d&fcError=%23111111&iconColorError=%23a83300&bgColorOverlay=%235c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=%23cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Component containers
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-widget {
|
||||||
|
font-family: Verdana,Arial,sans-serif;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
.ui-widget .ui-widget {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
.ui-widget input,
|
||||||
|
.ui-widget select,
|
||||||
|
.ui-widget textarea,
|
||||||
|
.ui-widget button {
|
||||||
|
font-family: Verdana,Arial,sans-serif;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
.ui-widget-content {
|
||||||
|
border: 1px solid #555555;
|
||||||
|
background: #000000 url("images/ui-bg_flat_25_000000_40x100.png") 50% 50% repeat-x;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.ui-widget-content a {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.ui-widget-header {
|
||||||
|
border: 1px solid #333333;
|
||||||
|
background: #444444 url("images/ui-bg_highlight-soft_44_444444_1x100.png") 50% 50% repeat-x;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.ui-widget-header a {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Interaction states
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-state-default,
|
||||||
|
.ui-widget-content .ui-state-default,
|
||||||
|
.ui-widget-header .ui-state-default {
|
||||||
|
border: 1px solid #444444;
|
||||||
|
background: #222222 url("images/ui-bg_highlight-soft_35_222222_1x100.png") 50% 50% repeat-x;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #eeeeee;
|
||||||
|
}
|
||||||
|
.ui-state-default a,
|
||||||
|
.ui-state-default a:link,
|
||||||
|
.ui-state-default a:visited {
|
||||||
|
color: #eeeeee;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.ui-state-hover,
|
||||||
|
.ui-widget-content .ui-state-hover,
|
||||||
|
.ui-widget-header .ui-state-hover,
|
||||||
|
.ui-state-focus,
|
||||||
|
.ui-widget-content .ui-state-focus,
|
||||||
|
.ui-widget-header .ui-state-focus {
|
||||||
|
border: 1px solid #d3d3d3;
|
||||||
|
background: #3a3a3a url("images/ui-bg_highlight-soft_33_3a3a3a_1x100.png") 50% 50% repeat-x;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.ui-state-hover a,
|
||||||
|
.ui-state-hover a:hover,
|
||||||
|
.ui-state-hover a:link,
|
||||||
|
.ui-state-hover a:visited,
|
||||||
|
.ui-state-focus a,
|
||||||
|
.ui-state-focus a:hover,
|
||||||
|
.ui-state-focus a:link,
|
||||||
|
.ui-state-focus a:visited {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.ui-state-active,
|
||||||
|
.ui-widget-content .ui-state-active,
|
||||||
|
.ui-widget-header .ui-state-active {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
background: #787878 url("images/ui-bg_highlight-hard_20_787878_1x100.png") 50% 50% repeat-x;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.ui-state-active a,
|
||||||
|
.ui-state-active a:link,
|
||||||
|
.ui-state-active a:visited {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Interaction Cues
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-state-highlight,
|
||||||
|
.ui-widget-content .ui-state-highlight,
|
||||||
|
.ui-widget-header .ui-state-highlight {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
background: #eeeeee url("images/ui-bg_highlight-soft_80_eeeeee_1x100.png") 50% top repeat-x;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.ui-state-highlight a,
|
||||||
|
.ui-widget-content .ui-state-highlight a,
|
||||||
|
.ui-widget-header .ui-state-highlight a {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.ui-state-error,
|
||||||
|
.ui-widget-content .ui-state-error,
|
||||||
|
.ui-widget-header .ui-state-error {
|
||||||
|
border: 1px solid #ffb73d;
|
||||||
|
background: #ffc73d url("images/ui-bg_glass_40_ffc73d_1x400.png") 50% 50% repeat-x;
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
.ui-state-error a,
|
||||||
|
.ui-widget-content .ui-state-error a,
|
||||||
|
.ui-widget-header .ui-state-error a {
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
.ui-state-error-text,
|
||||||
|
.ui-widget-content .ui-state-error-text,
|
||||||
|
.ui-widget-header .ui-state-error-text {
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
.ui-priority-primary,
|
||||||
|
.ui-widget-content .ui-priority-primary,
|
||||||
|
.ui-widget-header .ui-priority-primary {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.ui-priority-secondary,
|
||||||
|
.ui-widget-content .ui-priority-secondary,
|
||||||
|
.ui-widget-header .ui-priority-secondary {
|
||||||
|
opacity: .7;
|
||||||
|
filter:Alpha(Opacity=70); /* support: IE8 */
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.ui-state-disabled,
|
||||||
|
.ui-widget-content .ui-state-disabled,
|
||||||
|
.ui-widget-header .ui-state-disabled {
|
||||||
|
opacity: .35;
|
||||||
|
filter:Alpha(Opacity=35); /* support: IE8 */
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.ui-state-disabled .ui-icon {
|
||||||
|
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Icons
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* states and images */
|
||||||
|
.ui-icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.ui-icon,
|
||||||
|
.ui-widget-content .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_cccccc_256x240.png");
|
||||||
|
}
|
||||||
|
.ui-widget-header .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_ffffff_256x240.png");
|
||||||
|
}
|
||||||
|
.ui-state-default .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_cccccc_256x240.png");
|
||||||
|
}
|
||||||
|
.ui-state-hover .ui-icon,
|
||||||
|
.ui-state-focus .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_ffffff_256x240.png");
|
||||||
|
}
|
||||||
|
.ui-state-active .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_222222_256x240.png");
|
||||||
|
}
|
||||||
|
.ui-state-highlight .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_4b8e0b_256x240.png");
|
||||||
|
}
|
||||||
|
.ui-state-error .ui-icon,
|
||||||
|
.ui-state-error-text .ui-icon {
|
||||||
|
background-image: url("images/ui-icons_a83300_256x240.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* positioning */
|
||||||
|
.ui-icon-blank { background-position: 16px 16px; }
|
||||||
|
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||||
|
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||||
|
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||||
|
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||||
|
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||||
|
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||||
|
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||||
|
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||||
|
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||||
|
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||||
|
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||||
|
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||||
|
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||||
|
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||||
|
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||||
|
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||||
|
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||||
|
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||||
|
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||||
|
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||||
|
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||||
|
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||||
|
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||||
|
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||||
|
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||||
|
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||||
|
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||||
|
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||||
|
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||||
|
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||||
|
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||||
|
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||||
|
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||||
|
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||||
|
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||||
|
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||||
|
.ui-icon-extlink { background-position: -32px -80px; }
|
||||||
|
.ui-icon-newwin { background-position: -48px -80px; }
|
||||||
|
.ui-icon-refresh { background-position: -64px -80px; }
|
||||||
|
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||||
|
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||||
|
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||||
|
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||||
|
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||||
|
.ui-icon-document { background-position: -32px -96px; }
|
||||||
|
.ui-icon-document-b { background-position: -48px -96px; }
|
||||||
|
.ui-icon-note { background-position: -64px -96px; }
|
||||||
|
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||||
|
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||||
|
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||||
|
.ui-icon-comment { background-position: -128px -96px; }
|
||||||
|
.ui-icon-person { background-position: -144px -96px; }
|
||||||
|
.ui-icon-print { background-position: -160px -96px; }
|
||||||
|
.ui-icon-trash { background-position: -176px -96px; }
|
||||||
|
.ui-icon-locked { background-position: -192px -96px; }
|
||||||
|
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||||
|
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||||
|
.ui-icon-tag { background-position: -240px -96px; }
|
||||||
|
.ui-icon-home { background-position: 0 -112px; }
|
||||||
|
.ui-icon-flag { background-position: -16px -112px; }
|
||||||
|
.ui-icon-calendar { background-position: -32px -112px; }
|
||||||
|
.ui-icon-cart { background-position: -48px -112px; }
|
||||||
|
.ui-icon-pencil { background-position: -64px -112px; }
|
||||||
|
.ui-icon-clock { background-position: -80px -112px; }
|
||||||
|
.ui-icon-disk { background-position: -96px -112px; }
|
||||||
|
.ui-icon-calculator { background-position: -112px -112px; }
|
||||||
|
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||||
|
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||||
|
.ui-icon-search { background-position: -160px -112px; }
|
||||||
|
.ui-icon-wrench { background-position: -176px -112px; }
|
||||||
|
.ui-icon-gear { background-position: -192px -112px; }
|
||||||
|
.ui-icon-heart { background-position: -208px -112px; }
|
||||||
|
.ui-icon-star { background-position: -224px -112px; }
|
||||||
|
.ui-icon-link { background-position: -240px -112px; }
|
||||||
|
.ui-icon-cancel { background-position: 0 -128px; }
|
||||||
|
.ui-icon-plus { background-position: -16px -128px; }
|
||||||
|
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||||
|
.ui-icon-minus { background-position: -48px -128px; }
|
||||||
|
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||||
|
.ui-icon-close { background-position: -80px -128px; }
|
||||||
|
.ui-icon-closethick { background-position: -96px -128px; }
|
||||||
|
.ui-icon-key { background-position: -112px -128px; }
|
||||||
|
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||||
|
.ui-icon-scissors { background-position: -144px -128px; }
|
||||||
|
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||||
|
.ui-icon-copy { background-position: -176px -128px; }
|
||||||
|
.ui-icon-contact { background-position: -192px -128px; }
|
||||||
|
.ui-icon-image { background-position: -208px -128px; }
|
||||||
|
.ui-icon-video { background-position: -224px -128px; }
|
||||||
|
.ui-icon-script { background-position: -240px -128px; }
|
||||||
|
.ui-icon-alert { background-position: 0 -144px; }
|
||||||
|
.ui-icon-info { background-position: -16px -144px; }
|
||||||
|
.ui-icon-notice { background-position: -32px -144px; }
|
||||||
|
.ui-icon-help { background-position: -48px -144px; }
|
||||||
|
.ui-icon-check { background-position: -64px -144px; }
|
||||||
|
.ui-icon-bullet { background-position: -80px -144px; }
|
||||||
|
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||||
|
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||||
|
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||||
|
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||||
|
.ui-icon-play { background-position: 0 -160px; }
|
||||||
|
.ui-icon-pause { background-position: -16px -160px; }
|
||||||
|
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||||
|
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||||
|
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||||
|
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||||
|
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||||
|
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||||
|
.ui-icon-stop { background-position: -96px -160px; }
|
||||||
|
.ui-icon-eject { background-position: -112px -160px; }
|
||||||
|
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||||
|
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||||
|
.ui-icon-power { background-position: 0 -176px; }
|
||||||
|
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||||
|
.ui-icon-signal { background-position: -32px -176px; }
|
||||||
|
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||||
|
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||||
|
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||||
|
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||||
|
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||||
|
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||||
|
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||||
|
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||||
|
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||||
|
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||||
|
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||||
|
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||||
|
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||||
|
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||||
|
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||||
|
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||||
|
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||||
|
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||||
|
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||||
|
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||||
|
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||||
|
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||||
|
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||||
|
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||||
|
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||||
|
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||||
|
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||||
|
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||||
|
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||||
|
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc visuals
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* Corner radius */
|
||||||
|
.ui-corner-all,
|
||||||
|
.ui-corner-top,
|
||||||
|
.ui-corner-left,
|
||||||
|
.ui-corner-tl {
|
||||||
|
border-top-left-radius: 6px;
|
||||||
|
}
|
||||||
|
.ui-corner-all,
|
||||||
|
.ui-corner-top,
|
||||||
|
.ui-corner-right,
|
||||||
|
.ui-corner-tr {
|
||||||
|
border-top-right-radius: 6px;
|
||||||
|
}
|
||||||
|
.ui-corner-all,
|
||||||
|
.ui-corner-bottom,
|
||||||
|
.ui-corner-left,
|
||||||
|
.ui-corner-bl {
|
||||||
|
border-bottom-left-radius: 6px;
|
||||||
|
}
|
||||||
|
.ui-corner-all,
|
||||||
|
.ui-corner-bottom,
|
||||||
|
.ui-corner-right,
|
||||||
|
.ui-corner-br {
|
||||||
|
border-bottom-right-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Overlays */
|
||||||
|
.ui-widget-overlay {
|
||||||
|
background: #5c5c5c url("images/ui-bg_flat_50_5c5c5c_40x100.png") 50% 50% repeat-x;
|
||||||
|
opacity: .8;
|
||||||
|
filter: Alpha(Opacity=80); /* support: IE8 */
|
||||||
|
}
|
||||||
|
.ui-widget-shadow {
|
||||||
|
margin: -7px 0 0 -7px;
|
||||||
|
padding: 7px;
|
||||||
|
background: #cccccc url("images/ui-bg_flat_30_cccccc_40x100.png") 50% 50% repeat-x;
|
||||||
|
opacity: .6;
|
||||||
|
filter: Alpha(Opacity=60); /* support: IE8 */
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
5
jquery-ui-1.11.2/jquery-ui.theme.min.css
vendored
Executable file
1
jquery.touchSwipe.min.js
vendored
Executable file
306
minimal.css
Normal file
|
@ -0,0 +1,306 @@
|
||||||
|
html, body {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: #1C1C1C;
|
||||||
|
color: #D8D8D8;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.nomargin {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
input[type=button], select {
|
||||||
|
background-color: #D8D8D8;
|
||||||
|
color: #1C1C1C;
|
||||||
|
font-family: Futura, Arial;
|
||||||
|
font-size: 14pt;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
width: 90%;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.buttonactive {
|
||||||
|
background-color: #FF9900 !important;
|
||||||
|
color: #DDDDDD !important;
|
||||||
|
}
|
||||||
|
.christmas_active {
|
||||||
|
background-color: #FFB8B8 !important;
|
||||||
|
color: #1C881C !important;
|
||||||
|
}
|
||||||
|
select.queue_select {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12pt !important;
|
||||||
|
height: 1.5em;
|
||||||
|
}
|
||||||
|
select.surpriseme_sel {
|
||||||
|
width: 90%;
|
||||||
|
font-size: 12pt !important;
|
||||||
|
height: 1.5em;
|
||||||
|
}
|
||||||
|
input[type=button].queue_btn {
|
||||||
|
width: 20%;
|
||||||
|
height: 4.0em;
|
||||||
|
font-size: 14pt;
|
||||||
|
}
|
||||||
|
input[type=button].vol_btn {
|
||||||
|
width: 4.0em;
|
||||||
|
height: 1em;
|
||||||
|
font-size: 14pt;
|
||||||
|
}
|
||||||
|
#control input[type=button] {
|
||||||
|
height: 1.5em;
|
||||||
|
font-size: 14pt;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
input[type=button].christmas_btn {
|
||||||
|
width: 73%;
|
||||||
|
}
|
||||||
|
select.christmas_freq {
|
||||||
|
width: 15%;
|
||||||
|
font-size: 14pt !important;
|
||||||
|
}
|
||||||
|
input[type=button].led_btn {
|
||||||
|
width: 42%;
|
||||||
|
height: 2.0em;
|
||||||
|
text-indent: -3px;
|
||||||
|
line-height: 1.0em;
|
||||||
|
}
|
||||||
|
input[type=button].newqueue_btn {
|
||||||
|
width: 5em;
|
||||||
|
height: 2.5em;
|
||||||
|
text-indent: -3px;
|
||||||
|
line-height: 2.0em;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
input[type=button].category_go_btn {
|
||||||
|
width: 2.7em;
|
||||||
|
height: 3.0em;
|
||||||
|
text-indent: -3px;
|
||||||
|
line-height: 1.0em;
|
||||||
|
}
|
||||||
|
input[type=button].clear_search_btn {
|
||||||
|
width: 4.5em;
|
||||||
|
height: 1.5em;
|
||||||
|
text-indent: -3px;
|
||||||
|
}
|
||||||
|
input[type=text].searchtext {
|
||||||
|
width: 60%;
|
||||||
|
background-color: #1E1E1E;
|
||||||
|
color: #D8D8D8;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
}
|
||||||
|
div.mainbody {
|
||||||
|
width: 97%;
|
||||||
|
min-height: 700px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
text-align: center;
|
||||||
|
padding: 4px;
|
||||||
|
color: #D8D8D8;
|
||||||
|
font-family: Futura, Arial;
|
||||||
|
font-size: 18pt;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
div.volume_slider_container {
|
||||||
|
width: 90%;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
margin-top: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
div.volume_label {
|
||||||
|
display: inline-block;
|
||||||
|
width: 10%;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
div.volume_slider {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
width: 85%;
|
||||||
|
}
|
||||||
|
div.category_container {
|
||||||
|
width: 90%;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
div.category_sel {
|
||||||
|
float: left;
|
||||||
|
width: 80%
|
||||||
|
}
|
||||||
|
div.category_go {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
div.playing_contents {
|
||||||
|
width: 85%
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 12pt;
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
div.playing_art {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
width: 90%;
|
||||||
|
padding: 3px;
|
||||||
|
border: 2px solid #D8D8D8;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
}
|
||||||
|
.playing_img {
|
||||||
|
border-radius: 0.5em;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
div.playing_details {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
width: 70%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
span.playing_label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
div.history_contents {
|
||||||
|
width: 85%
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 10pt;
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
div.search_input {
|
||||||
|
width: 85%
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 14pt;
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
div.search_contents {
|
||||||
|
width: 85%
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 10pt;
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
div.lists_contents {
|
||||||
|
width: 85%
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
div.songlist_song_container {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
div.songlist_img_container {
|
||||||
|
width: 3.5em;
|
||||||
|
height: 3.5em;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.songlist_img {
|
||||||
|
width: 3.5em;
|
||||||
|
height: 3.5em;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
}
|
||||||
|
div.songlist_details_container {
|
||||||
|
width: 70%;
|
||||||
|
margin-left: 0.25em;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
hr.songlist {
|
||||||
|
width: 65%;
|
||||||
|
}
|
||||||
|
div.queue_contents {
|
||||||
|
width: 85%
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 10pt;
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.queuehidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.songhighlight {
|
||||||
|
color: #FFA500;
|
||||||
|
background-color: #1C1C1C;
|
||||||
|
}
|
||||||
|
.songwarning {
|
||||||
|
color: #E60000;
|
||||||
|
background-color: #1C1C1C;
|
||||||
|
}
|
||||||
|
.songnotice {
|
||||||
|
color: #0066FF;
|
||||||
|
background-color: #1C1C1C;
|
||||||
|
}
|
||||||
|
.ui-slider {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#skipsong_playing_btn {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
#tabs {
|
||||||
|
padding: 0px;
|
||||||
|
background: none;
|
||||||
|
border-width: 0px;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav {
|
||||||
|
border-color: #D8D8D8;
|
||||||
|
padding-left: 0px;
|
||||||
|
background: transparent;
|
||||||
|
border-width: 0px 0px 1px 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav .ui-state-default {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav .ui-state-active {
|
||||||
|
background: #D8D8D8;
|
||||||
|
border: #D8D8D8;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav .ui-state-default a {
|
||||||
|
color: #D8D8D8;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav .ui-state-active a {
|
||||||
|
color: #1C1C1C;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav li {
|
||||||
|
font-size: 50%;
|
||||||
|
font-family: Futura, Arial;
|
||||||
|
font-weight: bold;
|
||||||
|
top: 0px;
|
||||||
|
margin: 0em;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-panel {
|
||||||
|
color: #D8D8D8;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
460
minimal.js
Normal file
|
@ -0,0 +1,460 @@
|
||||||
|
// Global volume variables. These get pulled from the PHP config by ajax.
|
||||||
|
var maxVolume = 0;
|
||||||
|
var minVolume = 0;
|
||||||
|
var volFromServer = false;
|
||||||
|
var refreshTimerObj;
|
||||||
|
var gettingSongList = false;
|
||||||
|
var gettingJukeboxList = false;
|
||||||
|
var searchTimeout = null;
|
||||||
|
var queueTarget = 0;
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#tabs').tabs({
|
||||||
|
activate: function(event, ui) {
|
||||||
|
if ( ui.newTab.index() == 4 ) { $('#searchbox').val(""); }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getVolumeRange();
|
||||||
|
$('#volume_slider').slider({ animate: "fast", max: maxVolume, min: minVolume, step: 2 });
|
||||||
|
$('#volume_slider').slider({
|
||||||
|
change: function(event, ui) { if ( !volFromServer ) { setVolume(); } volFromServer = false; }
|
||||||
|
});
|
||||||
|
$('#max_btn').click(function() { setSliderVolume(maxVolume); });
|
||||||
|
$('#min_btn').click(function() { setSliderVolume(minVolume); });
|
||||||
|
$('#skipsong_btn').click(function() { skipSong($(this)); });
|
||||||
|
$('#skipsong_playing_btn').click(function() { skipSong($(this)); });
|
||||||
|
$('#dropsong_btn').click(function() { dropSong($(this)); });
|
||||||
|
$('#mute_btn').click(function() { toggleMute($(this)); });
|
||||||
|
$('#mute_playing_btn').click(function() { toggleMute($(this)); });
|
||||||
|
$('#category_go_btn').click(function() { changeQueue(); });
|
||||||
|
$('#surpriseme_btn').click(function() { surpriseMe(); });
|
||||||
|
$('#christmas_btn').click(function() { toggleChristmas($(this)); });
|
||||||
|
$('#emptyjukebox_btn').click(function() { emptyJukebox($(this)); });
|
||||||
|
$('#clearsearch_btn').click(function() { $('#searchbox').val(""); });
|
||||||
|
$('#searchbox').keyup(function() { startSearchTimer(); });
|
||||||
|
$('#christmas_freq').change(function() { changeChristmasFreq($('#christmas_freq').val()); });
|
||||||
|
$('#queuetarget_sel').change(function() { changeQueueTarget(); });
|
||||||
|
$('#newqueue_btn').click(function() { createQueue(); });
|
||||||
|
$('#led_crazy_btn').click(function() { setPattern("crazy"); });
|
||||||
|
$('#led_christmas_btn').click(function() { setPattern("christmas"); });
|
||||||
|
$('#led_julyfourth_btn').click(function() { setPattern("julyfourth"); });
|
||||||
|
$('#led_easter_btn').click(function() { setPattern("easter"); });
|
||||||
|
$('#led_halloween_btn').click(function() { setPattern("halloween"); });
|
||||||
|
$('#led_mellow_btn').click(function() { setPattern("mellow"); });
|
||||||
|
$('#led_crazymellow_btn').click(function() { setPattern("crazymellow"); });
|
||||||
|
$('#led_disableauto_btn').click(function() { disableAuto(); });
|
||||||
|
$('#led_lightsoff_btn').click(function() { lightsOff(); });
|
||||||
|
$('body').swipe({
|
||||||
|
swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
|
||||||
|
if ( (direction != "left") && (direction != "right") ) return false;
|
||||||
|
var tabIndex = $('#tabs').tabs('option', 'active');
|
||||||
|
if ( direction == "right" ) {
|
||||||
|
if ( tabIndex > 0 ) $('#tabs').tabs('option', 'active', tabIndex - 1);
|
||||||
|
$("html, body").animate({ scrollTop: 0}, 200);
|
||||||
|
} else {
|
||||||
|
if ( tabIndex < 4 ) $('#tabs').tabs('option', 'active', tabIndex + 1);
|
||||||
|
$("html, body").animate({ scrollTop: 0}, 200);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
allowPageScroll: "vertical"
|
||||||
|
});
|
||||||
|
updateQueueSelects();
|
||||||
|
getVolume();
|
||||||
|
toggleMute($(this), 'show');
|
||||||
|
getSongList();
|
||||||
|
getQueueTarget();
|
||||||
|
refreshTimerObj = setInterval('getSongList()', 10000);
|
||||||
|
//document.documentElement.requestFullscreen();
|
||||||
|
});
|
||||||
|
|
||||||
|
function startSearchTimer() {
|
||||||
|
if ( searchTimeout != null ) {
|
||||||
|
clearTimeout(searchTimeout);
|
||||||
|
}
|
||||||
|
searchTimeout = setTimeout(executeSearch, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateQueueSelects() {
|
||||||
|
var surprisemeVal = $("#surpriseme_sel").val();
|
||||||
|
var queuetargetVal = $("#queuetarget_sel").val();
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_getqueuelist.php',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
$("#queue_sel").html("<option value='0'>-- All Songs --</option>");
|
||||||
|
$("#surpriseme_sel").html("<option value='0'>-- All Songs --</option>");
|
||||||
|
$("#queuetarget_sel").html("<option value='0'>Jukebox</option>");
|
||||||
|
jQuery.each( data.queues, function(i, val) {
|
||||||
|
$("#queue_sel").append($('<option>', {
|
||||||
|
value: val.id,
|
||||||
|
text: val.name,
|
||||||
|
selected: val.active
|
||||||
|
}));
|
||||||
|
$("#surpriseme_sel").append($('<option>', {
|
||||||
|
value: val.id,
|
||||||
|
text: val.name
|
||||||
|
}));
|
||||||
|
if ( val.type == 'user' ) $("#queuetarget_sel").append($('<option>', {
|
||||||
|
value: val.id,
|
||||||
|
text: val.name
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
$("#surpriseme_sel").val(surprisemeVal);
|
||||||
|
$("#queuetarget_sel").val(data.queuetarget);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createQueue() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_createqueue.php',
|
||||||
|
data: {queuename: $("#newqueue_input").val()},
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
$("#newqueue_input").val("");
|
||||||
|
updateQueueSelects();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeQueueTarget() {
|
||||||
|
var newtarget = $('#queuetarget_sel').val();
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_setqueuetarget.php',
|
||||||
|
data: {queue: newtarget},
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
queueTarget = data;
|
||||||
|
if ( data == 0 ) {
|
||||||
|
$('#queuetab').html('Jukebox');
|
||||||
|
$('#jukebox_contents').removeClass('queuehidden');
|
||||||
|
$('#customq_contents').addClass('queuehidden');
|
||||||
|
} else {
|
||||||
|
$('#queuetab').html('CustomQ');
|
||||||
|
$('#jukebox_contents').addClass('queuehidden');
|
||||||
|
$('#customq_contents').removeClass('queuehidden');
|
||||||
|
getCustomQueueList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getQueueTarget() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_getqueuetarget.php',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
$('#queuetarget_sel').val(data);
|
||||||
|
queueTarget = data;
|
||||||
|
if ( data == 0 ) {
|
||||||
|
$('#queuetab').html('Jukebox');
|
||||||
|
$('#jukebox_contents').removeClass('queuehidden');
|
||||||
|
$('#customq_contents').addClass('queuehidden');
|
||||||
|
} else {
|
||||||
|
$('#queuetab').html('CustomQ');
|
||||||
|
$('#jukebox_contents').addClass('queuehidden');
|
||||||
|
$('#customq_contents').removeClass('queuehidden');
|
||||||
|
getCustomQueueList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleChristmas(callingElement) {
|
||||||
|
callingElement.blur();
|
||||||
|
callingElement.addClass("buttonactive");
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_togglexmas.php',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
callingElement.removeClass("buttonactive");
|
||||||
|
updateChristmasButton(data.christmas);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateChristmasButton(active) {
|
||||||
|
if ( active ) {
|
||||||
|
$('#christmas_btn').val("Christmas: Active");
|
||||||
|
if ( ! $('#christmas_btn').hasClass('christmas_active') ) { $('#christmas_btn').addClass('christmas_active'); }
|
||||||
|
} else {
|
||||||
|
$('#christmas_btn').val("Christmas: Inactive");
|
||||||
|
if ( $('#christmas_btn').hasClass('christmas_active') ) { $('#christmas_btn').removeClass('christmas_active'); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSongList() {
|
||||||
|
gettingSongList = true;
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_listsongs.php',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
if ( data.volume != $('#volume_slider').slider("value") ) {
|
||||||
|
volFromServer = true;
|
||||||
|
$('#volume_slider').slider("value", data.volume);
|
||||||
|
}
|
||||||
|
$('#history_contents').html(data.songlist);
|
||||||
|
$('#playing_contents').html(data.songplaying);
|
||||||
|
updateChristmasButton(data.christmas);
|
||||||
|
updateMuteButton(data.muted);
|
||||||
|
$('#christmas_freq').val(data.christmasfreq);
|
||||||
|
getJukeboxList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeChristmasFreq(newfreq) {
|
||||||
|
if ( gettingSongList == true ) {
|
||||||
|
setTimeout(function() { changeChristmasFreq(newfreq); }, 200);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_setchristmasfreq.php',
|
||||||
|
data: {newfreq: newfreq}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getJukeboxList() {
|
||||||
|
if ( queueTarget == 0 ) {
|
||||||
|
gettingJukeboxList = true;
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_getjukebox.php',
|
||||||
|
dataType: 'html',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
$('#jukebox_contents').html(data);
|
||||||
|
gettingSongList = false;
|
||||||
|
gettingJukeboxList = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
getCustomQueueList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCustomQueueList() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_getcustomq.php',
|
||||||
|
dataType: 'html',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
$('#customq_contents').html(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function executeSearch() {
|
||||||
|
searchTimeout = null;
|
||||||
|
var searchfor = $('#searchbox').val();
|
||||||
|
if ( searchfor.length < 4 ) return false;
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_searchsongs.php',
|
||||||
|
dataType: 'html',
|
||||||
|
data: {searchfor: searchfor},
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
$('#search_contents').html(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeHighlight(elementID) {
|
||||||
|
$(elementID).css("color", "#D8D8D8");
|
||||||
|
$(elementID).css("background-color", "#1C1C1C");
|
||||||
|
}
|
||||||
|
|
||||||
|
function showQueued(elementID) {
|
||||||
|
$(elementID).css("color", "orange");
|
||||||
|
$(elementID).css("background-color", "#1C1C1C");
|
||||||
|
}
|
||||||
|
|
||||||
|
function dropCustomQSong(songid) {
|
||||||
|
var elementID = "#customq_" + songid;
|
||||||
|
$(elementID).css("color", "#1C1C1C");
|
||||||
|
$(elementID).css("background-color", "#D8D8D8");
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_dropcustomqsong.php',
|
||||||
|
data: {songid: songid},
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
getCustomQueueList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function addSongToQueue(songid) {
|
||||||
|
var elementID = "#search_" + songid;
|
||||||
|
$(elementID).css("color", "#1C1C1C");
|
||||||
|
$(elementID).css("background-color", "#D8D8D8");
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_queuesong.php',
|
||||||
|
data: {songid: songid},
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
getJukeboxList();
|
||||||
|
setTimeout(function() { showQueued(elementID); }, 200);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function dropJukeboxSong(id) {
|
||||||
|
if ( gettingJukeboxList || gettingSongList ) return false;
|
||||||
|
var elementID = "#juke_" + id;
|
||||||
|
$(elementID).css("color", "#1C1C1C");
|
||||||
|
$(elementID).css("background-color", "#D8D8D8");
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_dropjukeboxsong.php',
|
||||||
|
data: {id: id},
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
getJukeboxList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getVolumeRange() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_getvolrange.php',
|
||||||
|
async: false,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
maxVolume = data.max;
|
||||||
|
minVolume = data.min;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateMuteButton(muted) {
|
||||||
|
$('#mute_btn').blur();
|
||||||
|
$('#mute_playing_btn').blur();
|
||||||
|
if ( muted ) {
|
||||||
|
$('#mute_btn').prop('value', 'Unmute');
|
||||||
|
$('#mute_playing_btn').prop('value', 'Unmute');
|
||||||
|
} else {
|
||||||
|
$('#mute_btn').prop('value', 'Mute');
|
||||||
|
$('#mute_playing_btn').prop('value', 'Mute');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleMute(callingElement, show) {
|
||||||
|
callingElement.blur();
|
||||||
|
callingElement.addClass("buttonactive");
|
||||||
|
if ( typeof show === 'undefined' ) { show = ""; }
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_togglemute.php',
|
||||||
|
data: {show: show},
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
callingElement.removeClass("buttonactive");
|
||||||
|
updateMuteButton(data.muted);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function skipSong (callingElement) {
|
||||||
|
callingElement.blur();
|
||||||
|
callingElement.addClass("buttonactive");
|
||||||
|
if ( gettingJukeboxList || gettingSongList ) return false;
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_skipsong.php',
|
||||||
|
async: false,
|
||||||
|
success: function (data, stat, jqo) {
|
||||||
|
callingElement.removeClass("buttonactive");
|
||||||
|
getSongList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function emptyJukebox (callingElement) {
|
||||||
|
callingElement.blur();
|
||||||
|
callingElement.addClass("buttonactive");
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_emptyjukebox.php',
|
||||||
|
success: function (data, stat, jqo) {
|
||||||
|
callingElement.removeClass("buttonactive");
|
||||||
|
getJukeboxList();
|
||||||
|
//skipSong();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function dropSong (callingElement) {
|
||||||
|
callingElement.blur();
|
||||||
|
callingElement.addClass("buttonactive");
|
||||||
|
if ( gettingJukeboxList || gettingSongList ) return false;
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_dropsong.php',
|
||||||
|
async: false,
|
||||||
|
success: function (data, stat, jqo) {
|
||||||
|
callingElement.removeClass("buttonactive");
|
||||||
|
getSongList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeQueue () {
|
||||||
|
var qid = $('#queue_sel').val();
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_changequeue.php',
|
||||||
|
data: {newid: qid},
|
||||||
|
async: false,
|
||||||
|
success: function (data, stat, jqo) {
|
||||||
|
getSongList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function surpriseMe () {
|
||||||
|
var qid = $('#surpriseme_sel').val();
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_surpriseme.php',
|
||||||
|
data: {queueid: qid},
|
||||||
|
success: function(data, stat, jqo) {
|
||||||
|
getJukeboxList();
|
||||||
|
// skipSong();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setSliderVolume (value) {
|
||||||
|
$('#volume_slider').slider("value", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setVolume () {
|
||||||
|
volume = $('#volume_slider').slider("value");
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax_setvolume.php',
|
||||||
|
data: {volume: volume},
|
||||||
|
dataType: 'text'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getVolume () {
|
||||||
|
$.ajax({
|
||||||
|
url: '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'
|
||||||
|
});
|
||||||
|
}
|
16
mobile640.css
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
input[type=button].christmas_btn {
|
||||||
|
width: 67%;
|
||||||
|
}
|
||||||
|
select.christmas_freq {
|
||||||
|
width: 20%;
|
||||||
|
font-size: 12pt !important;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
border-radius: 0.75em;
|
||||||
|
}
|
||||||
|
.christmas_active {
|
||||||
|
background-color: #FF8888 !important;
|
||||||
|
}
|
||||||
|
#tabs .ui-tabs-nav li {
|
||||||
|
font-size: 45%;
|
||||||
|
}
|
2
scripts/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
order deny,allow
|
||||||
|
deny from all
|
34
scripts/README.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Scripts and Settings
|
||||||
|
|
||||||
|
This folder contains scripts which are called by the web interface and four for automatic management of music data.
|
||||||
|
|
||||||
|
```
|
||||||
|
******************
|
||||||
|
**** IMPORTANT ***
|
||||||
|
******************
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure the web server obeys .htaccess directives!! We dont' want these executed remotely.
|
||||||
|
|
||||||
|
## INI file:
|
||||||
|
|
||||||
|
homeaudio.ini - This file must be in /etc/. Edit contents according to local configuration. None of the included scripts will work without this file in /etc/.
|
||||||
|
|
||||||
|
## Web accessible system scripts:
|
||||||
|
|
||||||
|
homeaudio_togglemute.pl - This file will toggle system volume to mute and back.
|
||||||
|
|
||||||
|
## Jukebox script:
|
||||||
|
|
||||||
|
homeaudio_music.pl - This script is intended to be run by the Apache user in the background, all the time.
|
||||||
|
|
||||||
|
## System scripts: (intended to be run daily, usually from cron)
|
||||||
|
|
||||||
|
homeaudio_auditqueues.pl - Clean up queues
|
||||||
|
homeaudio_makealpha.pl - Create all the alphabetical based links to albums in /Alphabetical/
|
||||||
|
homeaudio_parsesongs.php - Syncs up the database songs with files on the HD.
|
||||||
|
homeaudio_updateall.sh - Run all three of the above scripts. Useful when you add new songs. Make sure the SCRIPTPATH in this file is correct.
|
||||||
|
|
||||||
|
## Migration script: Intended to be run once. THIS WILL REMOVE USER QUEUES!
|
||||||
|
|
||||||
|
migrateuserqueues.php - This script will attempt to convert user queues from the old DB to the new DB. Edit first! Use with caution.
|
10
scripts/homeaudio.ini
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
DBHOST=localhost
|
||||||
|
DBUSER=dbuser
|
||||||
|
DBPASS=dbpass
|
||||||
|
DBNAME=musicnew
|
||||||
|
MP3DIR=/mp3/
|
||||||
|
ARTDIR=/var/www/htdocs/m/art/
|
||||||
|
CHRISTMASGENRE=Christmas
|
||||||
|
YEARDECADES=1970,1980,1990,2000,2010
|
||||||
|
QUEUESINYEARS=Soundtracks,Lite,TamMusic,Rock,RnB-Rap,Dance - Techno,TamNew
|
||||||
|
SAFETYFILES=Bluegrass/sanitycheck.txt
|
126
scripts/homeaudio_auditqueues.pl
Executable file
|
@ -0,0 +1,126 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use DBI;
|
||||||
|
use DBD::mysql;
|
||||||
|
use Config::INI::Reader;
|
||||||
|
|
||||||
|
sub ltrim { my $s = shift; $s =~ s/^\s+//; return $s };
|
||||||
|
sub rtrim { my $s = shift; $s =~ s/\s+$//; return $s };
|
||||||
|
sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
|
||||||
|
|
||||||
|
my $confcontents = Config::INI::Reader->read_file('/etc/homeaudio.ini');
|
||||||
|
my $Config = $confcontents->{_};
|
||||||
|
|
||||||
|
$dsn = "DBI:mysql:" . $Config->{DBNAME} . ":" . $Config->{DBHOST};
|
||||||
|
$dbh = DBI->connect($dsn, $Config->{DBUSER}, $Config->{DBPASS}, {RaiseError=>1});
|
||||||
|
|
||||||
|
$mp3dir = $Config->{MP3DIR};
|
||||||
|
|
||||||
|
# Check for the existence of SAFETYFILES from the config file before proceeding
|
||||||
|
my @safetyfiles = split(/,/, trim($Config->{SAFETYFILES}));
|
||||||
|
for ( my $i=0; $i<@safetyfiles; $i++ ) {
|
||||||
|
if ( ! -e $Config->{MP3DIR} . $safetyfiles[$i] ) {
|
||||||
|
print "Missing safety file \"$safetyfiles[$i]\"! Exiting...\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the current default list (if there is one);
|
||||||
|
$activelist = "";
|
||||||
|
$sth = $dbh->prepare("SELECT id FROM queues WHERE active='true'");
|
||||||
|
$sth->execute();
|
||||||
|
if ( $sth->rows > 0 ) {
|
||||||
|
@result = $sth->fetchrow_array();
|
||||||
|
}
|
||||||
|
$activelist = $result[0];
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Create the year queues from the list in the config file if they don't already exist
|
||||||
|
# Must be at least one year!!!
|
||||||
|
@years = split(/,/, trim($Config->{YEARDECADES}));
|
||||||
|
for ( my $i=0; $i<@years; $i++ ) {
|
||||||
|
$years[$i] = trim($years[$i]);
|
||||||
|
$sth = $dbh->prepare("INSERT IGNORE INTO queues (name, type) VALUES(?, 'year')");
|
||||||
|
$queuename = $years[$i] . "'s";
|
||||||
|
$sth->execute($queuename);
|
||||||
|
$sth->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
# Populate and prune the "year" queues (i.e. 1990's)
|
||||||
|
# First we get all the "year" queues
|
||||||
|
my %yearqueues; # This will be populated from the database
|
||||||
|
$sth = $dbh->prepare("SELECT id, name FROM queues WHERE type='year'");
|
||||||
|
$sth->execute();
|
||||||
|
while ( @row = $sth->fetchrow_array ) {
|
||||||
|
$yearqueues{$row[0]} = substr($row[1], 0, 4);
|
||||||
|
}
|
||||||
|
$sth->finish();
|
||||||
|
# First we remove any songs which don't have the correct year
|
||||||
|
while ( ($yqid, $year) = each %yearqueues ) {
|
||||||
|
$yearend = $year + 10;
|
||||||
|
$sth = $dbh->prepare("DELETE FROM queuecontents WHERE qid=$yqid AND songid NOT IN (SELECT id FROM songs WHERE year >= $year AND year < $yearend)");
|
||||||
|
$sth->execute();
|
||||||
|
}
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Push any song genres which don't already exist into queues.
|
||||||
|
$sth = $dbh->prepare("INSERT INTO queues (name, type) SELECT DISTINCT(genre) AS genre, 'auto' FROM songs WHERE genre NOT IN (SELECT name FROM queues) AND genre NOT IN (SELECT genre FROM excludes)");
|
||||||
|
$sth->execute();
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Remove any auto queues which don't have corresponding genres in songs.
|
||||||
|
$sth = $dbh->prepare("DELETE FROM queues WHERE name NOT IN (SELECT DISTINCT(genre) FROM songs) AND type='auto'");
|
||||||
|
$sth->execute();
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Now we insert all the songs for each year into the appropriate queue, ignoring duplicates
|
||||||
|
# We want to restrict it to a subset of the queues so we'll make an array of queue IDs for the ones we want.
|
||||||
|
# The config parameter QUEUESINYEARS must have a comma separated list of queue names to include in the years. Must be at least 1!!
|
||||||
|
# First we get the queue names from the config into a database query friendly string for use with "IN"
|
||||||
|
my @dbqueuenames = split(/,/, trim($Config->{QUEUESINYEARS}));
|
||||||
|
my $wantedqueuenames = "";
|
||||||
|
for ( my $i=0; $i<@dbqueuenames; $i++ ) {
|
||||||
|
$wantedqueuenames .= "\"" . trim($dbqueuenames[$i]) . "\",";
|
||||||
|
}
|
||||||
|
$wantedqueuenames = substr($wantedqueuenames, 0, -1);
|
||||||
|
# Then we get the list of IDs based on that friendly string and build a new friendly string for the queue IDs
|
||||||
|
$sth = $dbh->prepare("SELECT id FROM queues WHERE name IN ($wantedqueuenames)");
|
||||||
|
$sth->execute();
|
||||||
|
my $wantedqueuesquery = "";
|
||||||
|
while ( @row = $sth->fetchrow_array ) {
|
||||||
|
$wantedqueuesquery .= $row[0] . ",";
|
||||||
|
}
|
||||||
|
$sth->finish();
|
||||||
|
$wantedqueuesquery = substr($wantedqueuesquery, 0, -1);
|
||||||
|
while ( ($yqid, $year) = each %yearqueues ) {
|
||||||
|
$yearend = $year + 10;
|
||||||
|
$sth = $dbh->prepare("INSERT IGNORE INTO queuecontents (qid, songid) SELECT $yqid, s.id FROM queuecontents AS qc LEFT JOIN songs AS s on qc.songid=s.id WHERE qc.qid IN ($wantedqueuesquery) AND year >= $year AND year < $yearend");
|
||||||
|
$sth->execute();
|
||||||
|
}
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Add any missing songs from distinct genres into the appropriate queue.
|
||||||
|
$sth = $dbh->prepare("INSERT IGNORE INTO queuecontents (qid, songid, timesplayed) SELECT q.id, s.id, 0 FROM songs AS s LEFT JOIN queues AS q ON s.genre=q.name WHERE q.id IS NOT NULL");
|
||||||
|
$sth->execute();
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Remove any queue contents for which the song is missing.
|
||||||
|
$sth = $dbh->prepare("DELETE FROM queuecontents WHERE songid NOT IN (SELECT id FROM songs)");
|
||||||
|
$sth->execute();
|
||||||
|
$sth->finish();
|
||||||
|
|
||||||
|
# Since it is possible for the active queue to have been removed (unlikely)
|
||||||
|
# the lowest indexed queue ID will be made active if no queue is active.
|
||||||
|
$sth = $dbh->prepare("SELECT id FROM queues WHERE active='true'");
|
||||||
|
$sth->execute();
|
||||||
|
if ( $sth->rows == 0 ) {
|
||||||
|
$sth = $dbh->prepare("SELECT MIN(id) FROM queues");
|
||||||
|
$sth->execute();
|
||||||
|
@result = $sth->fetchrow_array();
|
||||||
|
$sth = $dbh->prepare("UPDATE queues SET active='true' WHERE id=?");
|
||||||
|
$sth->execute($result[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Close the DB connection
|
||||||
|
$sth->finish();
|
||||||
|
$dbh->disconnect();
|
45
scripts/homeaudio_makealpha.pl
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use DBI;
|
||||||
|
use DBD::mysql;
|
||||||
|
use File::Path;
|
||||||
|
use Config::INI::Reader;
|
||||||
|
|
||||||
|
my $confcontents = Config::INI::Reader->read_file('/etc/homeaudio.ini');
|
||||||
|
my $Config = $confcontents->{_};
|
||||||
|
|
||||||
|
$dsn = "DBI:mysql:" . $Config->{DBNAME} . ":" . $Config->{DBHOST};
|
||||||
|
$dbh = DBI->connect($dsn, $Config->{DBUSER}, $Config->{DBPASS}, {RaiseError=>1});
|
||||||
|
|
||||||
|
$mp3dir = $Config->{MP3DIR};
|
||||||
|
$alphabetdir = $mp3dir . "Alphabetical/";
|
||||||
|
|
||||||
|
# Remove all of the soft links in the Alphabetical folder
|
||||||
|
opendir(DIR, $alphabetdir);
|
||||||
|
@alphadirs = grep { !/^\./ } readdir(DIR);
|
||||||
|
closedir DIR;
|
||||||
|
foreach $dir (@alphadirs) {
|
||||||
|
rmtree($alphabetdir . $dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Parse the "albums" based on path from the DB
|
||||||
|
$sth = $dbh->prepare("SELECT SUBSTRING(path, LENGTH(genre)+2, LENGTH(path)-LENGTH(genre)-2) AS albumdir, genre FROM songs WHERE genre NOT IN (SELECT genre FROM excludes) AND path <> CONCAT(genre, '/') GROUP BY albumdir ORDER BY albumdir");
|
||||||
|
$sth->execute();
|
||||||
|
|
||||||
|
# Let's walk through the album list returned from the DB
|
||||||
|
while ( @row = $sth->fetchrow_array() ) {
|
||||||
|
$album = $row[0];
|
||||||
|
$firstchar = substr($album, 0, 1);
|
||||||
|
$genre = $row[1];
|
||||||
|
$currentpath = $alphabetdir . $firstchar . "/";
|
||||||
|
$target = "../../" . $genre . "/" . $album;
|
||||||
|
unless ( -e $currentpath ) {
|
||||||
|
mkdir $currentpath;
|
||||||
|
}
|
||||||
|
$newfile = $currentpath . $album;
|
||||||
|
symlink($target, $newfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sth->finish();
|
||||||
|
# Close the DB connection
|
||||||
|
$dbh->disconnect();
|
196
scripts/homeaudio_music.pl
Executable file
|
@ -0,0 +1,196 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
my $debug = 0; # Set to 1 to put the script in debug mode
|
||||||
|
|
||||||
|
use POSIX;
|
||||||
|
use DBI;
|
||||||
|
use DBD::mysql;
|
||||||
|
use Config::INI::Reader;
|
||||||
|
|
||||||
|
my $confcontents = Config::INI::Reader->read_file('/etc/homeaudio.ini');
|
||||||
|
my $Config = $confcontents->{_};
|
||||||
|
|
||||||
|
$dsn = "DBI:mysql:" . $Config->{DBNAME} . ":" . $Config->{DBHOST};
|
||||||
|
$dbh = DBI->connect($dsn, $Config->{DBUSER}, $Config->{DBPASS}, {RaiseError=>1});
|
||||||
|
|
||||||
|
sub getNextSong() {
|
||||||
|
# Set up our variables
|
||||||
|
my $songid = 0;
|
||||||
|
my $song = "";
|
||||||
|
my $qid = 0;
|
||||||
|
|
||||||
|
# If Christmas is active we should always make sure that a
|
||||||
|
# Christmas song has played within the last frequency interval.
|
||||||
|
$sth = $dbh->prepare("SELECT value FROM settings WHERE parameter='CHRISTMAS'");
|
||||||
|
$sth->execute();
|
||||||
|
@row = $sth->fetchrow_array();
|
||||||
|
$sth->finish();
|
||||||
|
$christmasactive = $row[0] eq "true" ? 1 : 0;
|
||||||
|
$forcechristmas = 0;
|
||||||
|
if ( $christmasactive ) {
|
||||||
|
if ( $debug ) { print "Christmas is active.\n"; }
|
||||||
|
$sth = $dbh->prepare("SELECT value FROM settings WHERE parameter='CHRISTMASFREQ'");
|
||||||
|
$sth->execute();
|
||||||
|
@row = $sth->fetchrow_array();
|
||||||
|
my $christmasfreq = $row[0];
|
||||||
|
$sth->finish();
|
||||||
|
if ( $debug ) { print "Christmas frequency is (${christmasfreq}). Checking if Christmas song was played recently.\n"; }
|
||||||
|
$sth = $dbh->prepare("SELECT COUNT(songid) FROM (SELECT songid FROM recently ORDER BY timeplayed DESC LIMIT ?) AS counter LEFT JOIN songs ON songid=id WHERE genre=?");
|
||||||
|
$sth->execute($christmasfreq - 1, $Config->{CHRISTMASGENRE});
|
||||||
|
@row = $sth->fetchrow_array();
|
||||||
|
$sth->finish();
|
||||||
|
if ( $row[0] == 0 ) {
|
||||||
|
$forcechristmas = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( $forcechristmas ) {
|
||||||
|
if ( $debug ) { print "No Christmas songs found in the last ${christmasfreq}. Forcing one to play.\n"; }
|
||||||
|
$queueselect = "SELECT id FROM queues WHERE name='" . $Config->{CHRISTMASGENRE} . "'";
|
||||||
|
$sth_first = $dbh->prepare("SELECT qid, songid, CONCAT(path, song) FROM queuecontents AS qc LEFT JOIN songs ON songid=id WHERE qc.timesplayed=0 AND qid=(${queueselect}) ORDER BY RAND() LIMIT 1");
|
||||||
|
$sth_first->execute();
|
||||||
|
$numsongs = $sth_first->rows;
|
||||||
|
if ( $sth_first->rows == 0 ) {
|
||||||
|
$sth = $dbh->prepare("UPDATE queuecontents SET timesplayed=0 WHERE qid=(${queueselect})");
|
||||||
|
$sth->execute();
|
||||||
|
$sth->finish();
|
||||||
|
$sth_second = $dbh->prepare("SELECT qid, songid, CONCAT(path, song) FROM queuecontents AS qc LEFT JOIN songs ON songid=id WHERE qc.timesplayed=0 AND qid=(${queueselect}) ORDER BY RAND() LIMIT 1");
|
||||||
|
$sth_second->execute();
|
||||||
|
if ( $sth->rows == 1 ) {
|
||||||
|
@row = $sth_second->fetchrow_array();
|
||||||
|
$qid = $row[0];
|
||||||
|
$songid = $row[1];
|
||||||
|
$song = $row[2];
|
||||||
|
}
|
||||||
|
$sth_second->finish();
|
||||||
|
} else {
|
||||||
|
@row = $sth_first->fetchrow_array();
|
||||||
|
$sth_first->finish();
|
||||||
|
$qid = $row[0];
|
||||||
|
$songid = $row[1];
|
||||||
|
$song = $row[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Only try to pull from the instantq if we don't have a song yet
|
||||||
|
if ( $songid == 0 ) {
|
||||||
|
# if there is anything in the instantq, get the list of songs
|
||||||
|
# (sorted by "id"), delete the most recent one and return
|
||||||
|
# the full path to the song
|
||||||
|
my $sth = $dbh->prepare("SELECT instantq.id, songid, CONCAT(path, song) AS songpath FROM instantq LEFT JOIN songs ON songid=songs.id ORDER BY id");
|
||||||
|
$sth->execute();
|
||||||
|
if ( $sth->rows > 0 ) {
|
||||||
|
@result = $sth->fetchrow_array();
|
||||||
|
$sth->finish();
|
||||||
|
$id = $result[0];
|
||||||
|
$songid = $result[1];
|
||||||
|
$songpath = $result[2];
|
||||||
|
$dbh->do("DELETE FROM instantq WHERE id=$id");
|
||||||
|
$sth->finish();
|
||||||
|
return ($songid, $songpath);
|
||||||
|
}
|
||||||
|
$sth->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
# Only try to grab the next song in the active queue if we don't have a song yet
|
||||||
|
if ( $songid == 0 ) {
|
||||||
|
# We wouldn't be here if there was anything in the instant queue
|
||||||
|
# so let's find out the default queue and randomly select a song
|
||||||
|
# from that queue which is in the group of lowest "timesplayed".
|
||||||
|
# Basically, when a song in a queue is played by the autoplayer
|
||||||
|
# its "timesplayed" is incremented. Each queue should have "timesplayed"
|
||||||
|
# values of only two distinct numbers since each queue starts at 0 (zero),
|
||||||
|
# gets incremented only when autoplayed, and won't get autoplayed again
|
||||||
|
# until after all other lower number "timesplayed" have been played.
|
||||||
|
if ( $debug ) { print "Trying to pull a song from the active queue.\n"; }
|
||||||
|
$queueselect = "SELECT id FROM queues WHERE active='true'";
|
||||||
|
$sth_first = $dbh->prepare("SELECT qid, songid, CONCAT(path, song) FROM queuecontents AS qc LEFT JOIN songs ON songid=id WHERE qc.timesplayed=0 AND qid=(${queueselect}) ORDER BY RAND() LIMIT 1");
|
||||||
|
$sth_first->execute();
|
||||||
|
$numsongs = $sth->rows;
|
||||||
|
# if there are no songs returned then reset the played count to zero and try again
|
||||||
|
if ( $sth_first->rows == 0 ) {
|
||||||
|
if ( $debug ) { print "Found no songs. Resetting timesplayed and trying again.\n"; }
|
||||||
|
$sth = $dbh->prepare("UPDATE queuecontents SET timesplayed=0 WHERE qid=(${queueselect})");
|
||||||
|
$sth->execute();
|
||||||
|
$sth->finish();
|
||||||
|
$sth_second = $dbh->prepare("SELECT qid, songid, CONCAT(path, song) FROM queuecontents AS qc LEFT JOIN songs ON songid=id WHERE qc.timesplayed=0 AND qid=(${queueselect}) ORDER BY RAND() LIMIT 1");
|
||||||
|
$sth_second->execute();
|
||||||
|
if ( $sth_second->rows == 0 ) {
|
||||||
|
if ( $debug ) { print "Found no songs after resetting timesplayed. Queue must be empty. Returning empty song.\n"; }
|
||||||
|
return (0, "");
|
||||||
|
}
|
||||||
|
@result = $sth_second->fetchrow_array();
|
||||||
|
$sth_second->finish();
|
||||||
|
} else {
|
||||||
|
@result = $sth_first->fetchrow_array();
|
||||||
|
$sth_first->finish();
|
||||||
|
}
|
||||||
|
$qid = $result[0];
|
||||||
|
$songid = $result[1];
|
||||||
|
$song = $result[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
# Increment the timesplayed for this song if a song was found
|
||||||
|
$sound = `/usr/bin/amixer sget Master`;
|
||||||
|
@mixer = split(/\n/, $sound);
|
||||||
|
$muted = 1;
|
||||||
|
if ( index($mixer[@mixer-1], "[on]") > 0 ) { $muted = 0; }
|
||||||
|
if ( ($muted == 0) && ($songid > 0) ) {
|
||||||
|
$sth = $dbh->prepare("UPDATE queuecontents SET timesplayed=1 WHERE qid=? AND songid=?");
|
||||||
|
$sth->execute($qid, $songid);
|
||||||
|
$sth->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
# return the song ID and the relative path
|
||||||
|
return ($songid, $song);
|
||||||
|
}
|
||||||
|
|
||||||
|
while ( 1 ) {
|
||||||
|
if ( -e "/tmp/homeaudio.stop" ) {
|
||||||
|
sleep 10;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
my ($songid, $song) = getNextSong();
|
||||||
|
# if the song is blank, sleep for 60 seconds and try again
|
||||||
|
# the song might be blank if the active queue is empty
|
||||||
|
# or there is no active queue and the instantq is empty
|
||||||
|
# or the song that was found in the DB doesn't exist on
|
||||||
|
# the hard drive
|
||||||
|
if ( $song eq "" ) {
|
||||||
|
if ( $debug ) { print "Found no songs to play. Sleeping for 60 seconds.\n"; }
|
||||||
|
sleep 60;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
$songcmd = $Config->{MP3DIR} . $song;
|
||||||
|
$songcmd =~ s/ /\\ /g;
|
||||||
|
$songcmd =~ s/&/\\&/g;
|
||||||
|
$songcmd =~ s/\(/\\\(/g;
|
||||||
|
$songcmd =~ s/\)/\\\)/g;
|
||||||
|
$songcmd =~ s/\[/\\\[/g;
|
||||||
|
$songcmd =~ s/\]/\\\]/g;
|
||||||
|
$songcmd =~ s/'/\\'/g;
|
||||||
|
$songcmd =~ s/"/\\"/g;
|
||||||
|
$songcmd =~ s/\$/\\\$/g;
|
||||||
|
$songdb = $song;
|
||||||
|
$songdb =~ s/'/\\'/g;
|
||||||
|
$sth = $dbh->prepare("INSERT INTO recently (songid, timeplayed) VALUES(?, NOW())");
|
||||||
|
$sth->execute($songid);
|
||||||
|
$sth->finish();
|
||||||
|
$sth = $dbh->prepare("SELECT timeplayed FROM recently ORDER BY timeplayed DESC limit 1 OFFSET 1000");
|
||||||
|
$sth->execute();
|
||||||
|
if ( $sth->rows == 1 ) {
|
||||||
|
@row = $sth->fetchrow_array();
|
||||||
|
$sth->finish();
|
||||||
|
$sth = $dbh->prepare("DELETE FROM recently WHERE timeplayed <= ?");
|
||||||
|
$sth->execute($row[0]);
|
||||||
|
}
|
||||||
|
$sth->finish();
|
||||||
|
$songcmd = "/usr/bin/mpg321 -q " . $songcmd;
|
||||||
|
if ( $debug ) {
|
||||||
|
print("Next: " . $songcmd . "\n"); $dbh->disconnect(); exit();
|
||||||
|
} else {
|
||||||
|
system($songcmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Close the DB connection
|
||||||
|
$dbh->disconnect();
|
163
scripts/homeaudio_parsesongs.php
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'getid3/getid3.php';
|
||||||
|
|
||||||
|
$ini = parse_ini_file("/etc/homeaudio.ini");
|
||||||
|
|
||||||
|
define("MP3ROOTDIR", $ini['MP3DIR']);
|
||||||
|
define("ARTDIR", $ini['ARTDIR']);
|
||||||
|
define("SONGSTABLE", "songs");
|
||||||
|
|
||||||
|
$globaldbh = new PDO("mysql:host={$ini['DBHOST']};dbname={$ini['DBNAME']}", $ini['DBUSER'], $ini['DBPASS']);
|
||||||
|
$ignoredirs = array();
|
||||||
|
$ignoredirs[] = "Album Playlists";
|
||||||
|
$ignoredirs[] = "Alphabetical";
|
||||||
|
$ignoredirs[] = "Incoming2";
|
||||||
|
$ignoredirs[] = "Recent";
|
||||||
|
$ignoredirs[] = "Recent (1-2 Months)";
|
||||||
|
$ignoredirs[] = "Recent (2-3 Months)";
|
||||||
|
$ignoredirs[] = "playlists";
|
||||||
|
|
||||||
|
$extbymimetypes = array(
|
||||||
|
'image/jpg' => 'jpg',
|
||||||
|
'image/jpeg' => 'jpg',
|
||||||
|
'image/png' => 'png',
|
||||||
|
'image/gif' => 'gif'
|
||||||
|
);
|
||||||
|
|
||||||
|
function pruneDB() {
|
||||||
|
global $globaldbh;
|
||||||
|
$query = "SELECT id, path, song FROM " . SONGSTABLE . " ORDER BY path, song";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$querydel = "DELETE FROM " . SONGSTABLE . " WHERE id=:id";
|
||||||
|
$sthdel = $globaldbh->prepare($querydel);
|
||||||
|
$count = 0;
|
||||||
|
$prunecount = 0;
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$count++;
|
||||||
|
if ( ($count % 1000) == 0 ) echo ".";
|
||||||
|
if ( !file_exists(MP3ROOTDIR . $row['path'] . $row['song']) ) {
|
||||||
|
$fieldsdel = array();
|
||||||
|
$fieldsdel[':id'] = $row['id'];
|
||||||
|
$sthdel->execute($fieldsdel);
|
||||||
|
$prunecount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $prunecount;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addNewSongs($path = "") {
|
||||||
|
global $ignoredirs, $sth_exists, $sth_addnew, $newcount;
|
||||||
|
$fh = opendir(MP3ROOTDIR . $path);
|
||||||
|
while ( false !== ($entry = readdir($fh)) ) {
|
||||||
|
if ( in_array($entry, $ignoredirs) ) continue;
|
||||||
|
if ( ($entry == ".") || ($entry == "..") ) continue;
|
||||||
|
if ( is_dir(MP3ROOTDIR . $path . $entry) ) {
|
||||||
|
addNewSongs($path . $entry . "/");
|
||||||
|
} else {
|
||||||
|
if ( substr($entry, -3) != "mp3" ) continue;
|
||||||
|
$song = $path . $entry;
|
||||||
|
$fields = array();
|
||||||
|
$fields[':path'] = $path;
|
||||||
|
$fields[':song'] = $entry;
|
||||||
|
$sth_exists->execute($fields);
|
||||||
|
if ( $sth_exists->fetchColumn() == 0 ) {
|
||||||
|
$newcount++;
|
||||||
|
if ( ($newcount % 1000) == 0 ) echo ".";
|
||||||
|
$sth_addnew->execute($fields);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($fh);
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseSongs() {
|
||||||
|
global $globaldbh, $extbymimetypes;
|
||||||
|
$parsecount = 0;
|
||||||
|
$query = "SELECT id, path, song FROM " . SONGSTABLE . " WHERE parsed='false'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$query_info = "UPDATE " . SONGSTABLE . " SET genre=:genre, title=:title, artist=:artist, album=:album, year=:year, length=:length, artfile=:artfile, parsed='true' WHERE id=:id";
|
||||||
|
$sth_info = $globaldbh->prepare($query_info);
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$fields = array();
|
||||||
|
$fields[':id'] = $row['id'];
|
||||||
|
list($fields[':genre'], $junk) = explode("/", $row['path'], 2);
|
||||||
|
$getid3 = new getID3;
|
||||||
|
$info = $getid3->analyze(MP3ROOTDIR . $row['path'] . $row['song']);
|
||||||
|
if ( isset($info['id3v2']['comments']['title'][0]) ) {
|
||||||
|
$fields[':title'] = $info['id3v2']['comments']['title'][0];
|
||||||
|
}
|
||||||
|
if ( !isset($fields[':title']) || ($fields[':title'] == "") ) {
|
||||||
|
@list($junk, $fields[':title']) = explode(" - ", substr($row['song'], 0, -4), 2);
|
||||||
|
}
|
||||||
|
if ( isset($info['id3v2']['comments']['artist'][0]) ) {
|
||||||
|
$fields[':artist'] = $info['id3v2']['comments']['artist'][0];
|
||||||
|
}
|
||||||
|
if ( !isset($fields[':artist']) || ($fields[':artist'] == "") ) {
|
||||||
|
@list($fields[':artist'], $junk) = explode(" - ", basename($row['path']), 2);
|
||||||
|
}
|
||||||
|
if ( isset($info['id3v2']['comments']['album'][0]) ) {
|
||||||
|
$fields[':album'] = $info['id3v2']['comments']['album'][0];
|
||||||
|
}
|
||||||
|
if ( !isset($fields[':album']) || ($fields[':album'] == "") ) {
|
||||||
|
@list($junk, $fields[':album']) = explode(" - ", basename($row['path']), 2);
|
||||||
|
}
|
||||||
|
if ( isset($info['id3v2']['comments']['year'][0]) ) {
|
||||||
|
$fields[':year'] = $info['id3v2']['comments']['year'][0];
|
||||||
|
}
|
||||||
|
if ( !isset($fields[':year']) ) $fields[':year'] = "";
|
||||||
|
@list($min, $sec) = explode(":", $info['playtime_string'], 2);
|
||||||
|
$fields[':length'] = (intval($min) * 60) + intval($sec);
|
||||||
|
$fields[':artfile'] = "";
|
||||||
|
if ( isset($info['comments']['picture'][0]['data']) && !is_null($info['comments']['picture'][0]['data']) ) {
|
||||||
|
$artmd5 = md5($info['comments']['picture'][0]['data']);
|
||||||
|
$mimetype = $info['comments']['picture'][0]['image_mime'];
|
||||||
|
if ( array_key_exists($mimetype, $extbymimetypes) ) {
|
||||||
|
$fields[':artfile'] = $artmd5 . "." . $extbymimetypes[$mimetype];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( ($fields[':artfile'] != "") && !file_exists(ARTDIR . $fields[':artfile']) ) {
|
||||||
|
file_put_contents(ARTDIR . $fields[':artfile'], $info['comments']['picture'][0]['data']);
|
||||||
|
}
|
||||||
|
$parsecount++;
|
||||||
|
if ( ($parsecount % 1000) == 0 ) echo ".";
|
||||||
|
$sth_info->execute($fields);
|
||||||
|
}
|
||||||
|
return $parsecount;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !file_exists(ARTDIR) ) {
|
||||||
|
echo "The album art folder doesn't exist. Let's try to creat it...";
|
||||||
|
$didmake = mkdir(ARTDIR, 0775, true);
|
||||||
|
if ( !$didmake ) {
|
||||||
|
echo "Oops!! Failed. Check path and perms.\n";
|
||||||
|
exit();
|
||||||
|
} else {
|
||||||
|
echo "success!\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Pruning DB of missing files...";
|
||||||
|
$prunecount = pruneDB();
|
||||||
|
echo " ", $prunecount, " songs pruned.\n";
|
||||||
|
|
||||||
|
//
|
||||||
|
// We are prepping the DB statements here since the addNewSongs() function
|
||||||
|
// is recursive. We don't want to make a TON of statements and be a hog.
|
||||||
|
//
|
||||||
|
$query = "SELECT COUNT(*) FROM " . SONGSTABLE . " WHERE path=:path AND song=:song";
|
||||||
|
$sth_exists = $globaldbh->prepare($query);
|
||||||
|
$query = "INSERT INTO " . SONGSTABLE . " (path, song) VALUES(:path, :song)";
|
||||||
|
$sth_addnew = $globaldbh->prepare($query);
|
||||||
|
$newcount = 0;
|
||||||
|
echo "Adding new songs to DB...";
|
||||||
|
addNewSongs();
|
||||||
|
echo " ", $newcount, " songs added.\n";
|
||||||
|
|
||||||
|
echo "Parsing ID3 tags...";
|
||||||
|
$parsecount = parseSongs();
|
||||||
|
echo " ", $parsecount, " tags parsed.\n";
|
||||||
|
|
||||||
|
?>
|
49
scripts/homeaudio_togglemute.pl
Executable file
|
@ -0,0 +1,49 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use Time::HiRes qw(usleep);
|
||||||
|
sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
|
||||||
|
|
||||||
|
$maxvolume = 32768;
|
||||||
|
|
||||||
|
if ( $ARGV[0] eq "-show" ) {
|
||||||
|
$showmute = 1;
|
||||||
|
} else {
|
||||||
|
$showmute = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sound = `/usr/bin/amixer sget Master`;
|
||||||
|
$mute = trim(`/usr/bin/amixer sget Master | grep "Front Left:" | awk '{print \$6}'`);
|
||||||
|
$curvol = int(`cat /tmp/curvol`);
|
||||||
|
$stepval = int($maxvolume * 0.1);
|
||||||
|
@mixer = split(/\n/, $sound);
|
||||||
|
#if ( index($mixer[@mixer-1], "[on]") > 0 ) {
|
||||||
|
if ( $mute eq "[on]" ) {
|
||||||
|
if ( $showmute ) {
|
||||||
|
exit 0;
|
||||||
|
} else {
|
||||||
|
$newvol = 0;
|
||||||
|
for ( $i=$curvol; $i>=0; $i-=$stepval ) {
|
||||||
|
usleep(65*1000);
|
||||||
|
if ( $i < 0 ) { $newvol = 0; } else { $newvol = $i; }
|
||||||
|
system("/usr/bin/amixer -q sset Master $newvol");
|
||||||
|
}
|
||||||
|
if ( $newvol != 0 ) { system("/usr/bin/amixer -q sset Master 0"); }
|
||||||
|
system("/usr/bin/amixer -q sset Master mute");
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ( $showmute ) {
|
||||||
|
exit 1;
|
||||||
|
} else {
|
||||||
|
system("/usr/bin/amixer -q sset Master 0");
|
||||||
|
system("/usr/bin/amixer -q sset Master unmute");
|
||||||
|
$newvol = 0;
|
||||||
|
for ( $i=$stepval; $i<=$curvol; $i+=$stepval ) {
|
||||||
|
usleep(65*1000);
|
||||||
|
$newvol = $i;
|
||||||
|
system("/usr/bin/amixer -q sset Master $i");
|
||||||
|
}
|
||||||
|
if ( $newvol != $curvol ) { system("/usr/bin/amixer -q sset Master $curvol"); }
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
}
|
7
scripts/homeaudio_updateall.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPTPATH=/var/www/htdocs/m/scripts/
|
||||||
|
|
||||||
|
${SCRIPTPATH}homeaudio_auditqueues.pl
|
||||||
|
${SCRIPTPATH}homeaudio_makealpha.pl
|
||||||
|
php ${SCRIPTPATH}homeaudio_parsesongs.php
|
100
scripts/migrateuserqueues.php
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( !file_exists("/etc/homeaudio.ini") ) {
|
||||||
|
echo "Error: /etc/homeaudio.ini not found!\n\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( false === ($config = parse_ini_file("/etc/homeaudio.ini")) ) {
|
||||||
|
echo "Error: Could not parse /etc/homeaudio.ini!\n\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// These two constants define the tables used from the old database
|
||||||
|
define("OLDSONGSTABLE", "music.songs");
|
||||||
|
define("OLDQUEUESTABLE", "music.queues");
|
||||||
|
|
||||||
|
// These three constants define the tables used from the new database
|
||||||
|
define("SONGSTABLE", "musicnew.songs");
|
||||||
|
define("NEWQUEUESTABLE", "musicnew.queues");
|
||||||
|
define("QUEUECONTENTSTABLE", "musicnew.queuecontents");
|
||||||
|
|
||||||
|
define("MP3ROOTDIR", $config['MP3DIR']);
|
||||||
|
define("ARTDIR", $config['ARTDIR']);
|
||||||
|
|
||||||
|
$globaldbh = new PDO("mysql:host=localhost;dbname=" . $config['DBNAME'], $config['DBUSER'], $config['DBPASS']);
|
||||||
|
$ignoredirs = array();
|
||||||
|
$ignoredirs[] = "Album Playlists";
|
||||||
|
$ignoredirs[] = "Alphabetical";
|
||||||
|
$ignoredirs[] = "Incoming2";
|
||||||
|
$ignoredirs[] = "Recent";
|
||||||
|
$ignoredirs[] = "Recent (1-2 Months)";
|
||||||
|
$ignoredirs[] = "Recent (2-3 Months)";
|
||||||
|
$ignoredirs[] = "playlists";
|
||||||
|
|
||||||
|
$extbymimetypes = array(
|
||||||
|
'image/bmp' => 'bmp',
|
||||||
|
'image/jpeg' => 'jpg',
|
||||||
|
'image/png' => 'png',
|
||||||
|
'image/gif' => 'gif'
|
||||||
|
);
|
||||||
|
|
||||||
|
function convertQueues() {
|
||||||
|
global $globaldbh;
|
||||||
|
$query = "DELETE FROM " . NEWQUEUESTABLE . " WHERE type='user'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$query = "INSERT INTO " . NEWQUEUESTABLE . " (name) SELECT qname FROM " . OLDQUEUESTABLE . " WHERE qtype='user'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertQueueContents() {
|
||||||
|
global $globaldbh;
|
||||||
|
$totalcount = 0;
|
||||||
|
$convertedcount = 0;
|
||||||
|
$queues = array();
|
||||||
|
$query = "DELETE " . QUEUECONTENTSTABLE . " FROM " . QUEUECONTENTSTABLE . " LEFT JOIN " . NEWQUEUESTABLE . " ON qid=id WHERE type='user'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$query = "SELECT id, name FROM " . NEWQUEUESTABLE;
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$queues[$row['name']] = $row['id'];
|
||||||
|
}
|
||||||
|
$query = "SELECT fullpath, qname FROM " . OLDSONGSTABLE . " LEFT JOIN " . OLDQUEUESTABLE . " ON qid=id WHERE qtype='user'";
|
||||||
|
$sth = $globaldbh->prepare($query);
|
||||||
|
$sth->execute();
|
||||||
|
$query_new = "INSERT INTO " . QUEUECONTENTSTABLE . " (qid, songid) VALUES(:qid, :songid)";
|
||||||
|
$sth_new = $globaldbh->prepare($query_new);
|
||||||
|
$query_search = "SELECT id FROM " . SONGSTABLE . " WHERE song=:song AND genre=:genre";
|
||||||
|
$sth_search = $globaldbh->prepare($query_search);
|
||||||
|
while ( $row = $sth->fetch() ) {
|
||||||
|
$fields_search = array();
|
||||||
|
$fields_search[':song'] = basename($row['fullpath']);
|
||||||
|
list($fields_search[':genre'], $junk) = explode("/", substr($row['fullpath'], strlen(MP3ROOTDIR)), 2);
|
||||||
|
$sth_search->execute($fields_search);
|
||||||
|
$totalcount++;
|
||||||
|
if ( $row_search = $sth_search->fetch() ) {
|
||||||
|
$fields_new = array();
|
||||||
|
$fields_new[':qid'] = $queues[$row['qname']];
|
||||||
|
$fields_new[':songid'] = $row_search['id'];
|
||||||
|
$sth_new->execute($fields_new);
|
||||||
|
$convertedcount++;
|
||||||
|
if ( ($convertedcount % 100) == 0 ) echo ".";
|
||||||
|
} else {
|
||||||
|
echo "Couldn't find: ", $fields_search[':song'], " in ", $fields_search[':genre'], "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array($totalcount, $convertedcount);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Converting DB:\n\n";
|
||||||
|
echo "Converting user queues...\n";
|
||||||
|
convertQueues();
|
||||||
|
echo "Converting user queue contents...";
|
||||||
|
$convcount = convertQueueContents();
|
||||||
|
echo " converted ", $convcount[1], " out of ", $convcount[0], " songs in old queues.\n";
|
||||||
|
|
||||||
|
?>
|