<?php
/*
* ARBS - Advanced Resource Booking System
* Copyright (C) 2005-2007 ITMC der TU Dortmund
* Based on MRBS by Daniel Gardner <http://mrbs.sourceforge.net/>
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
include_once("glob_inc.inc.php");
$area=(int)$_GET['area'];//the area from mrbs_area
$room=(int)$_GET['room'];//the area from mrbs_area
$category=(int)$_GET['category'];//the area from mrbs_area
$day=(int)$_GET['day'];
$month=(int)$_GET['month'];
$year=(int)$_GET['year'];
if(!getAuthorised(getUserName(), getUserPassword(), 1)){
showAccessDenied($day, $month, $year, $area);
exit;
}
else{
echo "<html>";
if(!getWritable($create_by, getUserName())){
showAccessDenied($day, $month, $year, $area);
exit;
}
print_header($day, $month, $year, $area);
if ($_GET['del_type'] == "room"){
$type_str=_("of the room");
$type_deldata .= "<ul>";
$type_deldata .= "<li>" . _("Booking entries of this room") . "</li>";
$type_deldata .= "</ul>";
$hrefstrNO = "admin.php?area=$area&category=$category&room=$room";
$hrefstrYES="admin.php?area=$area&category=$category&room=$room&del_type=room§ion=areas";
}
if ($_GET['del_type'] == "pid"){
$type_str=_("of the period");
$type_deldata .= "<ul>";
$type_deldata .= "<li>" . _("Selection options of periods for entries") . "</li>";
$type_deldata .= "</ul>";
$hrefstrNO = "admin.php?pid=".$_GET['pid'];
$hrefstrYES="admin.php?pid=".$_GET['pid']."&del_type=period§ion=periods";
}
if ($_GET['del_type'] == "category"){
$type_str=_("of the category");
$type_deldata .= "<ul>";
$type_deldata .= "<li>" . _("subsidiary rooms") . "</li>";
$type_deldata .= "<li>" . _("Booking entries of the rooms") . "</li>";
$type_deldata .= "</ul>";
$hrefstrNO = "admin.php?area=$area&category=$category";
$hrefstrYES="admin.php?area=$area&category=$category&del_type=category§ion=areas";
}
if ($_GET['del_type'] == "area"){
$type_str=_("of the area");
$type_deldata .= "<ul>";
$type_deldata .= "<li>" . _("subsidiary categories") . "</li>";
$type_deldata .= "<li>" . _("subsidiary rooms") . "</li>";
$type_deldata .= "<li>" . _("Booking entries of the rooms") . "</li>";
$type_deldata .= "</ul>";
$hrefstrNO = "admin.php?area=$area";
$hrefstrYES="admin.php?area=$area&del_type=area§ion=areas";
}
//layout
?>
<table cellpadding="5" cellspacing="0" width="100%">
<tr><td colspan=2> </td></tr>
<tr><td colspan=2><h2><?php echo(_("Administration")); ?></h2></td></tr>
<tr><td style="text-align:center">
<table>
<tr><td colspan="2" style="color:#ff0000"><?php printf("Achtung, beim Löschen %s werden folgende Datenbestände mit gelöscht:", $type_str); ?></td></tr>
<tr><td colspan="2"><?php echo($type_deldata); ?></td></tr>
<tr><td colspan="2" style="text-align:center"><h3><?php echo(_("Really delete?")); ?></h3><br> </td></tr>
<tr><td style="text-align:center"><a href="<?php echo($hrefstrYES); ?>"><?php echo(_("YES, delete")); ?></a></td>
<td style="text-align:center"><a href="<?php echo($hrefstrNO); ?>"><?php echo(_("NO, cancel")); ?></a></td></tr>
</table></td></tr></table>
</HTML>
<?php
}
?>