<?php // -*- php -*-
// Copyright (C) 2012, Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
// Sponsored by WIEDENMANN SEILE GMBH, http://www.wiedenmannseile.de
//
// This file is part of Wiedenmann Vacation.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>,
// or write to Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
// $_REQUEST['_DEBUG_'] = 1;
// --------------------------------------------------
// |||:sec:||| Configuration
require_once(dirname(__FILE__) . '/lib/util.php');
require_once(dirname(__FILE__) . '/lib/template.php');
// _DEBUG_ = 1 normal debugging
// _DEBUG_ = 2 turn off administrator rights
// _DEBUG_ = 3 provoke error #1
// _DEBUG_ = 4 provoke error #2
if (isset($_REQUEST['_DEBUG_'])) {
$_debug = $_REQUEST['_DEBUG_'];
if (empty($_debug)) {
$_debug = 1;
}
} else {
$_debug = 0;
file_put_contents('/tmp/xxxxxxx', 'check');
system('touch /tmp/xxxxxx1');
// file_put_contents('/tmp/xxxxxxx', 'check');
// system('touch /tmp/xxxxxx1');
// |||:sec:||| Setup
if (isset($_SERVER["REMOTE_USER"])) {
$remote_user = $_SERVER["REMOTE_USER"];
$remote_user = '';
if (isset($_REQUEST["user"])) {
$request_user = $_REQUEST["user"];
$request_user = '';
$is_admin = in_array($remote_user, $ADMIN_USERS);
if ($_debug > 1) {
$is_admin = False;
// $is_admin = False; // |:debug:|
$users = get_users();
$user_names = array_keys($users);
if (!$is_admin) {
$user = $remote_user;
$user = $request_user;
if (empty($user)) {
// |||:sec:||| HTML Header
$title = get_text('title');
$css = '
div.error {
margin-bottom: 10px;
span.label {
width: 100px;
display: inline-block;
vertical-align: top;
Status change: