Esempio n. 1
0
         $emailMsg .= '[' . ($_REQUEST['isAttending'][$attID] == 'on' ? 'x' : ' ') . '] ' . $_REQUEST['displayName'][$attID] . '(ID: ' . $attID . ")";
         $emailMsg .= ' - Previous: [' . ($currentUser->getAttendeeIsAttending($attID) ? 'x' : ' ') . '] ' . $currentUser->getAttendeeDisplayName($attID) . "\r\n";
     }
     if ($_REQUEST['displayName'][$attID] != '') {
         $currentUser->updateAttendeeRSVP($attID, $_REQUEST['isAttending'][$attID] == 'on' ? true : false, $isPlusOne, $_REQUEST['displayName'][$attID]);
     } else {
         $currentUser->updateAttendeeRSVP($attID, $_REQUEST['isAttending'][$attID] == 'on' ? true : false, $isPlusOne);
     }
 }
 $currentUser->updateCurrentRSVP($_REQUEST['email'], $_REQUEST['notesRSVP']);
 if ($isUpdate) {
     $emailMsg .= 'TotalAttending: ' . $currentUser->getCurrentNumAttending() . "\r\n";
     $emailMsg .= 'Previous Total: ' . $oldTotal . "\r\n";
     $delta = -($oldTotal - intval($currentUser->getCurrentNumAttending()));
     $emailMsg .= 'Delta:         ' . ($delta >= 0 ? '+' : '') . $delta . "\r\n\r\n";
     $emailMsg .= 'Email: ' . $currentUser->getcurrentUserEmail() . "\r\n";
     $emailMsg .= "\r\n\r\nNotes: \r\n" . $currentUser->getCurrentNotesRSVP();
     $emailMsg .= '</pre>--------<br />';
     $emailMsg .= 'Total Currently RSVP\'d: ' . $currentUser->getTotalAttending() . '<br />';
     $emailMsg .= 'Before this update:     ' . $oldSumAttending;
     require_once "emailDetails.inc";
     //echo 'DEBUG:<br />Mailto: ' . $mailto . '<br />Subject: ' . 'Updated RSVP - ' . $currentUser->getCurrentFullName() . '<br />Headers: ' . $headers . '<br />Email Body:<br />' . $emailMsg . '<br /><br />';
     mail($mailto, 'Updated RSVP - ' . $currentUser->getCurrentFullName(), $emailMsg, $headers);
 }
 echo '<p>Thanks for the ' . ($isUpdate ? 'update' : 'response') . '! We have ' . $currentUser->getCurrentAmountAttending() . ' confirmed guests in your party. ';
 if ($currentUser->getCurrentNumAttending() == 0) {
     echo 'That\'s a <em>little</em> bit sad, but it will be OK.</p>';
 } else {
     echo 'Huzzah!</p>';
 }
 if ($isUpdate) {