Copyright (C) 2005 James Grant Copyright (C) 2007 David Grant 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. */ ?> 0) { $notice = 'email_exists'; } else { user_save($u); if($_SESSION['last_page'] == 'committee_management') { header("location: {$config['SFIABDIRECTORY']}/admin/committees.php"); exit; } $notice = 'success'; } } //send the header if($eid == false) { $type = $_SESSION['users_type']; send_header("{$user_what[$type]} - Personal Information", array("{$user_what[$type]} Registration" => "{$type}_main.php") ); } else { if($_SESSION['last_page'] == 'committee_management') { send_header("Personal Information for {$u['firstname']} {$u['lastname']}", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php', 'Committee Management' => 'admin/committees.php') ); } else { send_header("Personal Information for {$u['firstname']} {$u['lastname']}", array("Committee Main" => "committee_main.php") ); } } switch($notice) { case 'success': echo notice(i18n("%1 %2 successfully updated",array($_POST['firstname'],$_POST['lastname']))); break; case 'email_exists': echo error(i18n("That email address is in use by another user")); break; } if($eid == false) { //output the current status $newstatus=user_personal_info_status($u); if($newstatus!='complete') echo error(i18n("Personal Information Incomplete")); else echo happy(i18n("Personal Information Complete")); } if(count($u['types']) > 1) { $roles=''; foreach($u['types'] as $t) { $roles.= (($roles=='')?'':', ').i18n($user_what[$t]); } echo notice(i18n('This user has multiple roles, the fields shown below are a combination of every role. Some may not apply to some roles. This user has the following roles:').' '.$roles); } function item($user, $text, $fname, $subtext='') { global $fields, $required; if(in_array($fname, $fields)) { echo ''.i18n($text).': '; if($subtext != '') echo '
'.i18n($subtext).''; echo ''; echo ""; if(in_array($fname, $required)) echo REQUIREDFIELD; echo ''; } else { echo ''; } } $eidstr = ''; if($eid != false) { $eidstr="?edit=$eid"; } echo "
\n"; echo "\n"; echo "\n"; echo "\n"; item($u, "First Name", 'firstname'); item($u, "Last Name", 'lastname'); echo "\n"; echo "\n"; item($u, "Email Address", 'email'); echo ''; echo "\n"; echo "\n"; item($u, "Username", 'username', '(if different from Email)'); item($u, "Password", 'password'); echo "\n"; echo "\n"; item($u, "Address 1", 'address'); item($u, "Address 2", 'address2'); echo "\n"; echo "\n"; item($u, "City", 'city'); if(in_array('province', $fields)) { echo ''; echo ''; } else { echo ''; } echo "\n"; echo "\n"; item($u, "Postal Code", 'postalcode'); echo ""; echo "\n"; echo ""; item($u, "Phone (Home)", 'phonehome'); item($u, "Phone (Cell)", 'phonecell'); echo "\n"; echo "\n"; item($u, "Organization", 'organization'); item($u, "Phone (Work)", 'phonework'); echo ""; echo "\n"; item($u, "Fax", 'fax'); echo ''; echo ""; echo ""; echo "
'.i18n('Province').': '; emit_province_selector("province",$judgeinfo->province,"onchange=\"fieldChanged()\""); if(in_array('province', $required)) echo REQUIREDFIELD; echo '

"; /* Committee specific fields */ if(in_array('committee', $u['types'])) { echo ""; echo "\n"; echo ""; echo ""; } echo '
".i18n("Email (Private)").":
".i18n("Display Emails").":"; if($u['displayemail']=="no") $checked="checked=\"checked\""; else $checked=""; echo "".i18n("No"); echo "     "; if($u['displayemail']=="yes") $checked="checked=\"checked\""; else $checked=""; echo "".i18n("Yes"); if(committee_auth_has_access("super")) { /* If the user is a committee member, only print these fields * if the editer has super access */ echo "

".i18n("Access Controls").":"; $ch = ($u['access_admin']=="yes") ? 'checked="checked"' : ''; echo " ".i18n("Administration")."
"; $ch = ($u['access_config']=="yes") ? 'checked="checked"' : ''; echo " ".i18n("Configuration")."
"; $ch = ($u['access_super']=="yes") ? 'checked="checked"' : ''; echo " ".i18n("Superuser")."
"; echo "
'; } echo "\n"; echo "
"; echo "
"; send_footer(); ?>