Update the copyrights on the PHP lib to have legal names.

This commit is contained in:
Jeff Teunissen 2001-07-19 11:52:47 +00:00
parent 8003941489
commit d7a07d55c5
9 changed files with 64 additions and 68 deletions

View file

@ -4,8 +4,7 @@
Array-handling function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000, 2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -25,18 +24,19 @@
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
*/
define ('_ARRAY_', 1);
/*
inArray
Search an array for data
*/
function inArray( $needle, $haystack )
function inArray ($needle, $haystack)
{
$found = false;
for ( $ptr = 0 ; $ptr < count ( $haystack ) ; $ptr++ ) {
if ( $haystack[$ptr] == $needle ) {
for ($ptr = 0; $ptr < count ($haystack); $ptr++) {
if ($haystack[$ptr] == $needle) {
$found = true;
}
}
@ -48,18 +48,17 @@
Add an element to an array
*/
function addToArray( $var, &$arr )
function addToArray ($var, &$arr)
{
if (!inArray ($var, $arr)) {
if (isset ($arr)) {
$arr[count( $arr )] = $var;
$arr[count ($arr)] = $var;
} else {
$arr = array ($var);
}
}
}
define('_ARRAY_', 1);
addToArray ('array', $has);
addToArray ('array', $needs);
?>

View file

@ -4,8 +4,7 @@
Authentication/Authorization function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000, 2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -25,7 +24,6 @@
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
*/
have ('auth');
need ('table');
@ -69,31 +67,31 @@ CREATE TABLE members (
<? include siteHome . "/parts/menu.php"; ?>
</TD>
<TD width="100%">
<? tableHeader("100%", black); ?>
<? tableHeader ("100%", black); ?>
<TR>
<? tableSpacer( 1, 9, 3, black); ?>
<? tableSpacer (1, 9, 3, black); ?>
</TR>
<TR>
<? tableSpacer( 9, 1, 1, black); ?>
<? tableSpacer (9, 1, 1, black); ?>
<TD>
<? require siteHome . "/parts/topmain.php"; ?>
</TD>
<? tableSpacer( 9, 1, 1, black); ?>
<? tableSpacer (9, 1, 1, black); ?>
</TR>
<TR>
<? tableSpacer( 1, 18, 3, black); ?>
<? tableSpacer (1, 18, 3, black); ?>
</TR>
<TR>
<? tableSpacer( 9, 1, 1, black); ?>
<? tableSpacer (9, 1, 1, black); ?>
<TD>
<!-- Content Start -->
<FORM name="login" method="post" action="<? echo thisUrl; ?>">
<?
tableBoxHeader(featureBgColor, tableHeadColor);
tableTitle($title, 1, tableHeadColor);
tableBoxHeader (featureBgColor, tableHeadColor);
tableTitle ($title, 1, tableHeadColor);
?><TD align="center"><?
tableHeader("100%", featureBgColor);
tableHeader ("100%", featureBgColor);
?>
<TR vAlign="center">
<TD align="center">
@ -132,7 +130,7 @@ CREATE TABLE members (
{
$digest = md5 (time ());
$cookie = "$userName-$encryptedPassWord-$digest";
SetCookie ("loginInfo", $cookie, (time() + EXPIRY));
SetCookie ("loginInfo", $cookie, (time () + EXPIRY));
$query = "UPDATE members SET u_secret='$digest'" .
" WHERE u_username='$userName'";
@ -165,7 +163,7 @@ CREATE TABLE members (
*/
function authCookie ($cookie, $userName, $password)
{
$cookie_var = split("-", $cookie);
$cookie_var = split ("-", $cookie);
$cUserName = $cookie_var[0];
$cPassword = $cookie_var[1];
$secret = $cookie_var[2];

View file

@ -4,8 +4,7 @@
Date data and functions
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000, 2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -28,21 +27,21 @@
have('date');
$shortMonths = array( 1=>'Jan', 2=>'Feb', 3=>'Mar', 4=>'Apr',
$shortMonths = array ( 1=>'Jan', 2=>'Feb', 3=>'Mar', 4=>'Apr',
5=>'May', 6=>'Jun', 7=>'Jul', 8=>'Aug',
9=>'Sep', 10=>'Oct', 11=>'Nov', 12=>'Dec');
function fileParseDate($date)
function fileParseDate ($date)
{
global $shortMonths;
return substr( $date, 3 ) . ' ' . $shortMonths[substr( $date, 1, 2 )];
return substr ($date, 3) . ' ' . $shortMonths[substr ($date, 1, 2)];
}
function dateFromSQLDateTime( $sqlDateTime )
function dateFromSQLDateTime ($sqlDateTime)
{
$time = explode( ' ', $sqlDateTime );
$date = explode( '-', $time[0] );
return strftime( '%d %b %Y', mktime( 0, 0, 0, $date[1], $date[2], $date[0]));
$time = explode ( ' ', $sqlDateTime);
$date = explode ( '-', $time[0]);
return strftime ( '%d %b %Y', mktime (0, 0, 0, $date[1], $date[2], $date[0]));
}
?>

View file

@ -4,8 +4,7 @@
File processing function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000, 2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -25,7 +24,6 @@
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
*/
have ('file');
/*
@ -33,20 +31,20 @@
Display a file with email addresses and URLs translated to links.
*/
function fileTranslateUrl( $filename ) {
function fileTranslateUrl ($filename) {
$file = fopen( $filename, "r");
$file = fopen ($filename, "r");
while ($line = fgets( $file, 2048 )) {
if ( preg_match( "/\</", $line )) {
$words = preg_split( "/\</", $line );
$words[1] = preg_replace( "/>/", "", $words[1]);
while ($line = fgets ($file, 2048)) {
if (preg_match ("/\</", $line)) {
$words = preg_split ("/\</", $line);
$words[1] = preg_replace ("/>/", "", $words[1]);
echo '<A href="mailto:' . $words[1] . '">' . $words[0] . '</A><BR>';
} else {
$line = preg_replace( "/http:\/\/(.*)/", "<A href=\"http://\\1\">http://\\1</A><BR>", $line );
$line = preg_replace ("/http:\/\/(.*)/", "<A href=\"http://\\1\">http://\\1</A><BR>", $line);
echo $line;
}
}
fclose( $file );
fclose ($file);
}
?>

View file

@ -4,8 +4,7 @@
Graphing function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000,2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -25,7 +24,6 @@
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
*/
have ('graph');
/*
@ -33,30 +31,37 @@
Return HTML for a 0-100% meter 250 pixels wide and 10 pixels high.
*/
function barGraph( $pct )
function barGraph ($pct)
{
$newPct = $pct - ($pct % 2);
$i = $pct;
$j = 100 - $newPct;
$result = '';
for ( ; $i >= 20 ; $i -= 20 ) {
for (; $i >= 20; $i -= 20) {
$result .= '<IMG src="/img/graph/ProgressBar.20.white.gif" vAlign="center" width="50" height="10" border="0" alt=" ">';
}
for ( ; $i >= 10 ; $i -= 10 ) {
for (; $i >= 10; $i -= 10) {
$result .= '<IMG src="/img/graph/ProgressBar.10.white.gif" vAlign="center" width="25" height="10" border="0" alt=" ">';
}
for ( ; $i >= 2 ; $i -= 2 ) {
for (; $i >= 2; $i -= 2) {
$result .= '<IMG src="/img/graph/ProgressBar.2.white.gif" vAlign="center" width="5" height="10" border="0" alt=" ">';
}
for ( ; $j >= 20 ; $j -= 20 ) {
for (; $j >= 20; $j -= 20) {
$result .= '<IMG src="/img/graph/ProgressBar.20.gray.gif" vAlign="center" width="50" height="10" border="0" alt=" ">';
}
for ( ; $j >= 10 ; $j -= 10 ) {
for (; $j >= 10; $j -= 10) {
$result .= '<IMG src="/img/graph/ProgressBar.10.gray.gif" vAlign="center" width="25" height="10" border="0" alt=" ">';
}
for ( ; $j >= 2 ; $j -= 2 ) {
for (; $j >= 2; $j -= 2) {
$result .= '<IMG src="/img/graph/ProgressBar.2.gray.gif" vAlign="center" width="5" height="10" border="0" alt=" ">';
}
return $result;
}
?>

View file

@ -4,8 +4,7 @@
Network function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000,2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -26,19 +25,21 @@
Boston, MA 02111-1307, USA.
*/
have ('network');
/*
finger
Connect to a finger daemon and get information about a user.
*/
function finger( $user, $host )
function finger ($user, $host)
{
$fp = fsockopen( $host, 79, &$errno, &$errstr ) or die( "$errno: $errstr" );
fputs( $fp, "$user\n" );
while ( !feof( $fp ) ) {
echo fgets( $fp, 128 );
$fp = fsockopen ($host, 79, &$errno, &$errstr) or die ("$errno: $errstr");
fputs ($fp, "$user\n");
while (!(feof ($fp))) {
echo fgets ($fp, 128);
}
fclose( $fp );
fclose ($fp);
}
?>

View file

@ -4,8 +4,8 @@
SQL-based news reading library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000,2001 Jeff Teunissen <deek@quakeforge.net>
Copyright (C) 2000 Daniel David Olson <theoddone33@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -30,7 +30,6 @@
function newsItem ($date, $user, $text)
{
if ($user == "Theoddone33") $user = "theoddone33";
echo '<TR>' .
' <TD>' .
' <DL>' .
@ -45,7 +44,6 @@
{
need ("date");
if ($array[n_user] == "Theoddone33") $user = "theoddone33";
return '<TR>' .
' <TD>' .
' <DL>' .

View file

@ -4,8 +4,7 @@
SQL function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000,2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

View file

@ -4,8 +4,7 @@
Table function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
Copyright (C) 2000,2001 Jeff Teunissen <deek@quakeforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License