[Openfirst-cvscommit] members divisions.php,NONE,1.1
Brought to you by:
xtimg
From: <xt...@us...> - 2003-08-12 04:46:50
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv29166 Added Files: divisions.php Log Message: Add division pages to members area. --- NEW FILE: divisions.php --- <?php /* * openFIRST.members - divisions.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@po...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ include("../config/globals.php"); include($header); ?> <h1>Divisions</h1> <?php if(isset($user->division) == true) { $division = $user->division; } if(isset($_GET["division"]) == true) { $division = $_GET["division"]; } if($division != "") { $div = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_divisions WHERE division='$division';")); echo("<h2>$div->division</h2> <sub><a href='divisions.php?division='>View list of all divisions</a></sub> <p>$div->description</p> <h2>$div->division Division Members</h2>"); $members = mysql_query("SELECT user, firstname, lastname, year, dateregistered, lastseen FROM ofirst_members WHERE division='$div->division';"); echo("<table> <tr><th>Full Name</th><th>Year</th><th>Date Registered</th><th>Last Seen</th></tr>"); while ($m = mysql_fetch_object($members)) { echo("<tr><td><a href='profile.php?id=$m->user'>$m->firstname $m->lastname</a></td><td>$m->year</td><td>$m->dateregistered</td><td>$m->lastseen</td></tr>"); } } else { $d = mysql_query("SELECT * FROM ofirst_divisions;"); echo("<table>"); while ($div = mysql_fetch_object($d)) { echo("<tr><th><a href='divisions.php?division=$div->division'>$div->division</a></th><td>$div->description</td></tr>"); } echo("</table>"); } ?> <?php include($footer); ?> |