コード例 #1
0
ファイル: fn_shortcuts.php プロジェクト: yrahman/playSMS
/**
 * Generate select HTML tag
 * Shortcut to themes_select()
 * @param  string $name     Tag name
 * @param  array  $options  Select options
 * @param  string $selected Selected option
 * @param  array  $tag_params  Additional input tag parameters
 * @param  string $css_id      CSS ID
 * @param  string $css_class   CSS class name
 * @return string           Select HTML tag
 */
function _select($name, $options = array(), $selected = '', $tag_options = array(), $css_id = '', $css_class = '')
{
    return themes_select($name, $options, $selected, $tag_options, $css_id, $css_class);
}
コード例 #2
0
ファイル: fn.php プロジェクト: yrahman/playSMS
/**
 * Generate select HTML tag for yes-no or enabled-disabled type of options
 * @param  string  $name     Tag name
 * @param  boolean $selected TRUE if yes/enabled
 * @param  string  $yes      'Yes' or 'Enabled' option
 * @param  string  $no       'No' or 'Disabled' option
 * @param  array  $tag_params  Additional input tag parameters
 * @param  string $css_id      CSS ID
 * @param  string $css_class   CSS class name
 * @return string            Select HTML tag
 */
function themes_select_yesno($name, $selected, $yes = '', $no = '', $tag_params = array(), $css_id = '', $css_class = '')
{
    $yes = $yes ? $yes : _('yes');
    $no = $no ? $no : _('no');
    $options = array($yes => 1, $no => 0);
    return themes_select($name, $options, $selected, $tag_params, $css_id, $css_class);
}