Пример #1
0
     show_textarea_row($title, "image_keywords_" . $i, $keywords, $textarea_size);
     if (isset($error['cat_id_' . $i])) {
         $title = sprintf("<span class=\"marktext\">%s *</span>", $lang['field_category']);
     } else {
         $title = $lang['field_category'];
     }
     echo "<tr class=\"" . get_row_bg() . "\">\n<td><p class=\"rowtitle\">" . $title . "</p></td>\n<td>" . get_category_dropdown($cat_id, 0, 3, $i) . "</td>\n</tr>\n";
     show_user_select_row($lang['user'], $user_id, $i);
     if (is_array($iptc) && $iptc_date) {
         $date = isset($iptc['2#055'][0]) ? preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $iptc['2#055'][0]) : $date;
     }
     $title = $lang['field_date'] . $lang['date_desc'] . $lang['date_format'] . (isset($file_src) ? get_iptc_insert_link($file_src, "date_created", "image_date_" . $i, 0) : "");
     show_input_row($title, "image_date_" . $i, $date, $textinput_size);
     show_hidden_input("old_cat_id_" . $i, $cat_id);
     show_radio_row($lang['field_free'], "image_active_" . $i, 1);
     show_radio_row($lang['field_allow_comments'], "image_allow_comments_" . $i, 1);
     show_additional_fields("image", array(), IMAGES_TABLE, $i);
 } else {
     echo "<tr class=" . get_row_bg() . ">\n";
     echo "<td><input type=\"checkbox\" name=\"addimage_" . $i . "\" value=\"1\"{$checked}></td>\n";
     $link = "<a href=\"" . MEDIA_PATH . $cat_path . "/" . $file . "\" target=\"_blank\">" . $file . "</a>";
     show_hidden_input("image_media_file_" . $i, $file);
     if ($thumb_file) {
         $file_src = THUMB_PATH . $cat_path . "/" . $thumb_file;
         $img_info = @getimagesize($file_src);
         $width = 48;
         $height = 48;
         $dim = $width;
         if ($img_info[0] > 0 && $img_info[1] > 0) {
             if ($img_info[0] > $width || $img_info[1] > $height) {
                 $ratio = $img_info[0] / $img_info[1];
Пример #2
0
if ($action == "intro") {
    $category = "\n<select name=\"cat\" class=\"categoryselect\">\n";
    $category .= "<option value=\"0\">" . $lang['all_categories'] . "</option>\n";
    $category .= "<option value=\"0\">-------------------------------</option>\n";
    $drop_down_cat_cache = array();
    $drop_down_cat_cache = $cat_parent_cache;
    $category .= get_category_dropdown_bits($cat_id);
    $category .= "</select>\n";
    show_form_header("files_check.php", "checkimages");
    show_table_header("Files Check", 2);
    show_custom_row("Category", $category);
    show_radio_row("Include sub-categories", "subcat", 1);
    show_input_row("Number of images to do per cycle", "imchksize", 50, 5);
    show_radio_row("Check Remote Files", "local", 1);
    show_radio_row("Check Thumbnails", "thumbs", 1);
    show_radio_row("Include automatic JavaScript redirect to next page", "autoredirect", 1);
    show_form_footer($lang['submit'], $lang['reset'], 2);
}
if ($action == "checkimages") {
    if (isset($HTTP_GET_VARS['cat']) || isset($HTTP_POST_VARS['cat'])) {
        $cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : intval($HTTP_POST_VARS['cat']);
    } else {
        $cat = 0;
    }
    if (isset($HTTP_GET_VARS['subcat']) || isset($HTTP_POST_VARS['subcat'])) {
        $subcat = isset($HTTP_GET_VARS['subcat']) ? intval($HTTP_GET_VARS['subcat']) : intval($HTTP_POST_VARS['subcat']);
    } else {
        $subcat = 0;
    }
    if ($cat) {
        $cats = array($cat);
Пример #3
0
function show_setting_row($setting_name, $value_option = "", $htmlspecialchars = 0)
{
    global $config, $setting;
    $config_value = $config[$setting_name];
    $config_value = $htmlspecialchars ? htmlspecialchars($config[$setting_name]) : $config[$setting_name];
    $setting[$setting_name] = replace_url($setting[$setting_name]);
    if ($value_option == "") {
        show_input_row($setting[$setting_name], "setting_item[" . $setting_name . "]", $config_value);
    } elseif ($value_option == "textarea") {
        show_textarea_row($setting[$setting_name], "setting_item[" . $setting_name . "]", $config_value, "", 6);
    } elseif ($value_option == "radio") {
        show_radio_row($setting[$setting_name], "setting_item[" . $setting_name . "]", $config_value);
    } else {
        echo "<tr class=\"" . get_row_bg() . "\">\n<td valign=\"top\"><p class=\"rowtitle\">" . $setting[$setting_name] . "</p></td>\n";
        echo "<td><p>";
        $value_option($setting_name, $config_value);
        echo "</p></td>\n</tr>\n";
    }
}
Пример #4
0
    }
}
if ($action == "addusers") {
    if (isset($HTTP_GET_VARS['num_newusers']) || isset($HTTP_POST_VARS['num_newusers'])) {
        $num_newusers = isset($HTTP_GET_VARS['num_newusers']) ? intval($HTTP_GET_VARS['num_newusers']) : intval($HTTP_POST_VARS['num_newusers']);
    } else {
        $num_newusers = 1;
    }
    if ($msg != "") {
        printf("<b>%s</b>\n", $msg);
    }
    show_form_header("users.php", "saveusers", "form", 1);
    show_table_header($lang['nav_users_add'], 2);
    show_num_select_row("&nbsp;", "num_newusers", $lang['num_newusers_desc']);
    for ($i = 1; $i <= $num_newusers; $i++) {
        show_table_separator($lang['user'] . " " . $i, 2);
        show_userlevel_select_row($lang['field_userlevel'], "user_level_" . $i);
        show_input_row($lang['field_username'], "user_name_" . $i, "", $textinput_size);
        show_input_row($lang['field_email'], "user_email_" . $i, "", $textinput_size);
        show_input_row($lang['field_password'], "user_password_" . $i, "", $textinput_size);
        show_input_row($lang['field_homepage'], "user_homepage_" . $i, "", $textinput_size);
        show_input_row($lang['field_icq'], "user_icq_" . $i, "", $textinput_size);
        show_radio_row($lang['field_showemail'], "user_showemail_" . $i, 0);
        show_radio_row($lang['field_allowemails'], "user_allowemails_" . $i, 1);
        show_radio_row($lang['field_invisible'], "user_invisible_" . $i, 0);
        show_additional_fields("user", array(), USERS_TABLE, $i);
    }
    show_hidden_input("num_newusers", $num_newusers);
    show_form_footer($lang['add'], $lang['reset'], 2);
}
show_admin_footer();
Пример #5
0
function show_additional_fields($type = "image", $image_row = array(), $table = IMAGES_TEMP_TABLE, $i = 0)
{
    global $site_db, $lang;
    $field_type_array = "additional_" . $type . "_fields";
    global ${$field_type_array};
    if (!empty(${$field_type_array})) {
        $table_fields = $site_db->get_table_fields($table);
        foreach (${$field_type_array} as $key => $val) {
            if (!isset($table_fields[$key])) {
                continue;
            }
            $field_name = $i ? $key . "_" . $i : $key;
            $value = isset($image_row[$key]) ? $image_row[$key] : "";
            switch ($val[1]) {
                case "textarea":
                    show_textarea_row($val[0], $field_name, $value);
                    break;
                case "radio":
                    show_radio_row($val[0], $field_name, $value == "" ? 1 : $value);
                    break;
                case "text":
                default:
                    show_input_row($val[0], $field_name, $value);
            }
            // end switch
        }
    }
}
");
    }
  }
  //-->
  </script>
<?php 
    if (!$cat_id) {
        $cat_id = intval($site_sess->get_session_var("rsicatid"));
    }
    show_form_header("rebuild_searchindex.php", "buildsearchindex");
    show_table_header($lang_rebuild_title, 2);
    show_input_row($lang_rebuild_batchsize, "batchsize", $batchsize);
    show_input_row($lang_rebuild_batchstart, "batchstart", $batchstart);
    show_cat_select_row($lang_rebuild_category, $cat_id, 2);
    show_radio_row("Include subcategories", "subcat", $subcat);
    show_radio_row($lang_rebuild_autoredirect, "autoredirect", $autoredirect);
    show_form_footer($lang['submit'], $lang['reset'], 2);
    echo "<p align=\"center\"><b>" . $lang_rebuild_empty;
    echo " <a href=\"javascript:ConfirmEmptySearchindex()\">" . $lang_rebuild_empty_click . "</a></b></p>";
}
if ($action == "buildsearchindex") {
    $sql = "SELECT MAX(image_id) as max\n          FROM " . IMAGES_TABLE;
    $row = $site_db->query_firstrow($sql);
    $max = isset($row['max']) ? $row['max'] : 0;
    $cat_filter = "1=1";
    $order = " ORDER BY image_id ASC LIMIT {$batchsize}";
    $filter = "image_id >= " . $batchstart . $order;
    if ($cat_id) {
        $cat_ids = array($cat_id);
        if ($subcat) {
            $subcat_ids = array();