> <?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 (empty( $filename ) && $_FILES['upload'] && empty($errors)) { //attempt to upload file $max_size = get_option('max_upload_size'); // the max. size for uploading $my_upload = new wp_dlm_file_upload; $my_upload->upload_dir = "../../../uploads/"; // the folder for the uploaded files (you may have to create this folder) $my_upload->extensions = $allowed_extentions; // specify the allowed extensions here $my_upload->max_length_filename = 100; // change this value to fit your field length in your database (standard 100) $my_upload->rename_file = false; //upload it $my_upload->the_temp_file = $_FILES['upload']['tmp_name']; $my_upload->the_file = $_FILES['upload']['name']; $my_upload->http_error = $_FILES['upload']['error']; $my_upload->replace = (isset($_POST['replace'])) ? $_POST['replace'] : "n"; $my_upload->do_filename_check = "n"; if ($my_upload->upload()) { $full_path = $my_upload->upload_dir.$my_upload->file_copy; $info = $my_upload->show_error_string(); } else $errors = '
'.$my_upload->show_error_string().'
'; $filename = get_bloginfo('wpurl')."/wp-content/uploads/".$my_upload->file_copy; } elseif (empty($errors)) { if ( empty( $filename ) ) $errors=__('
No file selected
',"wp-download_monitor"); } //save to db if ( empty($errors ) ) { if ($my_upload->replace=="y") { $query_del = sprintf("DELETE FROM %s WHERE filename='%s';", $wpdb->escape( $wp_dlm_db ), $wpdb->escape( $filename )); $wpdb->query($query_del); } $query_add = sprintf("INSERT INTO %s (title, filename, dlversion, postDate, hits, user, members,category_id,mirrors, file_description) VALUES ('%s','%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($download_cat), $wpdb->escape($mirrors), $wpdb->escape($file_description) ); $result = $wpdb->query($query_add); if ($result) { $newdownloadID = $wpdb->insert_id; } else _e('
Error saving to database - check downloads table exists.
',"wp-download_monitor"); } } if ($errors || !$_POST) { ?>

*
:
/>

" /> user_login.'" />'; ?>
.
delete all current stats for the currently uploaded file. If you wish to keep existing stats, go to the files Edit page instead and re-upload there.',"wp-download_monitor"); ?>

'; ?>