Esempio n. 1
0
      elem.value = "Locked";
      elem.disabled = false;
    }
  }
</script>

<section class=content>
<?php 
require_once "classWeddingUser.inc";
$currentUser = new weddingUser();
$currentUser->setCurrentUser($_SESSION['userID']);
if (isset($_REQUEST['submitted'])) {
    //echo print_r($_REQUEST);
    $isUpdate = $currentUser->getCurrentIsRSVP();
    $oldTotal = $currentUser->getCurrentNumAttending();
    $oldSumAttending = $currentUser->getTotalAttending();
    if ($isUpdate) {
        $emailMsg = '<strong>Changed RSVP Submitted</strong><br /> ' . date(DATE_RFC850) . '<br />--------<pre>';
        $emailMsg .= 'Name: ' . $currentUser->getCurrentFullName() . "\r\n";
        $emailMsg .= 'Username: '******'UserID: ' . $currentUser->getcurrentUserID() . "\r\n\r\n";
    }
    foreach ($_REQUEST['isPlusOne'] as $attID => $isPlusOne) {
        if ($isUpdate) {
            $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);