\n"; if (strcmp(strtolower($a) , strtolower ($b)) == 0) return 0; if (strcmp(strtolower($a) , strtolower ($b)) < 0) return -1; return 1; } if ((!isset($nrrows)) or ($nrrows < 0)) $nrrows=30; echo "
\nShow only the last rows/days.
"; #print_r($HTTP_GET_VARS); if ($con = mysql_connect("localhost","scholl","tHFA3DGHyyx2zzNK")): if (!isset($nofilter) && !isset($suche)) { #Nur die Spalten deren TM aktiv ist #Folgendes Kommando holt die aktuellste Zeile $cmd = "select * from tm_stats order by id DESC LIMIT 1;"; if ($result = mysql_db_query("scholl_2",$cmd,$con)) { #echo "Query ok"; $cntc = mysql_num_fields($result); $row = mysql_fetch_array($result); #fetching the row-names (Names of the TMS) $i = 2; $j = 0; while ($i < $cntc) { #echo "".mysql_field_name($result, $i)."\n"; #echo "".$row[mysql_field_name($result, $i)]."\n"; if ($row[mysql_field_name($result, $i)]!="") { $spalten_name[$j]=mysql_field_name($result, $i); $j++; } $i++; } #Alphabetische Sortierung der Spalten usort($spalten_name, "mycmp"); $cmd = "select id,date,".implode(",", $spalten_name)." from tm_stats where (TO_DAYS(date)+$nrrows > TO_DAYS(NOW())) order by date"; } else { echo "

Query false

"; } } elseif (!isset($suche)) { $cmd = "select * from tm_stats where (TO_DAYS(date)+$nrrows > TO_DAYS(NOW())) order by date"; } else { #Alphabetische Sortierung der Spalten usort($suche, "mycmp"); $cmd = "select id,date,".implode(",", $suche)." from tm_stats where (TO_DAYS(date)+$nrrows > TO_DAYS(NOW())) order by date"; } #print "$cmd
\n"; if ($result = mysql_db_query("scholl_2",$cmd,$con)): ?> You can also look at an by name ordered view
If you like, you can choose some TMs before pressing submit. Only these will be shown in the next view.
Submit without choosing any TM shows all currently active TMs
The following link shows all stored TMs all stored
At the bottom of the page you will find some links to chessrelated homepages of other TMs

\n"; #headline $i = 0; while ($i < $cntc) { if ($i > 1) { echo "\n"; echo "\n"; $altesumme=0; $rowcounter=0; $averageperday=0; while ($row = mysql_fetch_array($result)): $i = 0; $correctval = 0; # The following codeblock shows the names of the tms after 10 rows $rowcounter++; if (($rowcounter==10) and (!isset($suche))) { $countertmp = 0; while ($countertmp < $cntc) { echo "\n"; $rowcounter=0; } # The block for showing the names ends here :-) $summe = 0; while ($i < $cntc) { if (!isset($row[$i])) { $row[$i]="-"; $correctval+=$oldrow[$i]; } if ($i < 2) { echo "\n"; endwhile; ?>
".mysql_field_name($result, $i)."\n"; # echo "".mysql_field_name($result, $i)."\n"; } else { echo "".mysql_field_name($result, $i)."\n"; } $oldrow[$i]=0; $i++; } echo " Total\n"; echo " Total/Day\n"; echo "
".mysql_field_name($result, $countertmp)."\n"; $countertmp++; } echo " Total\n"; echo " Total/Day\n"; echo "
".$row[$i]."\n"; } else { if (($row[$i] != $oldrow[$i]) or ($oldrow[$i]=="-")) { echo "".$row[$i]."\n"; $oldrow[$i]=$row[$i]; } else { echo "   \n"; } } $i++; if ($i>1) {$summe=$summe+$row[$i];} } echo "".$summe."\n"; echo "".($summe-$altesumme+$correctval)."\n"; if ($altesumme > 0) $averageday+=($summe-$altesumme+$correctval); $altesumme = $summe; echo "
\n"; endif; else: print "

Konnte Datenbank nicht öffnen

\n"; endif; ?>

History of development

13. 02. 2002 No negative Numbers in Total/Day column and the possibility to decrease the number of shown rows
14. 02. 2002 Average tourns per day value added
08. 03. 2002 Reinstallation of the Database. Data of 6-8.3.2002 is aproximative.
29. 09. 2002 Added the possibility to choose TMs which are shown in the list.
01. 02. 2003 tms4.php3 has become much faster, because the data for the columns is only transmitted once.
11. 02. 2004 tms2.php3 shows only currently active TMs and all others only if explicitly wanted. In case of only active or explicitly choosen TMs, the colmns are sorted alphabetically.
08. 09. 2004 Added the ability to sort by number of managed tourns to tms4.php3

Links to chessrelated Homepages or Websites of other TMs