<th>Abbrev</th> <th>Name</th> <th>Contact</th> <th>Phone</th> <th>Email</th> <th>Website</th> <th>Night</th> <th>Schools</th> </tr> <?php $pemail = strlen($username) != 0; $ret = mysql_query("select code from club order by name"); if ($ret && mysql_num_rows($ret)) { while ($row = mysql_fetch_assoc($ret)) { $p = new Club($row["code"]); $p->fetchdets(); $sch = $p->Schools ? 'Yes' : '-'; print <<<EOT <tr> <td>{$p->display_code()}</td> <td>{$p->display_name()}</td> <td>{$p->display_contact()}</td> <td>{$p->display_contphone()}</td> <td>{$p->display_contemail($pemail)}</td> <td>{$p->display_website()}</td> <td>{$p->display_night()}</td> <td>{$sch}</td> </tr> EOT; } }
$club->Name = $newname; $club->Contactfirst = $contfirst; $club->Contactlast = $contlast; $club->Contactemail = $contemail; $club->Contactphone = $contphone; $club->Website = $website; $club->Night = $night; $club->Schools = $sch; $club->create(); $Title = "Club {$club->display_name()} created OK"; break; default: try { $club = new Club(); $club->frompost(); $club->fetchdets(); } catch (ClubException $e) { $mess = $e->getMessage(); include 'php/wrongentry.php'; exit(0); } // If name has changed, check it doesn't clash if ($newcode != $club->Code) { checkclash($newcode); $qcode = mysql_real_escape_string($newcode); mysql_query("update club set code='{$qcode}' where {$club->queryof()}"); $club->Code = $newcode; } $club->Name = $newname; $club->Contactfirst = $contfirst; $club->Contactlast = $contlast;