'; } else { // 2.7 echo ''; } if ( isset($_REQUEST['page']) && $_REQUEST['page']=='dlm_categories' ) { ?> '; // DEFINE QUERIES // select all downloads if (empty( $_POST['dlhits'] )) $_POST['dlhits'] = 0; // select a downloads if (isset($_GET['id'])) { $query_select_1 = sprintf("SELECT * FROM %s WHERE id=%s;", $wpdb->escape( $wp_dlm_db ), $wpdb->escape( $_GET['id'] )); } if (isset($_GET['action'])) $action = $_GET['action']; else $action = ''; if (!empty($action)) { switch ($action) { case "delete" : wp_dlm_clear_cached_stuff(); $d = $wpdb->get_row($query_select_1); global $wp_db_version; $adminpage = 'admin.php'; ?>

"title; ?>"

0 && $mm < 13) && ($jj > 0 && $jj < 32) && ($aa > 1990 && $jj < 2100) && (isset($hh) && $hh < 25) && (isset($mn) && $mn < 61) ) { // Good to go $newPostDate = "$aa-$mm-$jj $hh-$mn-00"; } else { // Bad Date $newPostDate = $postDate; } /* End Date Fields */ if ( $_POST['save'] ) { //save and validate if (empty( $_POST['title'] )) $errors.='
'.__('Required field: Title omitted',"wp-download_monitor").'
'; if (empty( $_POST['dlfilename'] ) && empty($_FILES['upload']['tmp_name'])) $errors.='
'.__('Required field: THE FILE omitted',"wp-download_monitor").'
'; if (empty( $_POST['dlhits'] )) $_POST['dlhits'] = 0; if (!is_numeric($_POST['dlhits'] )) $errors.='
'.__('Invalid hits entered',"wp-download_monitor").'
'; $members = (isset($_POST['memberonly'])) ? 1 : 0; $removefile = (isset($_POST['removefile'])) ? 1 : 0; $forcedownload = (isset($_POST['forcedownload'])) ? 1 : 0; if (empty($errors)) { // Remove Old Taxonomies $wpdb->query("DELETE FROM $wp_dlm_db_relationships WHERE download_id = ".$wpdb->escape($_GET['id']).""); // 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 ).'", '.$wpdb->escape($_GET['id']).')'; } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_relationships (taxonomy_id, download_id) VALUES ".implode(',', $values).""); // Tags $values = array(); if ($download_tags) { // Break 'em up $thetags = explode(',', $download_tags); $thetags = array_map('trim', $thetags); $thetags = array_map('strtolower', $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 ).'", '.$wpdb->escape($_GET['id']).')'; } } } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_relationships (taxonomy_id, download_id) VALUES ".implode(',', $values).""); // Handle File Uploads $time = current_time('mysql'); $overrides = array('test_form'=>false); // Remove old file if ($removefile){ $d = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wp_dlm_db WHERE id=%s;", $_GET['id'] ) ); $file = $d->filename; $dirs = wp_upload_dir(); $uploadpath = trailingslashit( $dirs['baseurl'] ); $absuploadpath = trailingslashit( $dirs['basedir'] ); if ( $uploadpath && ( strstr ( $d->filename, $uploadpath ) || strstr ( $d->filename, $absuploadpath )) ) { $file = str_replace( $uploadpath , "" , $d->filename); if(is_file($absuploadpath.$file)){ chmod($absuploadpath.$file, 0777); unlink($absuploadpath.$file); } } } 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']) ) { $dlfilename = $file['url']; } else $errors = '
'.$file['error'].'
'; if ( !empty($errors ) ) { // No File Was uploaded if ( empty( $_POST['dlfilename']) ) $errors = __('
No file selected
',"wp-download_monitor"); else $errors = ''; } //attempt to upload thumbnail if ( empty($errors ) ) { 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 ) ) { $query_update_file = sprintf("UPDATE %s SET title='%s', dlversion='%s', hits='%s', filename='%s', postDate='%s', user='%s',members='%s',mirrors='%s', file_description='%s' WHERE id=%s;", $wpdb->escape( $wp_dlm_db ), $wpdb->escape( $title ), mysql_real_escape_string( $dlversion ), mysql_real_escape_string( $dlhits ), $wpdb->escape( $dlfilename ), $wpdb->escape( $newPostDate ), $wpdb->escape( $_POST['user'] ), $wpdb->escape( $members ), $wpdb->escape( trim($mirrors) ) , $wpdb->escape( trim($file_description) ) , $wpdb->escape( $_GET['id'] )); $d = $wpdb->get_row($query_update_file); $show=true; // Process and save meta/custom fields $wpdb->query("DELETE FROM $wp_dlm_db_meta WHERE download_id = ".$_GET['id'].""); // Thumbnail if ($thumbnail) { $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ('thumbnail', '".$wpdb->escape( $thumbnail )."', '".$wpdb->escape($_GET['id'])."')"); } // Force Download $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ('force', '".$wpdb->escape( $forcedownload )."', '".$wpdb->escape($_GET['id'])."')"); // Custom Fields $index = 1; $values = array(); if (isset($_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']).'", '.$_GET['id'].')'; $index ++; } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ".implode(',', $values).""); echo '

'.__('Download edited Successfully',"wp-download_monitor").'

'; } } if (!empty($errors)) { echo $errors; } } } else { //load values $d = $wpdb->get_row($query_select_1); $title = $d->title; $dlversion = $d->dlversion; $dlhits = $d->hits; $dlfilename = $d->filename; if (empty( $dlhits )) $dlhits = 0; $members = $d->members; global $categories; $categories = array(); $categories_taxonomy = get_download_taxonomy($d->id); if (sizeof($categories_taxonomy['ids'])>0) $categories = $categories_taxonomy['ids']; global $download_tags; $download_tags = ''; $tags_taxonomy = get_download_taxonomy($d->id, 'tag'); if (sizeof($tags_taxonomy['names'])>0) $download_tags = implode(', ', $tags_taxonomy['names']); $mirrors = $d->mirrors; $file_description = $d->file_description; $fields = $wpdb->get_results("SELECT * FROM $wp_dlm_db_meta WHERE download_id= ".$d->id.""); $index=1; $custom_fields = array(); $thumbnail = ''; if ($fields) foreach ($fields as $meta) { if ($meta->meta_name=='thumbnail') { $thumbnail = stripslashes($meta->meta_value); } elseif ($meta->meta_name=='force') { $forcedownload = stripslashes($meta->meta_value); } elseif ($meta->meta_name=='filesize') { // Nothing } else { $custom_fields[$index]['key'] = $meta->meta_name; $custom_fields[$index]['value'] = stripslashes($meta->meta_value); $custom_fields[$index]['remove'] = 0; $index++; } } $postDate = date_i18n('Y-m-d H:i:s', strtotime($d->postDate)); $newPostDate = $d->postDate; } if (!isset($show)) $show = false; if ($show==false) { $max_upload_size_text = ''; if (function_exists('ini_get')) { $max_upload_size = min(dlm_let_to_num(ini_get('post_max_size')), dlm_let_to_num(ini_get('upload_max_filesize'))); $max_upload_size_text = __(' (defined in php.ini)',"wp-download_monitor"); } if (!$max_upload_size || $max_upload_size==0) { $max_upload_size = 8388608; $max_upload_size_text = ''; } ?>

:
:
:
:
:


/> = .



    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, $categories; 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 ''; } } ?>
:
:



/>
/>
user_login.'" />'; ?>

Some Name will become some-name.',"wp-download_monitor"); ?>

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

" />

get_row($query_select_1); $file = $d->filename; $dirs = wp_upload_dir(); $uploadpath = trailingslashit( $dirs['baseurl'] ); $absuploadpath = trailingslashit( $dirs['basedir'] ); if ( $uploadpath && ( strstr ( $d->filename, $uploadpath ) || strstr ( $d->filename, $absuploadpath )) ) { $file = str_replace( $uploadpath , "" , $d->filename); if(is_file($absuploadpath.$file)){ chmod($absuploadpath.$file, 0777); unlink($absuploadpath.$file); } } $query_delete = "DELETE FROM $wp_dlm_db WHERE id=".$wpdb->escape( $_GET['id'] ).";"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_stats WHERE download_id=".$wpdb->escape( $_GET['id'] ).";"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_log WHERE download_id=".$wpdb->escape( $_GET['id'] ).";"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_meta WHERE download_id=".$wpdb->escape( $_GET['id'] ).";"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_relationships WHERE download_id=".$wpdb->escape( $_GET['id'] ).";"; $wpdb->query($query_delete); echo '

'.__('Download deleted Successfully',"wp-download_monitor").'

'; // Truncate table if empty $q=$wpdb->get_results("select * from $wp_dlm_db;"); if ( empty( $q ) ) { $wpdb->query("TRUNCATE table $wp_dlm_db"); } $show=true; break; case "cancelled" : $show=true; break; } } /* Bulk Editing */ if (isset($_POST['dobulkaction']) || isset($_POST['dobulkaction2'])) { if (isset($_POST['dobulkaction'])) $action = $_POST['bulkactions']; elseif (isset($_POST['dobulkaction2'])) $action = $_POST['bulkactions2']; if (isset($_POST['check'])) $checked = $_POST['check']; else $checked = ''; $bulk_ids = array(); if ($checked && is_array($checked)) foreach ($checked as $key=>$value){ if (key($value) && key($value)>0) $bulk_ids[] = key($value); } elseif ($checked) { $bulk_ids = explode(',',$checked); } if (!$action || sizeof($bulk_ids)==0) { // No action selected/or no downloads selected $show=true; } elseif ($action=='reset') { // Reset Stats of selected downloads wp_dlm_clear_cached_stuff(); foreach ($bulk_ids as $bid) { if (is_numeric($bid) && $bid>0) { $wpdb->query( $wpdb->prepare( "UPDATE $wp_dlm_db SET hits=0 WHERE id=%s;", $bid ) ); } } echo '

'.__('Stats successfully reset for selected downloads',"wp-download_monitor").'

'; $show=true; } elseif ($action=='delete') { // Delete selected downloads wp_dlm_clear_cached_stuff(); foreach ($bulk_ids as $bid) { if (is_numeric($bid) && $bid>0) { $d = $wpdb->get_row( "SELECT * FROM $wp_dlm_db WHERE id=$bid;" ); $file = $d->filename; $dirs = wp_upload_dir(); $uploadpath = trailingslashit( $dirs['baseurl'] ); $absuploadpath = trailingslashit( $dirs['basedir'] ); if ( $uploadpath && ( strstr ( $d->filename, $uploadpath ) || strstr ( $d->filename, $absuploadpath )) ) { $file = str_replace( $uploadpath , "" , $d->filename); if(is_file($absuploadpath.$file)){ chmod($absuploadpath.$file, 0777); unlink($absuploadpath.$file); } } $query_delete = "DELETE FROM $wp_dlm_db WHERE id=$bid;"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_stats WHERE download_id=$bid;"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_log WHERE download_id=$bid;"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_meta WHERE download_id=$bid;"; $wpdb->query($query_delete); $query_delete = "DELETE FROM $wp_dlm_db_relationships WHERE download_id=$bid;"; $wpdb->query($query_delete); } } echo '

'.__('Selected Downloads deleted Successfully',"wp-download_monitor").'

'; // Truncate table if empty $q=$wpdb->get_results("select * from $wp_dlm_db;"); if ( empty( $q ) ) { $wpdb->query("TRUNCATE table $wp_dlm_db"); } $show=true; } elseif ($action=='edit'){ // Show edit form instead $show=false; $show_edit = true; if (isset($_POST['meta'])) $custom_fields = $_POST['meta']; else $custom_fields = ''; if (isset($_POST['save'])) { // get values if (isset($_POST['download_cat'])) $download_cat = $_POST['download_cat']; else $download_cat = ''; $change_memberonly = $_POST['change_memberonly']; $change_forcedownload = $_POST['change_forcedownload']; $members = (isset($_POST['memberonly'])) ? 1 : 0; $forcedownload = (isset($_POST['forcedownload'])) ? 1 : 0; $change_customfields = $_POST['change_customfields']; $change_tags = $_POST['change_tags']; $change_cats = $_POST['change_cats']; $change_thumbnail = $_POST['change_thumbnail']; $tags = $_POST['tags']; $thumbnail = $_POST['thumbnail']; 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 ); } } // save options $queries = array(); if ($change_memberonly==1) { $queries[] = " members='".$wpdb->escape($members)."' "; } if (sizeof($queries)>0) { $wpdb->query( "UPDATE $wp_dlm_db SET ".implode(', ', $queries)." WHERE id IN (".$wpdb->escape( implode(', ',$bulk_ids) ).");" ); } $taxonomy_ids = array(); if ($change_cats==1) { $cats = $download_taxonomies->categories; if (!empty($cats)) { foreach ( $cats as $c ) { $this_cat_value = (isset($_POST[ 'category_'.$c->id ])) ? 1 : 0; foreach($bulk_ids as $bid) { $wpdb->query("DELETE FROM $wp_dlm_db_relationships WHERE taxonomy_id = '".$c->id."' AND download_id = ".$bid.""); } if ($this_cat_value) $taxonomy_ids[] = $c->id; } } if (sizeof($cat_ids)>0) { foreach($cat_ids as $cat) { foreach($bulk_ids as $bid) { $wpdb->query("INSERT INTO $wp_dlm_db_relationships (taxonomy_id, download_id) VALUES ('".$cat."' , ".$bid.")"); } } } } if ($change_tags==1) { if ($tags) { // Break 'em up $thetags = explode(',', $tags); $thetags = array_map('trim', $thetags); $thetags = array_map('strtolower', $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; } foreach($bulk_ids as $bid) { $wpdb->query("DELETE FROM $wp_dlm_db_relationships WHERE taxonomy_id = '".$tag_id."' AND download_id = ".$bid.""); } if ($tag_id) $taxonomy_ids[] = $tag_id; } } } } } if (sizeof($taxonomy_ids)>0) { foreach($taxonomy_ids as $tax) { foreach($bulk_ids as $bid) { $wpdb->query("INSERT INTO $wp_dlm_db_relationships (taxonomy_id, download_id) VALUES ('".$tax."' , ".$bid.")"); } } } if ($change_thumbnail==1) { $wpdb->query("DELETE FROM $wp_dlm_db_meta WHERE download_id IN (".$wpdb->escape( implode(', ',$bulk_ids) ).") AND meta_name IN ('thumbnail')"); foreach($bulk_ids as $bid) { if ($thumbnail) $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ('thumbnail', '".$thumbnail."' , ".$bid.")"); } } if ($change_forcedownload==1) { $wpdb->query("DELETE FROM $wp_dlm_db_meta WHERE download_id IN (".$wpdb->escape( implode(', ',$bulk_ids) ).") AND meta_name IN ('force')"); foreach($bulk_ids as $bid) { if ($forcedownload) $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ('force', '".$forcedownload."' , ".$bid.")"); } } // Process and save meta/custom fields if ($change_customfields>0) { if ($change_customfields==1) { $wpdb->query("DELETE FROM $wp_dlm_db_meta WHERE download_id IN (".$wpdb->escape( implode(', ',$bulk_ids) ).") AND meta_name NOT IN ('tags','thumbnail','force')"); } elseif ($change_customfields==2) { // Get posted meta names $meta_names = array(); if ($_POST['meta']) foreach ($_POST['meta'] as $meta) { if (trim($meta['key'])) { $meta_names[] = "'".$wpdb->escape(strtolower((str_replace(' ','-',trim($meta['key'])))))."'"; } } $wpdb->query("DELETE FROM $wp_dlm_db_meta WHERE download_id IN (".$wpdb->escape( implode(', ',$bulk_ids) ).") AND meta_name IN (".implode(',', $meta_names).")"); } $values = array(); if ($_POST['meta']) foreach ($_POST['meta'] as $meta) { if (trim($meta['key'])) { foreach($bulk_ids as $bid) { $values[] = '("'.$wpdb->escape(strtolower((str_replace(' ','-',trim(stripslashes($meta['key'])))))).'", "'.$wpdb->escape($meta['value']).'", '.$bid.')'; } } } if (sizeof($values)>0) $wpdb->query("INSERT INTO $wp_dlm_db_meta (meta_name, meta_value, download_id) VALUES ".implode(',', $values).""); } echo '

'.__('Downloads edited successfully',"wp-download_monitor").'

'; // hide edit form - show downloads $show_edit = false; $show=true; } if ($show_edit==true) : ?>

.

    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, $categories; 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 ''; } } ?>
:
:
/>
/>

Some Name will become some-name.',"wp-download_monitor"); ?>

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

" />


" class="button dobulkaction" name="dobulkaction" type="submit" />
" class="button" type="submit" />
*/ ?> escape($_REQUEST['search_downloads'])."%' OR filename LIKE '%".$wpdb->escape($_REQUEST['search_downloads'])."%' OR ID = '".$wpdb->escape($_REQUEST['search_downloads'])."' ) "; } $total_results = sprintf("SELECT COUNT(id) FROM %s %s;", $wpdb->escape($wp_dlm_db), $search ); // Figure out the limit for the query based on the current page number. $from = (($page * 20) - 20); $paged_select = sprintf("SELECT $wp_dlm_db.* FROM $wp_dlm_db %s ORDER BY %s LIMIT %s,20;", $search, $wpdb->escape( $sort.' '.$dir ), $wpdb->escape( $from )); $download = $wpdb->get_results($paged_select); $total = $wpdb->get_var($total_results); // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total / 20); if (!empty($download)) { echo ''; foreach ( $download as $d ) { switch ($downloadtype) { case ("Title") : $downloadlink = urlencode($d->title); break; case ("Filename") : $downloadlink = $d->filename; $links = explode("/",$downloadlink); $downloadlink = urlencode(end($links)); $downloadlink = str_replace('%26', '%2526', $downloadlink); break; default : $downloadlink = $d->id; break; } // Changed from jS M Y $date = date_i18n(__("Y/m/d","wp-download_monitor"), strtotime($d->postDate)); $path = get_bloginfo('wpurl').'/'.get_option('upload_path').'/'; $file = str_replace($path, "", $d->filename); $links = explode("/",$file); $file = end($links); echo ''; echo ''; //$onclickcode = "if ( confirm('You are about to delete this download \'".$d->title."\'.\\n \'Cancel\' to stop, \'OK\' to delete.') ){return true;}return false;"; echo ''; echo ''; } echo ''; } else echo ''; // FIXED: 1.6 - Colspan changed ?>
<?php _e('Hits'," title="" />
'.$d->id.' '; $thumb = $wpdb->get_var('SELECT meta_value FROM '.$wp_dlm_db_meta.' WHERE download_id = '.$d->id.' AND meta_name = "thumbnail" LIMIT 1'); if (!$thumb) $thumb = $wp_dlm_root.'page-addon/thumbnail.gif'; echo 'Thumbnail'; echo ''.$d->title.''; if ($d->dlversion) echo ' ('.__('Version',"wp-download_monitor").' '.$d->dlversion.')'; echo ' '.$file.' '; $cats = get_download_taxonomy($d->id); if (sizeof($cats)==0) { _e('N/A',"wp-download_monitor"); } else { echo implode(', ', $cats['list']); } echo ''; $tags = get_download_taxonomy($d->id, 'tag'); if (sizeof($tags)==0) { _e('N/A',"wp-download_monitor"); } else { echo implode(', ', $tags['names']); } echo ' '; if ($d->members) echo __('Yes',"wp-download_monitor"); else echo __('No',"wp-download_monitor"); echo ' '; if ( $wpdb->get_var('SELECT meta_value FROM '.$wp_dlm_db_meta.' WHERE download_id = '.$d->id.' AND meta_name = "force" LIMIT 1') ) echo __('Yes',"wp-download_monitor"); else echo __('No',"wp-download_monitor"); echo ' '; echo $wpdb->get_var('SELECT COUNT(id) FROM '.$wp_dlm_db_meta.' WHERE download_id = '.$d->id.' AND meta_name NOT IN ("tags","thumbnail","force","filesize")'); echo ' '.$d->hits.''.$date.'
'.__('by',"wp-download_monitor").' '.$d->user.'
'.__('No downloads found.',"wp-download_monitor").'
" class="button dobulkaction" name="dobulkaction2" type="submit" />
1) { if (isset($_REQUEST['search_downloads'])) $search_downloads = $_REQUEST['search_downloads']; else $search_downloads = ''; $arr_params = array ( 'sort' => $sort, 'page' => 'download-monitor/wp-download_monitor.php', 'search_downloads' => $search_downloads, 'p' => "%#%" ); $arr_params2 = array ( 'action', 'id' ); $query_page = remove_query_arg($arr_params2); $query_page = add_query_arg( $arr_params , $query_page ); echo paginate_links( array( 'base' => $query_page, 'prev_text' => __('« Previous'), 'next_text' => __('Next »'), 'total' => $total_pages, 'current' => $page, 'end_size' => 1, 'mid_size' => 5, )); } ?>


get_item_quantity(5); $rss_items = $rss->get_items(0, $maxitems); if ( $maxitems > 0 ) : echo '
    '; foreach ( $rss_items as $item ) : $title = wptexturize($item->get_title(), ENT_QUOTES, "UTF-8"); $link = $item->get_permalink(); $date = $item->get_date('U'); if ( ( abs( time() - $date) ) < 86400 ) : // 1 Day $human_date = sprintf(__('%s ago','wp-download_monitor'), human_time_diff($date)); else : $human_date = date(__('F jS Y','wp-download_monitor'), $date); endif; echo '
  • '.$title.''.$human_date.'
  • '; endforeach; echo '
'; else : echo '
  • '.__('No items found.','wp-download_monitor').'
'; endif; else : echo '
  • '.__('No items found.','wp-download_monitor').'
'; endif; } ?>

Need help? FAQ, Usage instructions and other notes can be found on the WordPress.org plugin page.

',"wp-download_monitor"); ?>

Mike Jolley. The development of this plugin took a lot of time and effort, so please don\'t forget to donate if you found this plugin useful.',"wp-download_monitor"); ?>

'; } ?>