示例#1
0
            echo 'F&oslash;lgende data var tilstede ved sletting:<br />';
        }
        if ($thislog['log_action2'] == 'entry_undeleted') {
            echo 'F&oslash;lgende data var tilstede ved gjenoppretting:<br />';
        }
        echo '<a href="javascript:switchView(' . $thislog['log_id'] . ');" id="switchlink' . $thislog['log_id'] . '">' . __("hide") . '</a>' . chr(10);
        echo '<div id="log' . $thislog['log_id'] . '">' . chr(10);
        echo ' <ul>' . chr(10);
        echo printEntryLog($thislog, TRUE);
        echo ' </ul>' . chr(10);
        echo '</div>' . chr(10);
        echo '<script type="text/javascript">switchView(' . $thislog['log_id'] . ');</script>' . chr(10);
    }
    echo '</td>' . chr(10);
    echo ' </tr>' . chr(10);
}
echo '</table>' . chr(10);
echo '<h2>Handlinger</h2>';
echo '<span style="font-size: 16px;">';
if (!$deleted) {
    echo '<a href="entry_delete.php?entry_id=' . $entry['entry_id'] . '">' . iconHTML('page_white_delete') . ' Slett booking</a></span><br>' . '&nbsp;&nbsp;&nbsp;(Dette er ikke permanent. Den legges kun i et eget arkiv for slettede bookinger. Kan gjenopprettes igjen.)';
} else {
    echo '<a href="entry_delete.php?entry_id=' . $entry['entry_id'] . '&amp;undelete=1">' . iconHTML('page_white_get') . ' Gjenopprett booking</a></span><br>';
}
echo '</td></tr></table>';
debugAddToLog(__FILE__, __LINE__, 'entry.php finished');
debugPrintLog();
?>

<?php 
echo debugPrintTimeTotal();
示例#2
0
}
/*
 * IP filter
 * - Used denied access to all files except some pages
 * - Template displayed when accessing from a faulty address is
 *   located in tmeplates/wrong_ip.tpl
 */
if (isset($_SERVER['REMOTE_ADDR']) && !in_array($_SERVER['PHP_SELF'], $ip_filter_pagesWithoutFilter) && substr($_SERVER['REMOTE_ADDR'], 0, strlen($ip_filter_okeyaddresses)) != $ip_filter_okeyaddresses) {
    echo __('Access denied. This page is not accessable for external users.');
    exit;
}
/*
	## LOGIN ##
	If not logged in, redirect to login.php
*/
debugAddToLog(__FILE__, __LINE__, 'Checking login status');
$login = array();
if (isset($_SESSION['user_id'])) {
    $login['user_id'] = $_SESSION['user_id'];
} else {
    $login['user_id'] = '';
}
if (isset($_SESSION['user_password'])) {
    $login['user_password'] = $_SESSION['user_password'];
} else {
    $login['user_password'] = '';
}
// Earlier this was a setting that could be changed (MRBS etc)
// JM-booking is not made for running as non-logged-in users
if (!isset($require_login)) {
    $require_login = true;
示例#3
0
function print_header($day, $month, $year, $area)
{
    global $search_str, $nrbs_pageheader, $testSystem, $login;
    debugAddToLog(__FILE__, __LINE__, 'Start of glob_inc.inc.php');
    # If we dont know the right date then make it up
    if (!$day) {
        $day = date('d');
    }
    if (!$month) {
        $month = date('m');
    }
    if (!$year) {
        $year = date('Y');
    }
    if (empty($search_str)) {
        $search_str = '';
    }
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">' . chr(10);
    echo '<html>' . chr(10);
    echo '<head>' . chr(10);
    echo '	<title>JM-booking</title>' . chr(10);
    echo '	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' . chr(10);
    echo '  <link rel="SHORTCUT ICON" HREF="./favicon.ico">' . chr(10);
    echo '	<link rel="stylesheet" type="text/css" href="css/jm-booking.css" />' . chr(10);
    echo '	<link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" />' . chr(10);
    echo '	<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>' . chr(10) . chr(10);
    echo '	<script src="js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>' . chr(10) . chr(10);
    echo '	<script type="text/javascript" src="js/bsn.AutoSuggest_2.1.3_comp.js">' . '</script>' . chr(10);
    echo '</head>' . chr(10) . chr(10);
    echo '<body' . $testSystem['bodyAttrib'] . '>' . chr(10);
    echo '<table width="100%" class="hiddenprint">' . chr(10);
    if (strlen($nrbs_pageheader) > 0) {
        echo '<tr><td style="text-align:center;">' . $nrbs_pageheader . '</td></tr>' . chr(10);
    }
    echo '	<tr>' . chr(10) . '	<td bgcolor="#5B69A6">' . chr(10) . '		<table width="100%" border=0>' . chr(10) . '			<tr>' . chr(10) . '				<td class="banner' . $testSystem['bannerExtraClass'] . '" ' . 'style="text-align:center; font-size: 18px; font-weight: bold;">' . '<a href="./" class="lightbluebg">Booking for<br>J&aelig;rmuseet</a>' . '</td>' . chr(10) . '				<td class="banner' . $testSystem['bannerExtraClass'] . '">' . chr(10) . '					<table>' . chr(10) . '						<tr>' . chr(10) . '							<td align="right">' . '<form action="day.php" method="get" style="margin: 0px; padding: 0px;">';
    genDateSelector("", $day, $month, $year);
    if (!empty($area)) {
        echo '<input type="hidden" name="area" value=' . $area . '>';
    }
    echo '<input type="submit" value="' . __('View day') . '">' . iconHTML('calendar_view_day') . '</form>';
    echo '</td>' . chr(10);
    // Week
    echo '							<td align="right">' . '<form action="week.php" method="get" style="margin: 0px; padding: 0px;">';
    if (!empty($area)) {
        echo '<input type="hidden" name="area" value="' . $area . '">';
    }
    $thistime = mktime(0, 0, 0, $month, $day, $year);
    $thisweek = date('W', $thistime);
    $thisyear = date('Y', $thistime);
    echo '<select name="week">';
    for ($i = 1; $i <= 52; $i++) {
        echo '<option value="' . $i . '"';
        if ($i == $thisweek) {
            echo ' selected="selected"';
        }
        echo '>' . $i . '</option>';
    }
    echo '</select>';
    echo '<select name="year">';
    for ($i = $thisyear - 1; $i <= $thisyear + 10; $i++) {
        echo '<option value="' . $i . '"';
        if ($i == $thisyear) {
            echo ' selected="selected"';
        }
        echo '>' . $i . '</option>';
    }
    echo '</select>';
    echo '<input type="submit" value="' . __('View week') . '">';
    echo iconHTML('calendar_view_week');
    echo '</form>' . '</td>' . chr(10) . '						</tr>' . chr(10);
    // Month
    echo '						<tr>' . chr(10) . '							<td align="right">' . '<form action="month.php" method="get" style="margin: 0px; padding: 0px;">';
    echo '<input type="hidden" name="area" value="' . $area . '">';
    echo '<input type="hidden" name="day" value="1">';
    $thistime = mktime(0, 0, 0, $month, $day, $year);
    $thismonth = date('n', $thistime);
    $thisyear = date('Y', $thistime);
    echo '<select name="month">';
    for ($i = 1; $i <= 12; $i++) {
        $thismonthtime = mktime(0, 0, 0, $i, 1, $year);
        echo '<option value="' . $i . '"';
        if ($i == $thismonth) {
            echo ' selected="selected"';
        }
        echo '>' . __(date("M", $thismonthtime)) . '</option>';
    }
    echo '</select>';
    echo '<select name="year">';
    for ($i = $thisyear - 1; $i <= $thisyear + 10; $i++) {
        echo '<option value="' . $i . '"';
        if ($i == $thisyear) {
            echo ' selected="selected"';
        }
        echo '>' . $i . '</option>';
    }
    echo '</select>';
    echo '<input type="submit" value="' . _h('View month') . '">' . iconHTML('calendar_view_month');
    echo '</form></td>' . chr(10);
    // Find using entry_id
    echo '							<td align="right">';
    echo '<form action="entry.php" method="get" style="margin: 0px; padding: 0px;">';
    echo '<input type="text" id="entry_id_finder" name="entry_id" ' . 'value="' . __('Enter entry ID') . '" ' . 'onclick="document.getElementById(\'entry_id_finder\').value=\'\';">';
    echo '<input type="submit" value="' . __('Find') . '">';
    echo '</form>';
    echo '</td>' . chr(10);
    echo '						</tr>' . chr(10) . '					</table>' . chr(10);
    echo '				</td>' . chr(10);
    echo '				<td class="banner' . $testSystem['bannerExtraClass'] . '" align="center">' . chr(10);
    echo '					' . __("Logged in as") . ' <a href="user.php?user_id=' . $login['user_id'] . '">' . htmlentities($login['user_name'], ENT_QUOTES) . '</a><br>' . chr(10);
    echo '					<a href="logout.php">' . iconHTML('bullet_delete') . ' ' . __("Log out") . '</a><br>' . chr(10);
    echo '					<a href="admin.php">' . iconHTML('bullet_wrench') . ' ' . __("Administration") . '</a>' . chr(10);
    echo '				</td>' . chr(10);
    echo '			</tr>' . chr(10) . '		</table>' . chr(10);
    echo '		 -:- <a class="menubar" href="./edit_entry2.php?day=' . $day . '&amp;month=' . $month . '&amp;year=' . $year . '&amp;area=' . $area . '&amp;room=">' . iconHTML('page_white_add') . ' ' . __('Make a new entry') . '</a>' . chr(10);
    //echo '		 -:- <a class="menubar" href="./new_entries.php">'.
    //iconHTML('table').' '.
    //_('List with new entries').'</a>'.chr(10);
    echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=not_confirmed">' . iconHTML('email_delete') . ' ' . __('Not confirmed') . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=no_user_assigned">' . iconHTML('user_delete') . ' ' . __('No users assigned') . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=servering">' . iconHTML('drink') . ' ' . 'Servering</a>' . chr(10);
    #echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=next_100">'.
    #iconHTML('page_white_go').' '.
    #_('Next 100').'</a>'.chr(10);
    echo '		 -:- <a class="menubar" href="./statistikk.php">' . iconHTML('chart_bar') . ' ' . 'Statistikk</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./customer_list.php">' . iconHTML('group') . ' ' . __('Customers') . '</a>' . chr(10);
    if ($login['user_invoice'] || $login['user_invoice_setready']) {
        echo '		 -:- <a class="menubar" href="./invoice_main.php';
        // By default, use the current area when going into the invoice part
        if (!$login['user_invoice']) {
            echo '?area_id=' . $area;
        }
        echo '">' . iconHTML('coins') . ' ' . __('Invoice') . '</a>' . chr(10);
    }
    echo '		 -:- <a class="menubar" href="./user_list.php">' . iconHTML('user') . ' ' . __('Userlist') . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./entry_filters.php?filters=a:1:{i:0;a:3:{i:0;s:10:%22entry_name%22;i:1;s:0:%22%22;i:2;s:0:%22%22;}}&amp;return_to=entry_list">' . iconHTML('find') . ' ' . 'Bookings&oslash;k' . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="http://booking.jaermuseet.local/wiki/">' . iconHTML('wiki_icon', '.gif', 'height: 16px;') . ' ' . 'Wiki' . '</a>' . chr(10);
    echo '		 -:-' . chr(10);
    echo '		</td>' . chr(10) . '	</tr>' . chr(10) . '</table>' . chr(10);
    debugAddToLog(__FILE__, __LINE__, 'Finished printing header');
}