· 9 years ago · Jan 27, 2017, 09:32 PM
1<?php
2/**
3 * The Template for displaying all single posts.
4 *
5 * @package WordPress
6 * @subpackage Novavideo
7 * @since Novavideo 1.0
8 */
9
10get_header();
11function not_null($s){
12 if($s == "")
13 return false;
14 else if(!isset($s))
15 return false;
16 return true;
17}
18include_once( TEMPLATEPATH . '/_includes/mobile-detect.php' ); ?>
19<center><a href="http://onlinemovies.is/watch-now/" target="_blank"><img src="http://i.imgur.com/F0elFCK.png" width="728" style="display:block;width:100%;max-width:728px" border="0" ></a>
20</center>
21<h1 class="home border-radius-5 box-shadow"><a id="bookmark-this" href="#" title="Bookmark This Page"><b>♥ Add <?php the_title(); ?> on your browser (Bookmark) !</b></a></h1>
22 <script>
23jQuery(document).ready(function($) {
24 $('#bookmark-this').click(function(e) {
25 var bookmarkURL = window.location.href;
26 var bookmarkTitle = document.title;
27
28 if ('addToHomescreen' in window && window.addToHomescreen.isCompatible) {
29 // Mobile browsers
30 addToHomescreen({ autostart: false, startDelay: 0 }).show(true);
31 } else if (window.sidebar && window.sidebar.addPanel) {
32 // Firefox version < 23
33 window.sidebar.addPanel(bookmarkTitle, bookmarkURL, '');
34 } else if ((window.sidebar && /Firefox/i.test(navigator.userAgent)) || (window.opera && window.print)) {
35 // Firefox version >= 23 and Opera Hotlist
36 $(this).attr({
37 href: bookmarkURL,
38 title: bookmarkTitle,
39 rel: 'sidebar'
40 }).off(e);
41 return true;
42 } else if (window.external && ('AddFavorite' in window.external)) {
43 // IE Favorite
44 window.external.AddFavorite(bookmarkURL, bookmarkTitle);
45 } else {
46 // Other browsers (mainly WebKit - Chrome/Safari)
47 alert('Press ' + (/Mac/i.test(navigator.userAgent) ? 'Cmd' : 'Ctrl') + '+D to bookmark this page.');
48 }
49
50 return false;
51 });
52});</script>
53 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
54
55 <?php novavideo_setPostViews(get_the_ID()); $current_postID = $post->ID; ?>
56
57 <div id="video" itemscope itemtype="http://schema.org/Movie">
58
59 <h1 class="border-radius-top-5" itemprop="name"><span><?php the_title(); ?>
60 </span>
61 </h1>
62
63 <meta itemprop="image" content="<?php echo novavideo_get_post_image( 'full', true );?>" />
64
65 <!-- Video player -->
66 <div id="video-code" <?php if ( has_post_format( 'video' ) ) : ?>class="video-load"<?php endif; ?>>
67 <script type="text/javascript">
68 $(document).ready(function() {
69
70 //Default Action
71 $(".tab_content").hide(); //Hide all content
72 $("ul.tabs li:first").addClass("active").show(); //Activate first tab
73 $(".tab_content:first").show(); //Show first tab content
74
75 //On Click Event
76 $("ul.tabs li").click(function() {
77 $("ul.tabs li").removeClass("active"); //Remove any "active" class
78 $(this).addClass("active"); //Add "active" class to selected tab
79 $(".tab_content").hide(); //Hide all tab content
80 var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
81 $(activeTab).fadeIn(); //Fade in the active content
82 return false;
83 });
84 });
85 </script>
86 <!-- Hidden description -->
87 <?php if ( get_option( novavideo_get_theme_name() . '_hide_desc' ) == 'yes' && get_the_content() != '' && novavideo_get_video_rendering() ) : ?>
88 <div class="infobutton border-radius-top-right-5"></div>
89 <div class="infotext border-radius-top-5" itemprop="description"><?php the_content(); ?></div>
90 <?php endif; ?>
91
92
93 <style> .player-4k img:hover{opacity:0.9;cursor:pointer}
94 .player-4k img{width:100%;}</style>
95 <div class="video-embed">
96 <?php
97
98 $s4 = get_post_meta($post->ID, 'server_5', true);
99 $s3 = get_post_meta($post->ID, 'server_4', true);
100 $s2 = get_post_meta($post->ID, 'server_3', true);
101 $s1 = get_post_meta($post->ID, 'code', true);
102 $xx = 1;
103 if(not_null($s3)){
104 $plain_txt = base64_encode($s3);
105 $string = $plain_txt;
106 $encrypt_method = "AES-256-CBC";
107 $secret_key = 'This is my secret key';
108 $secret_iv = 'This is my secret iv';
109 // hash
110 $key = hash('sha256', $secret_key);
111 // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
112 $iv = substr(hash('sha256', $secret_iv), 0, 16);
113 $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
114 $output = base64_encode($output);
115 $encrypted_txt = $output;
116 $urlen = $encrypted_txt;
117
118 $drive = "//onlinemovietv.pro/player/wp-embed.php?url=".$urlen;
119 }
120 ?>
121 <ul class="tabs">
122 <?php if(not_null($s3)) { ?>
123 <li><a href="#drive"><?php echo $xx;?></a></li>
124 <?php $xx++; } if(not_null($s2)) {?>
125 <li><a href="#server2"><?php echo $xx;?></a></li>
126 <?php $xx++; } if(not_null($s1)) {?>
127 <li><a href="#server3"><?php echo $xx;?></a></li>
128 <?php $xx++; } ?>
129 <li><a href="#4khd">HD</a></li>
130 <?php if(not_null($s4)) {?>
131 <li><a href="#server4"><?php echo $xx;?></a></li>
132 <?php } ?>
133 </ul>
134 <div class="tab_container">
135 <?php if(not_null($s3)) { ?>
136 <div id="drive" class="tab_content">
137 <iframe src="<?php echo $drive;?>" scrolling="no" frameborder="0" width="700" height="430" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
138 </div>
139 <?php } if(not_null($s2)) {?>
140 <div id="server2" class="tab_content">
141 <?php echo $s2;?>
142 </div>
143 <?php $xx++; } if(not_null($s1)) {?>
144 <div id="server3" class="tab_content">
145 <?php echo $s1;?>
146 </div>
147 <?php } if(not_null($s4)) {?>
148 <div id="server4" class="tab_content">
149 <?php echo $s4;?>
150 </div>
151 <?php } ?>
152 <div id="4khd" class="tab_content player-4k">
153 <a href="onlinemovies.is/watch-now" target="_blank"> <img src="http://onlinemovies.is/wp-content/uploads/2016/05/player1.png"/> </a>
154 </div>
155
156 </div>
157
158 </div>
159
160
161
162 </div><!-- #video-code -->
163
164
165
166 <!-- Video advertising -->
167 <?php include_once( TEMPLATEPATH . '/_front/single/video-advertising.php' ); ?>
168
169 <!-- Video infos -->
170 <?php include_once( TEMPLATEPATH . '/_front/single/video-infos.php' ); ?>
171
172 <!-- Shadow DZ plus -->
173 <?php if ( get_option( novavideo_get_theme_name() . '_dzplus' ) == 'yes' ) : ?>
174 <img id="shadow_img" src="<?php echo get_bloginfo('template_url'); ?>/images/video-shadow.png" width="100%" />
175 <?php endif; ?>
176
177 </div><!-- #video -->
178
179 <!-- Content banner -->
180 <?php $content_banner = novavideo_get_banner( 'content' ); ?>
181 <?php if ( !empty( $content_banner ) ) : ?>
182 <div class="content-banner"><?php echo $content_banner ?></div>
183 <?php endif; ?>
184
185 <!-- Video content widget -->
186 <?php
187 if ( function_exists('dynamic_sidebar') && is_active_sidebar('video-content') )
188 dynamic_sidebar('Video Content');
189 ?>
190
191 <!-- Comments -->
192 <?php if ( get_option( novavideo_get_theme_name() . '_comments' ) == 'yes' ) : ?>
193
194 <div id="comments">
195
196 <div class="comments-template">
197 <?php comments_template( '', true ); ?>
198 </div>
199
200 </div><!-- #comments -->
201
202 <?php endif;?>
203
204 <?php endwhile; else: ?>
205 <?php _e('No video founded.', novavideo_get_theme_name()); ?>
206 <?php endif; ?>
207
208 <div class="clear"></div>
209
210
211 </div><!-- #content -->
212
213 <?php wp_reset_query(); ?>
214
215<?php get_sidebar(); ?>
216<?php get_footer(); ?>