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. */ ?> id; } /* Match selections with available positions */ foreach($_POST['posn'] as $id=>$val) { if(!in_array($id, $posns)) continue; $vals[] = $id; } $u['volunteer_positions'] = $vals; } else { //if they didnt select anything... $u['volunteer_positions']=array(); } user_save($u); $newstatus = volunteer_status_position($u); ?> "; display_messages(); echo "

".i18n('Volunteer Positions')." -

"; echo ""; echo "
\n"; echo "\n"; /* Read current selections */ $checked_positions = array(); $r = mysql_query("SELECT * FROM volunteer_positions_signup WHERE users_id = '{$u['id']}' AND conferences_id='{$conference['id']}'"); while($p = mysql_fetch_object($r)) { $checked_positions[] = $p->volunteer_positions_id; } /* Load available volunteer positions */ $q = "SELECT *,UNIX_TIMESTAMP(start) as ustart, UNIX_TIMESTAMP(end) as uend FROM volunteer_positions WHERE conferences_id = {$conference['id']}"; $r = mysql_query($q); while($p = mysql_fetch_object($r)) { echo '' ; echo ""; echo ''; } echo "
'; $checked = false; if($_SESSION['lang'] == 'en') { $sday = strftime("%a. %B %e, %Y", $p->ustart); $stime = strftime("%H:%M", $p->ustart); $eday = strftime("%a. %B %e, %Y", $p->uend); $etime = strftime("%H:%M", $p->uend); if($sday == $eday) { $start = $stime; $end = "$etime, $sday"; } else { $start = "$sday, $stime"; $end = "$eday, $etime"; } } else { $start = $p->start; $end = $p->end; } $ch = in_array($p->id, $checked_positions) ? 'checked="checked"' : ''; echo "id]\" value=\"checked\" />"; echo ''; echo ''.i18n($p->name).'($start - $end)
'; echo i18n($p->desc); echo '

"; echo ""; echo "
"; echo "
"; ?>