<?php

/* For licensing terms, see /license.txt */
/**
               Item-manager (add, edit & delete)
*/
require_once 'rsys.php';
Rsys::protect_script('m_item');
$tool_name = get_lang('ItemManagerHeader');
//$interbreadcrumb[] = array ("url" => "../admin/index.php", "name" => get_lang('PlatformAdmin'));
/**
 *  Filter to display the modify-buttons
 *
 *  @param  -   int     $id     The item-id
 */
function modify_filter($id)
{
    $str = '';
    $outtt = false;
    if (Rsys::item_allow($id, 'edit')) {
        $str .= '<a href="m_item.php?action=edit&amp;id=' . $id . '" title="' . get_lang("EditItem2") . '"><img alt="" src="../img/edit.gif" /></a>';
    }
    if (Rsys::item_allow($id, 'm_rights')) {
        $str .= ' &nbsp;<a href="m_item.php?action=m_rights&amp;item_id=' . $id . '" title="' . get_lang("MRights") . '"><img alt="" src="../img/info_small.gif" /></a>';
    }
    if (Rsys::item_allow($id, 'delete')) {
        $str .= ' <a href="m_item.php?action=delete&amp;id=' . $id . '" title="' . get_lang("DeleteItem") . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmDeleteItem"))) . "'" . ')) return false;"><img alt="" src="../img/delete.gif" /></a>';
    }
    if (Rsys::item_allow($id, 'edit')) {
        $number = Rsys::get_item($id);
        $str .= ' <a href="m_item.php?action=blackout&amp;id=' . $id . '" title="' . get_lang("Blackout") . '"><img alt="" src="../img/blackout' . $number[5] . '.gif" /></a>';
Esempio n. 2
0
<?php
/* For licensing terms, see /license.txt */
/**
	Reservation-manager (add, edit & delete)
*/

require_once('rsys.php');
Rsys :: protect_script('reservation');

if (!empty($_GET['cat']) && !empty($_GET['item'] )) {
	$cat = (int)$_GET['cat'];
	$item = (int)$_GET['item'];
	$interbreadcrumb[] = array ('url' => "reservation.php?cat=$cat&item=$item", 'name' => get_lang('Booking'));
} else {
	$interbreadcrumb[] = array ('url' => 'reservation.php', 'name' => get_lang('Booking'));
}


$tool_name = get_lang('BookIt');
Display :: display_header($tool_name);
api_display_tool_title($tool_name);

$reservationid = intval($_GET['rid']);
$reservation = Rsys :: get_reservation($reservationid);
$item = Rsys :: get_item($reservation[0][2]);
if ($reservation[0][9] < $reservation[0][4]) {
	ob_start();
	$form = new FormValidator('reservation', 'post', 'subscribe.php?rid='.Security::remove_XSS($_GET['rid']));
	$form->addElement('hidden', 'timepicker', $reservation[0][11]);
	$form->addElement('hidden', 'accepted', $reservation[0][3]);
	if ($reservation[0][11] == 1) {
<?php

/* For licensing terms, see /license.txt */
/**
               Reservation-manager (add, edit & delete)
*/
require_once 'rsys.php';
Rsys::protect_script('m_reservation', $_GET['item_id']);
$tool_name = get_lang('BookingPeriodList');
/**
 *  Filter to display the modify-buttons
 *
 *  @param  -   int     $id     The reservation-id
 */
function modify_filter($id)
{
    $out = ' <a href="m_reservation.php?action=accept&amp;rid=' . $id . '" alt="' . get_lang('AutoAccept') . '"><img title="' . get_lang('AutoAccept') . '"  alt="' . get_lang('AutoAccept') . '" src="../img/students.gif" /></a>';
    $out .= '<a href="m_reservation.php?action=edit&amp;id=' . $id . '" alt="' . get_lang('EditBookingPeriod') . '"><img title="' . get_lang('EditBookingPeriod') . '" alt="' . get_lang('EditBookingPeriod') . '" src="../img/edit.gif" /></a>';
    $out .= ' <a href="m_reservation.php?action=delete&amp;id=' . $id . '" alt="' . get_lang('DeleteBookingPeriod') . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmDeleteBookingPeriod"))) . "'" . ')) return false;"><img title="' . get_lang('DeleteBookingPeriod') . '" alt="' . get_lang('DeleteBookingPeriod') . '" src="../img/delete.gif" /></a>';
    return $out;
}
if (isset($_POST['action'])) {
    switch ($_POST['action']) {
        case 'accept_users':
            $ids = $_POST['accepting'];
            //echo count($ids);
            if (count($ids) > 0) {
                foreach ($ids as $id) {
                    //echo $id;
                    $result = Rsys::set_accepted($id, 1);
                }
<?php

/* For licensing terms, see /license.txt */
/**
       An overview with a list of upcoming reservations where
       the user has subscribed to (may also be viewable in the agenda)

       Later: links to m_item & m_reservation for every item your group (class) owns and
       the possibility (links) for adding new items or reservations
*/
require_once 'rsys.php';
Rsys::protect_script('mysubscriptions');
$tool_name = get_lang('Booking');
/**
 *  Filter to display the modify-buttons
 */
function modify_filter($id)
{
    return ' <a href="mysubscriptions.php?action=delete&amp;reservation_id=' . substr($id, 0, strpos($id, '-')) . '&amp;dummy=' . substr($id, strrpos($id, '-') + 1) . '" title="' . get_lang("DeleteSubscription") . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmDeleteSubscription"))) . "'" . ')) return false;"><img alt="" src="../img/delete.gif" /></a>';
}
switch ($_GET['action']) {
    case 'delete':
        Rsys::delete_subscription($_GET['reservation_id'], $_GET['dummy']);
        ob_start();
        Display::display_normal_message(Rsys::get_return_msg(get_lang('SubscriptionDeleted'), "mysubscriptions.php", $tool_name), false);
        $msg = ob_get_contents();
        ob_end_clean();
    default:
        $NoSearchResults = get_lang('NoReservations');
        Display::display_header($tool_name);
        api_display_tool_title($tool_name);
Esempio n. 5
0
/**
                Category-manager (add, edit & delete)
 */
require_once 'rsys.php';

// TODO: The global initialization scripts loads once again here. To be checked.
$language_file = 'admin';
$cidReset = true;
require_once '../inc/global.inc.php';
//

$this_section = SECTION_PLATFORM_ADMIN;

api_protect_admin_script();

Rsys :: protect_script('m_category');
$tool_name = get_lang('BookingSystem');
$interbreadcrumb[] = array ('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin'));

/**
 *  Filter to display the modify-buttons
 *
 *  @param - int $id The ResourceType-id
 */
function modify_filter($id) {
	return '<a href="m_category.php?action=edit&amp;id='.$id.'" title="'.get_lang("EditResourceType").'"><img alt="" src="../img/edit.gif" /></a>'.' <a href="m_category.php?action=delete&amp;id='.$id.'" title="'.get_lang("DeleteResourceType").'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmDeleteResourceType")))."'".')) return false;"><img alt="" src="../img/delete.gif" /></a>';
}

switch ($_GET['action']) {
	case 'add' :
		$interbreadcrumb[] = array ("url" => "m_category.php", "name" => $tool_name);