A trip id should be in the url..."); exit; } ?> Actually going is not tracked by this signup tool
'; return; } else { $allowed=0; $signupcount=$tripinfo['signuptype']; if ($signupcount >= 4) { //then members can sign themselves up as going $signupcount-=4; echo 'Members can mark themselves as going, but should use the '; echo 'Signup Page.
'; } //members can sign themselves up as going if ($signupcount >= 2) {//exec can sign people up as going $signupcount-=2; echo 'Exec are allowed to mark people as going using this page, you '; if ($exec) { $allowed=1; echo 'are exec.
'; } else { echo 'are not exec.
'; } }//end exec signup if ($signupcount >= 1) {//organizer as going $signupcount-=1; echo 'The organizer is allowed to mark people as going using this page, you '; if ($mem_id==$orgid) { $allowed=1; echo 'are the organizer.
'; } else { echo 'are not the organizer.
'; } }//end organizer if (user_has_role(PERMISSION_ADMIN)) {$allowed=1; echo 'Admins can always make change, you '; echo 'have admin.
'; } if (!$allowed) {return;} }//actually going tracked at all //END ALLOWED CHECKING echo '

Check/Uncheck the boxes to mark as going, then hit update

'; //sort out actions of the _POST from previous updates if ($_POST['submit']) { //first boot out all the people who were set as going mysql_query("UPDATE `participation` SET signupclass='0' WHERE `tripid`='$cleantripid' AND `signupclass`='3'") or die("Invalid query"); //then re-insert everyone who is now set as going... $numbersubmissions = count($_POST['memberbox']); for ($i=0; $i < $numbersubmissions; $i++){ $thisone=$_POST['memberbox'][$i]; mysql_query("UPDATE `participation` SET signupclass='3' WHERE `id`='$thisone'") or die("Invalid query"); } //if they showed the member list for more people if ($_POST['addmember']){ $numbersubmissions = count($_POST['addmember']); for ($i=0; $i < $numbersubmissions; $i++){ $thisone=$_POST['addmember'][$i]; // build and insert their entry $memberkey=mysql_query("SELECT name FROM members WHERE id='$thisone'") or die("Invalid membership query"); $meminfo = mysql_fetch_array($memberkey); $driving=$_POST['number_passengers'][$i]; if ($driving) { $explodedname=explode(' ',$meminfo['name']); $lastkey = count($explodedname)-1; $carname=$explodedname[$lastkey].'mobile'; } else { $driving=0; $carname=''; } $answers=$_POST['answers'][$i]; mysql_query("INSERT INTO `participation` ( `memberid`, `tripid`, `signupclass`, `signuptime`, `driving`, `carname`, `answers`) VALUES( '$thisone', '$cleantripid', '3', '$datenow', '$driving', '$carname', '$answers') ") or die(mysql_error()); $newid=mysql_insert_id(); if ($driving == 0){ } else { mysql_query("UPDATE `participation` SET `carid`='$newid' WHERE `id`='$newid'") or die(mysql_error()); } }//end for loop }//end if added from member list } //END SORT OUT POST ACTIONS //list people, with actually going first echo '
'; if ($oldtrip){echo 'Warning - This is an old trip
';} $types = array(-1 => 'no longer interested', -2 => 'bailed from committed', -3 => 'bailed from actually going', 0=> 'off the list (because they were marked going, but you unchecked them)', 1 => 'interested', 2 => 'committed', 3 => 'actually going'); $makecheckboxes=1; for ($i=3; $i >=-3; $i--){ $type=$types[$i]; //make a list of participants $signupclass=$i; include ("tripagenda/displayparticipantlist.php"); if ($emaillist) {echo '
';} } //for $i echo '
'; ?>
Add memberAdd people who didn't sign up ahead of time (enter 3 characters to autocomplete member name)