2009-08-21 19:29:45 +00:00
< ? php
/*
Template Name : Buy Print
Templete Author : Philip M . Hofer ( Frumph )
Templete URL : http :// webcomicplanet . com / forum /
Templete Author Email : philip @ frumph . net
*/
if ( isset ( $_REQUEST [ 'comic' ])) $comicnum = ( int ) $_REQUEST [ 'comic' ];
?>
2009-09-03 01:12:30 +00:00
< ? php get_header (); ?>
2009-09-17 22:45:30 +00:00
< ? php include ( get_template_directory () . '/layout-head.php' ); ?>
2009-08-21 19:29:45 +00:00
< ? php if ( ! empty ( $comicnum )) : ?>
< ? php $temppost = $post ; ?>
2009-11-02 12:23:41 +00:00
< ? php $post = & get_post ( $comicnum ); var_dump ( $post ); ?>
2009-09-19 10:11:37 +00:00
< div class = " <?php comicpress_post_class(); ?> " >
2009-08-21 19:29:45 +00:00
< div class = " post-page-head " ></ div >
< div class = " post-page " >
< div style = " float:right; " >
< br />
2009-10-05 06:08:01 +00:00
< img src = " <?php bloginfo('stylesheet_directory'); ?>/images/paypal.png " alt = " <?php _e('Powered by Paypal','comicpress'); ?> " />< br />
2009-08-21 19:29:45 +00:00
</ div >
< div style = " float:left; " >
2009-10-05 06:08:01 +00:00
< h2 class = " pagetitle " >< ? php _e ( 'Buy Print!' , 'comicpress' ); ?> </h2>
2009-08-21 19:29:45 +00:00
</ div >
< div class = " clear " ></ div >
2009-10-05 06:08:01 +00:00
< ? php _e ( 'Comic ID' , 'comicpress' ); ?> - #<?php echo $comicnum; ?><br />
< ? php _e ( 'Title:' , 'comicpress' ); ?> <?php echo the_title(); ?><br />
2009-08-21 19:29:45 +00:00
< br />
< ? php $post = & get_post ( $comicnum ); ?>
2009-10-21 01:14:59 +00:00
< ? php
foreach ( array ( " archive " , " rss " , " comic " , " mini " ) as $type ) {
if (( $requested_image = get_comic_url ( $type , $post )) !== false ) {
$image = $requested_image ; break ;
}
}
?>
2009-08-21 19:29:45 +00:00
< center >
2009-10-21 01:14:59 +00:00
< img src = " <?php echo $image ; ?> " alt = " <?php the_title(); ?> " title = " <?php the_title(); ?> " />< br />
2009-08-21 19:29:45 +00:00
< 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 = " shipping2 " value = " <?php echo $buy_print_us_amount ; ?> " >
2009-10-05 06:08:01 +00:00
< input type = " hidden " name = " cn " value = " <?php _e('Special Instructions (optional)','comicpress'); ?> " >
2009-08-21 19:29:45 +00:00
< input type = " hidden " name = " cancel_return " value = " <?php echo get_bloginfo('url'); ?> " >
2009-10-05 06:08:01 +00:00
< input type = " hidden " name = " item_name " value = " <?php _e('Print','comicpress'); ?> " >
2009-08-21 19:29:45 +00:00
< input type = " hidden " name = " notify_url " value = " <?php echo get_bloginfo('url'); ?> " >
< input type = " hidden " name = " page_style " value = " " >
< input type = " hidden " name = " return " value = " <?php echo bloginfo('url'); ?> " >
< input type = " hidden " name = " amount " value = " <?php echo $buy_print_us_amount ; ?> " >
2009-10-05 06:08:01 +00:00
< input type = " hidden " name = " item_number " value = " <?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum ; ?>) - <?php echo the_title(); ?> " >
2009-08-21 19:29:45 +00:00
< input type = " hidden " name = " business " value = " <?php echo $buy_print_email ; ?> " >
< input type = " hidden " name = " shipping " value = " <?php echo $buy_print_us_ship ; ?> " >
US / Canada < br >
2009-10-05 06:08:01 +00:00
$ < ? php echo $buy_print_us_amount ; ?> + $<?php echo $buy_print_us_ship; ?> <?php _e('shipping','comicpress'); ?><br />
< input type = " image " src = " <?php bloginfo('stylesheet_directory'); ?>/images/buynow_paypal.png " name = " submit32 " alt = " <?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?> " />
2009-08-21 19:29:45 +00:00
</ 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 = " shipping2 " value = " <?php echo $buy_print_int_amount ; ?> " >
2009-10-05 06:08:01 +00:00
< input type = " hidden " name = " cn " value = " <?php _e('Special Instructions (optional)','comicpress'); ?> " >
2009-08-21 19:29:45 +00:00
< input type = " hidden " name = " cancel_return " value = " <?php echo get_bloginfo('url'); ?> " >
2009-10-05 06:08:01 +00:00
< input type = " hidden " name = " item_name " value = " <?php _e('Print','comicpress'); ?> " >
2009-08-21 19:29:45 +00:00
< input type = " hidden " name = " notify_url " value = " <?php echo get_bloginfo('url'); ?> " >
< input type = " hidden " name = " page_style " value = " " >
< input type = " hidden " name = " return " value = " <?php echo bloginfo('url'); ?> " >
< input type = " hidden " name = " amount " value = " <?php echo $buy_print_int_amount ; ?> " >
2009-10-05 06:08:01 +00:00
< input type = " hidden " name = " item_number " value = " <?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum ; ?>) - <?php echo the_title(); ?> " >
2009-08-21 19:29:45 +00:00
< input type = " hidden " name = " business " value = " <?php echo $buy_print_email ; ?> " >
< input type = " hidden " name = " shipping " value = " <?php echo $buy_print_int_ship ; ?> " >
International < br >
2009-10-05 06:08:01 +00:00
$ < ? php echo $buy_print_int_amount ; ?> + $<?php echo $buy_print_int_ship; ?> <?php _e('shipping','comicpress'); ?><br />
< input type = " image " src = " <?php bloginfo('stylesheet_directory'); ?>/images/buynow_paypal.png " name = " submit32 " alt = " <?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?> " />
2009-08-21 19:29:45 +00:00
</ form >
</ td >
</ tr >
</ table >
< br />
2009-10-05 06:08:01 +00:00
< ? php _e ( 'The purchase of this strip is based on availability. A Print of this strip is what you are purchasing.' , 'comicpress' ); ?> <br />
2009-08-21 19:29:45 +00:00
</ center >
< br />
< ? php $post = $temppost ; ?>
< div class = " clear " ></ div >
</ div >
2009-09-12 15:28:32 +00:00
< div class = " post-page-foot " ></ div >
</ div >
2009-08-21 19:29:45 +00:00
< ? php else : ?>
< ? php if ( have_posts ()) : while ( have_posts ()) : the_post () ?>
2009-09-19 10:11:37 +00:00
< div class = " <?php comicpress_post_class(); ?> " >
2009-08-21 19:29:45 +00:00
< 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 () ?>
2009-10-05 06:08:01 +00:00
< ? php wp_link_pages ( array ( 'before' => '<p><strong>' . __ ( 'Pages:' , 'comicpress' ) . '</strong> ' , 'after' => '</p>' , 'next_or_number' => 'number' )) ?>
2009-08-21 19:29:45 +00:00
</ div >
2009-10-05 06:08:01 +00:00
< ? php edit_post_link ( __ ( 'Edit this page.' , 'comicpress' ), '<p>' , '</p>' ) ?>
2009-08-21 19:29:45 +00:00
< br class = " clear-margins " />
</ div >
< div class = " post-page-foot " ></ div >
2009-09-12 15:28:32 +00:00
</ div >
2009-08-21 19:29:45 +00:00
< ? php endwhile ; endif ; ?>
< ? php endif ; ?>
2009-09-17 22:45:30 +00:00
< ? php include ( get_template_directory () . '/layout-foot.php' ); ?>
2009-09-03 01:12:30 +00:00
< ? php get_footer () ?>