trim(fgets($fp), "\n"), "altDate" => trim(fgets($fp), "\n"), "band" => trim(fgets($fp), "\n"), "place" => trim(fgets($fp), "\n"), "price" => trim(fgets($fp), "\n"), "link" => trim(fgets($fp), "\n"), "linkText" => trim(fgets($fp), "\n"))); //Close file fclose($fp); // //No upcoming concerts? // if($newFound == 0) echo("
Ingen kommende konserter."); // echo("De kommende konsertene:
"); $newFound = 0; $lastYear = 1900; //Print information to screen for($i=0;$i= 4) $day = $day . "th"; //Check date for current concert if(((integer)$date < (integer)$today) && ($line != 2)) { if($newFound == 0) echo("
There are currently no upcoming concerts.
"); $line = 2; } if($line == 0) $newFound++; //New year? if((integer)$year != $lastYear) { $lastYear = (integer)$year; echo("
$year
"); } //Date formatting if(($hours == "99") && ($mins == "99")) $dateText = "$month $day"; else $dateText = "$altMonth.$altDay. - $hours:$mins"; if($altDate != "") { $dateText = $altDate; } if(($items[$i]["link"] == "") || ($items[$i]["link"] == "http://")) $linkText = ""; else if($items[$i]["linkText"] != "") $linkText = "" . stripslashes($linkText) . ""; else $linkText = "" . stripslashes($link) . ""; if($line == 2) //De som har vært $text = "" . "" . "" . "" . "
" . "" . "" . "" . "" . "" . "
$dateText$place$band $linkText
"; else //De som ikke har vært $text = "" . "" . "" . "" . "
" . "" . "" . "" . "" . "" . "
$dateText$place$band $linkText
"; echo($text); } echo(""); ?>