<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Team Name</title>
<style>
.button {background-Color: #ffffff; text-Align: center; font-Family: ARIAL; font-Size: 8pt; font-Weight: none;
text-Decoration: none; color: #000080; Height: 21px}
.header {background-Color: #ffffff; text-Align: right; font-Family: ARIAL; font-Size: 8pt; font-Weight: none;
text-Decoration: none; color: #cc0033; Height: 16px}
.title {background-Color: #ffffff; text-Align: left; font-Family: ARIAL; font-Size: 8pt; font-Weight: bold; text-Decoration:
none; color: #1E49A0; Height: 21px}
.title2 {background-Color: #CCE6FF; text-Align: left; font-Family: ARIAL; font-Size: 8pt; font-Weight: bold; text-Decoration:
none; color: #1E49A0; Height: 21px}
.title3 {background-Color: #ffffff; text-Align: left; font-Family: ARIAL; font-Size: 8pt; font-Weight: bold; text-Decoration:
none; color: #cc0033; Height: 21px}
.title4 {background-Color: #CCE6FF; text-Align: center; font-Family: ARIAL; font-Size: 8pt; font-Weight: bold;
text-Decoration: none; color: #000080; Height: 21px}
.title5 {background-Color: #1E49A0; text-Align: center; font-Family: ARIAL; font-Size: 8pt; font-Weight: bold;
text-Decoration: none; color: #ffffff; Height: 21px}
.space {text-Align: center; font-Family: Tahoma; font-Size: 4pt; font-Weight: none; text-Decoration: none; color: #000080;}
.textbox { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000080; border: 1px #000080 solid;
background-color: CCE6FF}
A:link, A:visited { text-decoration: none; color:#1E49A0; }
A:active, A:hover { text-decoration: none; color:#cc0033; }
</style>
</head>
<body>
<table border="0" width="460" bgcolor="#000080" cellspacing="1" cellpadding="0">
<tr>
<td class="space" bgcolor="#000080"> </td>
</tr>
<?
$lines=file("database/squadname.txt");
$num2=sizeof($lines);
// --- Table Save Processing Start ---
if ($go =="tab_edit") {
for ($i2=0; $i2 < $num2; $i2++) {
$entry=explode ("", $lines[$i2]);
if($entry[0] == $id) {
$entry[1]=(stripslashes($leagid2));
$entry[2]=(stripslashes($name2));
$entry[3]=(stripslashes($pld2));
$entry[4]=(stripslashes($win2));
$entry[5]=(stripslashes($los2));
$entry[6]=(stripslashes($dra2));
$entry[7]=(stripslashes($gf2));
$entry[8]=(stripslashes($ga2));
}
$lines[$i2]=implode($entry,""); #. "\n";
}
$meldung="-";
}
// --- Table Save Processing End ---
if ($go == "update_table")
{
// --- Edit Table Form Start ---
?>
<tr>
<td width="50%">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td class="title5">PLD</td>
<td class="title5">W</td>
<td class="title5">L</td>
<td class="title5">D</td>
<td class="title5">GF</td>
<td class="title5">GA</td>
<td class="title5">GD</td>
<td class="title5">PTS</td>
</tr>
<form name="form1" method="POST" action="<? echo $php_self;?>">
<input type=hidden name=id value="<? echo $id; ?>">
<input type=hidden name=go value="tab_edit">
<input type=hidden name=leagid2 value="<? echo $leagid; ?>">
<input type=hidden name=name2 value="<? echo $name; ?>">
<tr>
<td class="title5"><select size="1" name="pld2" class="textbox">
<option value="1" <? if ($pld==1) echo "selected"; ?>>1</option>
<option value="2" <? if ($pld==2) echo "selected"; ?>>2</option>
<option value="3" <? if ($pld==3) echo "selected"; ?>>3</option>
<option value="4" <? if ($pld==4) echo "selected"; ?>>4</option>
<option value="5" <? if ($pld==5) echo "selected"; ?>>5</option>
<option value="6" <? if ($pld==6) echo "selected"; ?>>6</option>
<option value="7" <? if ($pld==7) echo "selected"; ?>>7</option>
<option value="8" <? if ($pld==8) echo "selected"; ?>>8</option>
<option value="9" <? if ($pld==9) echo "selected"; ?>>9</option>
<option value="10" <? if ($pld==10) echo "selected"; ?>>10</option>
<option value="11" <? if ($pld==11) echo "selected"; ?>>11</option>
<option value="12" <? if ($pld==12) echo "selected"; ?>>12</option>
<option value="13" <? if ($pld==13) echo "selected"; ?>>13</option>
<option value="14" <? if ($pld==14) echo "selected"; ?>>14</option>
<option value="15" <? if ($pld==15) echo "selected"; ?>>15</option>
<option value="16" <? if ($pld==16) echo "selected"; ?>>16</option>
<option value="17" <? if ($pld==17) echo "selected"; ?>>17</option>
<option value="18" <? if ($pld==18) echo "selected"; ?>>18</option>
<option value="19" <? if ($pld==19) echo "selected"; ?>>19</option>
<option value="20" <? if ($pld==20) echo "selected"; ?>>20</option>
<option value="21" <? if ($pld==21) echo "selected"; ?>>21</option>
<option value="22" <? if ($pld==22) echo "selected"; ?>>22</option>
</select></td>
<td class="title5"><input type="text" name="win2" size="2" class="textbox" value="<? echo $win;?>"></td>
<td class="title5"><input type="text" name="los2" size="2" class="textbox" value="<? echo $los;?>"></td>
<td class="title5"><input type="text" name="dra2" size="2" class="textbox" value="<? echo $dra;?>"></td>
<td class="title5"><input type="text" name="gf2" size="2" class="textbox" value="<? echo $gf;?>"></td>
<td class="title5"><input type="text" name="ga2" size="2" class="textbox" value="<? echo $ga;?>"></td>
<td class="title5"><input type="text" name="gd2" size="2" class="textbox" value="<? echo $gd;?>"></td>
<td class="title5"><input type="text" name="pts2" size="2" class="textbox" value="<? echo $pts;?>"></td>
</tr>
<tr>
<td class="title5"><? echo $pld;?></td>
<td class="title5"><? echo $win;?></td>
<td class="title5"><? echo $los;?></td>
<td class="title5"><? echo $dra;?></td>
<td class="title5"><? echo $gf;?></td>
<td class="title5"><? echo $ga;?></td>
<td class="title5"><? echo $gd;?></td>
<td class="title5"><? echo $pts;?></td>
</tr>
<tr>
<td class="title5" colspan="8"><input type="submit" value="Record" name="B1" class="textbox"> </td>
</tr></form>
</table>
</td>
</tr>
<tr>
<td width="100% class="title5"><?
}
if (!$meldung) $meldung="";
echo "$meldung";
$fp=fopen("database/squadname.txt","w+");
for ($i=0; $i < $num2; $i++)
fwrite($fp, $lines[$i]);
fclose($fp);
?> </td>
</tr>
<tr>
<td width="100%" class="title5">
Division 2 North [ East ] League Table Statistics
</td>
</tr>
<tr>
<td class="space" bgcolor="#000080"> </td>
</tr>
<tr>
<td width="50%">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td class="title5" width="20">ID</td>
<td class="title5" width="220">Team Name</td>
<td class="title5" width="30">PLD</td>
<td class="title5" width="20">W</td>
<td class="title5" width="20">L</td>
<td class="title5" width="20">D</td>
<td class="title5" width="30">GF</td>
<td class="title5" width="30">GA</td>
<td class="title5" width="30">GD</td>
<td class="title5" width="30">PTS</td>
<td class="title5" width="30">Edit</td>
</tr>
//// this is the problem area \/\/\/\/\/\/\/
<?
$nega=="-100";
for ($n=67; $n=$n; $n--) {
for ($n2=37; $n2>0; $n2--) {
?>
<?
Menu Generator
$line = file("database/squadname.txt");
$lines = sizeof($line);
for ($j=0; $j<1; $j++)
{
for ($i= 0; $i<$lines ; $i++) {
$entry = explode ("", $line[$i]);
$nr = $entry[0];
$leagid = $entry[1];
$name = $entry[2];
$pld = $entry[3];
$win = $entry[4];
$los = $entry[5];
$dra = $entry[6];
$gf = $entry[7];
$ga = $entry[8];
$gd = ($gf-$ga);
$pts = (($win3)+($dra));
if($pts==$n){
if($gd==$n2) {
?>
<tr>
<td class="button" width="20"><? echo $leagid;?></td>
<td class="button" width="200"><? echo $name;?></td>
<td class="title5" width="30"><? echo $pld;?></td>
<td class="title5" width="20"><? echo $win;?></td>
<td class="title5" width="20"><? echo $los;?></td>
<td class="title5" width="20"><? echo $dra;?></td>
<td class="title5" width="30"><? echo $gf;?></td>
<td class="title5" width="30"><? echo $ga;?></td>
<td class="title5" width="30"><? echo $gd;?></td>
<td class="title5" width="30"><? echo $pts;?></td>
<td class="title5" width="30"><a href="<? echo $php4_self; ?>?go=update_table&id=<? echo $nr; ?>&leagid=<? echo
$leagid;?>&name=<? echo $name; ?>&pld=<? echo $pld; ?>&win=<? echo $win; ?>&los=<? echo $los; ?>&dra=<? echo $dra; ?>&gf=<?
echo $gf; ?>&ga=<? echo $ga; ?>&gd=<? echo $gd; ?>&pts=<? echo $pts; ?>">Edit</a>
</td>
</tr>
<? }}}}}}?>
</table>
</td>
</tr>
</table>
</body>
</html>