} $resize .= "</select>\n"; show_custom_row($lang['resize_proportions_desc'], $resize); show_input_row($lang['convert_thumbnail_quality'], "quality_thumbs", $quality_thumbs); if (!$detailed) { show_table_separator($lang['user'], 2); show_user_select_row($lang['add_as_user'], $user_id); } show_table_footer(); show_hidden_input("cat_id_p", $cat_id_p); show_hidden_input("mode", 1); show_table_header(preg_replace("/" . $site_template->start . "num_all_newimages" . $site_template->end . "/siU", $num_all_newimages, $lang['checkimages_note']), $colspan); if ($num_all_newimages) { show_description_row("<input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll();\"" . ($status ? "" : " checked=\"checked\"") . " /> <b>" . $lang['check_all'] . "</b>", $colspan); } else { show_description_row($lang['no_newimages'], $colspan); } $i = 0; foreach ($image_list as $key => $val) { $cat_id = $key; $cat_path = $cat_id == 0 ? "" : "/" . $cat_id; $cat_name = @$cat_cache[$cat_id]['cat_name']; $count = count($val); foreach ($val as $file) { $i++; //Check Image $file_type = get_file_extension($file); $iptc_auto_now = ($iptc_name || $iptc_date || $iptc_description || $iptc_keywords) && ($imageinfo = @getimagesize(MEDIA_PATH . $cat_path . "/" . $file, $info)) ? 1 : 0; $image_name = get_file_name($file); $date = date("Y-m-d H:i:s", time()); $caption = "";
show_form_footer($lang['do_backup'], $lang['reset']); show_table_header($lang['list_backups'], 4); $handle = opendir(ROOT_PATH . DATABASE_DIR); $filelist = array(); while ($file = @readdir($handle)) { if (is_file(ROOT_PATH . DATABASE_DIR . "/" . $file) && $file != "." && $file != ".." && preg_match("/\\.sql/i", $file)) { $filelist[] = $file; } } closedir($handle); if (!empty($filelist)) { rsort($filelist); foreach ($filelist as $key => $file) { echo "<tr class=\"" . get_row_bg() . "\" width=\"30%\">\n<td><p class=\"rowtitle\">{$file}</p></td>\n"; $file_time = format_date($config['date_format'] . " " . $config['time_format'], filemtime(ROOT_PATH . DATABASE_DIR . "/" . $file)); echo "<td>" . $file_time . "</td>"; $file_size = format_file_size(@filesize(ROOT_PATH . DATABASE_DIR . "/" . $file)); echo "<td>" . $file_size . "</td>"; echo "<td>"; echo "<a href=\"javascript:RestoreBackup('" . $file . "')\">[" . $lang['restore_backup'] . "]</a> "; echo "<a href=\"javascript:DeleteBackup('" . $file . "')\">[" . $lang['delete_backup'] . "]</a> "; show_text_link($lang['download_backup'], "backup.php?action=downloadbackup&file={$file}"); show_text_link($lang['show_backup'], "backup.php?action=showbackup&file={$file}"); echo "</td></tr>"; } } else { show_description_row($lang['no_backups'], 4); } show_table_footer(); } show_admin_footer();
if (isset($HTTP_GET_VARS['image_id']) && intval($HTTP_GET_VARS['image_id']) || isset($HTTP_POST_VARS['image_id']) && intval($HTTP_POST_VARS['image_id'])) { $image_id = isset($HTTP_GET_VARS['image_id']) ? intval($HTTP_GET_VARS['image_id']) : intval($HTTP_POST_VARS['image_id']); $image_ids[] = $image_id; } elseif (isset($HTTP_POST_VARS['selectimages'])) { $image_ids = $HTTP_POST_VARS['selectimages']; } else { $image_ids[] = 0; } if ($image_ids[0] != 0) { show_form_header("files_check.php", "deleteimage"); foreach ($image_ids as $val) { show_hidden_input("selectimages[]", $val); } $lang_key = count($image_ids) > 1 ? 'images' : 'image'; show_table_header($lang['delete'] . ": " . $lang[$lang_key], 2); show_description_row($lang['delete_image_confirm']); show_radio_row($lang['delete_image_files_confirm'], "delfromserver", 1); show_form_footer($lang['yes'], "", 2, $lang['no']); } else { show_table_header("Error Log:", 1); echo "<tr><td class=\"tablerow\">\n"; echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr><td> </td><td>\n"; echo "<b>" . $lang['error_log_desc'] . "</b>\n<ul>\n"; printf("<li>%s</li>\n", $lang['no_search_results']); echo "</ul>\n</td></tr></table>\n"; echo "</td></tr>\n"; show_table_footer(); $action = "final"; } } if ($action == "intro") {
} echo "<td>" . $show_user_name . "</td>\n"; $show_image = "<a href=\"" . $site_sess->url(ROOT_PATH . "details.php?" . URL_IMAGE_ID . "=" . $comment_row['image_id']) . "\" target=\"_blank\">" . format_text($comment_row['image_name'], 2) . "</a> (ID: " . $comment_row['image_id'] . ")"; echo "<td>" . $show_image . "</td>\n"; echo "<td>" . format_date($config['date_format'] . " " . $config['time_format'], $comment_row['comment_date']) . "</td>\n"; echo "<td><p>"; show_text_link($lang['edit'], "comments.php?action=editcomment&comment_id=" . $comment_row['comment_id']); show_text_link($lang['delete'], "comments.php?action=removecomment&comment_id=" . $comment_row['comment_id']); echo "</p></td>\n"; echo "</tr>\n"; } echo "<tr class=\"tablefooter\">\n<td colspan=\"6\" align=\"left\">\n "; echo "<input type=\"submit\" value=\" " . $lang['delete'] . " \" class=\"button\">\n"; echo " \n</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n</form>\n"; } else { show_description_row($lang['no_search_results'], 6); show_form_footer("", ""); } echo "<div align=\"right\">"; echo "<form action=\"" . $site_sess->url("comments.php") . "\" name=\"form2\" method=\"post\">\n"; if ($limitnumber != 5000 && $limitfinish < $countcomments['comments']) { show_hidden_input("action", "findcomments"); show_hidden_input("image_id", $image_id); show_hidden_input("image_name", $image_name, 1); show_hidden_input("user_name", $user_name, 1); show_hidden_input("comment_headline", $comment_headline, 1); show_hidden_input("comment_text", $comment_text, 1); show_hidden_input("dateafter", $dateafter); show_hidden_input("datebefore", $datebefore); show_hidden_input("orderby", $orderby, 1); show_hidden_input("direction", $direction, 1);
* (Licence.txt) for further information. * * * *************************************************************************/ $nozip = 1; define('IN_CP', 1); $root_path = false === stristr($_SERVER['PHP_SELF'], "/plugins/") ? "./../" : "./../../"; define('ROOT_PATH', $root_path); require ROOT_PATH . 'admin/admin_global.php'; if ($config['language_dir'] == 'deutsch') { $lang_clear_cache = 'Cache leeren'; $lang_clear_confirm = 'Wollen Sie das Cache-Verzeichnis leeren (%s)?'; $lang_clear_success = 'Cache-Verzeichnis geleert'; } else { $lang_clear_cache = 'Clear Cache'; $lang_clear_confirm = 'Do you want to clear the cache directory (%s)?'; $lang_clear_success = 'Cache directory cleared'; } show_admin_header(); if ($action == "clearcache") { @set_time_limit(0); clear_cache(); $msg = $lang_clear_success; } if ($msg != "") { printf("<b>%s</b>\n", $msg); } show_form_header($HTTP_SERVER_VARS['PHP_SELF'], "clearcache"); show_table_header($lang_clear_cache); show_description_row(sprintf($lang_clear_confirm, realpath($cache_path))); show_form_footer($lang['submit'], ""); show_admin_footer();
$image_rating = sprintf("%.2f", intval($image_rating)); $sql = "UPDATE " . IMAGES_TABLE . "\n SET image_rating = {$image_rating}\n {$where_sql}"; $result = $site_db->query($sql); echo $result ? "<b>OK</b><br />" : "<b><span class=\"marktext\">ERROR</span></b><br />"; } if ($image_votes !== "") { echo $lang['field_votes'] . "..."; flush(); $sql = "UPDATE " . IMAGES_TABLE . "\n SET image_votes = {$image_votes}\n {$where_sql}"; $result = $site_db->query($sql); echo $result ? "<b>OK</b><br />" : "<b><span class=\"marktext\">ERROR</span></b><br />"; } } if ($action == "resetstats") { if ($msg !== "") { printf("<b>%s</b>\n", $msg); } show_form_header("stats.php", "updatestats", "form", 1); show_table_header($lang['nav_general_stats'], 2); show_description_row($lang['reset_stats_desc'], 2); show_cat_select_row($lang['field_category'], 0, 2); show_table_separator($lang['nav_categories_edit'], 2); show_input_row($lang['field_hits'], "cat_hits", "", $textinput_size2); show_table_separator($lang['nav_images_edit'], 2); show_input_row($lang['field_hits'], "image_hits", "", $textinput_size2); show_input_row($lang['field_downloads'], "image_downloads", "", $textinput_size2); show_input_row($lang['field_rating'] . " (1-" . MAX_RATING . ")", "image_rating", "", $textinput_size2); show_input_row($lang['field_votes'], "image_votes", "", $textinput_size2); show_form_footer($lang['save_changes'], "", 2); } show_admin_footer();
$m = ""; if ($action == "migratekeywords") { @set_time_limit(0); $sql = "SELECT image_id, image_keywords, image_name, image_description FROM " . IMAGES_TABLE . " WHERE image_keywords LIKE '% %';"; $image_result = $site_db->query($sql); while ($image_row = $site_db->fetch_array($image_result)) { $image_keywords = $image_row['image_keywords']; $image_id = intval($image_row['image_id']); $image_keywords = preg_replace("/[\n\r\\s]/is", ",", $image_keywords); $image_keywords_arr = explode(',', $image_keywords); array_walk($image_keywords_arr, 'trim_value'); $image_keywords = implode(',', array_unique(array_filter($image_keywords_arr))); $sql = "UPDATE " . IMAGES_TABLE . " SET image_keywords = '" . $image_keywords . "' WHERE image_id = " . $image_id . " LIMIT 1;"; $result = $site_db->query($sql); if ($result) { remove_searchwords($image_id); $search_words = array("image_name" => $image_row['image_name'], "image_description" => $image_row['image_description'], "image_keywords" => $image_row['image_keywords']); add_searchwords($image_id, $search_words); $msg .= "Image ID: " . $image_row['image_id'] . "; Keywords: " . $image_keywords . "<br />"; } } $msg .= "<br />" . $lang_migration_success; } if ($msg != "") { printf("<b>%s</b><br /><br />\n", $msg); } show_form_header($HTTP_SERVER_VARS['PHP_SELF'], "migratekeywords"); show_table_header($lang_migration_title); show_description_row($lang_migration_perform); show_form_footer($lang['submit'], ""); show_admin_footer();
$result = $site_db->query($sql); $sql = "DELETE FROM " . GROUP_ACCESS_TABLE . "\n WHERE group_id = {$group_id}"; $result2 = $site_db->query($sql); $sql = "DELETE FROM " . GROUP_MATCH_TABLE . "\n WHERE group_id = {$group_id}"; $result3 = $site_db->query($sql); $msg = $result && $result2 && $result3 ? $lang['usergroup_delete_success'] : $lang['usergroup_delete_error']; $action = "modifygroups"; } if ($action == "removegroup") { $group_id = isset($HTTP_POST_VARS['group_id']) ? intval($HTTP_POST_VARS['group_id']) : intval($HTTP_GET_VARS['group_id']); $sql = "SELECT group_id, group_name\n FROM " . GROUPS_TABLE . "\n WHERE group_id = {$group_id}"; $result = $site_db->query_firstrow($sql); show_form_header("usergroups.php", "deletegroup"); show_hidden_input("group_id", $group_id); show_table_header($lang['delete'] . ": " . format_text($result['group_name'], 2), 2); show_description_row($lang['delete_group_confirm']); show_form_footer($lang['yes'], "", 2, $lang['no']); } if ($action == "addgroup") { $group_name = trim($HTTP_POST_VARS['group_name']); if ($group_name != "") { $sql = "INSERT INTO " . GROUPS_TABLE . "\n (group_name, group_type)\n VALUES\n ('{$group_name}', " . GROUPTYPE_GROUP . ")"; $result = $site_db->query($sql); $msg = $result ? $lang['usergroup_add_success'] : $lang['usergroup_add_error']; } $action = "modifygroups"; } if ($action == "updategroup") { $error = array(); $group_id = isset($HTTP_POST_VARS['group_id']) ? intval($HTTP_POST_VARS['group_id']) : intval($HTTP_GET_VARS['group_id']); $group_name = trim($HTTP_POST_VARS['group_name']);