<h3>' . _T("site_index_thumbnail_link") . '</h3> <div class="code_box"><label for="codelbb">' . _T("site_index_bbcode") . ':</label> <input type="text" id="codelbb" value="' . $links[$countThumb]['thumb_mid_bbcode'] . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div> <div class="code_box"><label for="codehtml"><a href="' . $thumb_mid_link . '" title="' . $alt . '" >' . _T("site_index_html_code") . '</a> :</label> <input type="text" id="codehtml" value="' . $links[$countThumb]['thumb_mid_html'] . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div> <h3>' . _T("site_index_image_link") . '</h3> <div class="code_box"><label for="codebb">' . _T("site_index_bbcode") . ':</label> <input type="text" id="codebb" value="' . $links[$countThumb]['image_bbcode'] . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div> <div class="code_box"><label for="codedirect">' . _T("site_index_direct_link") . '</label> <input type="text" id="codedirect" value="' . $links[$countThumb]['image_direct'] . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div>'; $thumbHtml .= '</div>'; $thumbHtml .= '<div style="clear: both;"></div>'; } else { user_feedback('error', _T("site_index_thumbs_page_err"), 'admin_bulkupload_thumbs'); } } $countThumb++; } // end uploaded loop } // end show uploaded images if (isset($_SESSION['upload'])) { user_feedback('success', _T('admin_bulk_upload_success', count($_SESSION['upload'])), 'upload_images'); unset($_SESSION['upload']); if (isset($_SESSION['show_image'])) { unset($_SESSION['show_image']); } } // make image list to upload if (isset($_POST['bupload'])) { if ($handle = opendir(CFBULKUPLOADPATH)) { $i = 0; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $path = CFBULKUPLOADPATH . $file;
* Used For: Admin ADs page * Last edited: 19/12/2012 * *************************************************************************************************************/ if (isset($_POST['changeads'])) { $makeFile = '<?php if(!defined(\'cfih\') or !cfih) exit("Direct access not permitted."); $ads[\'header\'] = \'' . safe_slash_html($_POST['ad1']) . '\'; $ads[\'index\'] = "' . safe_slash_html($_POST['ad2']) . '"; $ads[\'thumb\'] = "' . safe_slash_html($_POST['ad3']) . '"; $ads[\'gallery\'] = "' . safe_slash_html($_POST['ad4']) . '"; $ads[\'footer\'] = "' . safe_slash_html($_POST['ad5']) . '";'; if ($fp = fopen(CFDATAPATH . 'ads.php', 'w+')) { fwrite($fp, $makeFile); fclose($fp); } else { user_feedback('error', 'Error: Saving file', 'admin_ads_saving_file'); } } // page settings $page['id'] = 'ads'; $page['title'] = _T("admin_ad_page_title"); $page['description'] = ''; $page['tipsy'] = true; require CFADMINPATH . 'admin_page_header.php'; ?> <!-- admin settings --> <div id="msg"></div> <div class="ibox full"> <h2><?php echo _T("admin_ad_page_title"); ?>
/** * report_img($id) * used to update the database about a image being reported */ function report_img($id) { global $settings; $id = cl($id); if (db_addReport($id)) { user_feedback('success', _T("site_gallery_report_suc"), 'image_report'); if (check_set('SET_EMAIL_REPORT') && $settings['SET_CONTACT'] != '') { $subject = "Image Reported on " . $settings['SET_TITLE']; $message = "reported image id: " . $id . " \r\n"; $message .= "reported on : " . $settings['SET_TITLE'] . " \r\n"; $message .= "Admin Panel : " . $settings['SET_SITEURL'] . "/admin.php \r\n"; $headers = "From:" . $settings['SET_CONTACT'] . " <" . $settings['SET_CONTACT'] . ">"; mail($settings['SET_CONTACT'], $subject, $message, $headers); } return true; } user_feedback('error', _T("site_gallery_report_err_find"), 'report_img'); return false; }
$settings['SET_IMAGE_WIDGIT'] = cl($_POST['setImageWidgit']) == 1 ? 1 : 0; $settings['SET_NODUPLICATE'] = cl($_POST['setNoDuplicate']) == 1 ? 1 : 0; $settings['SET_RESIZE_IMG_ON'] = cl($_POST['setResizeImg']) == 1 ? 1 : 0; $settings['SET_ADDTHIS'] = cl($_POST['setAddThis']); //Short url settings $settings['SET_SHORT_URL_API'] = cl($_POST['setSUrlApi']); $settings['SET_SHORT_URL_API_URL'] = cl($_POST['setSUrlApiUrl']); $settings['SET_SHORT_URL_PASS'] = cl($_POST['setSUrlApiPass']); $settings['SET_SHORT_URL_USER'] = cl($_POST['setSUrlApiUesr']); // save settings if (!is_feedback('error')) { if (saveSettings(CFINCPATH . 'set.php', $settings)) { user_feedback('success', _T("admin_set_suc_update"), 'saveing_settings'); cl_cache_folder(); } else { user_feedback('error', _T("admin_set_err_saveing_settings"), 'admin_set_saveing_settings'); } } } // page settings $page['id'] = 'set'; $page['title'] = 'Admin Settings page'; $page['description'] = ''; $page['tipsy'] = true; $page['fancybox'] = true; require CFROOTPATH . 'admin/admin_page_header.php'; ?> <!-- admin settings --> <div id="msg"></div> <form method="POST" action="admin.php?act=set"> <div class="tabs">
// save image to upload array to be sent to thumb page $_SESSION['upload'][] = array('id' => $image['id'], 'did' => $image['did']); // count images uploaded $imgCount++; if ($imgCount >= $settings['SET_MAX_UPLOAD'] && !isset($admin_upload)) { break; // break upload loop as you have updated max number of images in one go... } } else { user_feedback('error', '<b>' . $image['name'] . '</b> ' . _T("site_index_delete_image_err_db"), 'savedb'); continue; } } // end image upload loop } elseif (!isset($_SESSION['err'])) { user_feedback('error', _T("site_upload_err") . ' ...', 'unknown_error'); } // remove temp images if (isset($removeList)) { foreach ($removeList as $tempImg) { // remove old file if (file_exists($tempImg)) { unlink($tempImg); } } } //////////////////////////////////////////////////////////////////////////////////// // send to page // admin bulk uploader if (isset($admin_upload)) { header('Location: ' . $settings['SET_SITEURL'] . 'admin.php?act=bulk');
} } else { user_feedback('error', _T("admin_set_err_password_wrong"), 'admin_log_password_wrong'); $reset_password = true; } } else { user_feedback('error', _T("admin_set_err_password_both"), 'admin_log_password_both'); $reset_password = true; } } else { // end check code user_feedback('error', _T("admin_log_forgot_password_err"), 'admin_log_forgot_password_3'); } } else { // end check file user_feedback('error', _T("admin_log_forgot_password_err"), 'admin_log_forgot_password_4'); } } // END FORGOT YOUR PASSWORD //////////////////////////////////////////////////////////////////////////////////// if (!checklogin()) { $page['id'] = 'logon'; $page['title'] = _T("admin_log_title"); $page['description'] = ''; require CFADMINPATH . 'admin_page_header.php'; echo "<!-- admin login -->"; if (!$reset_password) { // LOGIN PAGE ?> <div class="tabs"> <h2><?php
$banDescription = cl($_POST['banDes']); if ($banIp != '') { if (db_ban_user($banIp, $banDescription)) { user_feedback('success', _T("admin_ban_suc", $banIp), 'banned'); } else { user_feedback('error', _T("admin_ban_err_save_db"), 'admin_ban_saving_ban'); } } else { user_feedback('error', _T("admin_ban_err_no_ip"), 'admin_ban_no_ip'); } } //unban user $ip_to_unban = isset($_GET['ip']) ? cl($_GET['ip']) : ''; if ($ip_to_unban != '') { if (db_remove_ban($ip_to_unban)) { user_feedback('success', _T("admin_ban_suc_unbanned", $ip_to_unban), 'unban'); } } // find ip from image ID $id_to_ban = isset($_GET['id']) ? cl($_GET['id']) : ''; if ($id_to_ban != '') { $BAN_IP = db_get_image($id_to_ban); $BAN_IP = $BAN_IP['ip']; } // List Banned IP's $banned_list = ''; if ($banList = db_list_banned_uers()) { foreach ($banList as $k => $v) { $odd_class = empty($odd_class) ? ' class="odd"' : ''; $banned_list .= '<tr' . $odd_class . '> <td class="textleft">
function download_backup($file) { if (!file_exists(CFBACKUPPATH . $file)) { user_feedback('error', _T('admin_db_backup_not_found'), 'download_backup'); return false; } downloadFile(CFBACKUPPATH . $file); }
$gallery->setNumberOfImagesToShow($imgOnGalleryRow * theme_setting('gallery_rows', $settings['SET_IMG_ROWS'])); $galleryList = $gallery->galleryList(); // make gallery // check for search if (isset($search)) { if (!$search || !$gallery->imagesFound) { $Err['searchErr'] = $search; $searchHeader = '<h4 class="search">' . _T("site_search_no_results") . ' <span class="search_for">' . $gallery->searchFor . '</span></h4><p class="search_sug">' . _T("site_search_suggestions") . '</p>'; $pageSet['image_widgit'] = true; } else { $searchHeader = '<h4 class="search">' . _T("site_search_results", '<span class="search_for">' . $gallery->imagesFound . '</span>') . ' <span class="search_for">' . $gallery->searchFor . '</span></h4>'; } } // check gallery for images if (empty($galleryList) && !isset($search)) { user_feedback('error', _T("site_gallery_err_no_image"), 'gallery_search_no_image'); } // header page var $pageSet['id'] = 'gallery'; $pageSet['title'] = ' - ' . _T("site_gallery_page_title") . ' ' . $gallery->pageNmber; $pageSet['description'] = 'Free Image Hosting, Online image gallery of uploaded images'; $pageSet['keywords'] = 'gallery, images, photos, image gallery, photo gallery, free image hosting'; // load header require CFROOTPATH . 'header.php'; // print search Header to page if needed echo isset($searchHeader) ? $searchHeader : ''; // check gallery has images to list if (!empty($galleryList)) { foreach ($galleryList as $k => $image) { echo !($k % $imgOnGalleryRow) ? '<ul class="gallery">' : ''; // start new row
$adminMenu = '<div id="admin_bar"> <div class="title">Admin Menu</div> <ul class="nav"> <li><a href="' . $settings['SET_SITEURL'] . '/admin.php?act=logout" title="' . _T("admin_menu_logout") . '">' . _T("admin_menu_logout") . '</a></li> <li><a href="' . $settings['SET_SITEURL'] . '/admin.php?act=set" title="' . _T("admin_menu_settings") . '">' . _T("admin_menu_settings") . '</a></li> <li><a href="' . $settings['SET_SITEURL'] . '/admin.php?act=ban" title="' . _T("admin_menu_banned") . '">' . _T("admin_menu_banned") . '</a></li> <li><a href="' . $settings['SET_SITEURL'] . '/admin.php?act=db" title="' . _T("admin_menu_database") . '">' . _T("admin_menu_database") . '</a></li> <li><a href="' . $settings['SET_SITEURL'] . '/admin.php?act=images" title="' . _T("admin_menu_image_list") . '">' . _T("admin_menu_image_list") . '</a></li> <li><a href="' . $settings['SET_SITEURL'] . '/admin.php" title="' . _T("admin_menu_home") . '">' . _T("admin_menu_home") . '</a></li> </ul> </div>'; } // 404 page error if (isset($_GET['err'])) { $page_error = error_header($_GET['err']); user_feedback('error', $page_error, 'page_error'); } ?> <!doctype html> <html lang="<?php echo _T("site_lang_code"); ?> "> <head> <meta charset="<?php echo _T("site_charset"); ?> "> <title><?php get_site('title'); ?>
* 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 Edit Image Info * Last edited: 11/01/2012 * *************************************************************************************************************/ // Get Image ID $edit_img_id = cl($_GET['id']); // Update Image Info If Needed if (isset($_POST['update'])) { $pam = array('alt' => cl($_POST['setAlt']), 'private' => cl($_POST['setPrivate']) == 1 ? true : false); if (db_update($edit_img_id, $pam)) { user_feedback('success', _T("admin_iep_suc"), 'edit_image'); } } // get image info $edit_image = db_get_image($edit_img_id); $cdb = db_imageCounterList(null, $edit_img_id); // page settings $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
* * 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 Dashboard * Last edited: 19/12/2012 * *************************************************************************************************************/ // Image Report List if ($act == "report" && cl($_GET['id']) != '') { if (db_remove_from_report(cl($_GET['id']))) { user_feedback('success', _T("admin_home_report_remove_suc"), 'image_report_remove'); } else { user_feedback('error', _T("admin_home_report_remove_err"), 'admin_home_report_remove'); } } // set any header hooks add_code_line('admin-footer', '<script type= "text/javascript"> $(document).ready(function() { $("#overview").load(\'admin/ajax/admin_dashboard_ajax.php' . (!$ADMIN_DASHBOARD_FULL ? '?t=b' : '') . '\', function(response, status, xhr) { if (status == "error") { // handle error }else{ $(this).fadeIn(); ' . ($settings['SET_ALLOW_REPORT'] ? ' $("#report").load(\'admin/ajax/admin_report_ajax.php\', function() { $(this).fadeIn(); removeImageFromList(this); });' : '') . '
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ include 'lib/requirements-check.php'; $user_feedback_requirements_check = new User_Feedback_Requirements_Check(array('title' => 'User Feedback', 'php' => '5.3', 'wp' => '4.0', 'file' => __FILE__)); if ($user_feedback_requirements_check->passes()) { if (file_exists(__DIR__ . '/vendor/autoload.php')) { include __DIR__ . '/vendor/autoload.php'; } /** * Get the User Feedback controller instance. * * @return \Required\User_Feedback\Controller */ function user_feedback() { static $controller = null; if (null === $controller) { $controller = new \Required\User_Feedback\Controller(); } return $controller; } // Initialize the plugin. add_action('plugins_loaded', function () { user_feedback()->add_hooks(); }); } unset($user_feedback_requirements_check);