/**
 * Displays the Downloads template
 *
 * @access private
 * @since 3.8.10
 *
 */
function _wpsc_action_downloads_section()
{
    global $files, $products;
    $items = array();
    if (wpsc_has_downloads() && !empty($files)) {
        foreach ($files as $key => $file) {
            $item = array();
            if ($products[$key]['downloads'] > 0) {
                $url = add_query_arg('downloadid', $products[$key]['uniqueid'], home_url());
                $item['title'] = sprintf('<a href="%1$s">%2$s</a>', esc_url($url), esc_html($file['post_title']));
            } else {
                $item['title'] = esc_html($file['post_title']);
            }
            $item['downloads'] = $products[$key]['downloads'];
            $item['datetime'] = date(get_option('date_format'), strtotime($products[$key]['datetime']));
            $items[] = (object) $item;
        }
    }
    include wpsc_get_template_file_path('wpsc-account-downloads.php');
}
Ejemplo n.º 2
0
						<input type="hidden" value="true" name="submitwpcheckout_profile" />
						<input type="submit" value="<?php 
    _e('Save Profile', 'wpsc');
    ?>
" name="submit" />
					</td>
				</tr>
			</table>
		</form>
	<!-- 	START OF DOWNLOADS PAGE -->
	<?php 
} elseif (is_wpsc_downloads_page()) {
    ?>

		<?php 
    if (wpsc_has_downloads()) {
        ?>

				<table class="logdisplay">
					<tr>
						<th><?php 
        _e('File Names', 'wpsc');
        ?>
 </th>
						<th><?php 
        _e('Downloads Left', 'wpsc');
        ?>
 </th>
						<th><?php 
        _e('Date', 'wpsc');
        ?>