예제 #1
0
파일: session.inc.php 프로젝트: retsil/sqa
function update_radio_input($table, $column, $values, $quot, $column1, $index1, $row)
{
    if (!empty($values[$_POST[$column]])) {
        $row = update_field($table, $column, '//', $quot, $column1, $index1, $row);
        radio_input($column, $values, $row);
    } else {
        if ($_POST['update'] != '' and !empty($_POST[$column])) {
            die('Invalid input' . $_POST[$column]);
        } else {
            radio_input($column, $values, $row);
        }
    }
}
예제 #2
0
function get_admin_tab($input, $head = true)
{
    switch ($input['type']) {
        case "upload":
            upload_input($input, $head);
            break;
        case "uploadbg":
            uploadbg_input($input, $head);
            break;
        case "text":
            text_input($input, $head);
            break;
        case "ptext":
            ptext_input($input, $head);
            break;
        case "color":
            color_input($input, $head);
            break;
        case "tags":
            tags_input($input, $head);
            break;
        case "textarea":
            textarea_input($input, $head);
            break;
        case "number":
            number_input($input, $head);
            break;
        case "checkbox":
            checkbox_input($input, $head);
            break;
        case "radio":
            radio_input($input, $head);
            break;
        case "radio_bgtype":
            radio_bgtype_input($input, $head);
            break;
        case "select":
            select_input($input, $head);
            break;
        case "slider_num":
            slider_num_input($input, $head);
            break;
        case "background_bd":
            background_bd_input($input, $head);
            break;
        case "typography":
            typography_input($input, $head);
            break;
    }
}
예제 #3
0
function create_bootstrap_input2($type = 'text', $name, $options = array(), $label = ' ', $classes = '', $state = '', $default_value = '', $additional_attributes, $help = '', $required = false)
{
    if ($required) {
        $classes .= ' input-required';
        $classes = trim($classes);
    }
    $output = '';
    $output .= '<div class="form-group"><label for="' . $name . '" class="col-sm-2 control-label">' . $label . ($required ? ' <span class="required">*</span>' : '') . '</label>';
    $output .= '<div class="col-sm-10">';
    if ($type == 'textarea' || $type == 'longtext') {
        $output .= textarea_input($name, $classes, $state, $default_value, $additional_attributes);
    } else {
        if ($type == 'select' || $type == 'dropdown') {
            $output .= select_input($name, $options, $classes, $state, $default_value, $additional_attributes);
        } else {
            if ($type == 'checkbox') {
                $output .= checkbox_input($options, $default_value);
            } else {
                if ($type == 'radio' || $type == 'switch') {
                    $output .= radio_input($options, $name, $default_value);
                } else {
                    $output .= text_input($type, $name, $classes, $state, $default_value, $additional_attributes);
                }
            }
        }
    }
    $output .= '<p class="help-block">' . $help . '</p></div>' . "\n";
    $output .= '</div>' . "\n";
    return $output;
}