function galleryList() { global $DBCOUNT; if ($this->searchErr) { return array(); } $img = array(); if ($imageList = imageList(($this->pageNmber - 1) * $this->imgOnPage, $this->imgOnPage, 'added', 'ASC', $this->searchFor)) { foreach ($imageList as $k => $image) { $img[] = array('thumbSmallUrl' => imageAddress(3, $image, "dt"), 'thumbLink' => imageAddress(2, $image, "pm"), 'imageAlt' => $image['alt'] != "" ? $image['alt'] : $image['name'], 'id' => $image['id']); } // endfor } $this->imagesFound = $DBCOUNT; return $img; }
order_by($db_img, $orderBy, $order); $imageList = array_slice($db_img, $page_number * $item_on_page, $item_on_page); foreach ($imageList as $k => $image) { $bandwidthStyle = ''; //($settings['SET_MAX_BANDWIDTH'] !=0 && ($settings['SET_MAX_BANDWIDTH']*1048576) < $image['bandwidth']?' style="background-color:red;color:#000"':''); $list_item .= ' <tr class="' . ($odd = empty($odd) ? 'odd' : '') . '"> <td> <a href="' . imageAddress(2, $image, "pm") . '" class="tip" title="' . _T("admin_ilp_thumb_page_link") . '"><img src="img/Image-Info.png" height="16" width="16" border="0" alt="' . _T("admin_ilp_thumb_page_link") . '" /></a> <a href="admin.php?act=edit&id=' . $image['id'] . '" class="tip" title="' . _T("admin_ilp_edit_alt") . '"><img src="img/Image-Edit.png" height="16" width="16" border="0" alt="' . _T("admin_ilp_edit_alt") . '" /></a> <a href="#" id="' . $image['deleteid'] . '" class="tip delete" title="' . _T("admin_ilp_report_alt_delete") . '" ret="' . sprintf(_T("admin_ilp_report_delete"), $image['id']) . '" ><img src="img/Image-Del.png" height="16" width="16" border="0" alt="' . _T("admin_ilp_report_alt_delete") . '" /></a> <a href="admin.php?act=ban&id=' . $image['id'] . '" class="tip" title="' . _T("admin_ilp_report_alt_ban") . '"><img src="img/User-Block.png" height="16" width="16" border="0" alt="' . _T("admin_ilp_report_alt_ban") . '" /></a> <a href="admin.php?act=images&ip=' . $image['ip'] . '" class="tip" title="' . sprintf(_T("admin_ilp_ipsearch_alt"), $image['ip']) . '"><img src="img/user-search.png" height="16" width="16" border="0" alt="' . sprintf(_T("admin_ilp_ipsearch_alt"), $image['ip']) . '" /></a> </td> <td>' . date('d M y', $image['added']) . '</td> <td><a href="' . imageAddress(1, $image) . '" target="_blank" title="' . $image['name'] . '" img_src="<img src=\'' . imageAddress(3, $image) . '\'/>" class="imglink img_tooltip lightbox">' . $image['alt'] . '</a></td> <td>' . $image['lastviewed'] . '</td> <td>' . $image['gallery'] . '</td> <td>' . $image['hotlink'] . '</td> <td' . $bandwidthStyle . '>' . format_size($image['bandwidth']) . '</td> <td>' . (array_key_exists('private', $image) && $image['private'] ? 'Yes' : 'No') . '</td> </tr>'; } } else { //make image list $list_item = '<tr class="odd"><td colspan="10"><h1>No Images Found</h1></td></tr>'; $pagination = ''; } // set any header hooks add_code_line('admin-footer', '<script type= "text/javascript"> $(document).ready(function() {
echo '<url><loc>' . $settings['SET_SITEURL'] . '/contact.php</loc></url>'; } // Contact if ($settings['SET_HIDE_GALLERY']) { // get images & set $DBCOUNT $imageList = imageList(0, 'all'); // get image list from db // list gallery pages $link_mod = !$settings['SET_MOD_REWRITE'] ? '/gallery.php?p=' : '/gallery/page'; $ex_var = !$settings['SET_MOD_REWRITE'] ? '' : '.html'; $number_of_pages = ceil($DBCOUNT / $settings['SET_IMG_ON_PAGE']); if ($number_of_pages * $settings['SET_IMG_ON_PAGE'] < $DBCOUNT) { $number_of_pages++; } for ($i = 1; $i <= $number_of_pages; $i++) { echo "<url>"; echo "<loc>" . $settings['SET_SITEURL'] . $link_mod . $i . $ex_var . "</loc>"; echo "</url>"; } // list image pages foreach ($imageList as $k => $image) { echo "<url>"; echo "<loc>" . imageAddress(2, $image, "pm") . "</loc>"; echo "</url>"; echo "<url>"; echo "<loc>" . imageAddress(3, $image, "pt") . "</loc>"; echo "</url>"; } } echo "</urlset>"; cache_end();
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * You may not modify and/or remove any copyright notices or labels on the software on each * page (unless full license is purchase) and in the header of each script source file. * * You should have received a full copy of the LICENSE AGREEMENT along with * Codefuture Image Hosting Script. If not, see http://codefuture.co.uk/projects/imagehost/license/. * * * ABOUT THIS PAGE ----- * Used For: Admin Bulk image uploader * Last edited: 19/12/2012 * *************************************************************************************************************/ // check for errors coming from other pages if (isset($_SESSION['err'])) { $Err = $_SESSION['err']; unset($_SESSION['err']); } // check for uploaded image to show if (isset($_SESSION['upload']) && isset($_SESSION['show_image'])) { $countThumb = 0; // count number of thumb's on page $thumbHtml = ''; // hold thumbnail page html // image loop foreach ($_SESSION['upload'] as $k => $uploadimage) { if (isset($uploadimage['id'])) { $img_id = $uploadimage['id']; }
/** * ImageWidget($numImg=null, $return = true ) * numImg [number of image] * return [ false(echo) | true(return)] */ function ImageWidget($numImg = null, $return = true) { global $settings; if (!isset($settings['SET_IMAGE_WIDGIT']) || !$settings['SET_IMAGE_WIDGIT']) { return; } if ($imageList = imageList('rand', $numImg)) { $rand_widget = '<h2 class="boxtitle">' . _T("home_image_widgit") . '</h2> <ul class="gallery">'; foreach ($imageList as $image) { // get image address $thumb_url = imageAddress(3, $image, "dt"); // get thumb page address $thumb_mid_link = imageAddress(2, $image, "pm"); //see if there is a alt(title) if not use the image name $alt_text = $image['alt'] != "" ? $image['alt'] : $image['name']; //image list for page $rand_widget .= ' <li><a href="' . $thumb_mid_link . '" title="' . $alt_text . '" class="thumb" > <img src="' . $thumb_url . '" alt="' . $alt_text . '" /> </a><h2><a href="' . $thumb_mid_link . '" title="' . $alt_text . '">' . $alt_text . '</a></h2> </li>'; } // endfor $rand_widget .= '</ul><div class="clear"></div>'; if ($return) { return $rand_widget; } echo $rand_widget; } }
exit; } if ($image = db_get_image($img['id'])) { $image_time = $image['added']; if (array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER)) { $if_modified_since = strtotime(preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"])); if ($if_modified_since >= $image_time && !$debug_img) { header("HTTP/1.0 304 Not Modified"); exit; } } header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $image_time) . ' GMT', true, 200); header('Expires: ' . gmdate('D, d M Y H:i:s', $image_time + 86400 * 365) . ' GMT', true, 200); header("Pragma: public"); header("Cache-Control: maxage=" . 86400 * 14); $img_address = imageAddress($img['type'], $image); $pathinfo = pathinfo($img_address); $img['ext'] = strtolower($pathinfo['extension']); if ($img['ext'] == 'jpg') { $img['ext'] = 'jpeg'; } if (!hotlink()) { if (!$debug_img) { header('Content-type: image/' . $img['ext']); } // donwload image header if ($img['type'] == 4) { header('Content-Length: ' . $image['size']); header('Content-Disposition: attachment;filename="' . $image['name'] . '"'); } readfile($img_address);
} $imgUp->fingerprint(); // need to check for duplicate images? if ($settings['SET_NODUPLICATE']) { //check for Duplicate Images if ($fp = findImage('fingerprint', $imgUp->info['fingerprint'])) { // If similar files exist, check them foreach ($fp as $fpItem) { if ($imgUp->are_duplicates(imageAddress(1, $fpItem))) { $dupFound = true; $dup = $fpItem; break; } } if (isset($dupFound)) { $err_add = '<br/><a href="' . imageAddress(2, $dup, 'pm') . '" title="' . $dup['alt'] . '" >Duplicate Images</a>'; user_feedback('error', '<b>' . $imgUp->info['full_name'] . '</b> ' . _T("upload_duplicate_found") . ' ' . $err_add, 'duplicate '); continue; } } } if (!$imgUp->finish_upload(isset($admin_upload) ? 1 : null)) { if ($imgUp->error_code == 125) { user_feedback('error', '<b>' . $imgUp->info['full_name'] . '</b> ' . _T("site_upload_err") . ' .', 'filemove'); } continue; } //Resize image if needed if ($settings['SET_RESIZE_IMG_ON']) { if (isset($_POST['new_width'][$i]) && !empty($_POST['new_width'][$i]) || isset($_POST['new_height'][$i]) && !empty($_POST['new_height'][$i])) { $imgUp->stretchSmallImages(true);
?> </link> <description><?php echo _T("feed_description"); ?> </description> <language><?php echo _T("feed_language"); ?> </language> <?php if ($settings['SET_HIDE_GALLERY'] && ($imageList = imageList(0, 10))) { foreach ($imageList as $k => $image) { $date = date('Y-m-d\\TH:i:s\\Z', $image['added']); $url = imageAddress(2, $image, "pm"); $thumb_url = imageAddress(3, $image, "dt"); $img_ext = $image['ext']; if ($img_ext == 'jpg') { $img_ext = 'jpeg'; } ?> <entry> <title><?php echo $image['alt']; ?> </title> <link rel="alternate" type="text/html" href="<?php echo $url; ?> "/> <published><?php
ini_set("max_input_time", "600"); define('cfih', 'admin'); define('CFROOTPATH', dirname(dirname(dirname(__FILE__))) . '/'); include_once CFROOTPATH . 'inc/cfih.php'; if (!checklogin() || !$settings['SET_ALLOW_REPORT']) { exit("Direct access not permitted."); } $report_list = null; if ($full_report = db_imageReportList()) { foreach ($full_report as $k => $image) { $odd_class = empty($odd_class) ? ' class="odd"' : ''; $img_alt = $image['alt']; $img_name = $image['name']; $img_deleteid = $image['deleteid']; $img_url = imageAddress(1, $image); $img_thumb_url = imageAddress(3, $image); $report_list .= '<tr' . $odd_class . '> <td> <a href="admin.php?act=report&id=' . $image['id'] . '" class="tip" title="' . _T("admin_home_report_alt_remove") . '"><img src="img/Image-Ok.png" height="16" width="16" border="0" alt="' . _T("admin_home_report_alt_remove") . '" /></a> <a href="#" id="' . $img_deleteid . '" class="tip delete" title="' . _T("admin_home_report_alt_delete") . '" ret="' . sprintf(_T("admin_home_report_delete"), $image['id']) . '"><img src="img/Image-Del.png" height="16" width="16" border="0" alt="' . _T("admin_home_report_alt_delete") . '" /></a> <a href="admin.php?act=ban&id=' . $image['id'] . '" class="tip" title="' . _T("admin_home_report_alt_ban") . '"><img src="img/User-Block.png" height="16" width="16" border="0" alt="' . _T("admin_home_report_alt_ban") . '" /></a> <a href="admin.php?act=images&ip=' . $image['ip'] . '" class="tip" title="' . sprintf(_T("admin_ilp_ipsearch_alt"), $image['ip']) . '"><img src="img/user-search.png" height="16" width="16" border="0" alt="' . sprintf(_T("admin_ilp_ipsearch_alt"), $image['ip']) . '" /></a> </td> <td><a href="' . $img_url . '" target="_blank" title="' . $img_alt . '" img_src="<img src=\'' . $img_thumb_url . '\' />" class="imglink img_tooltip lightbox">' . $img_name . '</a></td>'; } } ?> <div class="ibox"> <h2><?php echo _T("admin_home_reported_images"); ?>
$page['id'] = 'edit'; $page['title'] = _T("admin_iep_title"); $page['description'] = ''; $page['tipsy'] = true; $page['lightbox'] = true; require CFADMINPATH . 'admin_page_header.php'; ?> <!-- admin image edit --> <div class="ibox top_img"><a href="<?php echo imageAddress(1, $edit_image); ?> " target="_blank" title="<?php echo $edit_image['alt']; ?> " class="imglink lightbox"><img src="<?php echo imageAddress(2, $edit_image); ?> " title="<?php echo $edit_image['alt']; ?> " class=" imgedit_img" /></a></div> <div class="ibox"><h2><?php echo _T("admin_iep_bandwidth_views"); ?> </h2> <div class="quickview"> <h3><?php echo _T("admin_iep_since_uploaded"); ?> </h3> <ul>
<h3><?php echo _T("admin_home_by_hotlink_views"); ?> </h3> <ul> <li><?php echo _T("admin_home_id"); ?> : <span class="number"><a href="<?php echo imageAddress(1, $lr_mostViewImage); ?> " target="_blank" title="<?php echo $lr_mostViewImage['alt']; ?> " img_src="<img src='<?php echo imageAddress(3, $lr_mostViewImage); ?> ' />" class="imglink img_tooltip lightbox"><?php echo $lr_mostViewImage['id']; ?> </a></span></li> <li><?php echo _T("admin_home_name"); ?> : <span class="number"> <?php echo $lr_mostViewImage['alt']; ?> </span></li> <li><?php echo _T("admin_home_uploaded_date"); ?>
// check for cache if (!isset($delete_id)) { // && !checklogin()){ unset($_SESSION['upload']); cache_cheack($img_id . '_thumb' . ($showImage ? '_small' : ''), 60 * 60 * 24 * 30); } // hold thumbnail page html if (!isset($thumbHtml)) { $thumbHtml = ''; } // Thumbnail page variables $thumb_link = imageAddress(3, $image, 'pt'); $thumb_url = imageAddress(3, $image, 'dt'); $thumb_mid_link = imageAddress(2, $image, 'pm'); $thumb_mid_url = imageAddress(2, $image, 'dm'); $imgurl = imageAddress(1, $image, 'di'); $alt = $image['alt']; $shorturl = $image['shorturl']; $thumb_show = $showImage ? $thumb_url : $thumb_mid_url; // make image links $links[$countThumb] = array('thumb_bbcode' => imageLinkCode('bbcode', $thumb_url, $thumb_link), 'thumb_html' => imageLinkCode('html', $thumb_url, $thumb_link, $alt), 'thumb_mid_bbcode' => imageLinkCode('bbcode', $thumb_mid_url, $thumb_mid_link), 'thumb_mid_html' => imageLinkCode('html', $thumb_mid_url, $thumb_mid_link, $alt), 'image_bbcode' => imageLinkCode('bbcode', $imgurl), 'image_direct' => $imgurl, 'delete_url' => isset($delete_id) ? $settings['SET_SITEURL'] . '?d=' . $delete_id : ''); // comments layout $layout = ' full'; // AdSense $thumb_Ad_html = !isset($countThumb) || $countThumb < 2 ? get_ad('thumb', 'thumb_Ad', false) : ''; //image box $thumbHtml .= '<div class="img_ad_box ' . (isset($countThumb) && $countThumb > 0 ? ' nextbox' : '') . '"> <div class="img_box' . (!empty($thumb_Ad_html) ? ' left' : '') . '"> <a href="' . $imgurl . '" title="' . $alt . '" class="lightbox" ><img src="' . $thumb_show . '" alt="' . $alt . '" /><br/> <span>' . $alt . '</span></a> </div>