<?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">
Beispiel #2
0
echo SITE_NAME;
?>
 - Worker View Page</title>
    <link href="css/site.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="container">

<?php 
//setStationCurrent(NULL);
if (isset($_REQUEST[MENU_VIEW_WORKER])) {
    setWorkerCurrent($author);
} else {
    if (isset($_REQUEST[PARAM_LIST_INDEX])) {
        $worker = getParamItem(PARAM_LIST, PARAM_LIST_INDEX);
        setWorkerCurrent($worker);
    }
}
$_SESSION[PARAM_LIST] = NULL;
$worker = getWorkerCurrent();
if (!$author->isOrganizer()) {
    $worker = $author;
}
if (is_null($worker)) {
    $worker = $author;
}
setWorkerCurrent($worker);
// paranoia about some included section
$isAuthor = $worker->workerid == $author->workerid;
// login == current worker
<?php

// $Id: DocumentViewAction.php 1635 2012-08-31 21:22:03Z preston $ Copyright (c) ConSked, LLC. All Rights Reserved.
include 'util/authenticate.php';
require_once 'properties/constants.php';
require_once 'db/Document.php';
require_once 'util/log.php';
require_once 'util/session.php';
$document = getParamItem(PARAM_LIST2, PARAM_LIST2_INDEX);
if (!is_null($document)) {
    try {
        $document->selectContent();
        // can throw PDOException
        // send the file to the browser
        header("Content-type: {$document->docMime}");
        header("Content-Disposition: attachment; filename='{$document->docName}'");
        echo $document->content;
        $document->content = NULL;
        // gc hint
        $document = NULL;
        // gc hint
        return;
    } catch (Exception $ex) {
        $msg = $ex->getMessage();
        logMessage("DocumentViewAction", "file error:{$msg}");
        $_SESSION[PARAM_PAGE_MESSAGE] = "Your document has failed to download.";
    }
}
header('Location: WorkerViewPage.php');
include 'WorkerViewPage.php';
Beispiel #4
0
    <title><?php 
echo SITE_NAME;
?>
 - Station View Page</title>
    <link href="css/site.css" rel="stylesheet" type="text/css">
	<script src="swwat/js/validate.js"></script>
</head>

<body>
<div id="container">

<?php 
$expo = getExpoCurrent();
// use REQUEST as may be a GET
if (isset($_REQUEST[PARAM_LIST2_INDEX])) {
    $station = getParamItem(PARAM_LIST2, PARAM_LIST2_INDEX);
    if (isset($station)) {
        if (!$station instanceof StationJob) {
            // used in the reports, etc
            if ($station instanceof Job || $station instanceof ShiftAssignment) {
                $station = StationJob::selectID($station->stationid);
            } else {
                $station = StationJob::selectID($station->stationid);
            }
        }
        setStationCurrent($station);
    }
}
$_SESSION[PARAM_LIST2] = NULL;
$station = getStationCurrent();
$workerList = Worker::selectStation($station->stationid);