function failNotEquals($expected, $actual, $expected_label, $message=0) { // Private function for reporting failure to match. $str = $message ? ($message . ' ') : ''; $str .= "($expected_label/actual)<br>"; $htmlExpected = grr_htmlSpecialChars($expected); $htmlActual = grr_htmlSpecialChars($actual); $str .= sprintf("<pre>%s\n--------\n%s</pre>", $htmlExpected, $htmlActual); $this->fail($str); }
function SendError( $number, $text ) { SetXmlHeaders() ; // Create the XML document header echo '<?xml version="1.0" encoding="utf-8" ?>' ; echo '<Connector><Error number="' . $number . '" text="' . grr_htmlSpecialChars( $text ) . '" /></Connector>' ; exit ; }
function ConvertToXmlAttribute( $value ) { if ( defined( 'PHP_OS' ) ) { $os = PHP_OS ; } else { $os = php_uname() ; } if ( strtoupper( substr( $os, 0, 3 ) ) === 'WIN' || FindBadUtf8( $value ) ) { return ( utf8_encode( grr_htmlSpecialChars( $value ) ) ) ; } else { return ( grr_htmlSpecialChars( $value ) ) ; } }
} else { echo "<input type=\"text\" name=\"new_login\" size=\"40\" value=\"".htmlentities($user_login)."\" />\n"; } echo "<table border=\"0\" cellpadding=\"5\"><tr>\n"; echo "<td>".get_vocab("last_name")." *".get_vocab("deux_points")."</td>\n<td><input type=\"text\" name=\"reg_nom\" size=\"40\" value=\""; if ($user_nom) echo grr_htmlSpecialChars($user_nom); echo "\" /></td>\n"; echo "<td>".get_vocab("first_name")." *".get_vocab("deux_points")."</td>\n<td><input type=\"text\" name=\"reg_prenom\" size=\"20\" value=\""; if ($user_nom) echo grr_htmlSpecialChars($user_prenom); echo "\" /></td>\n"; echo "<td></td><td></td>"; echo "</tr>\n"; echo "<tr><td>".get_vocab("mail_user").get_vocab("deux_points")."</td><td><input type=\"text\" name=\"reg_email\" size=\"30\" value=\""; if ($user_mail) echo grr_htmlSpecialChars($user_mail); echo "\" /></td>\n"; echo "<td>".get_vocab("statut").get_vocab("deux_points")."</td>\n"; echo "<td><select name=\"reg_statut\" size=\"1\">\n"; echo "<option value=\"visiteur\" "; if ($user_statut == "visiteur") { echo "selected=\"selected\"";}; echo ">".get_vocab("statut_visitor")."</option>\n"; echo "<option value=\"utilisateur\" "; if ($user_statut == "utilisateur") { echo "selected=\"selected\"";}; echo ">".get_vocab("statut_user")."</option>\n"; // un gestionnaire d'utilisateurs ne peut pas créer un administrateur général ou un gestionnaire d'utilisateurs if (authGetUserLevel(getUserName(),-1) >= 6) { echo "<option value=\"gestionnaire_utilisateur\" "; if ($user_statut == "gestionnaire_utilisateur") { echo "selected=\"selected\"";}; echo ">".get_vocab("statut_user_administrator")."</option>\n"; echo "<option value=\"administrateur\" "; if ($user_statut == "administrateur") { echo "selected=\"selected\"";}; echo ">".get_vocab("statut_administrator")."</option>\n"; } echo "</select></td>\n"; if (strtolower(getUserName()) != strtolower($user_login)) { echo "<td>".get_vocab("activ_no_activ").get_vocab("deux_points")."</td>";
function accumulate_periods(&$row, &$count, &$hours, $report_start, $report_end, &$room_hash, &$breve_description_hash, $csv="n") { global $vocab, $periods_name; $max_periods = count($periods_name); if ($_GET["sumby"] == "5") $temp = grr_sql_query1("select type_name from ".TABLE_PREFIX."_type_area where type_letter = '".$row[$_GET["sumby"]]."'"); else if (($_GET["sumby"] == "3") or ($_GET["sumby"] == "6")) $temp = $row[$_GET["sumby"]]; else $temp = grrExtractValueFromOverloadDesc($row[12],$_GET["sumby"]); if ($temp == "") $temp = "(Autres)"; if ($csv == "n") { $breve_description = grr_htmlSpecialChars($temp); # Area and room separated by break: $room = grr_htmlSpecialChars($row[8]) .$vocab["deux_points"]. "<br />" . grr_htmlSpecialChars($row[9]); } else { # Use brief description or created by as the name: $breve_description = ($temp); # Area and room separated by break: $room = ($row[9]) . " " . ($row[10]); } # Accumulate the number of bookings for this room and name: @$count[$room][$breve_description]++; # Accumulate hours used, clipped to report range dates: $dur = (min((int)$row[2], $report_end) - max((int)$row[1], $report_start))/60; if ($dur < (24*60)) @$hours[$room][$breve_description] += $dur; else @$hours[$room][$breve_description] += ($dur % $max_periods) + floor( $dur/(24*60) ) * $max_periods; $room_hash[$room] = 1; $breve_description_hash[$breve_description] = 1; }
AND (".TABLE_PREFIX."_j_useradmin_area.login is null or (".TABLE_PREFIX."_j_useradmin_area.login=u.login and ".TABLE_PREFIX."_j_useradmin_area.id_area!=".$id_area."))) order by u.nom, u.prenom"; $res = grr_sql_query($sql); $nb_users = grr_sql_count($res); if ($nb_users > 0) { ?> <tr><td> <h3><?php echo get_vocab("add_multiple_user_to_list").get_vocab("deux_points");?></h3> <form action="admin_right_admin.php" method='post'> <div><select name="agent" size="8" style="width:200px;" multiple="multiple" ondblclick="Deplacer(this.form.agent,this.form.elements['reg_multi_admin_login[]'])"> <?php if ($res) for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { if (authUserAccesArea($row[0],$id_area) == 1) { echo "<option value='$row[0]'>".grr_htmlSpecialChars($row[1])." ".grr_htmlSpecialChars($row[2])."</option>"; } } ?> </select> <input type="button" value="<<" onclick="Deplacer(this.form.elements['reg_multi_admin_login[]'],this.form.agent)"/> <input type="button" value=">>" onclick="Deplacer(this.form.agent,this.form.elements['reg_multi_admin_login[]'])"/> <select name="reg_multi_admin_login[]" id="reg_multi_admin_login" size="8" style="width:200px;" multiple="multiple" ondblclick="Deplacer(this.form.elements['reg_multi_admin_login[]'],this.form.agent)"> <option> </option> </select> <input type="hidden" name="id_area" value="<?php echo $id_area;?>" /> <input type="submit" value="Enregistrer" onclick="selectionner_liste(this.form.reg_multi_admin_login);"/></div> <script type="text/javascript"> vider_liste(document.getElementById('reg_multi_admin_login'));
WHERE ((etat!='inactif' and (statut='utilisateur' or statut='visiteur' or statut='gestionnaire_utilisateur')) AND (".TABLE_PREFIX."_j_user_area.login is null or (".TABLE_PREFIX."_j_user_area.login=u.login and ".TABLE_PREFIX."_j_user_area.id_area!=".$id_area."))) order by u.nom, u.prenom"; $res = grr_sql_query($sql); $nb_users = grr_sql_count($res); if ($nb_users > 0) { ?> <tr><td> <h3><?php echo get_vocab("add_multiple_user_to_list").get_vocab("deux_points");?></h3> <form action="admin_access_area.php" method='post'> <div><select name="agent" size="8" style="width:200px;" multiple="multiple" ondblclick="Deplacer(this.form.agent,this.form.elements['reg_multi_user_login[]'])"> <?php if ($res) for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { echo "<option value=\"$row[0]\">".grr_htmlSpecialChars($row[1])." ".grr_htmlSpecialChars($row[2])." </option>\n"; } ?> </select> <input type="button" value="<<" onclick="Deplacer(this.form.elements['reg_multi_user_login[]'],this.form.agent)"/> <input type="button" value=">>" onclick="Deplacer(this.form.agent,this.form.elements['reg_multi_user_login[]'])"/> <select name="reg_multi_user_login[]" id="reg_multi_user_login" size="8" style="width:200px;" multiple="multiple" ondblclick="Deplacer(this.form.elements['reg_multi_user_login[]'],this.form.agent)"> <option> </option> </select> <input type="hidden" name="id_area" value="<?php echo $id_area;?>" /> <input type="submit" value="Enregistrer" onclick="selectionner_liste(this.form.reg_multi_user_login);"/></div> <script type="text/javascript"> vider_liste(document.getElementById('reg_multi_user_login')); </script> </form>
#Si il y en a plus que 123, on affiche "..." après le 11ème for ($i = 0; $i < $n; $i++) { if ($i == 11 && $n > 12) { echo " ...\n"; break; } echo "\n<table width='100%' border='0'><tr>\n"; tdcell($d[$cday]["color"][$i]); echo "<span class=\"small_planning\">"; echo $d[$cday]["data"][$i] . "<br />"; // si la réservation est à modérer, on le signale if ((isset($d[$cday]["moderation"][$i])) and ($d[$cday]["moderation"][$i]==1)) echo " <img src=\"img_grr/flag_moderation.png\" alt=\"".get_vocab("en_attente_moderation")."\" title=\"".get_vocab("en_attente_moderation")."\" class=\"image\" /> \n"; if ($acces_fiche_reservation) echo "<a title=\"".grr_htmlSpecialChars($d[$cday]["who"][$i])."\" href=\"view_entry.php?id=" . $d[$cday]["id"][$i] . "&day=$cday&month=$month&year=$year&page=month\">" . $d[$cday]["who1"][$i] . "</a>"; else echo $d[$cday]["who1"][$i]; if ($d[$cday]["description"][$i]!= "") echo "<br /><i>(".$d[$cday]["description"][$i].")</i>"; echo "</span></td></tr></table>"; } } // Possibilité de faire une nouvelle réservation $date_now=mktime(); $hour = date("H",$date_now); // Heure actuelle $date_booking = mktime(24, 0, 0, $month, $cday, $year); // minuit
if ((isset($d[$weekday][$slot-$decale_slot*$nb_case]["statut"])) and ($d[$weekday][$slot-$decale_slot*$nb_case]["statut"]!='-')) echo " <img src=\"img_grr/buzy.png\" alt=\"".get_vocab("ressource actuellement empruntee")."\" title=\"".get_vocab("ressource actuellement empruntee")."\" width=\"20\" height=\"20\" class=\"image\" /> \n"; // si la réservation est à confirmer, on le signale if (($this_delais_option_reservation > 0) and (isset($d[$weekday][$slot-$decale_slot*$nb_case]["option_reser"])) and ($d[$weekday][$slot-$decale_slot*$nb_case]["option_reser"]!=-1)) echo " <img src=\"img_grr/small_flag.png\" alt=\"".get_vocab("reservation_a_confirmer_au_plus_tard_le")."\" title=\"".get_vocab("reservation_a_confirmer_au_plus_tard_le")." ".time_date_string_jma($d[$weekday][$slot-$decale_slot*$nb_case]["option_reser"],$dformat)."\" width=\"20\" height=\"20\" class=\"image\" /> \n"; // si la réservation est à modérer, on le signale if ((isset($d[$weekday][$slot-$decale_slot*$nb_case]["moderation"])) and ($d[$weekday][$slot-$decale_slot*$nb_case]["moderation"]=='1')) echo " <img src=\"img_grr/flag_moderation.png\" alt=\"".get_vocab("en_attente_moderation")."\" title=\"".get_vocab("en_attente_moderation")."\" class=\"image\" /> \n"; if (!isset($d[$weekday][$slot-$decale_slot*$nb_case]["id"])) { echo " \" "; } else { if (($this_statut_room == "1") or (($this_statut_room == "0") and (authGetUserLevel(getUserName(),$room) > 2) )) { if ($acces_fiche_reservation) echo " <a title=\"".grr_htmlSpecialChars($d[$weekday][$slot-$decale_slot*$nb_case]["who"])."\" href=\"view_entry.php?id=" . $d[$weekday][$slot-$decale_slot*$nb_case]["id"] . "&day=$wday&month=$wmonth&year=$wyear&page=week\">" . $d[$weekday][$slot-$decale_slot*$nb_case]["data"] . "</a>"; else echo " ".$d[$weekday][$slot-$decale_slot*$nb_case]["data"]; } else { echo $d[$weekday][$slot-$decale_slot*$nb_case]["data"]; } if ($d[$weekday][$slot-$decale_slot*$nb_case]["description"]!= "") echo "<br /><i>".$d[$weekday][$slot-$decale_slot*$nb_case]["description"]."</i>"; } } }
// Affichage d'un pop-up affiche_pop_up($msg,"admin"); echo "<table><tr>"; $this_site_name = ""; # liste des sites echo "<td ><p><b>".get_vocab("sites").get_vocab("deux_points")."</b></p>\n"; $out_html = "<form id=\"site\" action=\"admin_admin_site.php\" method=\"post\">\n<div><select name=\"id_site\" onchange=\"site_go()\">\n"; $out_html .= "<option value=\"admin_admin_site.php?id_site=-1\">".get_vocab('select')."</option>"; $sql = "select id, sitename from ".TABLE_PREFIX."_site order by sitename"; $res = grr_sql_query($sql); if ($res) for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { $selected = ($row[0] == $id_site) ? "selected=\"selected\"" : ""; $link = "admin_admin_site.php?id_site=$row[0]"; $out_html .= "<option $selected value=\"$link\">" . grr_htmlSpecialChars($row[1])."</option>"; } $out_html .= "</select> <script type=\"text/javascript\" > <!-- function site_go() { box = document.getElementById(\"site\").id_site; destination = box.options[box.selectedIndex].value; if (destination) location.href = destination; } // --> </script> </div> <noscript> <div><input type=\"submit\" value=\"Change\" /></div>
$checked = false; if (is_array($info) AND $info["count"] > 0) { echo encode_message_utf8("<p>Sélectionnez ci-dessous le chemin d'accès dans l'annuaire :</p>"); $n = 0; for ($i = 0; $i < $info["count"]; $i++) { $names[] = $info[$i]["dn"]; if (is_array($names)) { for ($j = 0; $j < count($names); $j++) { $n++; echo "<br /><input name=\"base_ldap\" value=\"".grr_htmlSpecialChars($names[$j])."\" type='radio' id='tab$n'"; if (!$checked) { echo " checked=\"checked\""; $checked = true; } echo " />\n"; echo "<label for='tab$n'>".grr_htmlSpecialChars($names[$j])."</label>\n"; } } } echo "<br />Ou bien \n"; } echo "<br /><input name=\"base_ldap\" value=\"\" type='radio' id=\"autre\""; if (!$checked) { echo " checked=\"checked\""; $checked = true; } echo " />\n"; echo "<label for=\"autre\">".encode_message_utf8("Précisez le chemin : ")."</label>\n "; if (isset($_POST["ldap_base"])) $ldap_base = $_POST["ldap_base"]; else $ldap_base =""; if (isset($_POST["ldap_filter"])) $ldap_filter = $_POST["ldap_filter"]; else $ldap_filter =""; echo "<input type=\"text\" name=\"base_ldap_autre\" value=\"$ldap_base\" size=\"40\" />\n";
function affichage_champ_add_mails($id_resa) { $affichage = ""; // Les champs add : $overload_data = mrbsEntryGetOverloadDesc($id_resa); foreach ($overload_data as $fieldname=>$field) { if (($field["overload_mail"] == 'y') and ($field["valeur"]!="")) { $affichage .= bbcode(grr_htmlSpecialChars($fieldname).get_vocab("deux_points").grr_htmlSpecialChars($field["valeur"]),'nobbcode')."\n";; } } return $affichage; }
$ferme_table=true; $ouvre_table=true; } $html .= "<tr><td colspan=\"5\"><hr /></td></tr>"; } $breakkey = $key; if (grr_sql_count($res) != 0) for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { $html .= "<tr>\n"; $html .= "<td style=\"vertical-align:middle;\">$userdomain[$key]</td>\n"; $html .= "<td><form method=\"post\" action=\"admin_overload.php\">\n"; $html .= "<div><input type=\"hidden\" name=\"id_overload\" value=\"$row[0]\" />\n"; $html .= "<input type=\"hidden\" name=\"action\" value=\"change\" />\n"; $html .= "<input type=\"text\" name=\"fieldname\" value=\"".grr_htmlSpecialChars($row[1])."\" />\n"; $html .= "<select name=\"fieldtype\">\n"; $html .= "<option value=\"textarea\" "; if ($row[2] =="textarea") $html .= " selected=\"selected\""; $html .= " >".get_vocab("type_area")."</option>\n"; $html .= "<option value=\"text\" "; if ($row[2] =="text") $html .= " selected=\"selected\""; $html .= " >".get_vocab("type_text")."</option>\n"; $html .= "<option value=\"list\" "; if ($row[2] =="list") $html .= " selected=\"selected\""; $html .= " >".get_vocab("type_list")."</option>\n"; $html .= "<option value=\"numeric\" "; if ($row[2] =="numeric") $html .= " selected=\"selected\""; $html .= " >".get_vocab("type_numeric")."</option>\n"; $html .= "</select>\n"; $ind_div++;
if(isset($id_area)) { $sql = "select id, room_name, description, capacity, max_booking, statut_room from ".TABLE_PREFIX."_room where area_id=$id_area "; // on ne cherche pas parmi les ressources invisibles pour l'utilisateur $tab_rooms_noaccess = verif_acces_ressource(getUserName(), 'all'); foreach($tab_rooms_noaccess as $key){ $sql .= " and id != $key "; } $sql .= "order by order_display, room_name"; $res = grr_sql_query($sql); if (! $res) fatal_error(0, grr_sql_error()); if (grr_sql_count($res) != 0) { echo "<table cellpadding=\"3\" cellspacing=\"1\">"; for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { $color = ''; if ($row[5] == "0") $color = " class=\"texte_ress_tempo_indispo\""; echo "<tr><td ".$color.">" . grr_htmlSpecialChars($row[1]) . "<i> - " . grr_htmlSpecialChars($row[2]); if ($row[3]>0) echo " ($row[3] max.)"; echo "</i></td>\n<td><a href=\"admin_edit_room.php?room=$row[0]\"><img src=\"img_grr/edit_s.png\" alt=\"".get_vocab('edit')."\" title=\"".get_vocab('edit')."\" class=\"image\" /></a></td>\n"; echo "<td><a href=\"admin_edit_room.php?room=$row[0]&action=duplique_room\"><img src=\"img_grr/duplique.png\" alt=\"".get_vocab('duplique_ressource')."\" title=\"".get_vocab('duplique_ressource')."\" class=\"image\" /></a></td>"; echo "<td><a href=\"admin_room_del.php?type=room&room=$row[0]&id_area=$id_area\"><img src=\"img_grr/delete_s.png\" alt=\"".get_vocab('delete')."\" title=\"".get_vocab('delete')."\" class=\"image\" /></a></td>"; echo "<td><a href='javascript:centrerpopup(\"view_rights_room.php?id_room=$row[0]\",600,480,\"scrollbars=yes,statusbar=no,resizable=yes\")' title=\"".get_vocab("privileges")."\"> <img src=\"img_grr/rights.png\" alt=\"".get_vocab("privileges")."\" class=\"image\" /></a></td>"; echo "<td><a href='javascript:centrerpopup(\"view_room.php?id_room=$row[0]\",600,480,\"scrollbars=yes,statusbar=no,resizable=yes\")' title=\"".get_vocab("fiche_ressource")."\"> <img src=\"img_grr/details_s.png\" alt=\"détails\" class=\"image\" /></a></td>"; echo "</tr>\n"; } echo "</table>"; } else echo get_vocab("no_rooms_for_area"); } else { echo get_vocab('noarea'); }
} echo "</tr>\n"; reset($rooms); $tab_ligne++; } // répétition de la ligne d'en-tête echo "<tr>\n<th> </th>"; for ($i = 0; $i < $nbcol; $i++) { // On affiche pas toutes les ressources if (verif_acces_ressource(getUserName(), $id_room[$i])) { echo "<th"; if ($statut_room[$id_room[$i]] == "0") echo " class='avertissement' "; echo ">" . grr_htmlSpecialChars($room_name[$i])."</th>"; } } echo "<th> </th></tr>\n"; echo "</table>"; show_colour_key($area); } grr_sql_free($res); /* echo "<table border=\"1\">"; foreach ($tab as $cle => $value) { echo "<tr>"; foreach ($value as $value2) { echo "<td>"; echo $value2;
echo "<td><b><a href='admin_user.php?order_by=nom,prenom&display=$display'>".get_vocab("names")."</a></b></td>"; echo "<td><b>".get_vocab("privileges")."</b></td>"; echo "<td><b><a href='admin_user.php?order_by=statut,nom,prenom&display=$display'>".get_vocab("statut")."</a></b></td>"; echo "<td><b><a href='admin_user.php?order_by=source,nom,prenom&display=$display'>".get_vocab("authentification")."</a></b></td>"; echo "<td><b>".get_vocab("delete")."</b></td>"; echo "</tr>"; $sql = "SELECT nom, prenom, statut, login, etat, source FROM ".TABLE_PREFIX."_utilisateurs ORDER BY $order_by"; $res = grr_sql_query($sql); if ($res) { for ($i = 0; ($row = grr_sql_row($res, $i)); $i++) { $user_nom = grr_htmlSpecialChars($row[0]); $user_prenom = grr_htmlSpecialChars($row[1]); $user_statut = $row[2]; $user_login = $row[3]; $user_etat[$i] = $row[4]; $user_source = $row[5]; if (($user_etat[$i] == 'actif') and (($display == 'tous') or ($display == 'actifs'))) { $affiche = 'yes'; } else if (($user_etat[$i] != 'actif') and (($display == 'tous') or ($display == 'inactifs'))) { $affiche = 'yes'; } else { $affiche = 'no'; } if ($affiche == 'yes') { // Affichage des login, noms et prénoms $col[$i][1] = $user_login; $col[$i][2] = "$user_nom $user_prenom";
* *** empty log message *** * * Revision 1.3 2009-01-20 07:19:17 grr * *** empty log message *** * * Revision 1.2 2008-11-16 22:00:59 grr * *** empty log message *** * * */ // Affichage d'un lien pour format imprimable if ( ( !isset($_GET['pview']) or ($_GET['pview'] != 1)) and (isset($affiche_pview))) { echo "<div class=\"format_imprimable\"><a href=\"". traite_grr_url($grr_script_name) ."?"; if (isset($_SERVER['QUERY_STRING']) and ($_SERVER['QUERY_STRING'] != '')) echo grr_htmlSpecialChars($_SERVER['QUERY_STRING']) . "&"; echo "pview=1\" "; if (getSettingValue("pview_new_windows")==1) echo " target=\"_blank\""; echo ">" . get_vocab("ppreview") . "</a></div>"; } // Affichage du message d'erreur en cas d'échec de l'envoi de mails automatiques if (!(getSettingValue("javascript_info_disabled"))) { if ((isset($_SESSION['session_message_error'])) and ($_SESSION['session_message_error']!='')) { echo "<script type=\"text/javascript\">"; echo "<!--\n"; echo " alert(\"".get_vocab("title_automatic_mail")."\\n".$_SESSION['session_message_error']."\\n".get_vocab("technical_contact")."\")"; echo "//-->"; echo "</script>"; $_SESSION['session_message_error'] = ""; } }
<th>Value</th> </tr> </thead> <?php if ( isset( $_POST ) ) $postArray = &$_POST ; // 4.1.0 or later, use $_POST else $postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS foreach ( $postArray as $sForm => $value ) { if ( get_magic_quotes_gpc() ) $postedValue = grr_htmlSpecialChars( stripslashes( $value ) ) ; else $postedValue = grr_htmlSpecialChars( $value ) ; ?> <tr> <th style="vertical-align: top"><?php echo $sForm?></th> <td><pre><?php echo $postedValue?></pre></td> </tr> <?php } ?> </table> <div id="footer"> <hr /> <p> CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a> </p>
// Minutes à ajouter à l'heure $eveningends pour avoir la fin réelle d'une journée. echo "<tr>\n"; echo "<td>".get_vocab("eveningends_minutes_area").get_vocab("deux_points")."</td>\n"; echo "<td><input type=\"text\" name=\"eveningends_minutes_area\" size=\"5\" value=\"".grr_htmlSpecialChars($row["eveningends_minutes_area"])."\" /></td>\n"; echo "</tr>"; // Resolution - quel bloc peut être réservé, en secondes echo "<tr>\n"; echo "<td>".get_vocab("resolution_area").get_vocab("deux_points")."</td>\n"; echo "<td><input type=\"text\" name=\"resolution_area\" size=\"5\" value=\"".grr_htmlSpecialChars($row["resolution_area"])."\" /></td>\n"; echo "</tr>"; // Valeur par défaut de la durée d'une réservation echo "<tr>\n"; echo "<td>".get_vocab("duree_par_defaut_reservation_area").get_vocab("deux_points")."</td>\n"; echo "<td><input type=\"text\" name=\"duree_par_defaut_reservation_area\" size=\"5\" value=\"".grr_htmlSpecialChars($row["duree_par_defaut_reservation_area"])."\" /></td>\n"; echo "</tr>"; // Format d'affichage du temps : valeur 0 pour un affichage « 12 heures » et valeur 1 pour un affichage « 24 heure ». echo "<tr>\n"; echo "<td>".get_vocab("twentyfourhour_format_area").get_vocab("deux_points")."</td>\n"; echo "<td>\n"; echo "<label><input type=\"radio\" name=\"twentyfourhour_format_area\" value=\"0\" "; if ($row['twentyfourhour_format_area'] == 0) echo " checked=\"checked\""; echo " />".get_vocab("twentyfourhour_format_12")."</label>\n<br />"; echo "<label><input type=\"radio\" name=\"twentyfourhour_format_area\" value=\"1\" "; if ($row['twentyfourhour_format_area'] == 1) echo " checked=\"checked\""; echo " />".get_vocab("twentyfourhour_format_24")."</label>\n"; echo "</td>\n"; echo "</tr>\n";
?> <h3 style="text-align:center;"><?php echo get_vocab("room").get_vocab("deux_points")." ".grr_htmlSpecialChars($row["room_name"]); $id_area = mrbsGetRoomArea($id_room); $area_name = grr_sql_query1("select area_name from ".TABLE_PREFIX."_area where id='".$id_area."'"); $area_access = grr_sql_query1("select access from ".TABLE_PREFIX."_area where id='".$id_area."'"); echo "<br />(".$area_name; if ($area_access == 'r') echo " - ".get_vocab("access"); echo ")"; echo "</h3>"; if ($row['statut_room'] == "0") echo "<h2 style=\"text-align:center;\"><span class=\"avertissement\">".get_vocab("ressource_temporairement_indisponible")."</span></h2>"; echo "<h3>".get_vocab("description")."</h3>\n"; echo "<div>".grr_htmlSpecialChars($row["description"])." </div>\n"; if ($row["comment_room"] != '') { echo "<h3>".get_vocab("match_descr")."</h3>\n"; echo "<div>".$row["comment_room"]."</div>\n"; } if ($row["capacity"] != '0') { echo "<h3>".get_vocab("capacity_2")."</h3>\n"; echo "<p>".$row["capacity"]."</p>\n"; } if ($row["max_booking"] != "-1") echo "<p>".get_vocab("msg_max_booking").get_vocab("deux_points").$row["max_booking"]."</p>"; // Limitation par domaine $max_booking_per_area = grr_sql_query1("SELECT max_booking FROM ".TABLE_PREFIX."_area WHERE id = '".protect_data_sql($id_area)."'"); if ($max_booking_per_area >= 0) echo "<p>".get_vocab("msg_max_booking_area").get_vocab("deux_points").$max_booking_per_area."</p>";
echo "<div id=\"div_profilBeneficiaire\">"; // Ici, on insère des données avec l'ajax concernant des précisions sur le bénéficiaire sélectionné dans la liste "Réservation au nom de". echo "</div>"; if (isset($statut_beneficiaire)) echo $statut_beneficiaire; if (isset($statut_beneficiaire)) echo $statut_beneficiaire; echo "</td></tr>\n"; if ($tab_benef["nom"] != "") echo "<tr id=\"menu4\"><td>"; else echo "<tr style=\"display:none\" id=\"menu4\"><td>"; echo get_vocab("nom beneficiaire")." *".get_vocab("deux_points")."<input type=\"text\" name=\"benef_ext_nom\" value=\"".grr_htmlSpecialChars($tab_benef["nom"])."\" size=\"20\" />"; $affiche_mess_asterisque=true; if (getSettingValue("automatic_mail") == 'yes') { echo "<br />".get_vocab("email beneficiaire").get_vocab("deux_points")."<input type=\"text\" name=\"benef_ext_email\" value=\"".grr_htmlSpecialChars($tab_benef["email"])."\" size=\"20\" />"; } echo "</td></tr>\n"; } else $flag_qui_peut_reserver_pour = "no"; echo "<tr><td class=\"E\"><b>$B</b></td></tr> <tr><td class=\"CL\"><input id=\"name\" name=\"name\" size=\"80\" value=\"$C\" /></td></tr> <tr><td class=\"E\"><b>$D</b></td></tr> <tr><td class=\"TL\"><textarea name=\"description\" rows=\"2\" cols=\"80\">$E</textarea></td></tr>"; echo "<tr><td><div id=\"div_champs_add\">"; // Ici, on insère tous ce qui concerne les champs additionnels avec de l'ajax ! echo "</div>"; echo "</td></tr>\n"; // Début réservation echo "<tr><td class=\"E\"><b>$F</b></td></tr>\n"; echo "<tr><td class=\"CL\">";
$month = date("m"); $year = date("Y"); showAccessDenied($day, $month, $year, '',''); exit(); } echo begin_page(getSettingValue("company").get_vocab("deux_points").get_vocab("mrbs")); $res = grr_sql_query("SELECT * FROM ".TABLE_PREFIX."_room WHERE id=$id_room"); if (! $res) fatal_error(0, get_vocab('error_room') . $id_room . get_vocab('not_found')); $row = grr_sql_row_keyed($res, 0); grr_sql_free($res); ?> <h3 style="text-align:center;"><?php echo get_vocab("room").get_vocab("deux_points")." ".grr_htmlSpecialChars($row["room_name"]); $id_area = mrbsGetRoomArea($id_room); $area_name = grr_sql_query1("select area_name from ".TABLE_PREFIX."_area where id='".$id_area."'"); $area_access = grr_sql_query1("select access from ".TABLE_PREFIX."_area where id='".$id_area."'"); echo "<br />(".$area_name; if ($area_access == 'r') echo " - <span class=\"avertissement\">".get_vocab("access")."</span>"; echo ")"; echo "</h3>"; // On affiche pour les administrateurs les utilisateurs ayant des privilèges sur cette ressource echo "\n<h2>".get_vocab('utilisateurs ayant privileges')."</h2>"; $a_privileges = 'n'; // on teste si des utilateurs administre le domaine $req_admin = "select u.login, u.nom, u.prenom from ".TABLE_PREFIX."_utilisateurs u left join ".TABLE_PREFIX."_j_useradmin_area j on u.login=j.login where j.id_area = '".$id_area."' order by u.nom, u.prenom";
function ConvertToXmlAttribute( $value ) { return utf8_encode( grr_htmlSpecialChars( $value ) ) ; }
$overload_data = mrbsEntryGetOverloadDesc($id); foreach ($overload_data as $fieldname=>$fielddata) { if ($fielddata["confidentiel"] == 'n') $affiche_champ = 'y'; else if (($fin_session != 'n') or (getUserName()=='')) $affiche_champ = 'n'; else // seuls les administrateurs et le bénéficiaire peut voir un champ confidentiel if ((authGetUserLevel(getUserName(),$room_id) >= 4) or ($beneficiaire == getUserName())) $affiche_champ = 'y'; else $affiche_champ = 'n'; if ($affiche_champ == 'y') { echo "<tr><td><b>".bbcode(grr_htmlSpecialChars($fieldname).get_vocab("deux_points"),'')."</b></td>\n"; echo "<td>".bbcode(grr_htmlSpecialChars($fielddata["valeur"]),'')."</td></tr>\n"; } } } ?> <tr> <td><b><?php echo get_vocab("room").get_vocab("deux_points") ?></b></td> <td><?php echo nl2br($area_name . " - " . $room_name) ?></td> </tr> <tr> <td><b><?php echo get_vocab("start_date").get_vocab("deux_points") ?></b></td> <td><?php echo $start_date ?></td> </tr> <tr> <td><b><?php echo get_vocab("duration") ?></b></td> <td><?php echo $duration . " " . $dur_units ?></td>
'<option value="-3"'; if ($default_room == -3) $display_liste .= ' selected="selected" '; $display_liste .= ' >'.get_vocab('default_room_month_all').'</option>'."\n". '<option value="-4"'; if ($default_room == -4) $display_liste .= ' selected="selected" '; $display_liste .= ' >'.get_vocab('default_room_month_all_bis').'</option>'."\n"; for ($enr = 0; ($row = grr_sql_row($resultat, $enr)); $enr++) { $display_liste .= ' <option value="'.$row[0].'"'; if ($default_room == $row[0]) $display_liste .= ' selected="selected" '; $display_liste .= '>'.grr_htmlSpecialChars($row[1]).' '.get_vocab('display_week'); $display_liste .= '</option>'."\n"; } $display_liste .= ' </select> </td> </tr></table>'."\n"; } } if ($unicode_encoding) header("Content-Type: text/html;charset=utf-8"); else header("Content-Type: text/html;charset=".$charset_html); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
FROM ".TABLE_PREFIX."_site ORDER BY id ASC"; $resultat = grr_sql_query($sql); echo(' <table> <tr> <td>'.get_vocab('default_site').get_vocab('deux_points').'</td> <td> <select id="id_site" name="id_site" onchange="modifier_liste_domaines();modifier_liste_ressources(2)"> <option value="-1">'.get_vocab('choose_a_site').'</option>'."\n"); for ($enr = 0; ($row = grr_sql_row($resultat, $enr)); $enr++) { echo ' <option value="'.$row[0].'"'; if ($default_site == $row[0]) echo ' selected="selected" '; echo '>'.grr_htmlSpecialChars($row[2]); echo '</option>'."\n"; } echo(' </select> </td> </tr>'); } else { echo '<input type="hidden" id="id_site" name="id_site" value="-1" /> <table>'; } /** * Liste des domaines */ echo '<tr><td colspan="2">';
$no_td = FALSE; } echo "\n<table width='100%' border='0'><tr>"; tdcell($d[$cday]["color"][$i]); if ($d[$cday]["res"][$i]!='-') echo " <img src=\"img_grr/buzy.png\" alt=\"".get_vocab("ressource actuellement empruntee")."\" title=\"".get_vocab("ressource actuellement empruntee")."\" width=\"20\" height=\"20\" class=\"image\" /> \n"; // si la réservation est à confirmer, on le signale if ((isset($d[$cday]["option_reser"][$i])) and ($d[$cday]["option_reser"][$i]!=-1)) echo " <img src=\"img_grr/small_flag.png\" alt=\"".get_vocab("reservation_a_confirmer_au_plus_tard_le")."\" title=\"".get_vocab("reservation_a_confirmer_au_plus_tard_le")." ".time_date_string_jma($d[$cday]["option_reser"][$i],$dformat)."\" width=\"20\" height=\"20\" class=\"image\" /> \n"; // si la réservation est à modérer, on le signale if ((isset($d[$cday]["moderation"][$i])) and ($d[$cday]["moderation"][$i]==1)) echo " <img src=\"img_grr/flag_moderation.png\" alt=\"".get_vocab("en_attente_moderation")."\" title=\"".get_vocab("en_attente_moderation")."\" class=\"image\" /> \n"; echo "<span class=\"small_planning\"><b>". $d[$cday]["data"][$i] . "</b><br />"; if ($acces_fiche_reservation) echo "<a title=\"".grr_htmlSpecialChars($d[$cday]["who"][$i])."\" href=\"view_entry.php?id=" . $d[$cday]["id"][$i]."&page=week_all&day=$cday&month=$cmonth&year=$cyear&\">" . $d[$cday]["who1"][$i] . "</a>"; else echo $d[$cday]["who1"][$i]; echo "</span>"; if ($d[$cday]["description"][$i]!= "") echo "<br /><i>".$d[$cday]["description"][$i]."</i>"; echo "</td></tr></table>"; } } } if ($no_td) { if ($row[4]==1)
/** * Creates a %CKEditor instance. * In incompatible browsers %CKEditor will downgrade to plain HTML <textarea> element. * * @param $name (string) Name of the %CKEditor instance (this will be also the "name" attribute of textarea element). * @param $value (string) Initial value (optional). * @param $config (array) The specific configurations to apply to this editor instance (optional). * @param $events (array) Event listeners for this editor instance (optional). * * Example usage: * @code * $CKEditor = new CKEditor(); * $CKEditor->editor("field1", "<p>Initial value.</p>"); * @endcode * * Advanced example: * @code * $CKEditor = new CKEditor(); * $config = array(); * $config['toolbar'] = array( * array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ), * array( 'Image', 'Link', 'Unlink', 'Anchor' ) * ); * $events['instanceReady'] = 'function (ev) { * alert("Loaded: " + ev.editor.name); * }'; * $CKEditor->editor("field1", "<p>Initial value.</p>", $config, $events); * @endcode */ function editor($name, $value = "", $config = array(), $events = array()) { $attr = ""; foreach ($this->textareaAttributes as $key => $val) { $attr.= " " . $key . '="' . str_replace('"', '"', $val) . '"'; } $out = "<textarea name=\"" . $name . "\"" . $attr . ">" . grr_htmlSpecialChars($value) . "</textarea>\n"; if (!$this->initialized) { $out .= $this->init(); } $_config = $this->configSettings($config, $events); $js = $this->returnGlobalEvents(); if (!empty($_config)) $js .= "CKEDITOR.replace('".$name."', ".$this->jsEncode($_config).");"; else $js .= "CKEDITOR.replace('".$name."');"; $out .= $this->script($js); if (!$this->returnOutput) { print $out; $out = ""; } return $out; }
* *** empty log message *** * * Revision 1.6 2009-02-27 13:28:19 grr * *** empty log message *** * * Revision 1.5 2008-11-16 22:00:58 grr * *** empty log message *** * * */ include "include/admin.inc.php"; $grr_script_name = "admin_confirm_change_date_bookings.php"; $back = ''; if (isset($_SERVER['HTTP_REFERER'])) $back = grr_htmlSpecialChars($_SERVER['HTTP_REFERER']); unset($display); $display = isset($_GET["display"]) ? $_GET["display"] : NULL; if(authGetUserLevel(getUserName(),-1) < 6) { $day = date("d"); $month = date("m"); $year = date("Y"); showAccessDenied($day, $month, $year, '',$back); exit(); } if (isset($_GET['valid']) and ($_GET['valid'] == "yes")) { if (!saveSetting("begin_bookings", $_GET['begin_bookings'])) { echo "Erreur lors de l'enregistrement de begin_bookings !<br />"; } else { $del = grr_sql_query("DELETE FROM ".TABLE_PREFIX."_entry WHERE (end_time < ".getSettingValue('begin_bookings').")");
echo "<h1><a href=\"admin_open_mysql.php?file_name=$file_name\">" . get_vocab("YES") . "!</a> <a href=\"admin_config.php?page_config=4\">" . get_vocab("NO") . "!</a></h1>"; echo "</div>"; } else { #Procède à la restauration $file = fopen($file_name, "r") or exit("Erreur de lecture de fichier!"); $ok=""; $error = ""; while(!feof($file)) { $line = fgets($file); while ($line[0]!='#' and !stristr($line,';') and !feof($file)) $line .= fgets($file); if (grr_sql_query($line)) { $ok.="1"; } else { $ok.="0"; $error .="<hr />".grr_htmlSpecialChars($line); } } fclose($file); unlink($file_name); echo "<h3>La restauration est terminée !</h3>" ; echo strlen($ok)." requêtes ont été exécutées " ; if (strrpos($ok,'0')) { echo "avec ".substr_count($ok,'0')." erreur(s) :"; echo $error."<hr />"; } else { echo "sans erreurs."; } echo "<br /><a href=\"login.php\">".get_vocab("msg_logout3")."</a></div>"; }