Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.14 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  
  5. * -------------------------------------------------------------------------------------
  6.  
  7. * @author: Doothemes
  8.  
  9. * @author URI: https://doothemes.com/
  10.  
  11. * @aopyright: (c) 2017 Doothemes. All rights reserved
  12.  
  13. * -------------------------------------------------------------------------------------
  14.  
  15. *
  16.  
  17. * @since 2.1.4
  18.  
  19. *
  20.  
  21. */
  22.  
  23.  
  24.  
  25. $dato = get_query_var('tab');
  26.  
  27. // Movies Meta data
  28.  
  29. $get_report = isset( $_GET['report'] ) ? $_GET['report'] : null;
  30.  
  31. $admin = current_user_can('administrator');
  32.  
  33. $dt_date = new DateTime(dt_get_meta('release_date'));
  34.  
  35. $dt_apid = dt_get_meta('ids');
  36.  
  37. $dt_rating_imdb = dt_get_meta('imdbRating');
  38.  
  39. $dt_votes_imdb = dt_get_meta('imdbVotes');
  40.  
  41. $dt_rated = dt_get_meta('Rated');
  42.  
  43. $dt_country = dt_get_meta('Country');
  44.  
  45. $dt_title_original = dt_get_meta('original_title');
  46.  
  47. $dt_rating_tmdb = dt_get_meta('vote_average');
  48.  
  49. $dt_votes_tmdb = dt_get_meta('vote_count');
  50.  
  51. $dt_tagline = dt_get_meta('tagline');
  52.  
  53. $dt_runtime = dt_get_meta('runtime');
  54.  
  55. $dt_trailer = dt_get_meta('youtube_id');
  56.  
  57. $dt_images = dt_get_meta('imagenes');
  58.  
  59. $dt_rand_images = rand_images('imagenes', $id, 'original', true, true);
  60.  
  61. $dt_maindrop = dt_get_meta('dt_backdrop');
  62.  
  63. $dt_reports = dt_get_meta('numreport');
  64.  
  65. $dt_string = dt_get_meta('dt_string');
  66.  
  67. $return_link = return_links( $dt_string );
  68.  
  69. // Datos
  70.  
  71. $dt_rating_dt = dt_get_meta('_starstruck_avg');
  72.  
  73. $dt_votes_dt = dt_get_meta('_starstruck_total');
  74.  
  75. $dt_player = get_post_meta($post->ID, 'repeatable_fields', true);
  76.  
  77. $backgound = get_option('dt_dynamic_bg');
  78.  
  79. // Image
  80.  
  81. $thumb_id = get_post_thumbnail_id();
  82.  
  83. $thumb_url = wp_get_attachment_image_src($thumb_id,'dt_poster_a', true);
  84.  
  85. // Star Item post
  86.  
  87. if (have_posts()) :while (have_posts()) : the_post(); set_dt_views(get_the_ID()); ?>
  88.  
  89.  
  90.  
  91. <?php if($backgound == 'true') { ?>
  92.  
  93. <style>
  94.  
  95. #dt_contenedor {
  96.  
  97. background-image: url(<?php echo esc_url( rand_images('imagenes', $id, 'original', true, true) ); ?>);
  98.  
  99. background-repeat: no-repeat;
  100.  
  101. background-attachment: fixed;
  102.  
  103. background-size: cover;
  104.  
  105. background-position: 50% 0%;
  106.  
  107. }
  108.  
  109. </style>
  110.  
  111. <?php } if( $dt_player == null ) doo_breadcrumb( get_the_ID(), 'movies', __d('Movies') ); ?>
  112.  
  113. <div id="single" class="dtsingle">
  114.  
  115. <div id="edit_link"></div>
  116.  
  117. <div class="content">
  118.  
  119. <?php if($dt_player): get_template_part('inc/parts/single/player'); endif; ?>
  120.  
  121. <div class="sheader">
  122.  
  123. <div class="poster">
  124.  
  125. <img src="<?php if($thumb_id) { echo $thumb_url[0]; } else { dt_image('dt_poster', $post->ID, 'w185'); } ?>" alt="<?php the_title(); ?>">
  126.  
  127. </div>
  128.  
  129. <div class="data">
  130.  
  131. <h1><?php the_title(); ?></h1>
  132.  
  133. <div class="extra">
  134.  
  135. <?php if($d = $dt_tagline) { echo '<span class="tagline">', $d, '</span>'; } ?>
  136.  
  137. <?php if($d = $dt_date) { echo '<span class="date">', $d->format(DOO_TIME), '</span>'; } ?>
  138.  
  139. <?php if($d = $dt_country) { echo '<span class="country">', $d, '</span>'; } ?>
  140.  
  141. <?php if($d = $dt_runtime) { echo '<span class="runtime">', $d, ' ', __d('Min.'), '</span>'; }; ?>
  142.  
  143. <?php if($d = $dt_rated) { echo '<span class="C'. $d .' rated">', $d, '</span>'; } ?><span><?php edit_post_link(__('&nbsp;Edit')); ?></span>
  144.  
  145. </div>
  146.  
  147. <?php echo do_shortcode('[starstruck_shortcode]'); ?>
  148.  
  149. <div class="sgeneros">
  150.  
  151. <?php echo get_the_term_list($post->ID, 'genres', '', '', ''); ?>
  152.  
  153. </div>
  154.  
  155. </div>
  156.  
  157. </div>
  158.  
  159. <div class="single_tabs">
  160.  
  161. <div class="user_control">
  162.  
  163. <?php dt_list_button( get_the_ID() ); dt_views_button( get_the_ID() ); ?>
  164.  
  165. </div>
  166.  
  167. <ul id="section" class="smenu idTabs">
  168.  
  169. <li><a href="#info"><?php _d('Info'); ?></a></li>
  170.  
  171. <li><a href="#cast"><?php _d('Cast'); ?></a></li>
  172.  
  173. <?php if($dt_trailer) { ?><li><a href="#trailer"><?php _d('Trailer'); ?></a></li><?php } ?>
  174.  
  175. <?php if($return_link == 1) { ?><li><a href="#linksx"><?php _d('Links'); ?></a></li><?php } ?>
  176.  
  177. </ul>
  178.  
  179. </div>
  180.  
  181. <div id="trailer" class="sbox fixidtab">
  182.  
  183. <h2><?php _d('Video trailer'); ?></h2>
  184.  
  185. <div class="videobox">
  186.  
  187. <div class="embed">
  188.  
  189. <?php $trailers = get_post_meta($post->ID, "youtube_id", $single = true); mostrar_trailer_iframe($trailers) ?>
  190.  
  191. </div>
  192.  
  193. </div>
  194.  
  195. </div>
  196.  
  197. <div id="cast" class="sbox fixidtab">
  198.  
  199. <h2><?php _d('Director'); ?></h2>
  200.  
  201. <div class="persons">
  202.  
  203. <?php dt_director($post->ID, "img", true); ?>
  204.  
  205. </div>
  206.  
  207. <h2><?php _d('Cast'); ?></h2>
  208.  
  209. <div class="persons">
  210.  
  211. <?php dt_cast_2($post->ID, "img", true); ?>
  212.  
  213. </div>
  214.  
  215. </div>
  216.  
  217.  
  218.  
  219. <div id="info" class="sbox fixidtab">
  220.  
  221. <h2><?php _d('Synopsis'); ?></h2>
  222.  
  223. <div itemprop="description" class="wp-content">
  224.  
  225. <?php the_content(); ?>
  226.  
  227.  
  228.  
  229. <?php if($dt_images) { ?>
  230.  
  231. <div id="dt_galery" class="galeria">
  232.  
  233. <?php dt_get_images("w300", $post->ID); ?>
  234.  
  235. </div>
  236.  
  237. <?php } ?>
  238.  
  239. <?php if(get_option('ads_ss_1') =="true") { if($ads = get_option('ads_spot_single')) { echo '<div class="module_single_ads">'. stripslashes($ads). '</div>'; } } ?>
  240.  
  241. </div>
  242.  
  243. <?php if($d = $dt_title_original) { ?>
  244.  
  245. <div class="custom_fields">
  246.  
  247. <b class="variante"><?php _d('Original title'); ?></b>
  248.  
  249. <span class="valor"><?php echo $d; ?></span>
  250.  
  251. </div>
  252.  
  253. <?php } if($d = $dt_rating_imdb) { ?>
  254.  
  255. <div class="custom_fields">
  256.  
  257. <b class="variante"><?php _d('IMDb Rating'); ?></b>
  258.  
  259. <span class="valor">
  260.  
  261. <b id="repimdb"><?php echo '<strong>', $d, '</strong> ', $dt_votes_imdb, ' ', __d('votes'); ?></b>
  262.  
  263. <?php if($admin) { ?><a data-id="<?php echo get_the_id(); ?>" data-imdb="<?php echo $dt_apid; ?>" id="update_imdb_rating"><?php _d('Update Rating'); ?></a><?php } ?>
  264.  
  265. </span>
  266.  
  267. </div>
  268.  
  269. <?php } if($d = $dt_rating_tmdb) { ?>
  270.  
  271. <div class="custom_fields">
  272.  
  273. <b class="variante"><?php _d('TMDb Rating'); ?></b>
  274.  
  275. <span class="valor"><?php echo '<strong>', $d, '</strong> ', $dt_votes_tmdb, ' ', __d('votes'); ?></span>
  276.  
  277. </div>
  278.  
  279. <?php } ?>
  280.  
  281. </div>
  282.  
  283. <?php get_template_part('inc/parts/single/links'); ?>
  284.  
  285. <div class="sbox">
  286.  
  287. <?php links_social_single($post->ID); ?>
  288.  
  289. </div>
  290.  
  291. <?php get_template_part('inc/parts/single/relacionados'); ?>
  292.  
  293. <?php get_template_part('inc/parts/comments'); ?>
  294.  
  295. <?php // Eliminar reportes de error
  296.  
  297. if( $get_report =="ready") {
  298.  
  299. global $user_ID; if( $user_ID ) : if( current_user_can('level_10') ) :
  300.  
  301. delete_post_meta($post->ID, 'numreport');
  302.  
  303. endif; endif;
  304.  
  305. }
  306.  
  307. ?>
  308.  
  309. <?php endwhile; endif; ?>
  310.  
  311. <?php if( $dt_player != null ) doo_breadcrumb( get_the_ID(), 'movies', __d('Movies'), 'breadcrumb_bottom' ); ?>
  312.  
  313. </div>
  314.  
  315. <div class="sidebar scrolling <?php if( $dt_player ): if(get_cookie('dt_player_width') == 'full') { echo 'fullsidebar'; } endif; ?>">
  316.  
  317. <?php if($widgets = dynamic_sidebar('sidebar-movies')) { $widgets; } else { echo '<a href="'. esc_url( home_url() ) .'/wp-admin/widgets.php">'. __d('Add widgets') .'</a>'; } ?>
  318.  
  319. </div>
  320.  
  321. </div>
  322.  
  323. <?php if(current_user_can('administrator')) { if($dt_reports >= 1 ) { ?>
  324.  
  325. <div class="reports_notice_admin">
  326.  
  327. <span class="num"><?php echo $dt_reports; ?></span>
  328.  
  329. <span class="report"><?php _d('Reports'); ?></span>
  330.  
  331. <span><a data-id="<?php echo get_the_id(); ?>" class="delete_notice"><?php _d('Delete notice'); ?></a></span>
  332.  
  333. </div>
  334.  
  335. <?php } } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement