science-ation/volunteer_main.php

90 lines
3.2 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.
*/
?>
<?
require_once("common.inc.php");
require_once("user.inc.php");
require_once("user_page.inc.php");
require_once("volunteer.inc.php");
user_auth_required('volunteer');
send_header("Volunteer Registration", array());
switch($_GET['notice']) {
case 'password_changed':
echo happy(i18n('Your password has been successfully updated'));
break;
case 'already_logged_in':
2007-11-17 21:45:38 +00:00
echo error(i18n('You are already logged in, please use the [Logout] link in the upper right to logout before loggin in as different user'));
break;
case 'attached':
echo happy(i18n('The Volunteer role has been attached to your account. Use the [Switch Roles] link in the upper right to change roles while you are logged in'));
break;
2007-11-16 06:30:42 +00:00
}
//only display the named greeting if we have their name
echo i18n("Hello <b>%1</b>",array($_SESSION['name']));
echo "<br />";
echo "<br />";
echo i18n("Please use the checklist below to complete your data. Click on an item in the table to edit that information. When you have entered all information, the <b>Status</b> field will change to <b>Complete</b>");
echo "<br />";
echo "<br />";
$u = user_load($_SESSION['users_id']);
user_page_summary_begin();
user_page_summary_item("Contact Information",
"user_personal.php", "user_personal_info_status", array($u));
user_page_summary_item("Volunteer Positions",
"volunteer_position.php", "volunteer_status_position", array($u));
$overallstatus = user_page_summary_end(true);
/* A bit of a FIXME here, if a user completes everythign but doesn't refresh
this page, they will never be marked as complete. Not sure how to handle
this, it's kinda hackey to call EVERY status() fucntion within EACH page to
get teh overall status. */
user_update_complete($u, $overallstatus);
echo "<br />";
echo "<br />";
if($overallstatus!='complete')
{
echo error(i18n("You will not be marked as an active volunteer until your \"Overall Status\" is \"Complete\""));
}
else
{
echo happy(i18n("Thank you for completing the volunteer registration process. We look forward to seeing you at the fair"));
}
echo "<br />";
echo i18n('Other Options and Things To Do').':<br />';
echo '<ul>';
2007-11-16 17:53:20 +00:00
echo '<li><a href="user_password.php">'.i18n('Change My Password').'</a></li>';
echo '</ul>';
2007-11-16 06:30:42 +00:00
send_footer();
?>