· 7 years ago · Apr 12, 2018, 05:50 PM
1<?php
2$dt_player = get_post_meta($post->ID, 'repeatable_fields', true);
3$reports = get_post_meta($post->ID, 'numreport', true);
4$views = dt_get_meta('dt_views_count');
5$light = get_option('dt_player_luces','true');
6$report = get_option('dt_player_report','true');
7$ads = get_option('dt_player_ads','not');
8$qual = get_option('dt_player_quality','true');
9$viewsc = get_option('dt_player_views','true');
10$clic = get_option('dt_player_ads_hide_clic','true');
11$time = get_option('dt_player_ads_time','20');
12$ads_300 = get_option('dt_player_ads_300');
13$page = get_option('dt_jwplayer_page');
14$gdrivepage = get_option('dt_jwplayer_page_gdrive');
15// Player
16$ids = dt_get_meta('ids');
17if (preg_match('/tt/',$ids)) {
18$ids = dt_get_meta('ids');
19}else {
20$jsons_aka = file_get_contents('http://api.themoviedb.org/3/tv/'.$ids.'?api_key=05902896074695709d7763505bb88b4d&append_to_response=external_ids');
21$uncompressed = json_decode($jsons_aka);
22$ids= $uncompressed->external_ids->imdb_id;
23$temp = dt_get_meta('temporada');
24$epis = dt_get_meta('episodio');
25$ids = $ids.'-'.$temp.'-'.$epis;
26}
27?>
28<div id="playex" class="player_sist <?php if(get_cookie('dt_player_width') == 'full') { echo 'fullplayer'; } ?>">
29 <?php get_template_part('inc/parts/single/report-video'); ?>
30 <?php if ( $dt_player ) : ?>
31 <div class="playex">
32 <?php if ($ads =='true') : ?>
33 <div id="playerads" class="ads_player">
34 <div class="ads_box">
35 <div class="ads">
36 <?php if($ads_300) : echo '<div class="code">'. stripslashes($ads_300). '</div>'; endif; ?>
37 <?php if ($clic =='true'): ?><span class="notice"><?php _d('click on ad to close'); ?></span><?php endif; ?>
38 </div>
39 </div>
40 </div>
41 <?php endif; ?>
42 <?php $numerado = 1; { foreach ( $dt_player as $field ) { ?>
43 <?php if($field['select'] == 'iframe') { ?>
44 <div id="option-<?php echo $numerado; ?>" class="play-box-iframe fixidtab">
45 <!-- added -->
46<?php
47 $inboxf = $field['url'];
48 $plain_txt = base64_encode($inboxf);
49 $string = $plain_txt;
50 $encrypt_method = "AES-256-CBC";
51 $secret_key = 'akaplayer.com';
52 $secret_iv = 'Akaplayer.com';
53 // hash
54 $key = hash('sha256', $secret_key);
55 // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
56 $iv = substr(hash('sha256', $secret_iv), 0, 16);
57 $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
58 $output = base64_encode($output);
59 $encrypted_txt = $output;
60
61?>
62 <<?php echo 'iframe'; ?> class="metaframe rptss" src="//akaplayer.com/embeddooplay/embed.php?url=<?php echo $encrypted_txt; ?>" frameborder="0" scrolling="no" allowfullscreen></iframe>
63 </div>
64 <?php } if($field['select'] == 'mp4') { ?>
65 <div id="option-<?php echo $numerado; ?>" class="play-box-iframe fixidtab">
66 <<?php echo 'iframe'; ?> class="metaframe rptss" src="<?php echo $page .'?source='. base64_encode( $field['url'] ) . '&id='. $post->ID; ?>" frameborder="0" scrolling="no" allowfullscreen></iframe>
67 </div>
68 <?php } if($field['select'] == 'gdrive') { ?>
69 <div id="option-<?php echo $numerado; ?>" class="play-box-iframe fixidtab">
70 <<?php echo 'iframe'; ?> class="metaframe rptss" src="<?php echo $gdrivepage .'?gd='. $field['url'] . '&id='. $post->ID; ?>" frameborder="0" scrolling="no" allowfullscreen></iframe>
71 </div>
72 <?php } if($field['select'] == 'dtshcode') { ?>
73 <div id="option-<?php echo $numerado; ?>" class="play-box-shortcode fixidtab">
74 <?php echo do_shortcode($field['url']); ?>
75 </div>
76 <?php } $numerado++; } } ?>
77
78
79 <?php $numerado = $numerado + 1; { ?>
80
81 <div id="option-<?php echo $numerado; ?>" class="play-box-iframe fixidtab">
82 <iframe class="metaframe rptss" src="//akaplayer.com/player/<?php echo $ids; ?>" frameborder="0" scrolling="no" allowfullscreen></iframe>
83 </div>
84 <?php } ?>
85
86 </div>
87 <?php elseif ( !$dt_player ) : ?>
88 <div class="playex">
89 <?php if ($ads =='true') : ?>
90 <div id="playerads" class="ads_player">
91 <div class="ads_box">
92 <div class="ads">
93 <?php if($ads_300) : echo '<div class="code">'. stripslashes($ads_300). '</div>'; endif; ?>
94 <?php if ($clic =='true'): ?><span class="notice"><?php _d('click on ad to close'); ?></span><?php endif; ?>
95 </div>
96 </div>
97 </div>
98 <?php endif; ?>
99 <?php $numerado = 1; ?>
100 <div id="option-<?php echo $numerado; ?>" class="play-box-iframe fixidtab">
101 <iframe class="metaframe rptss" src="//akaplayer.com/player/<?php echo $ids; ?>" frameborder="0" scrolling="no" allowfullscreen></iframe>
102 </div>
103 </div>
104 <?php endif; ?>
105 <div class="control">
106 <nav class="player">
107 <ul class="options">
108 <li>
109 <a class="sources"><i class="icon-menu listsormenu"></i> <b><?php _d('Options'); ?></b></a>
110 <?php if ( $dt_player ) : ?>
111 <ul class="idTabs sourceslist">
112 <?php $numerado = 1; { foreach ( $dt_player as $field ) { ?>
113 <li><a class="options" href="#option-<?php echo $numerado; ?>">
114 <b class="icon-play_arrow"></b> <?php echo $field['name']; ?>
115 <?php if($field['idioma']) { ?><span class="dt_flag"><img src="<?php echo DOO_URI, '/assets/img/flags/',$field['idioma'],'.png'; ?>"></span><?php } ?>
116 </a></li>
117 <?php $numerado++; } } ?>
118 <?php $numerado = $numerado +1; { ?>
119 <li><a class="options" href="#option-<?php echo $numerado; ?>">
120 <b class="icon-play_arrow"></b> <?php echo 'Sever 1 VIP | akaPlayer.com1'; ?>
121 <span class="dt_flag"><img src="<?php echo DOO_URI, '/assets/img/flags/en.png'; ?>"></span>
122 </a></li>
123 <?php } ?>
124 </ul>
125 <?php elseif ( !$dt_player ) : ?>
126 <ul class="idTabs sourceslist">
127 <li><a class="options" href="#option-<?php echo $numerado; ?>">
128 <b class="icon-play_arrow"></b> <?php echo 'Sever 1 VIP | akaPlayer.com'; ?>
129 <span class="dt_flag"><img src="<?php echo DOO_URI, '/assets/img/flags/en.png'; ?>"></span>
130 </a></li>
131 </ul>
132 <?php endif; ?>
133 </li>
134 </ul>
135 </nav>
136 <?php if ($qual =='true') : if($quali = $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'dtquality'))) { ?>
137 <?php if($mostrar = $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'dtquality'))) { ?><span class="qualityx"><?php echo $mostrar; ?></span><?php } ?>
138 <?php } endif; ?>
139 <?php if ($viewsc =='true') : if($views) { echo '<span class="views"><strong>'. comvert_number($views) .'</strong> '. __d('Views') .'</span>'; } endif; ?>
140 <nav class="controles">
141 <ul class="list">
142 <?php if ($ads =='true') : ?><li id="count" class="contadorads"><?php _d('Ad'); ?> <i id="contador"><?php echo $time; ?></i></li><?php endif; ?>
143 <?php if ($light =='true') : ?><li><a class="lightSwitcher" href="javascript:void(0);"><i class="icon-wb_sunny"></i></a></li><?php endif; ?>
144 <?php if ($report =='true') : if($reports=='10') { /* none*/ } else { ?><li><a class="report-video"><i class="icon-notification"></i> <span><?php _d('report'); ?></span></a></li><?php } endif; ?>
145 <li><a class="wide <?php if(get_cookie('dt_player_width') == 'full') { echo 'recox'; } else { echo 'reco'; } ?>">
146 <i class="icons-enlarge2 <?php if(get_cookie('dt_player_width') == 'full') { echo 'icons-shrink2'; } ?>"></i>
147 </a></li>
148 </ul>
149 </nav>
150 </div>
151</div>
152<script type='text/javascript'>
153 jQuery(document).ready(function($){
154 $("#oscuridad").css("height", $(document).height()).hide();
155 $(".lightSwitcher").click(function(){
156 $("#oscuridad").toggle();
157 if ($("#oscuridad").is(":hidden"))
158 $(this).html("<i class='icon-wb_sunny'></i>").removeClass("turnedOff");
159 else
160 $(this).html("<i class='icon-wb_sunny'></i>").addClass("turnedOff");
161 });
162<?php if ($ads =='true') : ?>
163 var segundos = <?php echo $time; ?>;
164 function ads_time(){
165 var t = setTimeout( ads_time, 1000);
166 document.getElementById('contador').innerHTML = '' +segundos--+'';
167 if (segundos==0){
168 $('#playerads').fadeOut('slow');
169 $('#count').fadeOut('slow');
170 clearInterval(setTimeout);
171 }
172 }
173 ads_time();
174<?php endif; ?>
175<?php if ($clic =='true'): ?>
176 $(".code").click(function() {
177 $("#playerads").fadeOut("slow");
178 $("#count").fadeOut("slow");
179 });
180 $(".notice").click(function() {
181 $("#playerads").fadeOut("slow");
182 $("#count").fadeOut("slow");
183 });
184<?php endif; ?>
185 $(".options").click(function() {
186 $('.rptss').attr('src', function ( i, val ) { return val; });
187 });
188 });
189</script>
190
191
192<?php if(get_option('ads_ss_1') =="true") { if($ads = get_option('ads_spot_single')) { echo '<div class="module_single_ads">'. stripslashes($ads). '</div>'; } } ?>
193</div>
194<?php if($d = $dt_title_original) { ?>
195<div class="custom_fields">
196<b class="variante"><?php _d('Original title'); ?></b>
197<span class="valor"><?php echo $d; ?></span>
198</div>
199<?php } if($d = $dt_rating_imdb) { ?>
200<div class="custom_fields">
201 <b class="variante"><?php _d('IMDb Rating'); ?></b>
202 <span class="valor">
203 <b id="repimdb"><?php echo '<strong>', $d, '</strong> ', $dt_votes_imdb, ' ', __d('votes'); ?></b>
204 <?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 } ?>
205 </span>
206</div>
207<?php } if($d = $dt_rating_tmdb) { ?>
208<div class="custom_fields">
209<b class="variante"><?php _d('TMDb Rating'); ?></b>
210<span class="valor"><?php echo '<strong>', $d, '</strong> ', $dt_votes_tmdb, ' ', __d('votes'); ?></span>
211</div>
212<?php } ?>
213</div>
214<?php get_template_part('inc/parts/single/links'); ?>
215<div class="sbox">
216 <?php links_social_single($post->ID); ?>
217</div>
218<?php get_template_part('inc/parts/single/relacionados'); ?>
219<?php get_template_part('inc/parts/comments'); ?>
220<?php // Eliminar reportes de error
221if( $get_report =="ready") {
222 global $user_ID; if( $user_ID ) : if( current_user_can('level_10') ) :
223 delete_post_meta($post->ID, 'numreport');
224 endif; endif;
225}
226?>
227<?php endwhile; endif; ?>
228<?php doo_breadcrumb( get_the_ID(), 'movies', __d('Movies'), 'breadcrumb_bottom' ); ?>
229</div>
230<div class="sidebar scrolling <?php if(get_cookie('dt_player_width') == 'full') { echo 'fullsidebar'; } ?>">
231 <?php if($widgets = dynamic_sidebar('sidebar-movies')) { $widgets; } else { echo '<a href="'. esc_url( home_url() ) .'/wp-admin/widgets.php">'. __d('Add widgets') .'</a>'; } ?>
232</div>
233</div>
234<?php if(current_user_can('administrator')) { if($dt_reports >= 1 ) { ?>
235<div class="reports_notice_admin">
236 <span class="num"><?php echo $dt_reports; ?></span>
237 <span class="report"><?php _d('Reports'); ?></span>
238 <span><a data-id="<?php echo get_the_id(); ?>" class="delete_notice"><?php _d('Delete notice'); ?></a></span>
239</div>
240<?php } } ?>