"; $cellpadding = "5"; $cellspacing = "10"; $errmsg = ""; $tableformat = "yes"; $sort_normal_order = false; $sort_reverse_order = false; $long_format= true; $gentext=""; $genlink="/allaaktiviteter.php"; $txt1=" Läs mer..."; $txt2=" Läs ännu mer..."; $txt3=" Läs massor..."; echo "\n"; if ($mode == "4") { $long_format= false; $mode = "2"; } if ($mode == "5") { $long_format= false; $mode = "3"; } if ($mode == "1") { $category = "Tävling"; $sort_normal_order = true; if ($long_format) { echo "\n

Tävlingar

\n"; } else { echo "\n
Tävlingar

\n"; } } if ($mode == "2") { $category = "Aktivitet"; $status = "OnlyActive"; $tableformat = "no"; $sort_reverse_order = true; if ($long_format) { echo "\n

Aktiviteter

\n"; } else { echo "\n
Aktiviteter

\n"; } } if ($mode == "3") { $category = "Nyhet"; $status = "OnlyActive"; $tableformat = "no"; if ($long_format) { echo "\n

Nyheter

\n"; } else { echo "\n
Nyheter

\n"; } } if ($mode == "6") { $sort_normal_order = true; $cellpadding = "5"; $cellspacing = "0"; $actday = 1; $firstdate = mktime(0,0,0,$infodata,$actday,2006); $lastdate = mktime(0,0,0,$infodata+1,1,2006); $prevdate = 0; $arrindex = 1; } $file_line = file($logfile); $total_lines = count($file_line); for($i=($total_lines-1); 0 <= $i; $i--) { $line[] = explode("|",$file_line[$i]); } if ($sort_normal_order) { usort($line, "cmp_array_data"); } if ($sort_reverse_order) { usort($line, "cmp_array_data_rev"); } if ($tableformat == "yes") { echo "\n\n"; } $line_counter=0; for($i = 0; $i < $total_lines; $i++){ $line_array = $line[$i]; /* ## KEY ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $line_array[1] = $date_output $line_array[2] = $keyid $line_array[3] = $category $line_array[4] = $heading $line_array[5] = $txt3 $line_array[6] = $txt2 $line_array[7] = $txt1 $line_array[8] = $to_date $line_array[9] = $from_date $line_array[10] = $message */ // gets all the slashes from the posts $line_array[2] = stripslashes ($line_array[2]); $line_array[3] = stripslashes ($line_array[3]); $line_array[4] = stripslashes ($line_array[4]); $line_array[5] = stripslashes ($line_array[5]); $line_array[6] = stripslashes ($line_array[6]); $line_array[7] = stripslashes ($line_array[7]); $line_array[8] = stripslashes ($line_array[8]); $line_array[9] = stripslashes ($line_array[9]); $line_array[10] = stripslashes ($line_array[10]); $thestatus = "Aktiv"; if ( $line_array[9]!="" && $line_array[9] > strftime($date_format2)) { $thestatus = "Kommer"; } if ( $line_array[8]!="" && $line_array[8] < strftime($date_format2)) { $thestatus = "Gammal"; } if ( $line_array[9] == "" ) { $from_date = "-"; $date_output = $line_array[1]; } else { $from_date = $line_array[9]; $date_output = $from_date; } if ( $line_array[8] =="" ) { $to_date = "-"; } else { $to_date = $line_array[8]; } ### the printout if ( ($category=="" || $category == $line_array[3]) && ($status!="OnlyActive" || $thestatus=="Aktiv")) { if ($mode == "1") { echo "\n \n "; $titlehref = "href=#"; if ($line_array[7] != "") { $titlehref = "target=_blank href=$line_array[7]"; } echo " \n"; echo " \n "; echo " \n "; echo " \n "; echo " \n"; } else if ($mode == "2") { if ($long_format) { echo " $line_array[4]
$line_array[10]
$divider\n"; } else { $thetitle = strip_tags($line_array[10]); echo " $line_array[4]
\n"; } if ($line_array[7]!="") { echo " $txt1 "; } if ($line_array[6]!="") { echo " $txt2 "; } if ($line_array[5]!="") { echo " $txt3 "; } } else if ($mode == "3") { if ($long_format) { echo " $date_output: $line_array[4]
$line_array[10]
$divider\n"; } else { $thetitle = strip_tags($line_array[10]); echo " $line_array[4] ($date_output)
\n"; } if ($line_array[7]!="") { echo " $txt1 "; } if ($line_array[6]!="") { echo " $txt2 "; } if ($line_array[5]!="") { echo " $txt3 "; } } else if ($mode == "6") { if ($from_date == "-") { $itemdate = strtotime($to_date); } else { $itemdate = strtotime($from_date); } $actdate = mktime(0,0,0,$infodata,$actday,2006); while ($itemdate>$actdate && $actdate<$lastdate) { if ($prevdate != $actdate && $actdate<$lastdate) { $disp_text = strftime("%d/%m", $actdate); $date_text = strftime("%Y-%m-%d", $actdate); $veckodag = veckodagen($date_text); $thebgcolor = weekdaybgcolor($date_text); echo "\n \n"; } $actday = $actday+1; $actdate = mktime(0,0,0,$infodata,$actday,2006); } $disp_text = strftime("%d/%m", $actdate); $date_text = strftime("%Y-%m-%d", $actdate); $veckodag = veckodagen($date_text); $thebgcolor = weekdaybgcolor($date_text); if ($itemdate == $actdate && $actdate < $lastdate && $line_array[3] != "Nyhet") { echo "\n \n"; } else { echo " $disp_text $veckodag \n"; } $thetitle = strip_tags($line_array[10]); echo " \n"; echo " \n "; echo " \n"; $prevdate = $itemdate; } } else { echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; } $line_counter++; } } if ($tableformat == "yes") { echo "\n
"; if ($from_date == "-") { $veckodag = veckodagen($to_date); echo " $veckodag $to_date \n"; } else { $veckodag = veckodagen($from_date); echo " $veckodag $from_date \n"; } echo " $line_array[4] "; if ($line_array[7] != "") { echo "GIT"; } echo " "; if ($line_array[6] != "") { echo "Startlista"; } echo " "; if ($line_array[5] != "") { echo "Resultat"; } echo "
$disp_text $veckodag
"; if ($line_array[3]=="Aktivitet") { $gentext=""; $genlink="/allaaktiviteter.php"; $txt1=" Läs mer..."; $txt2=" Läs ännu mer..."; $txt3=" Läs massor..."; } else { $gentext = "Tävling: "; $genlink="/tavling/tkalender.php"; $txt1=" Allmänt..."; $txt2=" Startlista..."; $txt3=" Resultat..."; } if ($itemdate == $prevdate) { echo " $gentext $line_array[4] \n "; if ($line_array[7]!="") { echo " $txt1 "; } if ($line_array[6]!="") { echo " $txt2 "; } if ($line_array[5]!="") { echo " $txt3 "; } echo "
\n"; echo " $from_date
\n"; echo " $to_date
\n"; echo " $thestatus:$line_array[3]
\n"; echo "
$line_array[10] \n"; echo " $line_array[7]
\n"; echo " $line_array[6]
\n"; echo " $line_array[5]
\n"; echo "
"; } if ($line_counter == 0) { echo "\n

Det finns ingenting registrerat just nu...


$divider"; } } ?>