本文整理汇总了PHP中Institution::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Institution::toArray方法的具体用法?PHP Institution::toArray怎么用?PHP Institution::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Institution
的用法示例。
在下文中一共展示了Institution::toArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Institution
<?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: ${$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> </div><div class=padding50> </div> ";
}
}
}
示例2: array
$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'];
?>