Failed to load bootstrap.

'; exit; } } global $wp_db_version; if ($wp_db_version < 8201) { // Pre 2.6 compatibility (BY Stephen Rider) if ( ! defined( 'WP_CONTENT_URL' ) ) { if ( defined( 'WP_SITEURL' ) ) define( 'WP_CONTENT_URL', WP_SITEURL . '/wp-content' ); else define( 'WP_CONTENT_URL', get_option( 'url' ) . '/wp-content' ); } if ( ! defined( 'WP_CONTENT_DIR' ) ) define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); if ( ! defined( 'WP_PLUGIN_URL' ) ) define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' ); if ( ! defined( 'WP_PLUGIN_DIR' ) ) define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); } require_once(ABSPATH.'wp-admin/admin.php'); load_plugin_textdomain('wp-download_monitor', WP_PLUGIN_URL.'/download-monitor/languages/', 'download-monitor/languages/'); ################################################################################ // Changing the upload path ################################################################################ if (!function_exists('dlm_upload_dir')) { function dlm_upload_dir( $pathdata ) { $subdir = '/downloads'.$pathdata['subdir']; $pathdata['path'] = str_replace($pathdata['subdir'], $subdir, $pathdata['path']); $pathdata['url'] = str_replace($pathdata['subdir'], $subdir, $pathdata['url']); $pathdata['subdir'] = str_replace($pathdata['subdir'], $subdir, $pathdata['subdir']); do_action('download_monitor_dlm_upload_dir', $pathdata); return $pathdata; } function dlm_upload_thumbnail_dir( $pathdata ) { $subdir = '/downloads/thumbnails'.$pathdata['subdir']; $pathdata['path'] = str_replace($pathdata['subdir'], $subdir, $pathdata['path']); $pathdata['url'] = str_replace($pathdata['subdir'], $subdir, $pathdata['url']); $pathdata['subdir'] = str_replace($pathdata['subdir'], $subdir, $pathdata['subdir']); do_action('download_monitor_dlm_upload_dir', $pathdata); return $pathdata; } } ################################################################################ // REPLACE ADMIN URL ################################################################################ if (function_exists('admin_url')) { wp_admin_css_color('classic', __('Blue'), admin_url("css/colors-classic.css"), array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); wp_admin_css_color('fresh', __('Gray'), admin_url("css/colors-fresh.css"), array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); } else { wp_admin_css_color('classic', __('Blue'), get_bloginfo('wpurl').'/wp-admin/css/colors-classic.css', array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); wp_admin_css_color('fresh', __('Gray'), get_bloginfo('wpurl').'/wp-admin/css/colors-fresh.css', array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); } wp_enqueue_script( 'common' ); wp_enqueue_script( 'jquery-color' ); @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); if (!current_user_can('upload_files') || !current_user_can('user_can_add_new_download') || !current_user_can('user_can_add_exist_download')) wp_die(__('You do not have permission to upload files/downloads.')); load_plugin_textdomain('wp-download_monitor', '/'); ?> > <?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?>
Required field: Title omitted',"wp-download_monitor"); if (empty( $_POST['dlhits'] )) $_POST['dlhits'] = 0; if (!is_numeric($_POST['dlhits'] )) $errors=__('
Invalid hits entered
',"wp-download_monitor"); if ($thumbnail) { if( !strstr('://', $thumbnail ) ) { $pageURL = ""; $pageURL = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"]; } else { $pageURL .= $_SERVER["SERVER_NAME"]; } if (!strstr(get_bloginfo('url'),'www.')) $pageURL = str_replace('www.','', $pageURL ); if ( ! isset($_SERVER['DOCUMENT_ROOT'] ) ) $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']) ) ); $dir_path = $_SERVER['DOCUMENT_ROOT']; $thumbnail = str_replace( $dir_path, $pageURL, $thumbnail ); } } //attempt to upload file if ( empty($errors ) && isset($_FILES['upload']) ) { $time = current_time('mysql'); $overrides = array('test_form'=>false); add_filter('upload_dir', 'dlm_upload_dir'); $file = wp_handle_upload($_FILES['upload'], $overrides, $time); remove_filter('upload_dir', 'dlm_upload_dir'); if ( !isset($file['error']) ) { $full_path = $file['url']; $info = $file['url']; $filename = $file['url']; } else $errors = '
'.$file['error'].'
'; if ( !empty($errors ) ) { // No File Was uploaded if ( empty( $_POST['filename']) ) $errors = '
'.__('No file selected',"wp-download_monitor").'
'; else $errors = ''; } } //attempt to upload thumbnail if ( empty($errors ) && isset($_FILES['thumbnail_upload']) ) { $time = current_time('mysql'); $overrides = array('test_form'=>false); add_filter('upload_dir', 'dlm_upload_thumbnail_dir'); $file = wp_handle_upload($_FILES['thumbnail_upload'], $overrides, $time); remove_filter('upload_dir', 'dlm_upload_thumbnail_dir'); if ( !isset($file['error']) ) { $thumbnail = $file['url']; } } //save to db if ( empty($errors ) ) { // Add download $query_add = sprintf("INSERT INTO %s (title, filename, dlversion, postDate, hits, user, members, mirrors, file_description) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", $wpdb->escape( $wp_dlm_db ), $wpdb->escape( $_POST['title'] ), $wpdb->escape( $filename ), mysql_real_escape_string( $_POST['dlversion'] ), $wpdb->escape( $_POST['postDate'] ), mysql_real_escape_string( $_POST['dlhits'] ), $wpdb->escape( $_POST['user'] ), $wpdb->escape( $members ), $wpdb->escape($mirrors), $wpdb->escape($file_description) ); $result = $wpdb->query($query_add); if ($result) { $download_insert_id = $wpdb->insert_id; // Loop Categories $cats = $download_taxonomies->categories; $values = array(); if (!empty($cats)) { foreach ( $cats as $c ) { $this_cat_value = (isset($_POST[ 'category_'.$c->id ])) ? 1 : 0; if ($this_cat_value) $values[] = '("'.$wpdb->escape( $c->id ).'", '.$download_insert_id.')'; } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_relationships (taxonomy_id, download_id) VALUES ".implode(',', $values).""); // Tags $values = array(); if ($tags) { // Break 'em up $thetags = explode(',', $tags); $thetags = array_map('trim', $thetags); if (sizeof($thetags)>0) { foreach ($thetags as $tag) { if ($tag) { // Exists? $tag_id = $wpdb->get_var("SELECT id FROM $wp_dlm_db_taxonomies WHERE taxonomy='tag' AND name='".$wpdb->escape($tag)."';"); // Insert if (!$tag_id) { $wpdb->query("INSERT INTO $wp_dlm_db_taxonomies (name, parent, taxonomy) VALUES ('".$wpdb->escape($tag)."', 0, 'tag');"); $tag_id = $wpdb->insert_id; } if ($tag_id) $values[] = '("'.$wpdb->escape( $tag_id ).'", '.$download_insert_id.')'; } } } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_relationships (taxonomy_id, download_id) VALUES ".implode(',', $values).""); // Thumbnail if ($thumbnail) { $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ('thumbnail', '".$wpdb->escape( $thumbnail )."', '".$download_insert_id."')"); } // Force Download $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ('force', '".$wpdb->escape( $forcedownload )."', '".$download_insert_id."')"); // Process and save meta/custom fields $index = 1; $values = array(); if ($_POST['meta']) foreach ($_POST['meta'] as $meta) { if (trim($meta['key'])) { $values[] = '("'.$wpdb->escape(strtolower((str_replace(' ','-',trim(stripslashes($meta['key'])))))).'", "'.$wpdb->escape($meta['value']).'", '.$download_insert_id.')'; $index ++; } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ".implode(',', $values).""); } else _e('
Error saving to database
',"wp-download_monitor"); } else echo $errors; } } if ((isset($errors) && !empty($errors)) || !isset($_POST['insertonlybutton'])) { ?>

*
:
* " />

= .




" /> user_login.'" />'; ?>
    get_parent_cats(); if (!empty($cats)) { foreach ( $cats as $c ) { echo '
  • '; // Do Children if (!function_exists('cat_form_output_children')) { function cat_form_output_children($child) { global $download_taxonomies; if ($child) { echo '
  • '; echo '
      '; $download_taxonomies->do_something_to_cat_children($child->id, 'cat_form_output_children', 'cat_form_output_no_children'); echo '
    '; echo '
  • '; } } function cat_form_output_no_children() { echo '
  • '; } } echo '
      '; $download_taxonomies->do_something_to_cat_children($c->id, 'cat_form_output_children', 'cat_form_output_no_children'); echo '
    '; echo ''; } } ?>




/>
/>

'; } } $index ++; } if ($_POST['addmeta']) { echo ''; } } ?>
" type="submit" style="margin-bottom: 6px !important;" />

" />

'; ?>