2011-02-16 18:39:59 +00:00
|
|
|
<?
|
|
|
|
/*
|
|
|
|
This file is part of the 'Science Fair In A Box' project
|
|
|
|
SFIAB Website: http://www.sfiab.ca
|
|
|
|
|
|
|
|
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
|
|
|
Copyright (C) 2005 James Grant <james@lightbox.org>
|
|
|
|
|
|
|
|
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, version 2.
|
|
|
|
|
|
|
|
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; see the file COPYING. If not, write to
|
|
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<?
|
|
|
|
if($_GET['show_types'])
|
|
|
|
$NAV_IDENT=$_GET['show_types'][0];
|
|
|
|
if($_POST['show_types'])
|
|
|
|
$NAV_IDENT=$_POST['show_types'][0];
|
|
|
|
|
|
|
|
require_once('../common.inc.php');
|
|
|
|
require_once('../user.inc.php');
|
|
|
|
require_once('../judge.inc.php');
|
|
|
|
user_auth_required('admin');
|
|
|
|
|
|
|
|
require_once('judges.inc.php');
|
|
|
|
|
2011-02-23 17:48:44 +00:00
|
|
|
send_header("Account List",
|
2011-02-16 18:39:59 +00:00
|
|
|
array('Committee Main' => 'committee_main.php',
|
|
|
|
'Administration' => 'admin/index.php')
|
|
|
|
);
|
|
|
|
|
2011-02-23 17:48:44 +00:00
|
|
|
$querystr = "SELECT * FROM accounts ORDER BY username";
|
2011-02-16 18:39:59 +00:00
|
|
|
/*
|
|
|
|
echo $querystr;
|
|
|
|
echo "<br />\n";
|
|
|
|
echo "<br />\n";
|
|
|
|
*/
|
|
|
|
$q = mysql_query($querystr);
|
|
|
|
echo mysql_error();
|
|
|
|
echo "<br />\n";
|
|
|
|
$num = mysql_num_rows($q);
|
|
|
|
echo i18n("Listing %1 account total.",array($num));
|
|
|
|
|
|
|
|
echo mysql_error();
|
|
|
|
echo "<table class=\"tableview\">";
|
|
|
|
echo "<thead>";
|
|
|
|
echo "<tr>";
|
2011-02-23 17:48:44 +00:00
|
|
|
echo " <th>".i18n("Account ID")."</th>";
|
2011-02-16 18:39:59 +00:00
|
|
|
echo " <th>".i18n("Username")."</th>";
|
|
|
|
echo " <th>".i18n("Email Address")."</th>";
|
|
|
|
echo " <th>".i18n("Pending Email")."</th>";
|
2011-03-03 05:44:49 +00:00
|
|
|
echo " <th>".i18n("User Info")."</th>";
|
2011-02-23 17:48:44 +00:00
|
|
|
// echo " <th>".i18n("Actions")."</th>";
|
2011-02-16 18:39:59 +00:00
|
|
|
echo "</tr>";
|
|
|
|
echo "</thead>";
|
|
|
|
echo "<tbody>";
|
|
|
|
|
|
|
|
$tally = array();
|
|
|
|
$tally['active'] = array();
|
|
|
|
$tally['inactive'] = array();
|
|
|
|
$tally['active']['complete'] = 0;
|
|
|
|
$tally['active']['incomplete'] = 0;
|
|
|
|
$tally['active']['na'] = 0;
|
|
|
|
$tally['inactive']['complete'] = 0;
|
|
|
|
$tally['inactive']['incomplete'] = 0;
|
|
|
|
$tally['inactive']['na'] = 0;
|
|
|
|
while($r=mysql_fetch_assoc($q)) {
|
|
|
|
// get the role data for this user
|
|
|
|
echo "<tr>";
|
|
|
|
echo "<td>";
|
|
|
|
echo $r['id'];
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td>";
|
|
|
|
echo $r['username'];
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td>";
|
|
|
|
echo $r['email'];
|
|
|
|
echo "</td><td>";
|
|
|
|
echo $r['pendingemail'];
|
|
|
|
echo "</td>";
|
2011-02-23 17:48:44 +00:00
|
|
|
echo "<td>";
|
|
|
|
$u=user_load_by_accounts_id($r['id']);
|
|
|
|
if($u) {
|
2011-03-03 05:44:49 +00:00
|
|
|
if(count($u['roles'])) {
|
|
|
|
echo "<b>";
|
|
|
|
echo "<a href=\"#\" onclick=\"return openeditor({$u['id']})\">";
|
2011-03-05 04:39:06 +00:00
|
|
|
if($u['firstname'] || $u['lastname']) {
|
|
|
|
echo $u['firstname']." ".$u['lastname'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo i18n("No name specified");
|
|
|
|
}
|
2011-03-03 05:44:49 +00:00
|
|
|
echo "</a>";
|
|
|
|
echo "</b>";
|
|
|
|
echo "<table>";
|
|
|
|
foreach($u['roles'] AS $r=>$rd) {
|
|
|
|
echo "<tr><td>";
|
|
|
|
echo $rd['name'];
|
|
|
|
echo "</td>";
|
|
|
|
if($rd['active']=="yes"){ $cl="happy"; $cls=""; } else { $cl="error"; $cls="not "; }
|
|
|
|
echo "<td class=\"$cl\">{$cls}active</td>";
|
|
|
|
if($rd['complete']=="yes"){ $cl="happy"; $cls=""; } else { $cl="error"; $cls="not "; }
|
|
|
|
echo "<td class=\"$cl\">{$cls}complete</td>";
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
echo "</table>";
|
|
|
|
} else {
|
|
|
|
echo "no roles";
|
2011-02-23 17:48:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2011-03-03 05:44:49 +00:00
|
|
|
echo "no user record for this conference";
|
2011-02-23 17:48:44 +00:00
|
|
|
}
|
|
|
|
echo "</td>";
|
|
|
|
echo "</tr>";
|
2011-02-16 18:39:59 +00:00
|
|
|
}
|
|
|
|
echo "</tbody>";
|
|
|
|
echo "</table>";
|
|
|
|
|
|
|
|
send_footer();
|
|
|
|
?>
|