science-ation/user_page.inc.php

87 lines
2.4 KiB
PHP
Raw Permalink Normal View History

2007-11-16 06:30:42 +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>
Copyright (C) 2007 David Grant <dave@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.
*/
?>
<?
$user_page_overall_status = 'incomplete';
function user_page_summary_begin()
{
global $user_page_overall_status;
echo "<table class=\"summarytable\">";
echo "<tr><th>".i18n("Item")."</th><th>".i18n("Status")."</th></tr>";
$user_page_overall_status = 'complete';
}
function user_page_summary_item($name, $link, $status_function, $args=array())
{
global $user_page_overall_status;
echo "<tr><td>";
echo "<a href=\"$link\">";
echo i18n("$name");
echo "</a>";
echo "</td><td>";
//check to see if its complete
switch($status_function) {
case 'user_personal_info_status':
2018-10-30 17:27:45 +00:00
$status = user_personal_info_status($args[0]);
break;
case 'judge_status_other':
2018-10-30 17:27:45 +00:00
$status = judge_status_other($args[0]);
break;
case 'judge_status_expertise':
2018-10-30 17:27:45 +00:00
$status = judge_status_expertise($args[0]);
break;
case 'judge_status_availability':
2018-10-30 17:27:45 +00:00
$status = judge_status_availability($args[0]);
break;
case 'judge_status_special_awards':
2018-10-30 17:27:45 +00:00
$status = judge_status_special_awards($args[0]);
break;
default:
$status=call_user_func_array($status_function, $args);
break;
}
2007-11-16 06:30:42 +00:00
echo outputStatus($status);
echo "</td></tr>";
if($status != 'complete') {
$user_page_overall_status = 'incomplete';
}
}
function user_page_summary_end($print_overall)
{
global $user_page_overall_status;
if($print_overall) {
echo "<tr><td colspan=\"2\"><hr></td></tr>";
echo "<tr><td>".i18n("Overall Status")."</td><td>";
echo outputStatus($user_page_overall_status);
echo "</td></tr>";
}
echo "</table>";
return $user_page_overall_status;
}
?>