本文整理汇总了PHP中show_form_header函数的典型用法代码示例。如果您正苦于以下问题:PHP show_form_header函数的具体用法?PHP show_form_header怎么用?PHP show_form_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_form_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printf
<?php
if ($db_servertype != "mysql") {
echo "<span class=\"marktext\"><b>Note:</b> You are not using MySQL. Maybe the backup function won't work!</span>";
}
if ($msg != "") {
printf("<b>%s</b>\n", $msg);
}
$db_status = "";
get_database_size();
if (!empty($global_info['database_size']['total'])) {
$db_status .= "<p><b>" . $lang['database'] . ":</b><br>" . $lang['homestats_total'] . " <b>" . format_file_size($global_info['database_size']['total']) . "</b>";
if (!empty($global_info['database_size']['4images'])) {
$db_status .= " / 4images: <b>" . format_file_size($global_info['database_size']['4images']) . "</b></p>";
}
}
show_form_header("backup.php", "makebackup");
show_table_header($lang['do_backup'], 2);
$table_select = "<select name=\"db_tables[]\" size=\"10\" multiple>\n";
$result = $site_db->query("SHOW tables");
while ($row = $site_db->fetch_array($result)) {
$table_select .= "<option value=\"" . $row[0] . "\"";
if (in_array($row[0], $default_tables) && preg_match("/^" . $table_prefix . "/i", $row[0])) {
$table_select .= " selected";
}
$table_select .= ">" . $row[0] . "</option>\n";
}
$table_select .= "</select>\n";
show_custom_row($lang['do_backup_desc'] . $db_status, $table_select);
show_form_footer($lang['do_backup'], $lang['reset']);
show_table_header($lang['list_backups'], 4);
$handle = opendir(ROOT_PATH . DATABASE_DIR);
示例2: printf
$action = "modifysettings";
}
}
if ($action == "modifysettings") {
if (isset($HTTP_GET_VARS['settings_msg'])) {
printf("<b>%s</b><p>", trim($HTTP_GET_VARS['settings_msg']));
} elseif (!empty($msg)) {
echo $msg;
}
$sql = "SELECT setting_name, setting_value\n FROM " . SETTINGS_TABLE;
$result = $site_db->query($sql);
$config = array();
while ($row = $site_db->fetch_array($result)) {
$config[$row['setting_name']] = $row['setting_value'];
}
show_form_header("settings.php", "updatesettings");
show_table_header($lang['nav_general_settings'], 2);
echo "<tr class=\"tablerow\"><td colspan=\"2\">";
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\"><tr valign=\"top\">\n";
$numgroups = sizeof($setting_group);
$percolumn = ceil($numgroups / 2);
$settingcounter = 0;
foreach ($setting_group as $key => $val) {
$settingcounter++;
echo "<td>";
show_text_link($val, "#setting_group_" . $key);
echo "<br /></td>\n";
if ($settingcounter == 4) {
echo "</tr><tr>";
$settingcounter = 0;
}
示例3: define
* (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();
示例4: COUNT
$direction = "ASC";
}
$sql = "SELECT COUNT(*) AS comments\n FROM (" . COMMENTS_TABLE . " c , " . IMAGES_TABLE . " i)\n WHERE {$condition} AND c.image_id = i.image_id";
$countcomments = $site_db->query_firstrow($sql);
$limitfinish = $limitstart + $limitnumber;
$start = 0;
if ($countcomments['comments'] > 0) {
$start = $limitstart + 1;
}
echo $lang['found'] . " <b>" . $countcomments['comments'] . "</b> " . $lang['showing'] . " <b>{$start}</b>-";
if ($limitfinish > $countcomments['comments'] == 0) {
echo "<b>{$limitfinish}</b>.";
} else {
echo "<b>" . $countcomments['comments'] . "</b>.";
}
show_form_header("comments.php", "removecomment", "form");
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" align=\"center\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
if ($countcomments['comments'] > 0) {
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name, c.comment_headline, c.comment_text, c.comment_date, i.image_name\n FROM (" . COMMENTS_TABLE . " c, " . IMAGES_TABLE . " i)\n WHERE {$condition} AND c.image_id = i.image_id\n ORDER BY {$orderby} {$direction}\n LIMIT {$limitstart}, {$limitnumber}";
$result = $site_db->query($sql);
echo "<tr class=\"tableseparator\">\n";
echo "<td class=\"tableseparator\"><input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll();\" /></td>\n";
echo "<td class=\"tableseparator\">" . $lang['field_comment'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_username'] . "</td>\n<td class=\"tableseparator\">" . $lang['image'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_date'] . "</td>\n<td class=\"tableseparator\">" . $lang['options'] . "</td>\n</tr>\n";
while ($comment_row = $site_db->fetch_array($result)) {
echo "<tr class=\"" . get_row_bg() . "\">";
echo "<td><input type=\"checkbox\" name=\"deletecomments[]\" value=\"" . $comment_row['comment_id'] . "\" /></td>";
$show_comment = "<b>" . format_text($comment_row['comment_headline']) . "</b><br />";
if (strlen($comment_row['comment_text']) > 75) {
$comment_row['comment_text'] = substr($comment_row['comment_text'], 0, 75) . "...";
}
$show_comment .= format_text($comment_row['comment_text']);
示例5: while
$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();
示例6: show_description_row
$imgs .= "<td>" . $quality . "</td>";
$imgs .= "</tr>\n";
$imgs .= "<input type=\"hidden\" name=\"image_dimensions[" . $image_row['image_id'] . "]\" value=\"" . $image_info[0] . "x" . $image_info[1] . "\">";
$image_counter++;
}
}
}
if ($image_counter == $num_newimages) {
break;
}
}
}
if (empty($imgs)) {
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
$bgcounter = 0;
show_description_row($lang['no_search_results']);
show_table_footer();
} else {
show_form_header("resizer.php", "resizeimages", "form");
show_hidden_input("image_type", $image_type);
show_hidden_input("height", $height);
show_hidden_input("dimension", $dimension);
show_hidden_input("resize_type", $resize_type);
show_hidden_input("quality", $quality);
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
echo "<tr class=\"tableseparator\">\n<td class=\"tableseparator\">\n<input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll();\" checked=\"checked\">\n</td>\n<td class=\"tableseparator\">" . $lang['field_image_file'] . "</td>\n<td class=\"tableseparator\">" . $lang['resize_org_size'] . "</td>\n<td class=\"tableseparator\">" . $lang['resize_new_size'] . "</td>\n<td class=\"tableseparator\">" . $lang['resize_new_quality'] . "</td>\n</tr>\n";
echo $imgs;
show_form_footer($lang['resize_start'], "", 5);
}
}
show_admin_footer();
示例7: sprintf
}
} else {
$msg .= sprintf("<span class=\"marktext\">%s</span>", $lang['lostfield_error']);
$action = "addusers";
}
}
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);
}
示例8: printf
$action = "modifytemplates";
}
if ($action == "modifytemplates") {
if ($msg != "") {
printf("<p><b>%s</b></p>\n", $msg);
}
show_table_header($lang['edit_templates'], 2);
show_theme_select_row($lang['choose_theme']);
if ($themes_found) {
show_template_select_row($lang['choose_template'], $template_folder);
}
show_table_footer();
if (!isset($content)) {
$content = "";
}
show_form_header("templates.php", "savetemplate");
show_table_header($lang['edit_template'] . ": " . $template_file_name, 1);
echo "<tr class=\"tablerow\"><td>";
?>
<style>
.template_textarea {
width: 100%;
}
</style>
<?php
echo "<textarea name=\"content\" cols=\"60\" rows=\"30\" wrap=\"off\" class=\"template_textarea\">";
echo htmlspecialchars($content);
echo "</textarea>";
show_hidden_input("template_file_name", $template_file_name);
show_hidden_input("template_folder", $template_folder);
show_form_footer($lang['save_changes'], "", 1);
示例9: forward_to_modify
//$action = "modifycats";
forward_to_modify($msg);
} else {
$msg .= sprintf("<span class=\"marktext\">%s</span>", $lang['lostfield_error']);
$action = "editcat";
}
}
if ($action == "editcat") {
if ($msg != "") {
printf("<b>%s</b>\n", $msg);
}
$cat_id = isset($HTTP_POST_VARS['cat_id']) ? intval($HTTP_POST_VARS['cat_id']) : intval($HTTP_GET_VARS['cat_id']);
$sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment\n FROM " . CATEGORIES_TABLE . "\n WHERE cat_id = {$cat_id}";
$cat_row = $site_db->query_firstrow($sql);
show_admin_header();
show_form_header("categories.php", "updatecat", "cat_form");
show_hidden_input("cat_id", $cat_id);
show_table_header($lang['nav_categories_edit'], 2);
show_input_row($lang['field_category_name'], "cat_name", $cat_row['cat_name'], $textinput_size);
show_textarea_row($lang['field_description_ext'], "cat_description", $cat_row['cat_description'], $textarea_size);
$cat_parent_id = $cat_row['cat_parent_id'];
$category = "\n<select name=\"cat_parent_id\" class=\"categoryselect\" onChange=\"update_order_select(this.options[this.selectedIndex].value)\">\n";
$category .= "<option value=\"0\">" . $lang['main_category'] . "</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_parent_id);
$category .= "</select>\n";
show_custom_row($lang['field_parent'], $category);
if ($show_cat_order_dropdown) {
show_custom_row($lang['cat_order'], get_cat_order_dropdown($cat_parent_id, $cat_row['cat_order']));
示例10: show_form_footer
show_form_footer($lang['search'], $lang['reset'], 2);
$sql = "SELECT COUNT(*) AS images\n FROM " . IMAGES_TEMP_TABLE . " i\n WHERE {$condition}";
$countimages = $site_db->query_firstrow($sql);
$limitfinish = $limitstart + $limitnumber;
$start = 0;
if ($countimages['images'] > 0) {
$start = $limitstart + 1;
}
echo $lang['found'] . " <b>" . $countimages['images'] . "</b> " . $lang['showing'] . " <b>{$start}</b>-";
if ($limitfinish > $countimages['images'] == 0) {
echo "<b>" . $limitfinish . "</b>.";
} else {
echo "<b>" . $countimages['images'] . "</b>.";
}
echo "<br />" . $lang['no_image_found'];
show_form_header("validateimages.php", "saveimages", "form");
$bgcounter = 0;
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" align=\"center\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
if ($countimages['images'] > 0) {
echo "<tr class=\"tableseparator\">\n";
echo "<td class=\"tableseparator\">" . $lang['validate'] . "</td>\n<td class=\"tableseparator\">" . $lang['delete'] . "</td>\n<td class=\"tableseparator\"> </td>\n<td class=\"tableseparator\">" . $lang['field_image_name'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_category'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_username'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_date'] . "</td>\n<td class=\"tableseparator\">" . $lang['options'] . "</td>\n</tr>\n";
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_date, i.image_media_file" . get_user_table_field(", u.", "user_name") . "\n FROM " . IMAGES_TEMP_TABLE . " i\n LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)\n WHERE {$condition}\n ORDER BY {$orderby} {$direction}\n LIMIT {$limitstart}, {$limitnumber}";
$result = $site_db->query($sql);
while ($image_row = $site_db->fetch_array($result)) {
echo "<tr class=\"" . get_row_bg() . "\">";
$image_path = is_remote($image_row['image_media_file']) ? $image_row['image_media_file'] : MEDIA_TEMP_PATH . "/" . $image_row['image_media_file'];
$file_src = get_file_path($image_row['image_media_file'], "media", 0, 1);
echo "<td><input type=\"radio\" name=\"image_list[" . $image_row['image_id'] . "]\" value=\"1\"></td>";
echo "<td><input type=\"radio\" name=\"image_list[" . $image_row['image_id'] . "]\" value=\"0\"></td>";
echo "<td><a href=\"" . $image_path . "\" target=\"_blank\"><img src=\"" . $file_src . "\" border=\"1\" height=\"50\"></a></td>";
echo "<td><b><a href=\"" . $image_path . "\" target=\"_blank\">" . format_text($image_row['image_name'], 2) . "</a></b> (" . $image_row['image_media_file'];
示例11: intval
echo $lang_rebuild_empty_confirm;
?>
')) {
window.location.replace("<?php
echo $site_sess->url("rebuild_searchindex.php?action=emptyindex");
?>
");
}
}
//-->
</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";
示例12: sprintf
$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();
示例13: format_text
$imgs .= "<td width=\"25%\">" . format_text($cat_cache[$image_row['cat_id']]['cat_name'], 2) . "</td></tr>\n";
$image_counter++;
}
}
if ($image_counter == $num_newimages) {
break;
}
}
}
if (empty($imgs)) {
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
$bgcounter = 0;
show_description_row($lang['no_search_results'], 4);
show_table_footer();
} else {
show_form_header("thumbnailer.php", "createthumbnails", "form");
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
echo "<tr class=\"tableseparator\">\n<td class=\"tableseparator\"><input name=allbox type=checkbox onClick=\"CheckAll();\" checked=\"checked\"></td>\n<td class=\"tableseparator\">" . $lang['field_image_name'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_image_file'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_category'] . "</td>\n</tr>\n";
echo $imgs;
show_table_separator($lang['convert_options'], 4);
echo "<tr class=\"" . get_row_bg() . "\">\n<td colspan=\"2\"><p class=\"rowtitle\">" . $lang['convert_thumbnail_dimension'] . "</p></td>\n";
echo "<td colspan=\"2\"><p><input type=\"text\" size=\"" . $textinput_size . "\" name=\"dimension\" value=\"" . $config['auto_thumbnail_dimension'] . "\"></p></td>\n</tr>\n";
echo "<tr class=\"" . get_row_bg() . "\">\n<td colspan=\"2\" valign=\"top\"><p class=\"rowtitle\">" . $lang['resize_proportions_desc'] . "</p></td>\n";
echo "<td colspan=\"2\"><p>";
echo "<input type=\"radio\" name=\"resize_type\" value=\"1\" checked=\"checked\"> " . $lang['resize_proportionally'] . "<br />";
echo "<input type=\"radio\" name=\"resize_type\" value=\"2\"> " . $lang['resize_fixed_width'] . "<br />";
echo "<input type=\"radio\" name=\"resize_type\" value=\"3\"> " . $lang['resize_fixed_height'] . "<br />";
echo "</p></td>\n</tr>\n";
echo "<tr class=\"" . get_row_bg() . "\">\n<td colspan=\"2\"><p class=\"rowtitle\">" . $lang['convert_thumbnail_quality'] . "</p></td>\n";
echo "<td colspan=\"2\"><p><input type=\"text\" size=\"" . $textinput_size . "\" name=\"quality\" value=\"" . $config['auto_thumbnail_quality'] . "\"></p></td>\n</tr>\n";
show_form_footer($lang['create_thumbnails'], "", 4);
示例14: trim
if ($action == "final") {
$log = $site_sess->get_session_var("imchklog");
$log = trim($log, ";");
$log_array = explode(";", $log);
$log = array();
$i = 0;
foreach ($log_array as $key) {
$error = explode(",", $key);
if ($error[0] && !in_array($error[0], $ids)) {
$log[] = $key;
$i++;
}
}
$site_sess->set_session_var("imchklog", implode(";", $log));
if ($i) {
show_form_header("files_check.php", "removeimage", "form");
echo "Found <font color=red><b>" . count($log) . "</b></font> errors<br><br>";
echo "<table><tr><td bgcolor=\"green\" width=\"10\" height=\"10\"> </td><td width=\"150\"> - Local files</td>";
echo "<td bgcolor=\"red\" width=\"10\" height=\"10\"> </td><td> - Critical errors</td></tr>";
echo "<td bgcolor=\"orange\" width=\"10\" height=\"10\"> </td><td> - Remote files</td>";
echo "<td bgcolor=\"black\" width=\"10\" height=\"10\"> </td><td> - Warnings</td></tr></table><br>";
echo "<table class=\"tableheader\" cellspacing=\"1\" cellpadding=\"0\"><tr><td>";
echo "<table bgcolor=\"white\" cellspacing=\"1\" cellpadding=\"3\"><tr align=\"center\"><td class=\"tableheader\"> </td>\n";
echo "<td class=\"tableseparator\"><input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll();\" /></td>\n";
echo "<td class=\"tableheader\">Image name</td><td class=\"tableheader\">ID</td>";
echo "<td class=\"tableheader\">Category</td><td class=\"tableheader\">User Name</td><td class=\"tableheader\">Date</td><td class=\"tableheader\">Image file</td><td class=\"tableheader\">Ext.</td>" . ($thumbs ? "<td class=\"tableheader\">Thumb file</td><td class=\"tableheader\">Ext.</td>" : "") . "<td class=\"tableheader\">Action</td></tr>\n";
$i = 1;
foreach ($log as $key) {
$error = explode(",", $key);
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file, i.image_date" . get_user_table_field(", u.", "user_name") . "\n FROM " . IMAGES_TABLE . " i, " . USERS_TABLE . " u\n WHERE image_id = " . $error[0] . " AND " . get_user_table_field("u.", "user_id") . " = i.user_id\n LIMIT 1";
$image_row = $site_db->query_firstrow($sql);
示例15: COUNT
}
$sql = "SELECT COUNT(*) AS images\n FROM " . IMAGES_TABLE . " i\n LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)\n WHERE " . $condition;
$countimages = $site_db->query_firstrow($sql);
$limitfinish = $limitstart + $limitnumber;
$start = 0;
if ($countimages['images'] > 0) {
$start = $limitstart + 1;
}
echo $lang['found'] . " <b>" . $countimages['images'] . "</b> " . $lang['showing'] . " <b>{$start}</b>-";
if ($limitfinish > $countimages['images'] == 0) {
echo "<b>" . $limitfinish . "</b>.";
} else {
echo "<b>" . $countimages['images'] . "</b>.";
}
echo "<br />" . $lang['no_image_found'];
show_form_header("images.php", "removeimage", "form");
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" align=\"center\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
if ($countimages['images'] > 0) {
echo "<tr class=\"tableseparator\">\n";
echo "<td class=\"tableseparator\"><input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll();\" /></td>\n";
echo "<td class=\"tableseparator\">" . $lang['field_image_name'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_category'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_username'] . "</td>\n<td class=\"tableseparator\">" . $lang['field_date'] . "</td>\n<td class=\"tableseparator\">" . $lang['options'] . "</td>\n</tr>\n";
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_date" . get_user_table_field(", u.", "user_name") . "\n FROM " . IMAGES_TABLE . " i\n LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)\n WHERE {$condition}\n ORDER BY {$orderby} {$direction}\n LIMIT {$limitstart}, {$limitnumber}";
$result = $site_db->query($sql);
while ($image_row = $site_db->fetch_array($result)) {
echo "<tr class=\"" . get_row_bg() . "\">";
echo "<td><input type=\"checkbox\" name=\"deleteimages[]\" value=\"" . $image_row['image_id'] . "\" /></td>";
echo "<td><b><a href=\"" . $site_sess->url(ROOT_PATH . "details.php?" . URL_IMAGE_ID . "=" . $image_row['image_id']) . "\" target=_blank>" . format_text($image_row['image_name'], 2) . "</a></b> (" . $image_row['image_media_file'];
if (!get_file_path($image_row['image_media_file'], "media", $image_row['cat_id'], 1, 0)) {
echo " <b class=\"marktext\">!</b>";
}
echo ")</td>\n";