film.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php get_header(); ?>
  2. <div id="film-wrap">
  3. <div class="container film-container">
  4. <div class="row">
  5. <div class="film-page">
  6. <?php if ( have_posts() ) : ?>
  7. <?php while ( have_posts() ) : the_post(); ?>
  8. <div class="sixcol">
  9. <h2><?php the_title(); ?></h2>
  10. <h5><?php the_date('Y'); ?></h5>
  11. <div class="film-media">
  12. <h3><?php global $post; $id = $post->ID; echo get_post_meta($id, 'year', true);?></h3>
  13. <?php if ( get_post_meta($post->ID, 'video', true) ) : ?>
  14. <a class="video" href="<?php echo get_post_meta($post->ID, 'video', true) ?>">
  15. <img class="play" src="<?php echo get_template_directory_uri(); ?>/img/play.png" alt="play"/>
  16. <?php endif; ?>
  17. <?php the_post_thumbnail( 'film' ); ?>
  18. <?php if ( get_post_meta($post->ID, 'video', true) ) : ?>
  19. </a>
  20. <?php endif; ?>
  21. </div>
  22. <div class="sixcol">
  23. <div class="cover">
  24. <?php if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('film', 'secondary-image')) : MultiPostThumbnails::the_post_thumbnail('film', 'secondary-image'); endif; ?>
  25. </div>
  26. </div>
  27. <div class="sixcol">
  28. <div class="purchase-options">
  29. <?php $price = get_post_meta($post->ID, 'price', true); if ($price) { ?>
  30. <div class="store-item">
  31. <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  32. <input type="hidden" name="on0" value="Format">
  33. <select name="os0">
  34. <?php $price = get_post_custom_values('price'); if (!empty($price[0])) { ?><option value="Personal DVD">Personal DVD <?php echo get_post_meta($post->ID, 'price', true) ?></option><?php } ?>
  35. <?php $price2 = get_post_custom_values('price2'); if (!empty($price2[0])) { ?><option value="Library DVD">Library DVD <?php echo get_post_meta($post->ID, 'price2', true) ?></option><?php } ?>
  36. <?php $price3 = get_post_custom_values('price3'); if (!empty($price3[0])) { ?><option value="University DVD">University DVD <?php echo get_post_meta($post->ID, 'price3', true) ?></option><?php } ?>
  37. </select>
  38. <input type="submit" value="Add to Cart" border="0" name="submit">
  39. <input type="hidden" name="add" value="1">
  40. <input type="hidden" name="cmd" value="_cart">
  41. <input type="hidden" name="business" value="sales@phfilms.com">
  42. <input type="hidden" name="item_name" value="<?php the_title() ?>">
  43. <input type="hidden" name="item_number" value="xxxx">
  44. <input type="hidden" name="option_select0" value="Personal DVD">
  45. <input type="hidden" name="option_amount0" value="<?php echo get_post_meta($post->ID, 'price', true) ?>">
  46. <input type="hidden" name="option_select1" value="Library DVD">
  47. <input type="hidden" name="option_amount1" value="<?php echo get_post_meta($post->ID, 'price2', true) ?>">
  48. <input type="hidden" name="option_select2" value="University DVD">
  49. <input type="hidden" name="option_amount2" value="<?php echo get_post_meta($post->ID, 'price3', true) ?>">
  50. <input type="hidden" name="return" value="http://www.phfilms.com/index.php/completedpayment/">
  51. <input type="hidden" name="cancel_return" value="http://www.phfilms.com/index.php/cancelledpayment/">
  52. <input type="hidden" name="currency_code" value="USD">
  53. <input type="hidden" name="lc" value="US">
  54. </form>
  55. </div>
  56. <?php } else { ?>
  57. <?php } ?>
  58. <div class="purchase-links">
  59. <?php $price4 = get_post_meta($post->ID, 'price4', true); if ($price4) { ?>
  60. <br /><br /><br />
  61. <p>Available via: &#8595;</p>
  62. <ul>
  63. <li><a href="<?php echo get_post_meta($post->ID, 'price4', true) ?>" target="_blank"><?php echo get_post_meta($post->ID, 'price4', true) ?></a></li>
  64. </ul>
  65. <?php } ?>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="sixcol">
  71. <article>
  72. <ul class="tabs">
  73. <li><a href="#summary">Summary</a></li>
  74. <li><a href="#credits">Credits</a></li>
  75. <?php if ( get_post_meta($post->ID, 'publicity', true) ) : ?>
  76. <li><a href="#media">Publicity</a></li>
  77. <?php endif; ?>
  78. <?php if ( get_post_meta($post->ID, 'reviews', true) ) : ?>
  79. <li><a href="#reviews">Reviews</a></li>
  80. <?php endif; ?>
  81. </ul>
  82. <ul class="tabs-content">
  83. <li class="active" id="summary">
  84. <?php the_content(); ?>
  85. </li>
  86. <li id="credits">
  87. <?php if ( get_post_meta($post->ID, 'credits', true) ) : ?>
  88. <?php echo get_post_meta($post->ID, 'credits', true) ?>
  89. <?php endif; ?>
  90. </li >
  91. <li id="media">
  92. <?php if ( get_post_meta($post->ID, 'publicity', true) ) : ?>
  93. <?php echo get_post_meta($post->ID, 'publicity', true) ?>
  94. <?php endif; ?>
  95. </li>
  96. <li id="reviews">
  97. <?php if ( get_post_meta($post->ID, 'reviews', true) ) : ?>
  98. <?php echo get_post_meta($post->ID, 'reviews', true) ?>
  99. <?php endif; ?>
  100. </li>
  101. </ul>
  102. </article>
  103. </div>
  104. <?php endwhile; endif;?>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <?php get_footer(); ?>