2009-11-13 16:00:25 +00:00
< ? php
/*
Template Name : Buy Print
Template Author : Philip M . Hofer ( Frumph )
2009-11-14 15:12:36 +00:00
Template URL : http :// frumph . net / forum /
2009-11-13 16:00:25 +00:00
Template Author Email : philip @ frumph . net
Template Version : 2.14
*/
if ( isset ( $_REQUEST [ 'comic' ])) $comicnum = ( int ) $_REQUEST [ 'comic' ];
?>
< ? php get_header (); ?>
< ? php include ( get_template_directory () . '/layout-head.php' ); ?>
< ? php if ( ! empty ( $comicnum )) : ?>
< ? php $temppost = $post ; ?>
< ? php $post = & get_post ( $comicnum ); ?>
< div class = " <?php comicpress_post_class(); ?> " >
< div class = " post-page-head " ></ div >
< div class = " post-page " >
< div style = " float:right; " >
< br />
< img src = " <?php echo get_template_directory_uri(); ?>/images/paypal.png " alt = " <?php _e('Powered by Paypal','comicpress'); ?> " />< br />
</ div >
2009-11-18 23:15:24 +00:00
< ? php if ( function_exists ( 'the_post_image' )) {
2009-11-17 08:33:18 +00:00
if ( has_post_image () ) { ?>
< div class = " post-page-image " >
< ? php the_post_image ( 'full' ); ?>
</ div >
< ? php } ?>
2009-11-18 23:15:24 +00:00
< ? php } ?>
2009-11-22 18:06:19 +00:00
< ? php if ( ! $comicpress_options [ 'disable_page_titles' ]) { ?>
2009-11-17 08:33:18 +00:00
< h2 class = " pagetitle " >< ? php the_title () ?> </h2>
< ? php } ?>
2009-11-13 16:00:25 +00:00
< ? php _e ( 'Comic ID' , 'comicpress' ); ?> - #<?php echo $comicnum; ?><br />
< ? php _e ( 'Title:' , 'comicpress' ); ?> <?php echo the_title(); ?><br />
< br />
< ? php $post = & get_post ( $comicnum ); ?>
< ? php
foreach ( array ( " archive " , " rss " , " comic " , " mini " ) as $type ) {
if (( $requested_image = get_comic_url ( $type , $post )) !== false ) {
$image = $requested_image ; break ;
}
}
?>
< center >
< img src = " <?php echo $image ; ?> " alt = " <?php the_title(); ?> " title = " <?php the_title(); ?> " />< br />
< br />
< table >
< tr >
< td align = " left " valign = " center " >
< form target = " paypal " action = " https://www.paypal.com/cgi-bin/webscr " method = " post " >
< input type = " hidden " name = " add " value = " 1 " >
< input type = " hidden " name = " cmd " value = " _cart " >
< input type = " hidden " name = " item_name " value = " <?php _e('Print','comicpress'); ?> " >
< input type = " hidden " name = " return " value = " <?php echo bloginfo('wpurl'); ?> " >
2009-11-22 18:06:19 +00:00
< input type = " hidden " name = " amount " value = " <?php echo $comicpress_options['buy_print_us_amount'] ; ?> " >
2009-11-13 16:00:25 +00:00
< input type = " hidden " name = " item_number " value = " <?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum ; ?>) - <?php echo the_title(); ?> " >
2009-11-22 18:06:19 +00:00
< input type = " hidden " name = " business " value = " <?php echo $comicpress_options['buy_print_email'] ; ?> " >
< ? php if ( $comicpress_options [ 'buy_print_add_shipping' ]) { ?>
< input type = " hidden " name = " shipping " value = " <?php echo $comicpress_options['buy_print_us_ship'] ; ?> " >
2009-11-13 16:00:25 +00:00
US / Canada < br >
2009-11-22 18:06:19 +00:00
$ < ? php echo $comicpress_options [ 'buy_print_us_amount' ]; ?> + $<?php echo $comicpress_options['buy_print_us_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
2009-11-13 16:00:25 +00:00
< ? php } else { ?>
US / Canada < br >
2009-11-22 18:06:19 +00:00
$ < ? php echo $comicpress_options [ 'buy_print_us_amount' ]; ?> <br />
2009-11-13 16:00:25 +00:00
< ? php } ?>
< input type = " image " src = " <?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png " name = " submit32 " alt = " <?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?> " />
</ form >
</ td >
< td width = " 40 " >
</ td >
< td align = " left " valign = " center " >
< form target = " paypal " action = " https://www.paypal.com/cgi-bin/webscr " method = " post " >
< input type = " hidden " name = " add " value = " 1 " >
< input type = " hidden " name = " cmd " value = " _cart " >
< input type = " hidden " name = " item_name " value = " <?php _e('Print','comicpress'); ?> " >
< input type = " hidden " name = " return " value = " <?php echo bloginfo('wpurl'); ?> " >
2009-11-22 18:06:19 +00:00
< input type = " hidden " name = " amount " value = " <?php echo $comicpress_options['buy_print_int_amount'] ; ?> " >
2009-11-13 16:00:25 +00:00
< input type = " hidden " name = " item_number " value = " <?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum ; ?>) - <?php echo the_title(); ?> " >
2009-11-22 18:06:19 +00:00
< input type = " hidden " name = " business " value = " <?php echo $comicpress_options['buy_print_email'] ; ?> " >
< ? php if ( $comicpress_options [ 'buy_print_add_shipping' ]) { ?>
2009-11-13 16:00:25 +00:00
< input type = " hidden " name = " shipping " value = " <?php echo $buy_print_int_ship ; ?> " >
International < br >
2009-11-22 18:06:19 +00:00
$ < ? php echo $comicpress_options [ 'buy_print_int_amount' ]; ?> + $<?php echo $comicpress_options['buy_print_int_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
2009-11-13 16:00:25 +00:00
< ? php } else { ?>
International < br >
2009-11-22 18:06:19 +00:00
$ < ? php echo $comicpress_options [ 'buy_print_int_amount' ]; ?> <br />
2009-11-13 16:00:25 +00:00
< ? php } ?>
< input type = " image " src = " <?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png " name = " submit32 " alt = " <?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?> " />
</ form >
</ td >
</ tr >
</ table >
< br />
< ? php _e ( 'The purchase of this strip is based on availability. A Print of this strip is what you are purchasing.' , 'comicpress' ); ?> <br />
</ center >
< br />
< ? php $post = $temppost ; ?>
< div class = " clear " ></ div >
</ div >
< div class = " post-page-foot " ></ div >
</ div >
< ? php else : ?>
< ? php if ( have_posts ()) : while ( have_posts ()) : the_post () ?>
< div class = " <?php comicpress_post_class(); ?> " >
< div class = " post-page-head " ></ div >
< div class = " post-page " id = " post-<?php the_ID() ?> " >
< h2 class = " pagetitle " >< ? php the_title () ?> </h2>
< div class = " entry " >
< ? php the_content () ?>
< ? php wp_link_pages ( array ( 'before' => '<p><strong>' . __ ( 'Pages:' , 'comicpress' ) . '</strong> ' , 'after' => '</p>' , 'next_or_number' => 'number' )) ?>
</ div >
2009-11-29 12:40:02 +00:00
< br class = " clear-margins " />
2009-11-13 16:00:25 +00:00
< ? php edit_post_link ( __ ( 'Edit this page.' , 'comicpress' ), '<p>' , '</p>' ) ?>
</ div >
< div class = " post-page-foot " ></ div >
</ div >
< ? php endwhile ; endif ; ?>
< ? php endif ; ?>
< ? php include ( get_template_directory () . '/layout-foot.php' ); ?>
< ? php get_footer () ?>