need_calendars = true; if (cpm_get_subcomic_directory() !== false) { $cpm_config->messages[] = __("Subdirectory support enabled. Change Dates may not work as expected.", 'comicpress-manager'); } $comic_format_date_string = date(CPM_DATE_FORMAT); $dates_output_format = "Y-m-d"; $start_date = date($dates_output_format); $end_date = substr(pathinfo(end($cpm_config->comic_files), PATHINFO_BASENAME), 0, strlen($comic_format_date_string)); $end_date = date($dates_output_format, strtotime($end_date)); if (isset($_POST['start-date']) && !empty($_POST['start-date'])) { $target_start_date = strtotime($_POST['start-date']); if (($target_start_date != -1) && ($target_start_date !== false)) { $start_date = date($dates_output_format, $target_start_date); } else { $cpm_config->warnings[] = $_POST['start-date'] . " is an invalid date. Resetting to ${start_date}"; } $target_end_date = strtotime($_POST['end-date']); if (($target_end_date != -1) && ($target_end_date !== false)) { $end_date = date($dates_output_format, $target_end_date); } else { $cpm_config->warnings[] = $_POST['end-date'] . " is an invalid date. Resetting to ${end_date}"; } } if (strtotime($end_date) < strtotime($start_date)) { list($start_date, $end_date) = array($end_date, $start_date); } $visible_comic_files = array(); $visible_comic_files_md5 = array(); $start_date_timestamp = strtotime($start_date); $end_date_timestamp = strtotime($end_date); foreach ($cpm_config->comic_files as $file) { $filename = pathinfo($file, PATHINFO_BASENAME); $result = cpm_breakdown_comic_filename($filename); $result_date_timestamp = strtotime($result['date']); if (($result_date_timestamp >= $start_date_timestamp) && ($result_date_timestamp <= $end_date_timestamp)) { $visible_comic_files[] = $file; $visible_comic_files_md5[] = "\"" . md5($file) . "\""; } } $help_content = __("

Change post & comic dates lets you change the comic file names and post dates for any and every comic published. You will only be able to move a comic file and its associated post if there is no comic or post that exists on the destination date, as ComicPress Manager cannot automatically resolve such conflicts.

", 'comicpress-manager'); $help_content .= __("

This is a potentialy dangerous and resource-intensive operation. Back up your database and comics/archive/RSS folders before performing large move operations. Additionally, if you experience script timeouts while moving large numbers of posts, you may have to move posts & comic files by hand rather than through ComicPress Manager.

", 'comicpress-manager'); ob_start(); ?>

comic_files) > 0) { ?>
", "") ?> " />
[" href="#" onclick="$('holder-').style.backgroundColor=''; $('dates[]').value = ''; return false">R | " href="#" onclick="reschedule_posts(''); return false">I]
" />