本文整理汇总了PHP中Invitation::selectWorker方法的典型用法代码示例。如果您正苦于以下问题:PHP Invitation::selectWorker方法的具体用法?PHP Invitation::selectWorker怎么用?PHP Invitation::selectWorker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invitation
的用法示例。
在下文中一共展示了Invitation::selectWorker方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: swwat_parse_string
try {
$email = swwat_parse_string(html_entity_decode($_POST[PARAM_EMAIL]), true);
$password = swwat_parse_string(html_entity_decode($_POST[PARAM_PASSWORD]), true);
if (is_null($email)) {
throw new LoginException('username required');
}
if (is_null($password)) {
throw new LoginException('password required');
}
// else
try {
WorkerLogin::password_authenticate($email, $password);
$password = NULL;
$worker = getWorkerAuthenticated();
// see if any invites
$invitations = Invitation::selectWorker($worker->workerid);
// look for explicit-only
foreach ($invitations as $invite) {
if ($invite->workerid == $worker->workerid) {
// default to Registation page
header('Location: WorkerRegistrationPage.php');
include 'WorkerRegistrationPage.php';
return;
}
}
// $invite
//Go to the proper page
$expo = Expo::selectActive($worker->workerid);
if ($worker->isOrganizer()) {
// maybe the organizer is not assigned to anything!
if (!is_null($expo) && $expo->isRunning()) {
示例2: getWorkerAuthenticated
<meta http-equiv="expires" content="31 Dec 2011 12:00:00 GMT"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title><?php
echo SITE_NAME;
?>
- Worker Registration Page</title>
<link href="css/site.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<?php
$author = getWorkerAuthenticated();
$invitationList = Invitation::selectWorker($author->workerid);
$expoList = array();
foreach ($invitationList as $invitation) {
if (!is_null($invitation->expoid)) {
$expoList[] = Expo::selectID($invitation->expoid);
}
}
$_SESSION[PARAM_LIST] = $expoList;
//setExpoCurrent(NULL);
$invitationList = NULL;
// gc hint
// ok, start the html
include 'section/header.php';
?>
示例3: catch
}
try {
$worker = $worker->insert();
} catch (PDOException $ex) {
logMessage("RegistrationAction", $ex->getMessage());
$_SESSION[PARAM_MESSAGE] = "Registration was unsuccessful due to a database error. Please try again in a few minutes.";
header('Location: RegistrationPage.php');
include 'RegistrationPage.php';
return;
}
unset($_SESSION[PARAM_MESSAGE]);
unset($_SESSION[PARAM_WITHCODE]);
// default ACCEPT on all invitations
$registrationArray = array();
try {
$registrationArray = Invitation::selectWorker($worker->workerid);
} catch (PDOException $ex) {
logMessage("RegistrationAction", "selecting worker:{$worker->workerid} " . $ex->getMessage());
// but ignore and continue
}
foreach ($registrationArray as $registration) {
try {
$worker->assignToExpo($registration->expoid);
// $registration->delete(); // accepted, so don't keep around
} catch (PDOException $ex) {
logMessage("RegistrationAction", "assign worker:{$worker->workerid} to expo:{$expo->expoid} failure " . $ex->getMessage());
// but ignore and continue
}
}
// $registration
foreach ($registrationArray as $registration) {