$pos) { $char = substr($line, $pos, 1); $pos ++; if ($char == "%") { sscanf(substr($line, $pos, 2), "%x", $char); $char = chr($char); $pos += 2; } $out = $out.$char; } return $out; } $fp = fopen("termine".$_REQUEST["year"].".txt","r"); $Month = 1; while(!feof($fp)) { $line = ""; fscanf($fp, "%s", $line); if(strlen($line) == 0) continue; $pos = 0; $where = ""; $when = ""; $what = ""; while((substr($line, $pos, 1) != "+") && (strlen($line) > $pos)) { $pos++; } $pos++; while((substr($line, $pos, 1) != "+") && (strlen($line) > $pos)) { $when = $when.substr($line, $pos, 1); $pos++; } $pos++; while((substr($line, $pos, 1) != "+") && (strlen($line) > $pos)) { $what = $what.substr($line, $pos, 1); $pos++; } $pos++; while(strlen($line) > $pos) { $where = $where.substr($line, $pos, 1); $pos++; } if ( (substr($when, 3, 1) != "-") &&(substr($when, 3, 2) > $Month)) { $Month = substr($when, 3, 2); print ""; } else if( (substr($when, 3, 1) == "-") &&(substr($when, 7, 2) > $Month)) { $Month = substr($when, 7, 2); print ""; } print "\n"; } fclose($fp); ?>
"; if($Month==date("m")) print ""; print "


"; if($Month==date("m")) print ""; print "


".$when."".urldecode($what)."".decode($where)."