'. gTranslate('common', "Check All") . ' - '. gTranslate('common', "Clear All") . ' - '. gTranslate('common', "Invert Selection") .''; return $buf; } /** * $opts is now a name/value array, where $key is the value returned, and $name * is the value displayed (and translated). */ function selectOptions($album, $field, $opts) { foreach ($opts as $key => $value) { $sel = ''; if (isset($album->fields[$field]) && !strcmp($key, $album->fields[$field])) { $sel = 'selected'; } echo "\n\t"; } echo "\n"; } /** * Returns the partitial HTML code for HTML tags attributes * * @param array $attrList Format: 'key' => 'value' * @return string $attrList * @author Jens Tkotz */ function generateAttrs($attrList) { $attrs = ''; if(!empty($attrList) && is_array($attrList)) { foreach ($attrList as $key => $value) { if ($value === false) { continue; } elseif ($value === NULL) { $attrs .= " $key"; } else { $attrs .= " $key=\"$value\""; } } } return $attrs; } /** * Returns the HTML code for a selectbox * * @param string $name Name attribute of the selectbox * @param array $options Array of options. Format 'value' => 'text' * @param mixed $selected String or integer, if a value or key is equal this, the entry is selected. * @param integer $size Size of the box, default 1 * @param array $attrList Optional Attributs for the selectbox * @return string $html */ function drawSelect($name, $options, $selected = '', $size = 1, $attrList = array(), $prettyPrinting = false) { $crlf = ($prettyPrinting) ? "\n\t" : ''; $attrs = generateAttrs($attrList); $html = "'. $crlf; return $html; } /** * Returns the HTML code for a selectbox * * @param string $name Name attribute of the selectbox * @param array $options Array of options. Format 'trash' => array('text' => .., 'value' => '' * @param array $attrList Optional Attributs for the selectbox * @return string $html * @author Jens Tkotz */ function drawSelect2($name, $options, $attrList = array()) { $crlf = "\n\t"; // This attributes are no real HTML attribs and thus should be deleted. $optionIgnoreAttrs = array('text', 'icon', 'separate', 'html', 'type', 'requirements'); if (!isset($attrList['size'])) { $attrList['size'] = 1; } $attrs = generateAttrs($attrList); $html = "$crlf". $crlf; return $html; } /** * makeFormIntro() is a wrapper around makeGalleryUrl() that will generate * a