HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/chaharrah.tv/root/wp-content/themes/chaharrah/single.php
<?php
$minimal_style = ($_GET['style'] ?? '')=='minimal';

if($minimal_style) { ?>
<!doctype html>
	<head>
		<link rel="stylesheet" type="text/css" href="https://chaharrah.tv/wp-content/themes/chaharrah/js/v/video-js.css">
		<link rel="stylesheet" type="text/css" href="https://chaharrah.tv/wp-content/themes/chaharrah/css/minimal-player.css">
		<meta charset="UTF-8">
	  <script>window.jQuery || document.write('<script src="<?php bloginfo('template_url'); ?>/js/jquery.min.js"><\/script>')</script>
		<?php wp_head(); ?>
	</head>
	<body class="minimal-player">
		<div id="player_pane">
			<?php if(!preg_match('/.*\.mpd$/', get_field('video_link'))) { ?>
				<video id="video_element" class="video-js vjs-default-skin vjs-fullscreen"
						controls preload="auto"
						poster="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php the_field('image_up'); ?>&w=952&h=536"
						data-setup='{"playbackRates": [0.5, 1, 1.5, 2, 4]}'>
					<?php if (get_field('video_link')) { ?>
						<source src="<?php print get_field('video_link'); ?>" type='video/mp4' >
					<?php } else { ?>
						<source src="<?php print get_field('audio_link'); ?>" type='audio/mp3' >
					<?php } ?>
					<?php if (get_field('subtitle_en')) { ?>
						<track src="<?php print get_field('subtitle_en'); ?>" kind="subtitles" srclang="en" label="English">
					<?php } ?>
					<?php if (get_field('subtitle_fa')) { ?>
						<track src="<?php print get_field('subtitle_fa'); ?>" kind="subtitles" srclang="fa" label="فارسی" default>
					<?php } ?>
					<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
				</video>
				</script>
			<?php } else { ?>
				<video id="video_element" class="video-js vjs-default-skin vjs-fullscreen"
						controls preload="false"
						poster="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php the_field('image_up'); ?>&w=952&h=536">
				</video>
				<script>
					$(function() {
						var player = videojs('video_element', {html5: {nativeCaptions: false}, playbackRates: [0.5, 1, 1.5, 2, 4]});
						player.src({src: '<?php print get_field('video_link'); ?>', type: 'application/data+xml'});
						player.play();
					})
				</script>
			<?php } ?>
		</div>

		<?php get_footer(); ?>
	</body>
</html>
<?php 
	exit();
}

get_header();

if (have_posts())
	while (have_posts()) {
		the_post();
?>

		<div id="main" role="main">
			<div class="content-container">
				<div id="player_pane">
					<?php if(!preg_match('/.*\.mpd$/', get_field('video_link'))) { ?>
						<video id="video_element" class="video-js vjs-default-skin vjs-fullscreen"
								controls preload="false"
								poster="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php the_field('image_up'); ?>&w=952&h=536"
								data-setup='{"playbackRates": [0.5, 1, 1.5, 2, 4]}'>
							<?php if (get_field('video_link')) { ?>
								<source src="<?php print get_field('video_link'); ?>" type='video/mp4' >
							<?php } else { ?>
								<source src="<?php print get_field('audio_link'); ?>" type='audio/mp3' >
							<?php } ?>
							<?php if (get_field('subtitle_en')) { ?>
								<track src="<?php print get_field('subtitle_en'); ?>" kind="subtitles" srclang="en" label="English">
							<?php } ?>
							<?php if (get_field('subtitle_fa')) { ?>
								<track src="<?php print get_field('subtitle_fa'); ?>" kind="subtitles" srclang="fa" label="فارسی" default>
							<?php } ?>
							<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
						</video>
					<?php } else { ?>
						<video id="video_element" class="video-js vjs-default-skin vjs-fullscreen"
								controls preload="false"
								poster="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php the_field('image_up'); ?>&w=952&h=536">
						</video>

						<script>
							$(function() {
								var player = videojs('video_element', {html5: {nativeCaptions: false}, playbackRates: [0.5, 1, 1.5, 2, 4]});
								console.log('plaer', player);
								player.src({src: '<?php print get_field('video_link'); ?>', type: 'application/data+xml'});
								player.play();
							})
						</script>
					<?php } ?>
				</div>
				<!-- END SLIDE -->

				<div class="page-content">
					<div class="content">
						<ul class="content-dl">
							<?php
							$video_link = get_field('video_link');
							$suben_link = get_field('subtitle_en');
							$subfa_link = get_field('subtitle_fa');
							$lowres_link = get_field('lowres_link');
							$audio_link = get_field('audio_link');
							?>

							<li class="social">
								<div class="addthis_inline_share_toolbox"></div>
							</li>

							<?php if(function_exists('the_views')) { ?>
								<li class="pp">
									<a><?php  the_views(); ?></a>
								</li>
							<?php } ?>

							<li class="downloads">
								<?php if (!empty($video_link)) {?>
									<div class="item"><a target="_blank" href="<?php print $video_link; ?>"><i class="fas fa-video"></i> &nbsp; <span>دریافت ویدئو اصلی</span></a></div>
								<?php } ?>
								<?php if (!empty($suben_link)) {?>
									<div class="item"><a target="_blank" href="<?php print $suben_link; ?>"><i class="fas fa-video"></i> &nbsp; <span>زیرنویس انگلیسی</span></a></div>
								<?php } ?>
								<?php if (!empty($subfa_link)) {?>
									<div class="item"><a target="_blank" href="<?php print $subfa_link; ?>"><i class="fas fa-video"></i> &nbsp; <span>زیرنویس فارسی</span></a></div>
								<?php } ?>
								<?php if (!empty($lowres_link)) {?>
									<div class="item"><a target="_blank" href="<?php print $lowres_link; ?>"><i class="fas fa-video"></i> &nbsp; <span>دریافت ویدئو کم حجم</span></a></div>
								<?php } ?>
								<?php if (!empty($audio_link)) {?>
									<div class="item"><a target="_blank" href="<?php print $audio_link; ?>"><i class="fas fa-volume-up"></i> &nbsp; <span>دریافت فایل صوتی</span></a></div>
								<?php } ?>
								<?php if (pa_in_taxonomy('mohtava', 'pdf')) {?>
									<div class="item"><a target="_blank" href="<?php print the_field('asset_up'); ?>"><i class="fas fa-file-pdf"></i> &nbsp; <span>دریافت فایل PDF</span></a></div>
								<?php } ?>
								<?php if (pa_in_taxonomy('mohtava', 'powerpint')) {?>
									<div class="item"><a target="_blank" href="<?php print the_field('asset_up'); ?>"><i class="fas fa-chart-pie"></i> &nbsp; <span>دریافت فایل Power Point</span></a></div>
								<?php } ?>
							</li>
						</ul>

						<h1 class="page-title"><?php the_title(); ?></h1>
						<div class="portfolio-single">
							<!-- START AnythingSlider -->
							<div class="rightboxsingle">
								<?php the_content(); ?>
								<div class="clearfix"></div>
								<?php
									echo get_the_tag_list('<div class="portfolio-tags"><strong>برچسب‌ها</strong> : ',' ،','</div>');
								?>
								<!-- close .portfolio-tags --><!-- close .social-networking-portfolio -->

								<div class="clearfix"></div>
								<!-- #comments -->
							</div>

							<div class="leftboxsingle">
								<!-- <div class="socials">
									<h3>ما را در شبکه‌های اجتماعی دنبال کنید:</h3>
									<div class="networks">
										<a target="_blank" href="https://www.facebook.com/Chaharrah.tv"><img src="/wp-content/themes/chaharrah/images/social-icons/facebook-content.png"><span class="desc">فیس‌بوک</span></a>
										<a target="_blank" href="https://telegram.me/chaharrahtv"><img src="/wp-content/themes/chaharrah/images/social-icons/telegram-content.png"><span class="desc">تلگرام</span></a>
									</div>
								</div> -->
								
                <div class="boxin search">
									<div class="content-container search-page-form">
									  <form action="/" method="GET">
									    <input type="text" name="s" placeholder="عبارت مورد جستجو ...">
									    <button type="submit"><i class="fa fa-search"></i> &nbsp; جستجو</button>
									  </form>
									</div>
								</div>
								
								<?php
									$lecturers = wp_get_post_terms($post->ID,'lecturer');
									foreach ($lecturers as $lecturer) {
								?>
										<div class="boxin">
											<a href="<?php print get_term_link($lecturer->slug, 'lecturer'); ?>">
												<img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_field('logo_up', "lecturer_".$lecturer->term_id); ?>&w=100&h=75" width="100" height="75">
												<h3><?php echo $lecturer->name; ?> </h3>
											</a>
											<div class="tax-desc-body"><p><?php echo str_replace("\n", "</p><p>", $lecturer->description); ?></p></div>
											<?php $link = get_field('url_web', "lecturer_".$lecturer->term_id);
											if ($link) { ?><p><a href="http://<?php print $link; ?>" target="_blank">پیوند به وبگاه</a></p><?php } ?>
											<div class="clearfix"></div>
										</div>

								<?php
									}

									$organizers = wp_get_post_terms($post->ID,'organizer');
									// if (count($organizer)>0) {
									// 	$organizer = $organizer[0];
									foreach ($organizers as $organizer) {
								?>
										<div class="boxin">
											<a href="<?php print get_term_link($organizer->slug, 'organizer'); ?>">
												<img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_field('logo_up', "organizer_".$organizer->term_id); ?>&w=100&h=75" width="100" height="75">
												<h3><?php echo $organizer->name; ?> </h3>
											</a>
											<div class="tax-desc-body"><p><?php echo str_replace("\n", "</p><p>", $organizer->description); ?></p></div>
											<?php $link = get_field('url_web', "organizer_".$organizer->term_id);
											if ($link) { ?><p><a href="http://<?php print $link; ?>" target="_blank">پیوند به وبگاه</a></p><?php } ?>
											<div class="clearfix"></div>
										</div>
								<?php 
									}

									$eventss = wp_get_post_terms($post->ID,'events');
									if (count($eventss)>0) {
										$event = $eventss[0];
								?>
										<div class="boxin">
											<a href="<?php print get_term_link($event->slug, 'events'); ?>">
												<img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_field('logo_up', "events_".$event->term_id); ?>&w=100&h=75" width="100" height="75">
												<h3><?php echo $event->name; ?> </h3>
											</a>
											<div class="tax-desc-body"><p><?php echo str_replace("\n", "</p><p>", $event->description); ?></p></div>
											<?php $link = get_field('url_web', "events_".$event->term_id);
											if ($link) { ?><p><a href="https://<?php print $link; ?>" target="_blank">پیوند به وبگاه</a></p><?php } ?>
											<div class="clearfix"></div>
										</div>
								<?php } ?>
								<div class="clear"></div>
							</div>

							<?php comments_template(); ?>
						</div>
						<!-- close .portfolio-single -->
					</div>
					<!-- close .page-content -->

					<div class="clearfix"></div>
				</div>
			</div>
			<!-- close .content-container -->

			<div class="content-container-base-pagination">
				<div class="left-pagination"></div>
				<div class="right-pagination"></div>
				<div class="center-pagination"></div>
				<div class="clearfix"></div>
			</div>
			<!-- close .content-container-base or .content-container-base-pagination -->
		</div>
		<!-- close #main -->

<?php
	}
	get_footer();
?>