Пример #1
0
echo form_text('', 'avatar_height', 'avatar_height', $settings['avatar_height'], array('class' => 'pull-left', 'max_length' => 3, 'number' => 1));
echo "</td>\n</tr>\n<tr>\n";
echo "<td  class='tbl'><label for='calc_b'>" . $locale['1010'] . "</label></td>\n";
echo "<td  class='tbl'>\n";
function calculate_byte($download_max_b)
{
    $calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
    foreach ($calc_opts as $byte => $val) {
        if ($download_max_b / $byte <= 999) {
            return $byte;
        }
    }
    return 1000000;
}
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($settings['avatar_filesize']);
$calc_b = $settings['avatar_filesize'] / $calc_c;
echo form_text('', 'calc_b', 'calc_b', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => $locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'pull-left m-r-10'));
echo form_select('', 'calc_c', 'calc_c', $calc_opts, $calc_c, array('placeholder' => $locale['choose'], 'class' => 'pull-left', 'width' => '180px'));
echo "</td>\n</tr>\n<tr>\n";
echo "<td  class='tbl'>\n<label for='avatar_ratio'>" . $locale['1001'] . "</label></td>\n";
echo "<td  class='tbl'>\n";
$ratio_opts = array('0' => $locale['955'], '1' => $locale['956']);
echo form_select('', 'avatar_ratio', 'avatar_ratio', $ratio_opts, $settings['avatar_ratio']);
echo "</td>\n</tr>\n<tr>\n";
echo "<td  class='tbl'>\n<label for='userNameChange'>" . $locale['691'] . "?</label></td>\n";
echo "<td  class='tbl'>\n";
echo form_select('', 'userNameChange', 'userNameChange', $yes_no_array, $settings['userNameChange']);
echo "</td>\n</tr>\n<tr>\n";
echo "<td  class='tbl'>\n<label for='userthemes'>" . $locale['668'] . "?</label></td>\n";
echo "<td  class='tbl'>\n";
Пример #2
0
closeside();
openside('');
echo "<span class='pull-right position-absolute small' style='right:30px;'>" . $locale['537'] . "</span>\n";
echo form_select('forum_edit_timelimit', $locale['536'], $forum_settings['forum_edit_timelimit'], array('options' => array('0', '10', '30', '45', '60'), 'max_length' => 2, 'width' => '100px', 'required' => 1, 'error_text' => $locale['error_value'], 'inline' => 1));
echo form_select('forum_ips', $locale['507'], $forum_settings['forum_ips'], array('options' => $yes_no_array, 'error_text' => $locale['error_value'], 'inline' => 1));
echo form_select('forum_ranks', $locale['520'], $forum_settings['forum_ranks'], array('options' => $yes_no_array, 'error_text' => $locale['error_value'], 'inline' => 1));
echo form_select('forum_rank_style', $locale['forum_064'], $forum_settings['forum_rank_style'], array('options' => array($locale['forum_063'], $locale['forum_062']), 'error_text' => $locale['error_value'], 'inline' => 1));
echo form_select('forum_last_post_avatar', $locale['539'], $forum_settings['forum_last_post_avatar'], array('options' => $yes_no_array, 'error_text' => $locale['error_value'], 'inline' => 1));
echo form_select('forum_edit_lock', $locale['521'], $forum_settings['forum_edit_lock'], array('options' => $yes_no_array, 'error_text' => $locale['error_value'], 'inline' => 1));
echo form_select('forum_editpost_to_lastpost', $locale['538'], $forum_settings['forum_editpost_to_lastpost'], array('options' => $yes_no_array, 'error_text' => $locale['error_value'], 'inline' => 1));
closeside();
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-4'>\n";
openside('');
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($forum_settings['forum_attachmax']);
$calc_b = $forum_settings['forum_attachmax'] / $calc_c;
require_once INCLUDES . "mimetypes_include.php";
$mime = mimeTypes();
$mime_opts = array();
foreach ($mime as $m => $Mime) {
    $ext = ".{$m}";
    $mime_opts[$ext] = $ext;
}
echo "<div class='clearfix'>\n";
echo "<span class='pull-right small'>" . $locale['509'] . "</span>";
echo "<label for='calc_c'>" . $locale['508'] . "</label><br />\n";
echo form_text('calc_b', '', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => $locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'm-r-10 pull-left'));
echo form_select('calc_c', '', $calc_c, array('options' => $calc_opts, 'placeholder' => $locale['choose'], 'class' => 'pull-left', 'width' => '100%'));
echo "</div>\n";
echo "<div class='clearfix'>\n";
Пример #3
0
    if (defender::safe()) {
        foreach ($inputArray as $settings_name => $settings_value) {
            $inputSettings = array("settings_name" => $settings_name, "settings_value" => $settings_value, "settings_inf" => "blog");
            dbquery_insert(DB_SETTINGS_INF, $inputSettings, "update", array("primary_key" => "settings_name"));
        }
        addNotice("success", $locale['900']);
        redirect(FUSION_REQUEST);
    } else {
        addNotice('danger', $locale['901']);
    }
}
$opts = array('0' => $locale['952'], '1' => $locale['953b']);
$cat_opts = array('0' => $locale['959'], '1' => $locale['960']);
$thumb_opts = array('0' => $locale['955'], '1' => $locale['956']);
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($blog_settings['blog_photo_max_b']);
$calc_b = $blog_settings['blog_photo_max_b'] / $calc_c;
opentable($locale['blog_settings']);
echo "<div class='well'>" . $locale['blog_description'] . "</div>";
echo openform('settingsform', 'post', FUSION_REQUEST);
echo "<div class='row'>\n<div class='col-xs-12 col-sm-8'>\n";
openside('');
echo form_text("blog_pagination", $locale['669b'], $blog_settings['blog_pagination'], array("inline" => TRUE, "max_length" => 4, "width" => "150px", "type" => "number"));
echo "\n<div class='row'>\n\t<div class='col-xs-12 col-sm-3'>\n\t\t<label for='blog_thumb_w'>" . $locale['601'] . "</label>\n\t</div>\n\t<div class='col-xs-12 col-sm-9 p-l-5'>\n\t" . form_text('blog_thumb_w', '', $blog_settings['blog_thumb_w'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\t" . form_text('blog_thumb_h', '', $blog_settings['blog_thumb_h'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['604'] . " )</small>\n\t</div>\n</div>";
echo "\n<div class='row'>\n\t<div class='col-xs-12 col-sm-3'>\n\t\t<label for='blog_photo_w'>" . $locale['602'] . "</label>\n\t</div>\n\t<div class='col-xs-12 col-sm-9 p-l-5'>\n\t" . form_text('blog_photo_w', '', $blog_settings['blog_photo_w'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\t" . form_text('blog_photo_h', '', $blog_settings['blog_photo_h'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['604'] . " )</small>\n\t</div>\n</div>";
echo "\n<div class='row'>\n\t<div class='col-xs-12 col-sm-3'>\n\t\t<label for='blog_thumb_w'>" . $locale['603'] . "</label>\n\t</div>\n\t<div class='col-xs-12 col-sm-9 p-l-5'>\n\t" . form_text('blog_photo_max_w', '', $blog_settings['blog_photo_max_w'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\t" . form_text('blog_photo_max_h', '', $blog_settings['blog_photo_max_h'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['604'] . " )</small>\n\t</div>\n</div>";
echo "\n<div class='row'>\n\t<div class='col-xs-12 col-sm-3'>\n\t\t<label for='calc_b'>" . $locale['605'] . "</label>\n\t</div>\n\t<div class='col-xs-12 col-sm-9 p-l-5'>\n\t" . form_text('calc_b', '', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => $locale['error_rate'], 'width' => '100px', 'max_length' => 4, 'class' => 'pull-left m-r-10')) . "\n\t" . form_select('calc_c', '', $calc_c, array('options' => $calc_opts, 'placeholder' => $locale['choose'], 'class' => 'pull-left', 'width' => '180px')) . "\n\t</div>\n</div>\n";
closeside();
openside("");
echo form_select("blog_allow_submission", $locale['blog_0600'], $blog_settings['blog_allow_submission'], array("inline" => TRUE, "options" => array($locale['disable'], $locale['enable'])));
echo form_select("blog_allow_submission_files", $locale['blog_0601'], $blog_settings['blog_allow_submission_files'], array("inline" => TRUE, "options" => array($locale['disable'], $locale['enable'])));
Пример #4
0
        addNotice('success', $locale['900']);
    } else {
        // send message your settings was not safe.
        addNotice('danger', $locale['901']);
        addNotice('danger', $locale['696']);
        addNotice('danger', $locale['900']);
    }
    redirect(FUSION_SELF . $aidlink . "&amp;section=download_settings");
}
/**
 * Options for dropdown field
 */
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($dl_settings['download_max_b']);
$calc_b = $dl_settings['download_max_b'] / $calc_c;
$calc_cc = calculate_byte($dl_settings['download_screen_max_b']);
$calc_bb = $dl_settings['download_screen_max_b'] / $calc_cc;
$choice_opts = array('1' => $locale['yes'], '0' => $locale['no']);
$mime = mimeTypes();
$mime_opts = array();
foreach ($mime as $m => $Mime) {
    $ext = ".{$m}";
    $mime_opts[$ext] = $ext;
}
echo "<div class='well'>" . $locale['download_description'] . "</div>";
echo openform('settingsform', 'post', FUSION_REQUEST, array("class" => "m-t-20"));
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-8'>\n";
openside('');
echo form_text('download_pagination', $locale['939'], $dl_settings['download_pagination'], array('class' => 'pull-left', 'max_length' => 4, 'type' => 'number', 'inline' => TRUE, 'width' => '150px'));
echo "<div class='row m-0'>\n\n\t<label class='control-label col-xs-12 col-sm-3' for='photo_w'>" . $locale['934'] . "</label>\n\n\t<div class='col-xs-12 col-sm-9 p-l-0'>\n\n\t" . form_text('download_screen_max_w', "", $dl_settings['download_screen_max_w'], array('class' => 'pull-left m-r-10', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\t" . form_text('download_screen_max_h', '', $dl_settings['download_screen_max_h'], array('class' => 'pull-left', 'max_length' => 4, 'number' => 1, 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['604'] . " )</small>\n\t</div>\n</div>";
Пример #5
0
echo form_text('', 'photo_max_h', 'photo_max_h', $settings2['photo_max_h'], array('class' => 'pull-left', 'max_length' => 3, 'number' => 1));
echo "</td>\n</tr>\n<tr>\n";
echo "<td width='40%' class='tbl'><label for='calc_b'>" . $locale['605'] . "</label></td>\n";
echo "<td width='60%' class='tbl'>\n";
function calculate_byte($download_max_b)
{
    $calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
    foreach ($calc_opts as $byte => $val) {
        if ($download_max_b / $byte <= 999) {
            return $byte;
        }
    }
    return 1000000;
}
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($settings2['news_photo_max_b']);
$calc_b = $settings2['news_photo_max_b'] / $calc_c;
echo form_text('', 'calc_b', 'calc_b', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => $locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'pull-left m-r-10'));
echo form_select('', 'calc_c', 'calc_c', $calc_opts, $calc_c, array('placeholder' => $locale['choose'], 'class' => 'pull-left', 'width' => '180px'));
echo "</td>\n</tr>\n<tr>\n";
echo "<td width='40%' class='tbl'><label for='thumb_compression'>" . $locale['606'] . "</label></td>\n";
echo "<td width='60%' class='tbl'>\n";
$opts = array('gd1' => $locale['607'], 'gd2' => $locale['608']);
echo form_select('', 'thumb_compression', 'thumb_compression', $opts, $settings2['thumb_compression']);
echo "</td>\n</tr>\n<tr>\n";
echo "<td class='tbl'><label for='thumbs_per_row'>" . $locale['609'] . "</label></td>\n";
echo "<td class='tbl'>\n";
echo form_text('', 'thumbs_per_row', 'thumbs_per_row', $settings2['thumbs_per_row'], array('max_length' => 2));
echo "</td>\n</tr>\n<tr>\n";
echo "<td class='tbl'><label for='thumbs_per_page'>" . $locale['610'] . "</label></td>\n";
echo "<td class='tbl'>\n";
Пример #6
0
 /** The master form for Adding or Editing Dynamic Fields */
 private function quantum_dynamics_form()
 {
     global $aidlink, $defender;
     $config = array();
     $config_1 = array();
     $config_2 = array('field_thumbnail' => 0, 'field_thumbnail_2' => 0);
     $form_action = FUSION_SELF . $aidlink;
     if (isset($_GET['action']) && $_GET['action'] == 'field_edit' && isset($_GET['field_id']) && self::validate_field($_GET['field_id'])) {
         $form_action .= "&amp;action=" . $_GET['action'] . "&amp;field_id=" . $_GET['field_id'];
         $result = dbquery("SELECT * FROM " . $this->field_db . " WHERE field_id='" . intval($_GET['field_id']) . "'");
         if (dbrows($result) > 0) {
             $this->field_data = dbarray($result);
             if ($this->field_data['field_type'] == 'upload') {
                 $this->field_data += unserialize($this->field_data['config']);
                 // uncompress serialized extended information.
                 if ($this->debug) {
                     print_p($this->field_data);
                 }
             }
         } else {
             if (!$this->debug) {
                 redirect(FUSION_SELF . $aidlink);
             }
         }
     }
     $this->field_data['field_type'] = isset($_POST['add_field']) ? form_sanitizer($_POST['add_field'], '') : $this->field_data['field_type'];
     if (isset($_POST['save_field'])) {
         $this->field_data = array('field_type' => isset($_POST['add_field']) ? form_sanitizer($_POST['add_field'], '') : $this->field_data['field_type'], 'field_id' => form_sanitizer($_POST['field_id'], '0', 'field_id'), 'field_title' => form_sanitizer($_POST['field_title'], '', 'field_title', 1), 'field_name' => form_sanitizer($_POST['field_name'], '', 'field_name'), 'field_cat' => form_sanitizer($_POST['field_cat'], '0', 'field_cat'), 'field_options' => isset($_POST['field_options']) ? form_sanitizer($_POST['field_options'], '', 'field_options') : $this->field_data['field_options'], 'field_default' => isset($_POST['field_default']) ? form_sanitizer($_POST['field_default'], '', 'field_default') : $this->field_data['field_default'], 'field_error' => form_sanitizer($_POST['field_error'], '', 'field_error'), 'field_required' => isset($_POST['field_required']) ? 1 : 0, 'field_log' => isset($_POST['field_log']) ? 1 : 0, 'field_registration' => isset($_POST['field_registration']) ? 1 : 0, 'field_order' => form_sanitizer($_POST['field_order'], '0', 'field_order'));
         $this->field_data['field_name'] = str_replace(' ', '_', $this->field_data['field_name']);
         // make sure no space.
         if ($this->field_data['field_type'] == 'upload') {
             $max_b = isset($_POST['field_max_b']) ? form_sanitizer($_POST['field_max_b'], '', 'field_max_b') : 150000;
             $calc = isset($_POST['field_calc']) ? form_sanitizer($_POST['field_calc'], '', 'field_calc') : 1;
             $config = array('field_max_b' => isset($_POST['field_max_b']) && isset($_POST['field_calc']) ? $max_b * $calc : $this->field_data['field_max_b'], 'field_upload_type' => isset($_POST['field_upload_type']) ? form_sanitizer($_POST['field_upload_type'], '', 'field_upload_type') : $this->field_data['field_upload_type'], 'field_upload_path' => isset($_POST['field_upload_path']) ? form_sanitizer($_POST['field_upload_path'], '', 'field_upload_path') : $this->field_data['field_upload_path']);
             $config_1['field_valid_file_ext'] = isset($_POST['field_valid_file_ext']) && $config['field_upload_type'] == 'file' ? form_sanitizer($_POST['field_valid_file_ext'], '', 'field_valid_file_ext') : $this->field_data['field_valid_file_ext'];
             $config_2 = array('field_valid_image_ext' => isset($_POST['field_valid_image_ext']) && $config['field_upload_type'] == 'image' ? form_sanitizer($_POST['field_valid_image_ext'], '', 'field_valid_image_ext') : $this->field_data['field_valid_image_ext'], 'field_image_max_w' => isset($_POST['field_image_max_w']) && $config['field_upload_type'] == 'image' ? form_sanitizer($_POST['field_image_max_w'], '', 'field_image_max_w') : $this->field_data['field_image_max_w'], 'field_image_max_h' => isset($_POST['field_image_max_h']) && $config['field_upload_type'] == 'image' ? form_sanitizer($_POST['field_image_max_h'], '', 'field_image_max_h') : $this->field_data['field_image_max_h'], 'field_thumbnail' => isset($_POST['field_thumbnail']) ? form_sanitizer($_POST['field_thumbnail'], 0, 'field_thumbnail') : $this->field_data['field_thumbnail'], 'field_thumb_upload_path' => isset($_POST['field_thumb_upload_path']) && $config['field_upload_type'] == 'image' && $config_2['field_thumbnail'] ? form_sanitizer($_POST['field_thumb_upload_path'], '', 'field_thumb_upload_path') : $this->field_data['field_thumb_upload_path'], 'field_thumb_w' => isset($_POST['field_thumb_w']) && $config['field_upload_type'] == 'image' && $config_2['field_thumbnail'] ? form_sanitizer($_POST['field_thumb_w'], '', 'field_thumb_w') : $this->field_data['field_thumb_w'], 'field_thumb_h' => isset($_POST['field_thumb_h']) && $config['field_upload_type'] == 'image' && $config_2['field_thumbnail'] ? form_sanitizer($_POST['field_thumb_h'], '', 'field_thumb_h') : $this->field_data['field_thumb_h'], 'field_thumbnail_2' => isset($_POST['field_thumbnail_2']) ? 1 : isset($_POST['field_id']) ? 0 : $this->field_data['field_thumbnail_2'], 'field_thumb2_upload_path' => isset($_POST['field_thumb2_upload_path']) && $config['field_upload_type'] == 'image' && $config_2['field_thumbnail_2'] ? form_sanitizer($_POST['field_thumb2_upload_path'], '', 'field_thumb2_upload_path') : $this->field_data['field_thumb2_upload_path'], 'field_thumb2_w' => isset($_POST['field_thumb2_w']) && $config['field_upload_type'] == 'image' && $config_2['field_thumbnail_2'] ? form_sanitizer($_POST['field_thumb2_w'], '', 'field_thumb2_w') : $this->field_data['field_thumb2_w'], 'field_thumb2_h' => isset($_POST['field_thumb2_h']) && $config['field_upload_type'] == 'image' && $config_2['field_thumbnail_2'] ? form_sanitizer($_POST['field_thumb2_h'], '', 'field_thumb2_h') : $this->field_data['field_thumb2_h'], 'field_delete_original' => isset($_POST['field_delete_original']) && $config['field_upload_type'] == 'image' ? 1 : isset($_POST['field_id']) ? 0 : $this->field_data['field_delete_original']);
             if ($config['field_upload_type'] == 'file') {
                 $config = array_merge($config, $config_1);
             } elseif ($config['field_upload_type'] == 'image') {
                 // upload path must be required.
                 $config = array_merge($config, $config_2);
             } else {
                 \defender::stop();
                 addNotice('danger', $this->locale['fields_0108']);
             }
             if (\defender::safe()) {
                 $this->field_data['config'] = serialize($config);
             }
         }
         $this->create_fields($this->field_data, 'dynamics');
     }
     echo "<div class='m-t-20'>\n";
     echo openform('fieldform', 'post', $form_action, array('max_tokens' => 1));
     echo form_button('save_field', $this->locale['fields_0488'], 'save', array('input_id' => "save_field2", 'class' => 'btn-primary m-b-20'));
     $disable_opts = array();
     foreach ($this->page_list as $index => $v) {
         $disable_opts[] = $index;
     }
     // ok the value generated needs to be parsed by quantum
     echo form_select_tree('field_cat', $this->locale['fields_0450'], $this->field_data['field_cat'], array('no_root' => 1, 'width' => '100%', 'disable_opts' => $disable_opts), $this->category_db, 'field_cat_name', 'field_cat_id', 'field_parent');
     echo self::quantum_multilocale_fields('field_title', $this->locale['fields_0451'], $this->field_data['field_title'], array('required' => 1));
     echo form_text('field_name', $this->locale['fields_0453'], $this->field_data['field_name'], array('placeholder' => $this->locale['fields_0454'], 'required' => 1));
     if ($this->field_data['field_type'] == 'select') {
         echo form_select('field_options', $this->locale['fields_0455'], $this->field_data['field_options'], array('required' => 1, 'tags' => 1, 'multiple' => 1));
     }
     if ($this->field_data['field_type'] == 'upload') {
         require_once INCLUDES . 'mimetypes_include.php';
         $file_type_list = array();
         $file_image_list = array();
         foreach (mimeTypes() as $file_ext => $occ) {
             if (!in_array($file_ext, array_flip(img_mimeTypes()))) {
                 $file_type_list[] = '.' . $file_ext;
             }
         }
         foreach (img_mimeTypes() as $file_ext => $occ) {
             $file_image_list[] = '.' . $file_ext;
         }
         function calculate_byte($download_max_b)
         {
             $calc_opts = array(1 => $this->locale['fields_0490'], 1000 => $this->locale['fields_0491'], 1000000 => $this->locale['fields_0492']);
             foreach ($calc_opts as $byte => $val) {
                 if ($download_max_b / $byte <= 999) {
                     return $byte;
                 }
             }
             return 1000000;
         }
         $calc_opts = array(1 => $this->locale['fields_0490'], 1000 => $this->locale['fields_0491'], 1000000 => $this->locale['fields_0492']);
         $calc_c = calculate_byte($config['field_max_b']);
         $calc_b = $config['field_max_b'] / $calc_c;
         $file_upload_type = array('file' => $this->locale['fields_0456'], 'image' => 'Image Only');
         echo form_select('field_upload_type', $this->locale['fields_0457'], $config['field_upload_type'], array("options" => $file_upload_type));
         echo form_text('field_upload_path', $this->locale['fields_0458'], $config['field_upload_path'], array('placeholder' => $this->locale['fields_0459'], 'required' => 1));
         echo "<label for='field_max_b'>" . $this->locale['fields_0460'] . "</label>\n<br/>";
         echo "<div class='row'>\n";
         echo "<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
         echo form_text('field_max_b', '', $calc_b, array('class' => 'm-b-0', 'number' => 1, 'required' => 1));
         echo "</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\n";
         echo form_select('field_calc', '', $calc_c, array('options' => $calc_opts, 'width' => '100%'));
         echo "</div>\n</div>\n";
         // File Type
         echo "<div id='file_type'>\n";
         echo form_select('field_valid_file_ext', $this->locale['fields_0461'], $config_1['field_valid_file_ext'], array('options' => $file_type_list, 'multiple' => TRUE, 'tags' => TRUE, 'required' => TRUE));
         echo "</div>\n";
         // Image Type
         echo "<div id='image_type'>\n";
         echo form_select('field_valid_image_ext', $this->locale['fields_0462'], $config_2['field_valid_image_ext'], array('options' => $file_image_list, 'multiple' => TRUE, 'tags' => TRUE, 'required' => TRUE));
         echo "<label>" . $this->locale['fields_0463'] . "</label>\n<br/>";
         echo "<div class='row'>\n";
         echo "<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
         echo form_text('field_image_max_w', $this->locale['fields_0464'], $config_2['field_image_max_w'], array('number' => 1, 'placeholder' => $this->locale['fields_0466'], 'required' => 1));
         echo "</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\n";
         echo form_text('field_image_max_h', $this->locale['fields_0465'], $config_2['field_image_max_h'], array('number' => 1, 'placeholder' => $this->locale['fields_0466'], 'required' => 1));
         echo "</div>\n</div>\n";
         echo form_checkbox('field_thumbnail', $this->locale['fields_0467'], $config_2['field_thumbnail']);
         echo "<div id='field_t1'>\n";
         echo form_text('field_thumb_upload_path', $this->locale['fields_0468'], $config_2['field_thumb_upload_path'], array('placeholder' => $this->locale['fields_0469'], 'required' => 1));
         echo "<label>" . $this->locale['fields_0470'] . "</label>\n<br/>";
         echo "<div class='row'>\n";
         echo "<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
         echo form_text('field_thumb_w', $this->locale['fields_0471'], $config_2['field_thumb_w'], array('number' => 1, 'placeholder' => $this->locale['fields_0466'], 'required' => 1));
         echo "</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\n";
         echo form_text('field_thumb_h', $this->locale['fields_0472'], $config_2['field_thumb_h'], array('number' => 1, 'placeholder' => $this->locale['fields_0466'], 'required' => 1));
         echo "</div>\n</div>\n";
         echo "</div>\n";
         echo form_checkbox('field_thumbnail_2', $this->locale['fields_0473'], $config_2['field_thumbnail_2']);
         echo "<div id='field_t2'>\n";
         echo form_text('field_thumb2_upload_path', $this->locale['fields_0474'], $config_2['field_thumb2_upload_path'], array('placeholder' => $this->locale['fields_0469'], 'required' => 1));
         echo "<label>" . $this->locale['fields_0475'] . "</label>\n<br/>";
         echo "<div class='row'>\n";
         echo "<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
         echo form_text('field_thumb2_w', $this->locale['fields_0476'], $config_2['field_thumb2_h'], array('number' => 1, 'placeholder' => $this->locale['fields_0466'], 'required' => 1));
         echo "</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\n";
         echo form_text('field_thumb2_h', $this->locale['fields_0477'], $config_2['field_thumb2_h'], array('number' => 1, 'placeholder' => $this->locale['fields_0466'], 'required' => 1));
         echo "</div>\n</div>\n";
         echo "</div>\n";
         echo form_checkbox('field_delete_original', $this->locale['fields_0478'], $config_2['field_delete_original']);
         echo "</div>\n";
         add_to_jquery("\n\t\t\tif (\$('#field_upload_type').select2().val() == 'image') {\n\t\t\t\t\$('#image_type').show();\n\t\t\t\t\$('#file_type').hide();\n\t\t\t} else {\n\t\t\t\t\$('#image_type').hide();\n\t\t\t\t\$('#file_type').show();\n\t\t\t}\n\t\t\t\$('#field_upload_type').bind('change', function() {\n\t\t\t\tif (\$(this).select2().val() == 'image') {\n\t\t\t\t\$('#image_type').show();\n\t\t\t\t\$('#file_type').hide();\n\t\t\t\t} else {\n\t\t\t\t\$('#image_type').hide();\n\t\t\t\t\$('#file_type').show();\n\t\t\t\t}\n\t\t\t});\n\t\t\t// thumbnail\n\t\t\t\$('#field_thumbnail').is(':checked') ? \$('#field_t1').show() : \$('#field_t1').hide();\n\t\t\t\$('#field_thumbnail').bind('click', function() {\n\t\t\t\t\$(this).is(':checked') ? \$('#field_t1').show() : \$('#field_t1').hide();\n\t\t\t});\n\t\t\t// thumbnail 2\n\t\t\t\$('#field_thumbnail_2').is(':checked') ? \$('#field_t2').show() : \$('#field_t2').hide();\n\t\t\t\$('#field_thumbnail_2').bind('click', function() {\n\t\t\t\t\$(this).is(':checked') ? \$('#field_t2').show() : \$('#field_t2').hide();\n\t\t\t});\n\t\t\t");
     } else {
         // @todo add config for textarea
         if ($this->field_data['field_type'] !== 'textarea') {
             echo form_text('field_default', $this->locale['fields_0480'], $this->field_data['field_default']);
         }
         echo form_text('field_error', $this->locale['fields_0481'], $this->field_data['field_error']);
     }
     echo form_checkbox('field_required', $this->locale['fields_0482'], $this->field_data['field_required']);
     echo form_checkbox('field_log', $this->locale['fields_0483'], $this->field_data['field_log']);
     echo form_text('field_order', $this->locale['fields_0484'], $this->field_data['field_order'], array('number' => 1));
     echo form_checkbox('field_registration', $this->locale['fields_0485'], $this->field_data['field_registration']);
     echo form_hidden('add_field', '', $this->field_data['field_type']);
     echo form_hidden('field_id', '', $this->field_data['field_id']);
     echo form_button('save_field', $this->locale['fields_0488'], 'save', array('class' => 'btn-sm btn-primary'));
     echo closeform();
     echo "</div>\n";
 }
Пример #7
0
            foreach ($inputArray as $settings_name => $settings_value) {
                $inputSettings = array("settings_name" => $settings_name, "settings_value" => $settings_value, "settings_inf" => "gallery");
                dbquery_insert(DB_SETTINGS_INF, $inputSettings, "update", array("primary_key" => "settings_name"));
            }
            addNotice("success", $locale['900']);
            redirect(FUSION_REQUEST);
        } else {
            addNotice('danger', $locale['901']);
        }
    }
}
echo openform('settingsform', 'post', FUSION_REQUEST, array("class" => "m-t-20"));
echo "<div class='well'>" . $locale['gallery_0022'] . "</div>";
$choice_opts = array('1' => $locale['yes'], '0' => $locale['no']);
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($gll_settings['photo_max_b']);
$calc_b = $gll_settings['photo_max_b'] / $calc_c;
echo "<div class='row'><div class='col-xs-12 col-sm-8'>\n";
openside('');
echo form_text('gallery_pagination', $locale['gallery_0202'], $gll_settings['gallery_pagination'], array('max_length' => 2, 'inline' => 1, 'width' => '100px', "type" => "number"));
echo "\n<div class='row m-0'>\n\n\t<label class='label-control col-xs-12 col-sm-3 p-l-0' for='thumb_w'>" . $locale['gallery_0203'] . "</label>\n\n\t<div class='col-xs-12 col-sm-9 p-l-0'>\n\n\t" . form_text('thumb_w', '', $gll_settings['thumb_w'], array('class' => 'pull-left m-r-10', 'max_length' => 4, "type" => "number", 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\n\t" . form_text('thumb_h', '', $gll_settings['thumb_h'], array('class' => 'pull-left', 'max_length' => 4, "type" => "number", 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['gallery_0204'] . " )</small>\n\n\t</div>\n\n</div>\n\n";
echo "\n<div class='row m-0'>\n\n\t<label class='label-control col-xs-12 col-sm-3 p-l-0' for='photo_max_w'>" . $locale['gallery_0205'] . "</label>\n\n\t<div class='col-xs-12 col-sm-9 p-l-0'>\n\n\t" . form_text('photo_w', '', $gll_settings['photo_w'], array('class' => 'pull-left m-r-10', 'max_length' => 4, "type" => "number", 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\n\t" . form_text('photo_h', '', $gll_settings['photo_h'], array('class' => 'pull-left', 'max_length' => 4, "type" => "number", 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['gallery_0204'] . " )</small>\n\n\t</div>\n\n</div>\n";
echo "\n<div class='row m-0'>\n\n\t<label class='label-control col-xs-12 col-sm-3 p-l-0' for='photo_w'>" . $locale['gallery_0206'] . "</label>\n\n\t<div class='col-xs-12 col-sm-9 p-l-0'>\n\n\t" . form_text('photo_max_w', '', $gll_settings['photo_max_w'], array('class' => 'pull-left m-r-10', 'max_length' => 4, "type" => "number", 'width' => '150px')) . "\n\t<i class='entypo icancel pull-left m-r-10 m-l-0 m-t-10'></i>\n\n\t" . form_text('photo_max_h', '', $gll_settings['photo_max_h'], array('class' => 'pull-left', 'max_length' => 4, "type" => "number", 'width' => '150px')) . "\n\t<small class='m-l-10 mid-opacity text-uppercase pull-left m-t-10'>( " . $locale['gallery_0204'] . " )</small>\n\n\t</div>\n\n</div>\n";
echo "\n<div class='row m-0'>\n\n\t<label class='col-xs-12 col-sm-3 p-l-0' for='calc_b'>" . $locale['gallery_0207'] . "</label>\n\n\t<div class='col-xs-12 col-sm-9 p-l-0'>\n\n\t" . form_text('calc_b', '', $calc_b, array('required' => 1, "type" => "number", 'error_text' => $locale['error_rate'], 'width' => '150px', 'max_length' => 4, 'class' => 'pull-left m-r-10')) . "\n\t" . form_select('calc_c', '', $calc_c, array('options' => $calc_opts, 'class' => 'pull-left', 'width' => '180px')) . "\n\t</div>\n\n</div>\n\n";
closeside();
openside('');
echo form_checkbox("gallery_allow_submission", $locale['gallery_0200'], $gll_settings['gallery_allow_submission']);
echo form_checkbox("gallery_extended_required", $locale['gallery_0201'], $gll_settings['gallery_extended_required']);
closeside();
echo "</div><div class='col-xs-12 col-sm-4'>\n";
openside("");
Пример #8
0
echo openform('settingsform', 'settingsfrom', 'post', FUSION_SELF . $aidlink, array('downtime' => 0));
echo "<table class='table table-responsive center'>\n<tbody>\n<tr>\n";
echo "<td width='50%' class='tbl'><label for='numofthreads'>" . $locale['505'] . "</label> <span class='required'>*</span> <br /><span class='small2'>" . $locale['506'] . "</span></td>\n";
echo "<td width='50%' class='tbl'>\n";
$num_opts = array('5' => '5', '10' => '10', '15' => '15', '20' => '20');
echo form_select('', 'numofthreads', 'numofthreads', $num_opts, $settings2['numofthreads'], array('required' => 1, 'error_text' => $locale['error_value']));
echo "</td>\n</tr>\n<tr>\n";
echo "<td width='50%' class='tbl'><label for='forum_ips'>" . $locale['507'] . "</label> <span class='required'>*</span></td>\n";
echo "<td width='50%' class='tbl'>\n";
$yes_no_array = array('0' => $locale['yes'], '1' => $locale['no']);
echo form_select('', 'forum_ips', 'forum_ips', $yes_no_array, $settings2['forum_ips'], array('required' => 1, 'error_text' => $locale['error_value']));
echo "</td>\n</tr>\n<tr>\n";
echo "<td width='50%' class='tbl'><label for='calc_c'>" . $locale['508'] . "</label> <span class='required'>*</span><br /><span class='small2'>" . $locale['509'] . "</span> </td>\n";
echo "<td width='50%' class='tbl'>\n";
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = calculate_byte($settings2['attachmax']);
$calc_b = $settings2['attachmax'] / $calc_c;
echo form_text('', 'calc_b', 'calc_b', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => $locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'pull-left m-r-10'));
echo form_select('', 'calc_c', 'calc_c', $calc_opts, $calc_c, array('placeholder' => $locale['choose'], 'class' => 'pull-left', 'width' => '180px'));
echo "</td>\n</tr>\n<tr>\n";
echo "<td width='50%' class='tbl'>" . $locale['534'] . " <span class='required'>*</span><br /><span class='small2'>" . $locale['535'] . "</span> </td>\n";
echo "<td width='50%' class='tbl'>\n";
echo form_select('', 'attachmax_count', 'attachmax_count', range(1, 10), $settings2['attachmax_count'], array('required' => 1, 'error_text' => $locale['error_value']));
echo "</td>\n</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='50%' class='tbl'><label for='attachtypes'>" . $locale['510'] . "</label> <span class='required'>*</span><br /><span class='small2'>" . $locale['511'] . "</span></td>\n";
echo "<td width='50%' class='tbl'>\n";
require_once INCLUDES . "mimetypes_include.php";
$mime = mimeTypes();
$mime_opts = array();
foreach ($mime as $m => $Mime) {