<?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;
hr.sep {
width: 550px;
text-align: left;
margin-left: 0;
#body, #copyright-notice {
margin: 10px auto;
position:relative;
#body {
#copyright-notice {
text-align: center;
font-size: 8pt;
h4._more, h4._less {
cursor: pointer;
h4._more:after {
content: "...";
font-weight: bold;
padding-left: 4px;
h4._less:before {
content: "^";
padding-right: 4px;
';
$headers = '<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>';
$script ='
jQuery(document).ready(function(){
$("#expert-mode").click(function(ev) {
ev.preventDefault();
var jthis = $(this);
var contents = jthis.next();
if (contents.is(":visible")) {
jthis.addClass("_more");
jthis.removeClass("_less");
contents.hide();
jthis.removeClass("_more");
jthis.addClass("_less");
contents.show();
Status change: