3 /////////////////////////////////////////////////////////
4 // Work out our page title
5 /////////////////////////////////////////////////////////
7 if ( !isset($page_title) ||
$page_title == "" ) {
8 $current_track = current_track();
9 if ( is_object($current_track) ) {
10 $page_title = "$current_track->title : $current_track->album : $current_track->artist ";
11 $refresh_time = ( $current_track->finishing
- time() ) +
5;
12 if ( $refresh_time < 0 ) $refresh_time = 180;
13 if ( $refresh_time < 90 && $refresh_time > 30 ) $refresh_time = 90;
14 error_log( "$sysabbr: DBG: Title >>$page_title<< Finish >>$current_track->finishing >>".time()." >>$refresh_time");
18 $refresh_url = $letter_get;
20 $refresh_url .= "&a=".urlencode($a);
22 $refresh_url .= "&l=".urlencode($l);
23 $refresh_url = "http://$HTTP_HOST$PHP_SELF" . ereg_replace('^&','?',$refresh_url);
25 if ( isset($refresh) && ! $refresh) {
26 // Don't add a refresh header
27 error_log("Refresh forced off");
30 else if ( "$submit" != "" ) {
31 $fifo = fopen( "/var/run/adorno/fifo", "w" );
32 if ( ! ereg( "^(/music)|(http://)", "$track" ) ) {
33 $track = "/music" . "$track";
35 # $track = eregi_replace( " ", "\\ ", $track);
36 fputs( $fifo, "$action $track\n" );
38 $meta_refresh = "Refresh: $refresh_time; URL=$refresh_url" ;
39 header($meta_refresh);
41 else if ( !isset($a) && !isset($t) ) {
42 $meta_refresh = "Refresh: $refresh_time"."s";
43 header($meta_refresh);
46 $meta_refresh = "Refresh: $refresh_time; URL=$refresh_url" ;
47 header($meta_refresh);
49 error_log("Refresh header was : $meta_refresh");
51 if ( !isset($stylesheet) ) $stylesheet = "adorno.css";
53 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
56 <title>$page_title</title>
57 <meta name="MSSmartTagsPreventParsing" content="TRUE">
58 <link rel="stylesheet" type="text/css" href="$stylesheet" />