--- /dev/null
+<?php
+/*
+ Pitchfork Music Player Daemon Client
+ Copyright (C) 2007 Roger Bystrøm
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+ include_once("../inc/function_test.php");
+ require_once('../inc/base.php');
+ require_once("../lang/master.php");
+ header("Content-Type: text/html; charset=UTF-8");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
+ header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); // HTTP/1.1
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache"); // HTTP/1.0
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="../std/base.css" />
+ <link rel="stylesheet" type="text/css" href="../theme/mini/theme.css" />
+ <meta name="viewport" content="user-scalable=no, initial-scale=1.0, width=device-width" />
+<?php
+ $scripts = array("player/preferences.js.php", "lang/en.js", "std/collection.js", "std/toolkit.js", "std/streaming.js",
+ "std/plsearch.js", "std/playlist.js", "std/keyboard.js", "std/browser.js", "std/quickadd.js",
+ "std/command.js", "theme/mini/theme.js" );
+ if($language != "en")
+ $scripts[] = "lang/".$language.".js";
+
+ if(is_null(get_config("metadata_disable")))
+ $scripts[] = "std/metadata.js";
+
+ foreach($scripts as $script)
+ echo "\t\t<script type=\"text/JavaScript\" src=\"../".$script."\"></script>\n";
+ ?>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="robots" content="noindex,nofollow" />
+ <title>Pitchfork MPD Client</title>
+ </head>
+<body onload='init_player()'>
+
+<div class='player_control' style='' id='player_control'>
+
+ <div id='status_bar'>
+ <p id='status_bar_txt'></p>
+ <img id='status_bar_img' class='status_working' />
+ </div>
+
+ <div id='albumart'></div>
+ <div class='pc_artist' >
+ <p class='disp'><span id='disp_title'></span><br/></p>
+ <p class='disp' ><span id='disp_artist'></span><br/></p>
+ <p class='disp'><span id='disp_album'></span><br/></p>
+ <input type='text' id='quickadd' value='<?php echo m("Quick add"); ?>' />
+ <div id='qa_suggestions' ><p id='qa_suggestions_txt' ></p></div>
+ </div>
+
+ <div class='pc_ci' >
+ <div class='nomargin'>
+ <img id='previous_button' class='act_button fakelink'/>
+ <img id='stop_button' style='display: none; ' class='act_button fakelink' />
+ <img id='pp_button' class='act_button fakelink' />
+ <img id='next_button' class='act_button fakelink'/>
+ </div>
+ <p class='disp' style="display:none;"><span id="disp_info"></span></p>
+ </div>
+
+ <div class='pc_sliders'>
+ <div id='posslider' ></div>
+ <div id="volslider" ></div>
+ </div>
+
+ <div class='pc_settings'>
+ <div id='settings_header' class='settings_header'><p class='nomargin' style='padding-left: 10px;'><?php echo m("Server settings"); ?></p></div>
+ <div class='settings_container' id='settings_container'><p id='settings_content'></p></div>
+ </div>
+
+ <div class='pc_other'><ul class='nomargin'>
+ <li class='menuitem fakelink' title="<?php echo m("Add playlists or audio-files"); ?>"
+ id='playlist_add'><?php echo m("Add playlist"); ?></li>
+ <li class='menuitem fakelink' title="<?php echo m("Save current playlist"); ?>"
+ id='playlist_save'><?php echo m("Save playlist"); ?></li>
+ <li class='menuitem fakelink' title='<?php echo m("Search current playlist"); ?>'
+ id='playlist_search_btn' ><?php echo m("Search playlist"); ?></li>
+ <li class='menuitem' ><a class='pc_other' href='config.php'><?php echo m("Configure"); ?></a></li>
+
+ <?php
+ if(!is_null(get_config("shout_url")))
+ echo "\t\t<li class='menuitem fakelink' title='" . m("Start streaming to browser") . "' id='streaming_open'>".
+ m("Streaming") . "</li>\n";
+ if(is_null(get_config('metadata_disable'))) {
+ echo "\t\t<li title='" . m("Get music recommendations based on current playlist") . "' id='recommendation_open' ".
+ "class='menuitem fakelink'>". m("Recommendation") . "</li>\n";
+ echo "\t\t<li title='" . m("Get more information about this song/album") . "' id='metadata_open' class='menuitem fakelink'>".
+ m("Song Info") . "</li>\n";
+
+ }
+ ?>
+ </ul></div>
+</div>
+
+<div class='tab_select'>
+ <div class='tab_button' onclick='showPlaylist()'>Playlist</div>
+ <div class='tab_button' onclick='showControls()'>Controls</div>
+</div>
+
+<div class='selection_menu'>
+<img id='crop_items_button' class='menu_button fakelink' title="<?php echo m("Crop to selection"); ?>" />
+<img id='remove_items_button' class='menu_button fakelink' title="<?php echo m("Remove selection"); ?>" />
+<img id='open_directory_button' class='menu_button fakelink' title="<?php echo m("Open directory"); ?>" />
+</div>
+
+<div id='content'>
+<table id='playlist' ></table>
+</div>
+
+<div id="sidebar_header"><p class='nomargin'><span class='fakelink' id='metadata_open_lyrics'>[<?php echo m("Lyrics"); ?>]</span> <span id='metadata_open_description' class='fakelink'>[<?php echo m("Album description"); ?>]</span> <span id='metadata_open_review' class='fakelink'>[<?php echo m("Album review"); ?>]</span> <span id='metadata_close' class='fakelink'>[<?php echo m("Close"); ?>]</span></p></div>
+<div id='sidebar_display'><p class='nomargin' id='sidebar_display_txt'> </p></div>
+
+<div id='pagination_options'><img class="pagination_options" src='' id='pagination_jump_current'/><img class="pagination_options" src='' id='pagination_follow_current'/></div>
+<?php if(get_config("pagination", "0")!="0") {?>
+<div id='pagination'><ul id='pagination_list'></ul></div>
+<div id='pagination_spacer'> </div>
+<?php } ?>
+
+</body>
+</html>
--- /dev/null
+/* top right bottom left */
+body {
+ font-size: 12.4px;
+ font-family: sans-serif;
+ background: #888888;
+}
+
+a {
+ color: black;
+}
+
+select, input {
+ font-size: 0.95em;
+ line-height: 1.2em;
+ border: 1px solid #BFCFCC;
+}
+
+hr.server_settings {
+ color: #9db2b1;
+ background-color: #9db2b1;
+}
+
+.main_container, #playlist {
+ border: 1px solid #e2e2e2;
+ background: #f1f1f1;
+}
+
+#playlist {
+ cursor: default;
+}
+
+tr.playlist {
+ border: 0px;
+}
+
+div.moving_box {
+ background-color: #f1f1f1;
+ border: 1px solid #65869E;
+}
+
+tr.moving {
+ border-top: 1px solid #b0bdec;
+ color: gray;
+}
+
+li[dirtype=file] { background-image: url(images/audio_li.png); }
+li[dirtype=directory] { background-image: url(images/folder_li.png); }
+li[dirtype=artist] { background-image: url(images/media-artist_li.png); }
+li[dirtype=album] { background-image: url(images/media-album_li.png); }
+li[dirtype=playlist] { background-image: url(images/playlist_li.png); }
+
+/* used to signify that this is a search result and is used in std/browser.js */
+li[btype=search] { }
+
+/* used to select the filename */
+li[btype=search] > span {
+ color: gray;
+}
+
+div.slider_main, div.popup {
+ border: 1px solid #B0BDEC;
+ background-color: #DEE7F7;
+}
+
+div.slider_pointer {
+ border: 1px solid #a20000;
+ background-color: #ffcccc;
+}
+
+[slider_moving] {
+ cursor: move;
+}
+
+img.act_button {
+ height: 60px;
+ width: 60px;
+ opacity: 0.70;
+}
+img.act_button:hover {
+ opacity: 1.0;
+}
+
+#status_bar {
+ border: 1px solid #BDD8DA;
+ background: #DFEFF0;
+}
+
+div.settings_container, div.settings_header,
+div.player_control, div#streaming_display {
+ border: 1px solid #9db2b1;
+ background: #e7e7e7;
+}
+div.settings_header {
+ border-bottom: 0px;
+}
+
+input#quickadd {
+ font-size: 12px;
+ color: gray;
+ background: #f1f1f1;
+}
+
+input#quickadd:hover, input#quickadd:focus {
+ background: white;
+ border: 1px solid #9db2b1;
+}
+input#quickadd:focus {
+ color: black;
+}
+
+div#qa_suggestions {
+ background: white;
+ border: 1px solid #ccc;
+}
+
+span.qa_element[qa_selected] {
+ background-color: #A5F2F3;
+}
+
+div.big_albumart {
+ background-color: black;
+}
+
+p#albumart_txt {
+ color: white;
+}
+
+div#sidebar_header {
+ background: #f1f1f1;
+ border: 1px solid #9db2b1;
+ font-size: 0.9em;
+}
+
+div#sidebar_display {
+ border: 1px solid black;
+ background-color: #ffffff;
+ border: 1px solid #9db2b1;
+ font-size: 0.992em;
+ line-height: 1.3em;
+}
+
+
+/* for browser action buttons */
+
+/* match add buttons */
+li.browser_button_add {
+ background: url(images/add_15.png) no-repeat top left;
+}
+
+li.playlist_popup,
+span.playlist_popup {
+ border: 1px solid #B0BDEC;
+}
+
+div#pagination, div#pagination_options,
+div.overlay, div.selection_menu {
+ border: 1px solid #bfcfcc;
+ background: #f1f1f1;
+}
+
+ul#pagination_list > li,
+ul.browser_field,
+.browse_type {
+ border: 1px solid #bfcfcc;
+}
+
+/* current page on the pagination list */
+li[cpage] {
+ background-color: green;
+}
+
+span.plse {
+ background-image: url(images/audio_li.png);
+}
+
+span.plse:hover,
+ul.recommended > li > ul > li:hover ,
+[selected],
+li.menuitem:hover,
+#streaming_display li:hover
+{
+ background-color: #DEE7F7;
+}
+
+li.menuitem {
+ border: 1px solid #9DB2B1;
+ border-top: none;
+ background-color: #f1f1f1;
+}
+
+/* Added for small screen support */
+#playlist > tr > td {
+ padding-left: 1px;
+}
+
+#content {
+ margin-left: 0px;
+ margin-top: 0px;
+ left: 1px;
+ top: 31px;
+ width: 317px;
+ height: 300px;
+ z-index: -1;
+ display: none;
+ position: absolute;
+
+}
+
+#posslider, #volslider {
+ width: 250px;
+}
+
+div.slider_main {
+ height: 20px;
+}
+div.slider_pointer {
+ height: 25px;
+}
+div.player_control {
+ left: 1px;
+ top: 31px;
+ padding: 1px 1px 1px 1px;
+ height: 324px;
+ width: 317px;
+}
+div.pc_artist {
+ width: 150px;
+ left: 150px;
+}
+div#albumart {
+ width: 130px;
+ height: 130px;
+}
+
+div.tab_select {
+ position: fixed;
+ padding: 1px 1px 1px 1px;
+ left: 1px;
+ top: 0px;
+ width: 317px;
+ height: 30px;
+ z-index: 3;
+}
+
+div.tab_button {
+ float: right;
+ margin: 2px 2px 0px 2px;
+ width: 154px;
+ height: 25px;
+ background: #444444;
+ text-align: center;
+ vertical-align: middle;
+ /*border: 1px solid #222222;*/
+ color: #eeeeee;
+ z-index: 4;
+}
+
+img.thumbnailart {
+ width: 100%;
+}
+
+div.pc_ci {
+ top: 250px;
+ left: 60px;
+}
+div.pc_sliders {
+ left: 20px;
+ top: 140px;
+}
+
+#status_bar {
+ left: 200px;
+ width: 100px;
+ height: 50px;
+}
+
+img.status_working {
+ float: left;
+}
+
+input#quickadd {
+ width: 150px;
+ margin-top: 10px;
+ margin-left: 1px;
+}
+div#qa_suggestions {
+ margin-left: 1px;
+ width: 150px;
+}
+
+div.selection_menu, div.pc_other, hr.server_settings, div.pc_settings, div.settings_header, div#streaming_display, div#pagination_options, ul#pagination_list, ul#pagination_list > li, div#pagination_spacer, img.pagination_options {
+ display: none;
+}
--- /dev/null
+function showPlaylist() {
+if (document.all) {
+ document.all['content'].style.display = 'block';
+ document.all['content'].style.zIndex = 5;
+
+}
+else if (document.getElementById) {
+ document.getElementById('content').style.display = 'block';
+ document.getElementById('content').style.zIndex = 5;
+
+}
+
+}
+
+function showControls() {
+if (document.all) {
+ document.all['content'].style.display = 'none';
+ document.all['content'].style.zIndex = -1;
+}
+else if (document.getElementById) {
+ document.getElementById('content').style.display = 'none';
+ document.getElementById('content').style.zIndex = -1;
+
+}
+
+}
+
+/* number of "windows" on the directory browser */
+var BROWSER_NUM = 3;
+
+/* the border around the playing item in the playlist */
+var PLAYLIST_PLAYING_STYLE = "1px solid #a20000";
+
+/* this is the color thing that you add blink in */
+var DEFAULT_BLINK_COLOR = "#C1DAD6";
+
+var BASE_IMG_DIR = "../theme/default/images/";
+
+var IMAGE = new Object();
+
+IMAGE.BUTTON_PLAY = BASE_IMG_DIR + "play_25.png";
+IMAGE.BUTTON_STOP = BASE_IMG_DIR + "stop_25.png";
+IMAGE.BUTTON_PAUSE = BASE_IMG_DIR + "pause_25.png";
+IMAGE.BUTTON_PREVIOUS = BASE_IMG_DIR + "previous_25.png";
+IMAGE.BUTTON_NEXT = BASE_IMG_DIR + "next_25.png";
+
+IMAGE.BROWSER_PLAYLIST_REMOVE = BASE_IMG_DIR + "disabled_15.png";
+
+IMAGE.SERVER_SETTINGS_ENABLED = BASE_IMG_DIR + "enabled_15.png";
+IMAGE.SERVER_SETTINGS_DISABLED = BASE_IMG_DIR + "disabled_15.png";
+IMAGE.SERVER_SETTINGS_XFADE_DOWN= BASE_IMG_DIR + "left_15.png";
+IMAGE.SERVER_SETTINGS_XFADE_UP = BASE_IMG_DIR + "right_15.png";
+
+IMAGE.CLOSE = BASE_IMG_DIR + "close_15.png";
+IMAGE.WORKING = BASE_IMG_DIR + "working.gif";
+
+IMAGE.MENU_ITEM_CROP = BASE_IMG_DIR + "crop_30.png";
+IMAGE.MENU_ITEM_REMOVE = BASE_IMG_DIR + "remove_30.png";
+IMAGE.MENU_ITEM_DIRECTORY = BASE_IMG_DIR + "folder_30.png";
+
+IMAGE.PAGINATION_FOLLOW = BASE_IMG_DIR + "follow-playing-yes.png";
+IMAGE.PAGINATION_NOFOLLOW = BASE_IMG_DIR + "follow-playing-no.png";
+
+IMAGE.JUMP_CURRENT = BASE_IMG_DIR + "jump-to-current.png";
+
+
+/* this should be whatever the backgroun is converted from hex to dec */
+IMAGE.STREAM_BGCOLOR = "15198183";