result += "<tr><td>Title:</td><td><input class='input_name' type='text' value='' /></td></tr>";

		if(chapter.numbers.length > 1)
			result += "<tr><td>Volume number:</td><td><input class='input_volume' type='text' value='" + chapter.numbers[chapter.numbers.length-2] + "' /></td></tr>";
		else
			result += "<tr><td>Volume number:</td><td><input class='input_volume' type='text' value='0' /></td></tr>";
		

		if(chapter.numbers.length > 0)
			result += "<tr><td>Chapter number:</td><td><input class='input_chapter' type='text' value='" + chapter.numbers[chapter.numbers.length-1] + "' /></td></tr>";
		else
			result += "<tr><td>Chapter number:</td><td><input class='input_chapter' type='text' value='0' /></td></tr>";
		
		result += "<tr><td>Subchapter number:</td><td><input class='input_subchapter' type='text' value='0' /></td></tr>";		
		
		result += '<tr><td>Chapter language:</td><td><?php echo str_replace("\n", "", form_language(array('name' => 'input_language', 'class' => 'input_language'))); ?></td></tr>';

		result += "<tr><td>Teams:</td><td class='insert_teams'>";
			
		team_found = false;
		jQuery.each(chapter.teams, function(index, team){
			team_found = true;
			result += "<input type='text' class='set_teams' value='" + team.substring(1, team.length-1) + "' />";
		});
		if(!team_found) {
			result += "<input type='text' class='set_teams' value='" + default_team + "' />";
		}
		
		result += "<input type='text' class='set_teams' value='' onKeyUp='addField(this);' /></td></tr>";
		
		result += "</table>";
		if(chapter.numbers.length > 1)
			result += "<tr><td>Volume number:</td><td><input class='input_volume' type='text' value='" + chapter.numbers[chapter.numbers.length-2] + "' /></td></tr>";
		else
			result += "<tr><td>Volume number:</td><td><input class='input_volume' type='text' value='0' /></td></tr>";
		

		if(chapter.numbers.length > 0)
			result += "<tr><td>Chapter number:</td><td><input class='input_chapter' type='text' value='" + chapter.numbers[chapter.numbers.length-1] + "' /></td></tr>";
		else
			result += "<tr><td>Chapter number:</td><td><input class='input_chapter' type='text' value='0' /></td></tr>";
		
		result += "<tr><td>Subchapter number:</td><td><input class='input_subchapter' type='text' value='0' /></td></tr>";		
		
		result += '<tr><td>Chapter language:</td><td><?php 
echo str_replace("\n", "", form_language(array('name' => 'input_language', 'class' => 'input_language')));
?>
</td></tr>';

		result += "<tr><td>Teams:</td><td class='insert_teams'>";
			
		team_found = false;
		jQuery.each(chapter.teams, function(index, team){
			team_found = true;
			result += "<input type='text' class='set_teams' value='" + team.substring(1, team.length-1) + "' />";
		});
		if(!team_found) {
			result += "<input type='text' class='set_teams' value='" + default_team + "' />";
		}
		
		result += "<br/><input type='text' class='set_teams' value='' onKeyUp='addField(this);' /></td></tr>";
Example #3
0
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);
        }
    }
}
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);
        }
    }
}
Example #5
0
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);
        }
    }
}