\n\n\n"); } if(isset($_POST['submit'])) { $vars = array( 'mpd_host', 'mpd_port', 'mpd_pass', 'login_pass', 'update_delay', 'metadata_disable', 'theme', 'stop_button', 'shout_url', 'pagination', 'lang', 'aws_keyid', 'aws_secret'); foreach ($vars as $var) { $add = ""; if(isset($_POST[$var])&&trim($_POST[$var])!="") $add = trim($_POST[$var]); if($var=="pagination") { if(!is_numeric($add)) $add = 0; else $add = intval($add); } else if($var=="login_pass"&&strlen($add)>0) { if($add== HASH_PASS) continue; $add = generate_hash($add); } else if ($var=='aws_secret') { if ($add == HASH_PASS) continue; } if(isset($config->$var)) { $config->$var = $add; } else { $config->addChild($var, $add); } } $plentry = null; if(isset($config->plentry)) $plentry = $config->plentry; else $plentry = $config->addChild("plentry"); foreach($pl_fields as $field) { $val = isset($_POST['plentry_' . $field])?"yes":""; $plentry->$field = $val; } // need to save config! if($config->asXML("../config/config.xml")) { header("Location: index.php"); echo "

If you're not redirected, go here: player

"; exit(); } else { echo "

Could not save your configuration, check that config/config.xml is writeable

\n"; } } if(!is_writeable("../config")) { echo "

"; echo m("Warning: Your config/ directory is not writeable! Please change owner of directory to apache user."); echo "

\n"; } @ob_end_flush(); ?>

Pitchfork configuration

" . m("Let us take a minute to configure this player") . "

\n"; else echo "

" . m("Configure settings") . "

"; ?>

' name='mpd_host' />
' name='mpd_port' />
' name='mpd_pass' />


"; } echo "=3) echo "style='display: none; ' "; echo ">\n"; } ?>
' name='update_delay' />
' name='login_pass' />
name='stop_button' value='yesplease' />
" title="" size="5" />
 
 
  "; echo m("Show nonstandard") . " [+]
 "; echo "
 

Metadata

visit aws.amazon.com. ". "Then, get an access key, and fill in the details below."); ?>

name='metadata_disable' />
' name='aws_keyid' />
' name='aws_secret' />



For lyrics search to work in the directory browser file-names has to be saved with the lyrics, however when you move/delete files from your library this file reference become wrong. This button removes any references to such files.

" . m("Yes") . ""; else return "" . m("No") . ""; } // function_name:fatal (0/1) function test_function($stuff) { $stuff = explode(":", $stuff); $name = $stuff[0]; echo $name . ": "; echo print_yesno(function_exists($name), $stuff[1]); echo "
\n"; } ?>

\n"; echo m("Release date:") . " $release_date

\n"; $pl = get_playback(); $has_commands = true; try { if($pl) { $commands = $pl->getCommands(); /* these are just some of the needed commands */ $needed = array("outputs", "disableoutput", "enableoutput", "plchangesposid"); $res = array_intersect($needed, $commands); if(count($res)!=count($needed)) $has_commands = false; $pl->disconnect(); } } catch(PEAR_Exception $e) { $has_commands = false; } echo m("Connect to mpd:"). " ". print_yesno($pl, true) . "
\n"; if($pl) { echo m("MPD commands:")." " . print_yesno($has_commands, true) . "
\n"; } echo m("Metadata directory:"). " " . print_yesno((file_exists($metadata_dir)&&is_writeable($metadata_dir)) ||(!file_exists($metadata_dir)&&is_writeable($config_dir)), true); ?>

"; else echo "error\n"; $mem = ceil(return_bytes(ini_get("memory_limit"))/(1024*1024)); echo m("PHP memory limit:") . " " . $mem . "MB"; ?>

"; echo m("Warning: Magic quotes runtime is on,
please use pitchfork.conf or turn
of manually."); echo "

\n"; } if(get_magic_quotes_gpc()) { echo "

"; echo m("Warning: Magic quotes gpc is on,
please use pitchfork.conf or turn
of manually."); echo "

\n"; } ?>