<commit_before><?

// bzlist.php <NAME> < <EMAIL> >
//
// Copyright (c) 1993 - 2004 <NAME>
//
// This package is free software;  you can redistribute it and/or
// modify it under the terms of the license found in the file
// named COPYING that should have accompanied this file.
//
// THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
// WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// This is a simple script that reports current public servers
// and creates links to server stats via bzfquery.pl.

$listserver  = 'http://list.bzflag.org:5156';
$bzfquery    = '/usr/X11R6/bin/bzfquery.pl';

$fp = fopen("$listserver", "r");
if ($fp) {
	?>
	<PRE><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
	  <TR>
	    <TD WIDTH=300>Server Name</TD>
	    <TD WIDTH=125>Server Address</TD>
	    <TD>Server Description (short)</TD>
	  </TR>
	  <TR><TD COLSPAN=3>&nbsp;</TD></TR>
	<?
	while (!feof($fp)) {
		$buffer = fgets($fp, 1024);
		$array  = preg_split('/\s+/', $buffer);
		$count  = count($array);
		list($bzhost, $bzport) = split(":", $array[0], 2);
		$LINK   = "<A HREF=$_SERVER[PHP_SELF]?bzhost=$bzhost&bzport=$bzport>$bzhost:$bzport</A>";
		if(($bzhost)|($bzport)) {
			print "<TR>";
			print "<TD>$LINK</TD>";
			print "<TD>$array[3]</TD>";
			unset($array[0], $array[1], $array[2], $array[3]);
			foreach ( $array as $line ) {
				$description .= "$line ";
			}
			$bzdesc = substr("$description", 0, 50);
			unset($description);
			print "<TD>$bzdesc</TD>";
			print "</TR>";
		}
	}
	?></TABLE></PRE><BR><?
	fclose ($fp);
}

if(($_GET["bzhost"])&&($_GET["bzport"])) {
	?>
	<BR><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
	  <TR>
	    <TD><? print "$_GET[bzhost]:$_GET[bzport] Stats:"; ?></TD>
	  </TR>
	    <TR><TD>&nbsp;</TD></TR>
	  <TR>
	    <TD><PRE><? system("$bzfquery $_GET[bzhost] $_GET[bzport]"); ?></PRE></TD>
	  </TR>
	</TABLE>
	<?
}

?><commit_msg>ws, lc, editor settings, db server<commit_after><?php

// bzlist.php
//
// original by <NAME> <<EMAIL>>
//
// Copyright (c) 1993 - 2004 <NAME>
//
// This package is free software;  you can redistribute it and/or
// modify it under the terms of the license found in the file
// named COPYING that should have accompanied this file.
//
// THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
// WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// This is a simple script that reports current public servers
// and creates links to server stats via bzfquery.pl.

$listserver = 'http://db.bzflag.org/db/?action=LIST';
$bzfquery = './bzfquery.pl';

$fp = fopen("$listserver", "r");
if ($fp) {
?>
<pre><table border=0 cellpadding=0 cellspacing=0>
  <tr>
    <td width=300>Server Name</td>
    <td width=125>Server Address</td>
    <td>Server Description (short)</td>
  </tr>
  <tr><td colspan=3>&nbsp;</td></tr>
<?
  while (!feof($fp)) {
    $buffer = fgets($fp, 1024);
    $array = preg_split('/\s+/', $buffer);
    $count = count($array);
    list($bzhost, $bzport) = split(":", $array[0], 2);
    $LINK = "<a href=$_SERVER[PHP_SELF]?bzhost=$bzhost&bzport=$bzport>$bzhost:$bzport</a>";
    if (($bzhost)|($bzport)) {
      print "<tr>";
      print "<td>$LINK</td>";
      print "<td>$array[3]</td>";
      unset($array[0], $array[1], $array[2], $array[3]);
      foreach ( $array as $line ) {
	$description .= "$line ";
      }
      //$bzdesc = substr("$description", 0, 50);
      //print "<td>$bzdesc</td>";
      print "<td>$description</td>";
      unset($description);
      print "</tr>\n";
    }
  }
  print "</table></pre><br>";
  fclose ($fp);
}

if(($_GET["bzhost"])&&($_GET["bzport"])) {
  ?>
  <br><table border=0 cellpadding=0 cellspacing=0>
    <tr>
      <td><? print "$_GET[bzhost]:$_GET[bzport] Stats:"; ?></td>
    </tr>
    <tr><td>&nbsp;</td></tr>
    <tr>
      <td><pre><? system("$bzfquery $_GET[bzhost] $_GET[bzport]"); ?></pre></td>
    </tr>
  </table>
  <?
}

# Local Variables: ***
# mode:php ***
# tab-width: 8 ***
# c-basic-offset: 2 ***
# indent-tabs-mode: t ***
# End: ***
# ex: shiftwidth=2 tabstop=8

?>
{'fraction_non_alphanumeric': 0.22079160705770148, 'fraction_numerical': 0.019313304721030045, 'mean_word_length': 3.5253505933117584, 'pattern_counts': {'":': 2, '<': 112, '<?xml version=': 0, '>': 112, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3462565', 'n_tokens_mistral': 1680, 'n_tokens_neox': 1535, 'n_words': 380}