예제 #1
0
파일: admin.php 프로젝트: phill104/branches
function create_form(&$data)
{
    global $sn1, $sn2, $sn3, $options_to_disable, $CONFIG;
    $row_style_class = 'tableb';
    foreach ($data as $element) {
        if (is_array($element)) {
            $skipped = 0;
            $element[3] = isset($element[3]) ? $element[3] : '';
            if (UDB_INTEGRATION != 'coppermine' and in_array($element[1], $options_to_disable) and $CONFIG['bridge_enable']) {
                $element[2] = 15;
            }
            $sn1 = max($sn1, strpos($element[0], '<a href="#notice1"'));
            $sn2 = max($sn2, strpos($element[0], '<a href="#notice2"'));
            $sn3 = max($sn3, strpos($element[0], '<a href="#notice3"'));
            switch ($element[2]) {
                case 0:
                    form_input($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 1:
                    if (!($element[1] == 'enable_encrypted_passwords' && $CONFIG['enable_encrypted_passwords'])) {
                        form_yes_no($element[0], $element[1], $element[3], $row_style_class);
                        break;
                    }
                    $skipped = 1;
                    break;
                case 2:
                    form_img_pkg($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 3:
                    form_sort_order($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 4:
                    form_charset($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 5:
                    form_language($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 6:
                    form_theme($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    // Thumbnail scaling
                // Thumbnail scaling
                case 7:
                    form_scale($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    // Language + Theme selection
                // Language + Theme selection
                case 8:
                    form_lang_theme($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    // debug mode selection
                // debug mode selection
                case 9:
                    form_lang_debug($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    // tabbed display fix
                // tabbed display fix
                case 10:
                    form_number_dropdown($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 11:
                    form_lang_logmode($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 12:
                    form_plugin_yes_no($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 13:
                    form_exif_yes_no($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 14:
                    form_keywords_yes_no($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 15:
                    form_disabled($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 16:
                    form_auto_resize($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    // ascending or descending
                // ascending or descending
                case 17:
                    form_asc_desc($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    // registration disclaimer
                // registration disclaimer
                case 18:
                    form_registration_disclaimer($element[0], $element[1], $element[3], $row_style_class);
                    break;
                case 19:
                    form_user_guest_yes_no($element[0], $element[1], $element[3], $row_style_class);
                    break;
                    //Watermark place
                //Watermark place
                case 20:
                    form_watermark_place($element[0], $element[1], $row_style_class);
                    break;
                    //Which filest to watermark
                //Which filest to watermark
                case 21:
                    form_watermark_files($element[0], $element[1], $row_style_class);
                    break;
                default:
                    die('Invalid action');
            }
            // switch
            if (!$skipped) {
                $row_style_class = $row_style_class == 'tableb' ? 'tableb tableb_alternate' : 'tableb';
            }
        } else {
            form_label($element);
        }
    }
}
예제 #2
0
function create_form(&$data)
{
    foreach ($data as $element) {
        if (is_array($element)) {
            switch ($element[2]) {
                case 0:
                    form_input($element[0], $element[1]);
                    break;
                case 1:
                    form_yes_no($element[0], $element[1]);
                    break;
                case 2:
                    form_img_pkg($element[0], $element[1]);
                    break;
                case 3:
                    form_sort_order($element[0], $element[1]);
                    break;
                case 4:
                    form_charset($element[0], $element[1]);
                    break;
                case 5:
                    form_language($element[0], $element[1]);
                    break;
                case 6:
                    form_theme($element[0], $element[1]);
                    break;
                    // Thumbnail scaling
                // Thumbnail scaling
                case 7:
                    form_scale($element[0], $element[1]);
                    break;
                    // Language + Theme selection
                // Language + Theme selection
                case 8:
                    form_lang_theme($element[0], $element[1]);
                    break;
                    // debug mode selection
                // debug mode selection
                case 9:
                    form_lang_debug($element[0], $element[1]);
                    break;
                    // tabbed display fix
                // tabbed display fix
                case 10:
                    form_number_dropdown($element[0], $element[1]);
                    break;
                default:
                    die('Invalid action');
            }
            // switch
        } else {
            form_label($element);
        }
    }
}
예제 #3
0
파일: admin.php 프로젝트: alencarmo/OCF
function create_form(&$data)
{
    global $sn1, $sn2, $sn3, $options_to_disable, $CONFIG;
    foreach ($data as $element) {
        if (is_array($element)) {
            $element[3] = isset($element[3]) ? $element[3] : '';
            if (UDB_INTEGRATION != 'coppermine' and in_array($element[1], $options_to_disable) and $CONFIG['bridge_enable']) {
                $element[2] = 15;
            }
            $sn1 = max($sn1, strpos($element[0], '<a href="#notice1"'));
            $sn2 = max($sn2, strpos($element[0], '<a href="#notice2"'));
            $sn3 = max($sn3, strpos($element[0], '<a href="#notice3"'));
            switch ($element[2]) {
                case 0:
                    form_input($element[0], $element[1], $element[3]);
                    break;
                case 1:
                    if ($element[1] == 'enable_encrypted_passwords' && !$CONFIG['enable_encrypted_passwords'] || $element[1] != 'enable_encrypted_passwords') {
                        form_yes_no($element[0], $element[1], $element[3]);
                    }
                    break;
                case 2:
                    form_img_pkg($element[0], $element[1], $element[3]);
                    break;
                case 3:
                    form_sort_order($element[0], $element[1], $element[3]);
                    break;
                case 4:
                    form_charset($element[0], $element[1], $element[3]);
                    break;
                case 5:
                    form_language($element[0], $element[1], $element[3]);
                    break;
                case 6:
                    form_theme($element[0], $element[1], $element[3]);
                    break;
                    // Thumbnail scaling
                // Thumbnail scaling
                case 7:
                    form_scale($element[0], $element[1], $element[3]);
                    break;
                    // Language + Theme selection
                // Language + Theme selection
                case 8:
                    form_lang_theme($element[0], $element[1], $element[3]);
                    break;
                    // debug mode selection
                // debug mode selection
                case 9:
                    form_lang_debug($element[0], $element[1], $element[3]);
                    break;
                    // tabbed display fix
                // tabbed display fix
                case 10:
                    form_number_dropdown($element[0], $element[1], $element[3]);
                    break;
                case 11:
                    form_lang_logmode($element[0], $element[1], $element[3]);
                    break;
                case 12:
                    form_plugin_yes_no($element[0], $element[1], $element[3]);
                    break;
                case 13:
                    form_exif_yes_no($element[0], $element[1], $element[3]);
                    break;
                case 14:
                    form_keywords_yes_no($element[0], $element[1], $element[3]);
                    break;
                case 15:
                    form_disabled($element[0], $element[1], $element[3]);
                    break;
                case 16:
                    form_auto_resize($element[0], $element[1], $element[3]);
                    break;
                    // ascending or descending
                // ascending or descending
                case 17:
                    form_asc_desc($element[0], $element[1], $element[3]);
                    break;
                default:
                    die('Invalid action');
            }
            // switch
        } else {
            form_label($element);
        }
    }
}