* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
+require_once 'platal.inc.php';
function select_options($table,$valeur,$champ="text",$pad=false,
$where="",$join="",$group="")
$order = $champ;
if ($group) {
$fields .= ',' . $group;
- $order = $group . ',' . $order;
- }
+ $order = $group . ',' . $order;
+ }
$sql = "SELECT $fields FROM $table AS t $join $where ORDER BY $order";
$res = XDB::iterRow($sql);
$sel = ' selected="selected"';
if (!is_null($optgrp)) {
$html .= '</optgroup>';
}
- $html .= '<optgroup label="' . htmlentities($my_grp, ENT_QUOTES) . '">';
+ $html .= '<optgroup label="' . pl_entities($my_grp, ENT_QUOTES) . '">';
$optgrp = $my_grp;
}
- $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
- $my_id, ($valeur==$my_id?$sel:""), $my_text);
+ $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
+ $my_id, $valeur==$my_id ? $sel : "", pl_entities($my_text));
}
if (!is_null($optgrp)) {
$html .= '</optgroup>';