本文整理汇总了PHP中grr_htmlSpecialChars函数的典型用法代码示例。如果您正苦于以下问题:PHP grr_htmlSpecialChars函数的具体用法?PHP grr_htmlSpecialChars怎么用?PHP grr_htmlSpecialChars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了grr_htmlSpecialChars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: failNotEquals
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);
}
示例2: SendError
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 ;
}
示例3: ConvertToXmlAttribute
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 ) ) ;
}
}
示例4: if
} 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>";
示例5: accumulate_periods
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;
}
示例6: AND
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'));
示例7: WHERE
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>
示例8: tdcell
#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
示例9: and
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>";
}
}
}
示例10: affiche_pop_up
// 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>
示例11: encode_message_utf8
$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";
示例12: affichage_champ_add_mails
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;
}
示例13:
$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++;
示例14: verif_acces_ressource
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');
}
示例15: reset
}
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;