require_once 'grab_globals.inc.php'; include "config.inc.php"; include "functions.inc"; include "{$dbsys}.inc"; include "mrbs_auth.inc"; global $twentyfourhour_format; $edit_series = true; $room_order = "room_name"; #If we dont know the right date then make it up if (!isset($day) or !isset($month) or !isset($year)) { $day = date("d"); $month = date("m"); $year = date("Y"); } if (empty($area)) { $area = get_default_area(); } if (!isset($edit_type)) { $edit_type = ""; } if (!getAuthorised(getUserName(), getUserPassword(), 1)) { showAccessDenied($day, $month, $year, $area); exit; } # This page will either add or modify a booking # We need to know: # Name of booker # Description of meeting # Date (option select box for day, month, year) # Time # Duration
# $Id: roomsearch.php,v 1.2 2009/06/03 08:40:20 mike1989 Exp $ require_once "../../../config.php"; //for Moodle integration require_once 'grab_globals.inc.php'; include "config.inc.php"; include "functions.php"; include "userfunctions.php"; include "{$dbsys}.php"; include "mrbs_auth.php"; require_login(); global $twentyfourhour_format; $day = optional_param('day', 0, PARAM_INT); $month = optional_param('month', 0, PARAM_INT); $year = optional_param('year', 0, PARAM_INT); $area = optional_param('area', get_default_area(), PARAM_INT); $edit_type = optional_param('edit_type', '', PARAM_ALPHA); $id = optional_param('id', 0, PARAM_INT); $room_id = optional_param('room_id', 0, PARAM_INT); $start_hour = optional_param('start_hour', 0, PARAM_INT); // $morningstarts = optional_param('morningstarts', 0, PARAM_INT); //I believe this is coming from somewhere else - not URL - ab. // $rep_type could use a closer look but I believe this is not passed via URL -ab. $start_min = optional_param('start_min', 0, PARAM_INT); $rep_num_weeks = optional_param('rep_num_weeks', 0, PARAM_INT); $force = optional_param('force', FALSE, PARAM_BOOL); $duration = optional_param('duration', 1, PARAM_INT); $all_day = optional_param('all_day', FALSE, PARAM_BOOL); #If we dont know the right date then make it up if ($day == 0 or $month == 0 or $year == 0) { $day = date("d"); $month = date("m");
foreach($tab_rooms_noaccess as $key){ $sql .= " and id != $key "; } $sql .= " order by room_name"; $res = grr_sql_query($sql); if ($res) for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { $sql2 = "DELETE FROM ".TABLE_PREFIX."_j_user_room WHERE (login='******'login_admin']."' and id_room = '$row[0]')"; if (grr_sql_command($sql2) < 0) {fatal_error(0, "<p>" . grr_sql_error());} else {$msg=get_vocab("del_user_succeed");} } } } if ((empty($id_area)) and (isset($row[0]))) { if(authGetUserLevel(getUserName(),$row[0],'area') >= 6) $id_area = get_default_area(); else { # Retourne le domaine par défaut; Utilisé si aucun domaine n'a été défini. // On cherche le premier domaine à accès non restreint $id_area = grr_sql_query1("SELECT a.id FROM ".TABLE_PREFIX."_area a, ".TABLE_PREFIX."_j_useradmin_area j WHERE a.id=j.id_area and j.login='******' ORDER BY a.access, a.order_display, a.area_name LIMIT 1"); } } if (empty($room)) $room = -1; echo "<h2>".get_vocab('admin_right.php').grr_help("aide_grr_gestion_ressources")."</h2>\n"; echo "<p><i>".get_vocab("admin_right_explain")."</i></p>\n"; // Affichage d'un pop-up affiche_pop_up($msg,"admin");
function page_accueil($param = 'no') { // Definition de $defaultroom if (isset($_SESSION['default_room']) && $_SESSION['default_room'] > 0) { $defaultroom = $_SESSION['default_room']; } else { $defaultroom = Settings::get("default_room"); } // Definition de $defaultsite if (isset($_SESSION['default_site']) && $_SESSION['default_site'] > 0) { $defaultsite = $_SESSION['default_site']; } else { if (Settings::get("default_site") > 0) { $defaultsite = Settings::get("default_site"); } else { $defaultsite = get_default_site(); } } // Definition de $defaultarea if (isset($_SESSION['default_area']) && $_SESSION['default_area'] > 0) { $defaultarea = $_SESSION['default_area']; } else { if (Settings::get("default_area") > 0) { $defaultarea = Settings::get("default_area"); } else { $defaultarea = get_default_area($defaultsite); } } // Calcul de $page_accueil if ($defaultarea == -1) { $page_accueil = 'day.php?noarea='; } else { if ($defaultroom == -1) { $page_accueil = 'day.php?area=' . $defaultarea; } else { if ($defaultroom == -2) { $page_accueil = 'week_all.php?area=' . $defaultarea; } else { if ($defaultroom == -3) { $page_accueil = 'month_all.php?area=' . $defaultarea; } else { if ($defaultroom == -4) { $page_accueil = 'month_all2.php?area=' . $defaultarea; } else { $page_accueil = 'week.php?area=' . $defaultarea . '&room=' . $defaultroom; } } } } } if (Settings::get("module_multisite") == "Oui" && $defaultsite > 0) { $page_accueil .= '&id_site=' . $defaultsite; } if ($param == 'yes') { $page_accueil .= '&'; } return $page_accueil; }
function page_accueil($param='no') { // Definition de $defaultroom if (isset($_SESSION['default_room']) and ($_SESSION['default_room'] >0)) { $defaultroom = $_SESSION['default_room']; } else { $defaultroom = getSettingValue("default_room"); } // Definition de $defaultsite if (isset($_SESSION['default_site']) and ($_SESSION['default_site'] >0)) { $defaultsite = $_SESSION['default_site']; } else if (getSettingValue("default_site") > 0) { $defaultsite = getSettingValue("default_site"); } else $defaultsite = get_default_site(); // Definition de $defaultarea if (isset($_SESSION['default_area']) and ($_SESSION['default_area'] >0)) { $defaultarea = $_SESSION['default_area']; } else if (getSettingValue("default_area") > 0) { $defaultarea = getSettingValue("default_area"); } else $defaultarea = get_default_area($defaultsite); // Calcul de $page_accueil if ($defaultarea == -1) { $page_accueil="day.php?noarea="; // le paramètre noarea ne sert à rien, il est juste là pour éviter un cas particulier à traiter avec &id_site= et $param } else if ($defaultroom == -1) { $page_accueil="day.php?area=$defaultarea"; } else if ($defaultroom == -2) { $page_accueil="week_all.php?area=$defaultarea"; } else if ($defaultroom == -3) { $page_accueil="month_all.php?area=$defaultarea"; } else if ($defaultroom == -4) { $page_accueil="month_all2.php?area=$defaultarea"; } else { $page_accueil="week.php?area=$defaultarea&room=$defaultroom"; } if ((getSettingValue("module_multisite") == "Oui") and ($defaultsite>0)) $page_accueil .= "&id_site=".$defaultsite; if ($param=='yes') $page_accueil .= "&"; return $page_accueil ; }