Remove the conference rooms from the menu, leave conference center and if the user doesn't have access to the conference center redirect them to the conference room.

This commit is contained in:
Mark Crane
2012-10-30 10:42:46 +00:00
parent 7ab948b20f
commit c87683c7c5
3 changed files with 10 additions and 25 deletions

View File

@@ -36,24 +36,6 @@
$apps[$x]['menu'][$y]['path'] = '/app/conference_centers/conference_centers.php';
$apps[$x]['menu'][$y]['groups'][] = 'admin';
$apps[$x]['menu'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['menu'][$y]['title']['en-us'] = 'Conference Rooms';
$apps[$x]['menu'][$y]['title']['es-mx'] = '';
$apps[$x]['menu'][$y]['title']['de'] = '';
$apps[$x]['menu'][$y]['title']['de-ch'] = '';
$apps[$x]['menu'][$y]['title']['de-at'] = '';
$apps[$x]['menu'][$y]['title']['fr'] = '';
$apps[$x]['menu'][$y]['title']['fr-ca'] = '';
$apps[$x]['menu'][$y]['title']['fr-ch'] = '';
$apps[$x]['menu'][$y]['title']['pt-pt'] = '';
$apps[$x]['menu'][$y]['title']['pt-br'] = '';
$apps[$x]['menu'][$y]['uuid'] = '0daea9eb-5555-4325-be57-e3b6a30d5253';
$apps[$x]['menu'][$y]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
$apps[$x]['menu'][$y]['category'] = 'internal';
$apps[$x]['menu'][$y]['path'] = '/app/conference_centers/conference_rooms.php';
$apps[$x]['menu'][$y]['groups'][] = 'user';
$apps[$x]['menu'][$y]['groups'][] = 'admin';
$apps[$x]['menu'][$y]['groups'][] = 'superadmin';
//permission details
$y = 0;

View File

@@ -30,8 +30,14 @@ if (permission_exists('conference_center_view')) {
//access granted
}
else {
echo "access denied";
exit;
if (permission_exists('conference_room_view')) {
//redirect to the conference rooms
header( 'Location: conference_rooms.php') ;
}
else {
echo "access denied";
exit;
}
}
require_once "includes/header.php";
require_once "includes/paging.php";
@@ -50,7 +56,7 @@ require_once "includes/paging.php";
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>Conference Centers</b></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='conference_rooms.php'\" value='back'></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='Rooms' onclick=\"window.location='conference_rooms.php'\" value='Rooms'></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";

View File

@@ -68,9 +68,6 @@ require_once "includes/paging.php";
}
}
}
//echo "<pre>\n";
//print_r($conference);
//echo "</pre>\n";
//get variables used to control the order
$order_by = $_GET["order_by"];
@@ -96,7 +93,7 @@ require_once "includes/paging.php";
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
$prep_statement = $db->prepare($sql);
if ($prep_statement) {
$prep_statement->execute();
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
if ($row['num_rows'] > 0) {
$num_rows = $row['num_rows'];