} } 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(" ", "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();
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]; if ($ratio > 1) {
$thumb_src = get_file_path($image_row['image_thumb_file'], "thumb", 0, 1); show_image_row($lang['thumb'] . "<br /><span class=\"smalltext\">(" . $image_row['image_thumb_file'] . ")</span>", $thumb_src, 1, "delete_thumb_file"); } else { $file_type = get_file_extension($image_row['image_media_file']); show_image_row($lang['thumb'] . "<br /><span class=smalltext>(" . $lang['no_thumb_found'] . ")</span>", ICON_PATH . "/" . $file_type . ".gif", 1); } $value = is_remote($image_row['image_thumb_file']) || is_local_file($image_row['image_thumb_file']) ? $image_row['image_thumb_file'] : ""; show_upload_row($lang['thumb_file'], "thumb_file", "<br /><span class=\"smalltext\">" . $lang['allowed_mediatypes_desc'] . " jpg, gif, png</span>", $value); show_input_row($lang['field_download_url'] . $lang['download_url_desc'], "image_download_url", "", $textinput_size); show_input_row($lang['field_image_name'], "image_name", $image_row['image_name'], $textinput_size); show_textarea_row($lang['field_description_ext'], "image_description", $image_row['image_description'], $textarea_size); show_textarea_row($lang['field_keywords_ext'], "image_keywords", $image_row['image_keywords'], $textarea_size); show_cat_select_row($lang['field_category'], $image_row['cat_id'], 3); show_user_select_row($lang['user'], $image_row['user_id']); show_input_row($lang['field_date'] . $lang['date_desc'], "image_date", $image_row['image_date'], $textinput_size); show_additional_fields("image", $image_row, IMAGES_TEMP_TABLE); show_form_footer($lang['save_changes'], $lang['reset'], 2, "", " onClick='showProgress()'"); } if ($action == "saveimages") { $image_list = isset($HTTP_POST_VARS['image_list']) ? $HTTP_POST_VARS['image_list'] : ""; if (!empty($image_list)) { $image_id_sql = ""; foreach ($image_list as $key => $val) { $image_id_sql .= ($image_id_sql != "" ? ", " : "") . $key; } $sql = "SELECT *\n FROM " . IMAGES_TEMP_TABLE . "\n WHERE image_id IN({$image_id_sql})"; $result = $site_db->query($sql); $image_cache = array(); while ($row = $site_db->fetch_array($result)) { $image_cache[$row['image_id']] = $row; }