本文整理汇总了PHP中getWorkerAuthenticated函数的典型用法代码示例。如果您正苦于以下问题:PHP getWorkerAuthenticated函数的具体用法?PHP getWorkerAuthenticated怎么用?PHP getWorkerAuthenticated使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getWorkerAuthenticated函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addMenu
public static function addMenu($menuItemArray)
{
echo "<div id=\"menu\">\n<table>\n";
// always have a logout
Menu::addMenuItem(MENU_LOGOUT);
for ($k = 0; $k < count($menuItemArray); $k++) {
Menu::addMenuItem($menuItemArray[$k]);
}
// $k
// always able to see self's schedule
$author = getWorkerAuthenticated();
$worker = getWorkerCurrent();
$expo = getExpoCurrent($author->workerid);
$station = getStationCurrent($author->workerid);
if (is_null($worker)) {
$worker = $author;
}
if ($author->isOrganizer() || $author->isSupervisor()) {
# Menu::addMenuItem(MENU_WORKER_MESSAGE);
if (!is_null($expo)) {
if (strpos($_SERVER['SCRIPT_URL'], "ShiftCheckInPage.php")) {
Menu::addMenuItem(MENU_EXPO_CHECKIN_CLIENT);
} else {
if (!strpos($_SERVER['SCRIPT_URL'], "ExpoCheckInPage.php")) {
if (!is_null($station)) {
Menu::addMenuItem(MENU_CHECKIN_CLIENT);
} else {
Menu::addMenuItem(MENU_EXPO_CHECKIN_CLIENT);
}
}
}
}
}
if (!is_null($expo)) {
if (!strpos($_SERVER['SCRIPT_URL'], Menu::$MENU_ACTION_ARRAY[MENU_VIEW_EXPOCURRENT])) {
Menu::addMenuItem(MENU_VIEW_EXPOCURRENT);
}
Menu::addMenuItem(MENU_VIEW_SCHEDULE, !$expo->scheduleVisible);
}
Menu::addMenuItem(MENU_VIEW_WORKER);
echo "</table>\n</div><!-- menu -->\n";
return;
}
示例2: getWorkerAuthenticated
<?php
// $Id: PreferenceWelcomePage.php 2418 2012-10-28 19:23:53Z ecgero $ Copyright (c) ConSked, LLC. All Rights Reserved.
include 'util/authenticate.php';
require_once 'preferences/' . PREF . 'Preferences.php';
require_once 'properties/constants.php';
require_once 'section/Menu.php';
require_once 'util/log.php';
require_once 'util/session.php';
$author = getWorkerAuthenticated();
if (isset($_REQUEST[PARAM_LIST_INDEX])) {
$expo = getParamItem(PARAM_LIST, PARAM_LIST_INDEX);
if (!is_null($expo)) {
setExpoCurrent($expo);
}
$_SESSION[PARAM_LIST] = NULL;
}
$expo = getExpoCurrent();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="cache-control" content="no-cache"/>
<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;
?>
- Shift Preference Welcome</title>
<link href="css/site.css" rel="stylesheet" type="text/css">
示例3: logMessage
<?php
// $Id: authenticateOrganizer.php 1294 2012-08-09 23:44:40Z preston $ Copyright (c) ConSked, LLC. All Rights Reserved.
require_once 'util/session.php';
require_once 'db/Worker.php';
include 'util/authenticate.php';
if (!getWorkerAuthenticated()->isOrganizer()) {
logMessage('authorization', 'page requires Organizer');
header('Location: WorkerLoginPage.php');
include 'WorkerLoginPage.php';
return;
}
示例4: logMessage
<?php
// $Id: authenticate.php 1294 2012-08-09 23:44:40Z preston $ Copyright (c) ConSked, LLC. All Rights Reserved.
require_once 'util/session.php';
require_once 'db/Worker.php';
require_once 'db/WorkerLogin.php';
// require session login
if (!isLoggedIn()) {
logMessage('authentication', 'worker not logged in');
header('Location: WorkerLoginPage.php');
include 'WorkerLoginPage.php';
return;
}
if (WorkerLogin::isDisabled(getWorkerAuthenticated()->workerid)) {
logMessage('authentication', 'worker is being forced to log out per disabling');
header('Location: WorkerLoginPage.php');
include 'WorkerLoginPage.php';
return;
}
示例5: session_cache_limiter
session_cache_limiter('nocache');
session_start();
if (!isset($_SESSION[AUTHENTICATED_TEMP]) && !isLoggedIn()) {
logMessage('authentication', 'worker not logged in');
header('Location: WorkerLoginPage.php');
include 'WorkerLoginPage.php';
return;
}
require_once 'db/Worker.php';
require_once 'db/WorkerLogin.php';
require_once 'util/log.php';
require_once 'swwat/gizmos/parse.php';
$password = swwat_parse_string(html_entity_decode($_POST[PARAM_PASSWORD]), true);
if (is_null($password)) {
header('Location: WorkerLoginChangePage.php');
include 'WorkerLoginChangePage.php';
return;
}
// else
$worker = isset($_SESSION[AUTHENTICATED_TEMP]) ? $_SESSION[AUTHENTICATED_TEMP] : getWorkerAuthenticated();
WorkerLogin::password_change($worker->workerid, $password);
$worker = getWorkerAuthenticated();
$password = NULL;
if ($worker->isOrganizer()) {
header('Location: SiteAdminPage.php');
include 'SiteAdminPage.php';
} else {
header('Location: WorkerViewPage.php');
include 'WorkerViewPage.php';
}
return;
示例6: logMessage
<?php
// $Id: authenticateSupervisor.php 2264 2012-09-26 15:31:49Z preston $ Copyright (c) ConSked, LLC. All Rights Reserved.
require_once 'util/session.php';
require_once 'db/Worker.php';
include 'util/authenticate.php';
if (getWorkerAuthenticated()->isCrewMember()) {
logMessage('authorization', 'page requires Supervisor');
header('Location: WorkerLoginPage.php');
include 'WorkerLoginPage.php';
return;
}
示例7: getExpoCurrent
<?php
/* $Id: LinkExpoWorker.php 1970 2012-09-14 20:59:57Z preston $ Copyright (c) ConSked, LLC. All Rights Reserved. */
require_once 'db/Expo.php';
require_once 'db/Worker.php';
require_once 'util/session.php';
$titleLinkExpoWorker = !is_null(getExpoCurrent()) ? getExpoCurrent()->titleString() : "";
if (getWorkerAuthenticated()->isOrganizer() || getWorkerAuthenticated()->isSupervisor()) {
$title = "<a href='ExpoViewPage.php'>" . $titleLinkExpoWorker . "</a>";
}
?>
<div id="LinkExpo">
<table>
<?php
if (!is_null(getExpoCurrent())) {
?>
<tr>
<td><h5 style="margin:0">Expo</h5></td>
<td class="fieldLink"><?php
echo $titleLinkExpoWorker;
?>
</a></td>
</tr>
<?php
}
if (!is_null(getWorkerCurrent())) {
?>
<tr>
<td><h5 style="margin:0">Staff</h5></td>
<td class="fieldLink"><a href="WorkerViewPage.php"><?php
echo getWorkerCurrent()->nameString();
示例8: getWorkerCurrent
// $Id: WorkerEditAction.php 914 2012-07-14 13:26:32Z preston $ Copyright (c) ConSked, LLC. All Rights Reserved.
include 'util/authenticate.php';
require_once 'properties/constants.php';
require_once 'db/Worker.php';
require_once 'util/log.php';
require_once 'util/session.php';
require_once 'util/SMSEnum.php';
require_once 'swwat/gizmos/parse.php';
$worker = getWorkerCurrent();
if (isset($_POST[PARAM_SAVE])) {
$worker->firstName = swwat_parse_string(html_entity_decode($_POST[PARAM_FIRSTNAME]), true);
$worker->middleName = swwat_parse_string(html_entity_decode($_POST[PARAM_MIDDLENAME]), true);
$worker->lastName = swwat_parse_string(html_entity_decode($_POST[PARAM_LASTNAME]), true);
$worker->email = swwat_parse_string(html_entity_decode($_POST[PARAM_EMAIL]), true);
$worker->phone = swwat_parse_phone(html_entity_decode($_POST[PARAM_PHONE]), true);
$sms = swwat_parse_enum(html_entity_decode($_POST[PARAM_SMS_SERVICE]), SMSEnum::$SMS_ARRAY, true);
if (0 == strcmp(SMSEnum::$NONE, $sms)) {
$sms = NULL;
}
$worker->smsemail = is_null($worker->phone) || is_null($sms) ? NULL : $worker->phone . "@" . $sms;
$worker = $worker->update();
if ($worker->workerid == getWorkerAuthenticated()->workerid) {
$_SESSION[AUTHENTICATED] = $worker;
// unusual; but I believe the only place required to do so
} else {
setWorkerCurrent($worker);
}
}
// in all cases
header('Location: WorkerViewPage.php');
include 'WorkerViewPage.php';