Fix a bug where if no $table is passed to addTable it will now return gracefully instead of spitting out error messages

Add email field to the judge list, and the judge manager list
This commit is contained in:
james 2007-02-09 14:57:07 +00:00
parent 8db16d85f8
commit 952a4d3c29
3 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,7 @@ function openjudgeinfo(id)
judges.id,
judges.firstname,
judges.lastname,
judges.email,
judges.complete,
judges_years.year
@ -84,6 +85,7 @@ function openjudgeinfo(id)
echo mysql_error();
echo "<tr>";
echo " <th>".i18n("Judge Name")."</th>";
echo " <th>".i18n("Email Address")."</th>";
echo " <th>".i18n("Active")."</th>";
echo " <th>".i18n("Complete")."</th>";
echo " <th>".i18n("Actions")."</th>";
@ -95,6 +97,7 @@ function openjudgeinfo(id)
echo "<tr><td>";
echo "<a href=\"\" onclick=\"return openjudgeinfo($r->id)\">$r->firstname $r->lastname</a>";
echo "</td>";
echo "<td>$r->email</td>";
if($r->year)
{
echo "<td class=\"happy\" align=\"center\">".i18n("yes")."</td>";

View File

@ -29,6 +29,7 @@ $judges_fields = array( 'firstname' => 'First Name',
$judges_table_fields = array( 'id' => 'ID',
'firstname' => 'First Name',
'lastname' => 'Last Name',
'email' => 'Email Address',
'complete' => 'Complete',
// 'year' => 'Year',
);

View File

@ -521,6 +521,9 @@ class lpdf
function addTable($table,$align="center")
{
//if we get a table passed in that doesnt look like a table (not an array) then just return doing nothing
if(!is_array($table)) return;
if(is_array($table['header']))
{
$table_cols=count($table['header']);