RecordCount() > 0) { ?> EOF) { // MySQL 3.22 does not have INTERVAL list($dt_year, $dt_month, $dt_day) = explode('-', $downloads->fields['date_purchased_day']); $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $downloads->fields['download_maxdays'], $dt_year); $download_expiry = date('Y-m-d H:i:s', $download_timestamp); $is_downloadable = ( (file_exists(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']) && (($downloads->fields['download_count'] > 0 && $download_timestamp > time()) || $downloads->fields['download_maxdays'] == 0)) ) ? true : false; $zv_filesize = filesize (DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']); if ($zv_filesize >= 1024) { $zv_filesize = number_format($zv_filesize/1024/1024,2); $zv_filesize_units = TEXT_FILESIZE_MEGS; } else { $zv_filesize = number_format($zv_filesize); $zv_filesize_units = TEXT_FILESIZE_BYTES; } ?> 0, AND // - The file is present in the DOWNLOAD directory, AND EITHER // - No expiry date is enforced (maxdays == 0), OR // - The expiry date is not reached // if ( ($downloads->fields['download_count'] > 0) && (file_exists(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'])) && ( ($downloads->fields['download_maxdays'] == 0) || ($download_timestamp > time())) ) { if ($is_downloadable) { ?> MoveNext(); } ?>

 
fields['orders_products_download_id']) . '">' . $downloads->fields['products_name'] . ''; ?> fields['products_name']; ?> fields['orders_products_filename']; ?> fields['download_maxdays'] == 0 ? TEXT_DOWNLOADS_UNLIMITED : zen_date_short($download_expiry)); ?> fields['download_maxdays'] == 0 ? TEXT_DOWNLOADS_UNLIMITED_COUNT : $downloads->fields['download_count']); ?> fields['orders_products_download_id']) . '">' . zen_image_button(BUTTON_IMAGE_DOWNLOAD, BUTTON_DOWNLOAD_ALT) . '' : ' '; ?>

' . HEADER_TITLE_MY_ACCOUNT . ''); ?>

RecordCount() > 0 ?> RecordCount() > 0 and $downloads->RecordCount() < 1) { ?>