コード例 #1
0
ファイル: home.php プロジェクト: abhinay100/fourimages_app
     $per = intval($row['image_votes'] / $max * 100);
     echo "<td width=\"100%\">\n";
     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" width=\"100%\"><tr><td bgcolor=\"#FFFFFF\">\n";
     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"" . $per . "%\"><tr>\n";
     echo "<td bgcolor=\"#FCDC43\"><img src=\"images/spacer.gif\" height=\"10\" width=\"2\"></td>\n";
     echo "</tr></table></td></tr></table>\n</td>";
     echo "<td align=\"center\">" . $row['image_votes'] . "</td></tr>\n";
     $num++;
 }
 if ($num == 1) {
     echo "<tr class=\"" . get_row_bg() . "\">\n<td colspan=\"4\">" . $lang['no_search_results'] . "</td></tr>";
 }
 $sql = "SELECT SUM(image_downloads) AS sum\n          FROM " . IMAGES_TABLE;
 $row = $site_db->query_firstrow($sql);
 $sum = isset($row['sum']) ? $row['sum'] : 0;
 show_table_separator($lang['top_image_downloads'] . " (" . $lang['homestats_total'] . " " . $sum . ")", 4);
 $sql = "SELECT image_id, image_name, image_downloads\n          FROM " . IMAGES_TABLE . "\n          ORDER BY image_downloads DESC\n          LIMIT {$stats_limit}";
 $result = $site_db->query($sql);
 $num = 1;
 while ($row = $site_db->fetch_array($result)) {
     if ($num == 1) {
         $max = $row['image_downloads'];
         if ($max == 0) {
             $max = 1;
         }
     }
     echo "<tr class=\"" . get_row_bg() . "\">\n";
     echo "<td>&nbsp;" . $num . ".</td>\n<td nowrap=\"nowrap\"><b><a href=\"" . $site_sess->url(ROOT_PATH . "details.php?" . URL_IMAGE_ID . "=" . $row['image_id']) . "\" target=\"_blank\">" . format_text($row['image_name'], 2) . "</a></b></td>\n\n";
     $per = intval($row['image_downloads'] / $max * 100);
     echo "<td width=\"100%\">\n";
     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" width=\"100%\"><tr><td bgcolor=\"#FFFFFF\">\n";
コード例 #2
0
ファイル: checkimages.php プロジェクト: 4images/4images
 } elseif (file_exists(THUMB_PATH . $cat_path . "/" . $image_name . ".JPEG")) {
     $thumb_file = $image_name . ".JPEG";
 } elseif (file_exists(THUMB_PATH . $cat_path . "/" . $image_name . ".gif")) {
     $thumb_file = $image_name . ".gif";
 } elseif (file_exists(THUMB_PATH . $cat_path . "/" . $image_name . ".GIF")) {
     $thumb_file = $image_name . ".GIF";
 } elseif (file_exists(THUMB_PATH . $cat_path . "/" . $image_name . ".png")) {
     $thumb_file = $image_name . ".png";
 } elseif (file_exists(THUMB_PATH . $cat_path . "/" . $image_name . ".PNG")) {
     $thumb_file = $image_name . ".PNG";
 }
 $image_name = str_replace("_", " ", $image_name);
 $image_name = str_replace("%20", " ", $image_name);
 $checked = isset($HTTP_POST_VARS['image_name_' . $i]) && (!isset($HTTP_POST_VARS['addimage_' . $i]) || $HTTP_POST_VARS['addimage_' . $i] != 1) || $status ? "" : " checked=\"checked\"";
 if ($detailed) {
     show_table_separator("<input type=\"checkbox\" name=\"addimage_" . $i . "\" value=\"1\"" . $checked . " /> " . $file, 2);
     show_custom_row($lang['cni_foundin'] . " ", $cat_name == "" && !$key ? "[" . $lang['cni_root_folder'] . "]" : $cat_name . " (ID:{$key})");
     if ($file_type == "gif" || $file_type == "jpg" || $file_type == "png") {
         $file_src = MEDIA_PATH . $cat_path . "/" . $file;
         $img_info = @getimagesize($file_src);
         $width = $max_dimension;
         $height = $max_dimension;
         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) {
                     $width = $max_dimension;
                     $height = round($max_dimension / $img_info[0] * $img_info[1]);
                 } else {
                     $width = round($max_dimension / $img_info[1] * $img_info[0]);
                     $height = $max_dimension;
コード例 #3
0
    show_form_footer($lang['save_changes'], $lang['reset'], 2);
}
if ($action == "modifycomments") {
    if ($msg != "") {
        printf("<b>%s</b>\n", $msg);
    }
    show_form_header("comments.php", "findcomments", "form");
    show_table_header($lang['nav_comments_edit'], 2);
    show_input_row($lang['field_image_id_contains'], "image_id", "", $textinput_size);
    show_input_row($lang['field_image_name_contains'], "image_name", "", $textinput_size);
    show_input_row($lang['field_username_contains'], "user_name", "", $textinput_size);
    show_input_row($lang['field_headline_contains'], "comment_headline", "", $textinput_size);
    show_input_row($lang['field_comment_contains'], "comment_text", "", $textinput_size);
    show_date_input_row($lang['field_date_after'] . $lang['date_format'], "dateafter", "", $textinput_size);
    show_date_input_row($lang['field_date_before'] . $lang['date_format'], "datebefore", "", $textinput_size);
    show_table_separator($lang['sort_options'], 2);
    ?>
  <tr class="<?php 
    echo get_row_bg();
    ?>
"><td><p><b><?php 
    echo $lang['order_by'];
    ?>
</b></p></td><td><p>
  <select name="orderby">
  <option value="i.image_name" selected><?php 
    echo $lang['field_image_name'];
    ?>
</option>
  <option value="c.image_id" selected><?php 
    echo $lang['image'];
コード例 #4
0
ファイル: settings.php プロジェクト: 4images/4images
    show_setting_row("max_image_height");
    show_setting_row("max_media_size");
    show_setting_row("upload_notify", "radio");
    show_setting_row("upload_emails");
    show_setting_row("auto_thumbnail", "radio");
    show_setting_row("auto_thumbnail_dimension");
    show_setting_row("auto_thumbnail_resize_type", "show_auto_thumbnail_resize_type_options");
    show_setting_row("auto_thumbnail_quality");
    show_table_separator($setting_group[5], 2, "setting_group_5");
    show_setting_row("badword_list", "textarea");
    show_setting_row("badword_replace_char");
    show_setting_row("wordwrap_comments");
    show_setting_row("html_comments", "radio");
    show_setting_row("bb_comments", "radio");
    show_setting_row("bb_img_comments", "radio");
    show_table_separator($setting_group[6], 2, "setting_group_6");
    show_setting_row("category_separator", "", 1);
    show_setting_row("paging_range");
    show_table_separator($setting_group[7], 2, "setting_group_7");
    show_setting_row("user_edit_image", "radio");
    show_setting_row("user_delete_image", "radio");
    show_setting_row("user_edit_comments", "radio");
    show_setting_row("user_delete_comments", "radio");
    show_setting_row("account_activation", "show_account_activation_options");
    show_setting_row("activation_time");
    show_setting_row("session_timeout");
    show_setting_row("display_whosonline", "radio");
    show_setting_row("highlight_admin", "radio");
    show_form_footer($lang['save_changes'], "", 2);
}
show_admin_footer();
コード例 #5
0
ファイル: users.php プロジェクト: abhinay100/fourimages_app
    }
}
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();
コード例 #6
0
ファイル: categories.php プロジェクト: 4images/4images
    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']));
    }
    show_input_row($lang['field_hits'], "cat_hits", $cat_row['cat_hits'], 5);
    show_table_separator($lang['permissions'], 2);
    foreach ($access_field_array as $key => $val) {
        show_access_select($lang[$key], $key, $cat_row[$key]);
    }
    show_form_footer($lang['save_changes'], $lang['reset'], 2, $lang['back']);
}
if ($action == "modifycats") {
    $site_sess->set_session_var('back_url', $self_url);
    show_admin_header();
    if ($msg != "") {
        printf("<b>%s</b>\n<p>", $msg);
    } else {
        $msg = $site_sess->get_session_var('msg');
        if ($msg != "") {
            printf("<b>%s</b>\n<p>", $msg);
        }
コード例 #7
0
ファイル: stats.php プロジェクト: abhinay100/fourimages_app
        $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();
コード例 #8
0
ファイル: thumbnailer.php プロジェクト: 4images/4images
            }
            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);
    }
}
show_admin_footer();
コード例 #9
0
    show_form_header("usergroups.php", "updategroup");
    show_hidden_input("group_id", $group_id);
    show_table_header($lang['nav_usergroups'], 2);
    show_input_row($lang['field_usergroup_name'], "group_name", $result['group_name'], $textinput_size);
    show_form_footer($lang['save_changes'], $lang['reset'], 2, $lang['back']);
}
if ($action == "modifygroups") {
    if ($msg != "") {
        printf("<b>%s</b>\n", $msg);
    }
    show_form_header("usergroups.php", "addgroup", "form");
    show_table_header($lang['nav_usergroups'], 2);
    $sql = "SELECT group_id, group_name\n          FROM " . GROUPS_TABLE . "\n          WHERE group_type = " . GROUPTYPE_GROUP . "\n          ORDER BY group_name ASC";
    $result = $site_db->query($sql);
    $found = 0;
    while ($row = $site_db->fetch_array($result)) {
        echo "<tr class=\"" . get_row_bg() . "\"><td><p><b>" . $row['group_name'] . "</b></p></td><td><p>";
        show_text_link($lang['edit'], "usergroups.php?action=editgroup&group_id=" . $row['group_id']);
        show_text_link($lang['delete'], "usergroups.php?action=removegroup&group_id=" . $row['group_id']);
        show_text_link("<b>" . $lang['permissions'] . "</b>", "usergroups.php?action=editpermissions&group_id=" . $row['group_id']);
        echo "</p></td></tr>";
        $found = 1;
    }
    if (!$found) {
        echo "<tr class=\"" . get_row_bg() . "\">\n<td colspan=\"2\">" . $lang['no_search_results'] . "</td></tr>";
    }
    show_table_separator($lang['add_usergroup'], 2);
    show_custom_row("<input type=\"text\" name=\"group_name\" value=\"\" size=\"" . $textinput_size . "\">", "<input type=\"submit\" value=\"" . $lang['add_usergroup'] . "\" class=\"button\">");
    show_table_footer();
}
show_admin_footer();