Esempio n. 1
0
<?php

/*
 * Created on Mar 15, 2006 by Aaron Zeckoski (aaronz@vt.edu)
 */
// get institution information
$Inst = new Institution($User->institution_pk);
$isPartner = $Inst->isPartner();
// this means the user is in a partner inst
$INST = $Inst->toArray();
// get the current info out if it exists for this user
$conf_sql = "select * from conferences where users_pk='{$User->pk}' and confID='{$CONF_ID}'";
$result = mysql_query($conf_sql) or die('Conf fetch query failed: ' . mysql_error());
$CONF = mysql_fetch_assoc($result);
// first result is all we care about
$isRegistered = false;
// this means the user is already registered for the current conference
if ($CONF) {
    $isRegistered = true;
    $transID = $CONF['transID'];
    $fee = $CONF['fee'];
    $Message = "<span style='color:red;'>You have already filled out a registration form for this conference.</span>";
    if (!$isPartner) {
        if ($transID) {
            //non-member payment transaction received from Verisign
            $Message .= "<span style='color:red;'><br />Your payment confirmation number is: {$transID} </span><br/>" . "<span style='color:red;'><br />Registration fee paid: &#36;{$fee} </span><br/><br/>";
        } else {
            $Message .= "<span style='color:red;'><br />However, <strong>you have not completed the payment process.</strong>" . " <br/><br/></span><strong>Please go to" . " the <a href='payment.php'>Payment page</a> to complete the registration process.</strong>" . "<div class=padding50>&nbsp;</div><div class=padding50>&nbsp;</div> ";
        }
    }
}
Esempio n. 2
0
            $Message = "Error: Could not save: " . $opInst->Message;
        } else {
            $Message = "<strong>Saved institution information</strong>";
            if (!$PK) {
                // added a new institution
                echo "Created new institution: {$opInst->name}<br/>" . "<a href='{$_SERVER['PHP_SELF']}?pk={$opInst->pk}'>Edit this institution</a> " . "or <a href='admin_insts.php'>Go to Institutions page</a>";
                include $ACCOUNTS_PATH . 'include/footer.php';
                exit;
            }
        }
    } else {
        $Message = "<div class='error'>Please fix the following errors:\n<blockquote>\n{$Message}</blockquote>\n</div>\n";
    }
}
//echo $opUser, "<br/>"; // for testing
$thisItem = $opInst->toArray();
// put the user data into an array for easy access
// Use the user pks to get the user info for reps
$userPks = array();
$userPks[$opInst->rep_pk] = $opInst->rep_pk;
$userPks[$opInst->repvote_pk] = $opInst->repvote_pk;
$userInfo = $User->getUsersByPkList($userPks, "firstname,lastname,email");
//echo "<pre>",print_r($userInfo),"</pre><br/>";
// put the userInfo into the item
$thisItem['firstname'] = $userInfo[$opInst->rep_pk]['firstname'];
$thisItem['lastname'] = $userInfo[$opInst->rep_pk]['lastname'];
$thisItem['email'] = $userInfo[$opInst->rep_pk]['email'];
$thisItem['vfirstname'] = $userInfo[$opInst->repvote_pk]['firstname'];
$thisItem['vlastname'] = $userInfo[$opInst->repvote_pk]['lastname'];
$thisItem['vemail'] = $userInfo[$opInst->repvote_pk]['email'];
?>