<?php
 

global $wpdb, $post, $wp_query, $opt_themes; 
function mask_link( $string, $action = 'e' ){
$secret_key						= THEMES_NAMES;
$secret_iv						= EXTHEMES_AUTHOR;
$output							= false;
$encrypt_method					= "AES-256-CBC";
$key							= hash( 'sha256', $secret_key );
$iv								= substr( hash( 'sha256', $secret_iv ), 0, 16 );
if( $action == 'e' ){
	$output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );
} else if( $action == 'd' ){
	$output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );
}
return $output;
}

$down_pages_on					= $opt_themes['activate_download_pages'];
$svg_download					= $opt_themes['svg_icon_downloadx'];
$rtl_on							= $opt_themes['ex_themes_activate_rtl_']; 


$linkX						= get_bloginfo('url'); $parse = parse_url($linkX); $watermark1 = $parse['host'];

$url1						= get_post_meta( $post->ID, 'wp_downloadlink', true ) ;
$postid						= $wp_query->post->ID;
$dt_player					= get_post_meta($postid, 'repeatable_fields', true);
$updates					= get_post_meta( $post->ID, 'wp_updates_GP', true );
$updatesX1					= get_post_meta( $post->ID, 'wp_updates_GP', true );
$updatesX					= '-';
if( $updates === FALSE or $updates == '' ) $updates = $updatesX;
$sizes						= get_post_meta( $post->ID, 'wp_sizes', true ); 
$sizesX						= ' ';
if( $sizes === FALSE or $sizes == '' ) $sizes = $sizesX; 
$i							= 0;
$downloadlink				= get_post_meta(get_the_ID(), 'repeatable_fields', true);
$download2					= get_post_meta(get_the_ID(), 'wp_downloadlink', true);
$download3					= get_post_meta(get_the_ID(), 'wp_downloadlink2', true);
$downloadapkxapkpremier		= get_post_meta(get_the_ID(), 'wp_downloadapkxapkpremier', true);
$namedownload2				= get_post_meta(get_the_ID(), 'wp_namedownloadlink', true);
$namedownload3				= get_post_meta(get_the_ID(), 'wp_namedownloadlink2', true);
$size3						= get_post_meta(get_the_ID(), 'wp_sizedownloadlink2', true);
$tipe3						= get_post_meta(get_the_ID(), 'wp_typedownloadlink2', true);
$tipedownload3				= get_post_meta(get_the_ID(), 'wp_typedownloadlink2', true);
$download3x1				= get_post_meta(get_the_ID(), 'wp_downloadlink2', true);
$playstorelinkurl			= get_post_meta(get_the_ID(), 'wp_GP_ID', true);
$playstorelink				= 'https://play.google.com/store/apps/details?id='.$playstorelinkurl;
$mask_linkGP				= mask_link($playstorelink);
$unmask_link				= mask_link($playstorelink, 'd');
$version					= get_post_meta( $post->ID, 'wp_version', true ); 
$versionX1					= get_post_meta( $post->ID, 'wp_version_GP', true );
if ( $version === FALSE or $version == '' ) $version = $versionX1;
$sizes						= get_post_meta( $post->ID, 'wp_sizes', true );
$sizesX1					= get_post_meta( $post->ID, 'wp_sizes', true );
$sizesX						= '-';
if ( $sizes === FALSE or $sizes == '' ) $sizes = $sizesX;	
$link_playstore_on			= $opt_themes['activate_download_original_playstore'];
$downloadlink_gma				= get_post_meta( $post->ID, 'downloadlink_gma', true );
$downloadlink_gma_1				= get_post_meta( $post->ID, 'downloadlink_gma_1', true );
$downloadlink_gma_2				= get_post_meta( $post->ID, 'downloadlink_gma_2', true );
$downloadlink_gma_3				= get_post_meta( $post->ID, 'downloadlink_gma_3', true );
$downloadlink_gma_4				= get_post_meta( $post->ID, 'downloadlink_gma_4', true );
$downloadlink_gma_5				= get_post_meta( $post->ID, 'downloadlink_gma_5', true );
	
$namedownloadlink_gma			= get_post_meta( $post->ID, 'name_downloadlinks_gma', true );
$namedownloadlink_gma_1 		= get_post_meta( $post->ID, 'name_downloadlinks_gma_1', true );
$namedownloadlink_gma_2			= get_post_meta( $post->ID, 'name_downloadlinks_gma_2', true );
$namedownloadlink_gma_3 		= get_post_meta( $post->ID, 'name_downloadlinks_gma_3', true );
$namedownloadlink_gma_4			= get_post_meta( $post->ID, 'name_downloadlinks_gma_4', true );
$namedownloadlink_gma_5			= get_post_meta( $post->ID, 'name_downloadlinks_gma_5', true );
	
$sizedownloadlink_gma			= get_post_meta( $post->ID, 'size_downloadlinks_gma', true );
$sizedownloadlink_gma_1			= get_post_meta( $post->ID, 'size_downloadlinks_gma_1', true );
$sizedownloadlink_gma_2			= get_post_meta( $post->ID, 'size_downloadlinks_gma_2', true );
$sizedownloadlink_gma_3			= get_post_meta( $post->ID, 'size_downloadlinks_gma_3', true );
$sizedownloadlink_gma_4			= get_post_meta( $post->ID, 'size_downloadlinks_gma_4', true );
$sizedownloadlink_gma_5			= get_post_meta( $post->ID, 'size_downloadlinks_gma_5', true ); 


$image_id						= get_post_thumbnail_id(); 
$full							= 'full';
$icons							= '64';
$image_url						= wp_get_attachment_image_src($image_id, $full, true); 
$image_url_default				= $image_url[0];
$thumbnail_images				= $image_url;
$post_id						= get_the_ID();
$url							= wp_get_attachment_url( get_post_thumbnail_id($post->ID), '64' );
$defaults_no_images				= $opt_themes['ex_themes_defaults_no_images_']['url'];
$thumb_id						= get_post_thumbnail_id( $post->ID );
if ( '' != $thumb_id ) {
$thumb_url						= wp_get_attachment_image_src( $thumb_id, '64', true );
$image							= $thumb_url[0];
	} else {
$image							= $defaults_no_images;
	}
$urlimages2						= $image;
/* $img = file_get_contents(''.$urlimages2.'');
$images = base64_encode($img); */
$thumbnails_gp					= get_post_meta( $post->ID, 'wp_poster_GP', true );
$thumbnails						= str_replace( 'http://', '', $thumbnails_gp );
$thumbnails						= str_replace( 'https://', '', $thumbnails_gp );
$randoms						= mt_rand(0, 3);
$cdn_thumbnails					= '//i'.$randoms.'.wp.com/'.$thumbnails.'=w180-h180-p';
$thumbnails						= get_post_meta( $post->ID, 'wp_poster_GP', true );
 
$linkX							= get_bloginfo('url'); $parse = parse_url($linkX); $watermark1 = $parse['host'];
$url1							= get_post_meta( $post->ID, 'wp_downloadlink', true ) ;
$postid							= $wp_query->post->ID;
$dt_player						= get_post_meta($postid, 'repeatable_fields', true);
$updates						= get_post_meta( $post->ID, 'wp_updates_GP', true );
$updatesX1						= get_post_meta( $post->ID, 'wp_updates_GP', true );
$updatesX						= '-';
if( $updates === FALSE or $updates == '' ) $updates = $updatesX;
$sizes							= get_post_meta( $post->ID, 'wp_sizes', true ); 
$sizesX							= ' ';
if( $sizes === FALSE or $sizes == '' ) $sizes = $sizesX; 
$i								= 0;
$downloadlink					= get_post_meta(get_the_ID(), 'repeatable_fields', true);
$download3						= get_post_meta(get_the_ID(), 'wp_downloadlink2', true);
$download2						= get_post_meta(get_the_ID(), 'wp_downloadlink', true);
$downloadapkxapkpremier			= get_post_meta(get_the_ID(), 'wp_downloadapkxapkpremier', true);
$downloadapkxapkg 				= get_post_meta( $post->ID, 'wp_downloadapkxapkg', true );
if ( $downloadapkxapkpremier === FALSE or $downloadapkxapkpremier == '' ) $downloadapkxapkpremier = $downloadapkxapkg;
$namedownload2					= get_post_meta(get_the_ID(), 'wp_namedownloadlink', true);
$namedownload3					= get_post_meta(get_the_ID(), 'wp_namedownloadlink2', true);
$size3							= get_post_meta(get_the_ID(), 'wp_sizedownloadlink2', true);
$tipe3							= get_post_meta(get_the_ID(), 'wp_tipedownloadlink2', true);
$download3x1					= get_post_meta(get_the_ID(), 'wp_downloadlink2', true);
$playstorelinkurl				= get_post_meta(get_the_ID(), 'wp_GP_ID', true);
$playstorelink					= 'https://play.google.com/store/apps/details?id='.$playstorelinkurl;
$mask_linkGP					= mask_link($playstorelink);
$unmask_link					= mask_link($playstorelink, 'd');
$version						= get_post_meta( $post->ID, 'wp_version_GP', true );
$versionX						= '...';
if ( $version === FALSE or $version == '' ) $version = $versionX;
$timers_counts					= $opt_themes['download_waits_timers_'];
$user_info						= get_userdata(1);
$username						= $user_info->user_login;
$first_name						= $user_info->first_name;
$last_name						= $user_info->last_name;
$display_name					= $user_info->display_name;
$sidebar_on						= $opt_themes['sidebar_activated_']; 
$background_on					= $opt_themes['ex_themes_backgrounds_activate_'];
$thumbnails_gp_small_slider		= get_post_meta( $post->ID, 'wp_poster_GP', true ); 
$thumbnails						= str_replace( 'http://', '', $thumbnails_gp_small_slider );
$thumbnails						= str_replace( 'https://', '', $thumbnails_gp_small_slider );
$randoms						= mt_rand(0, 3);
$thumbnails_on					= $opt_themes['aktif_thumbnails'];
$rtl_on							= $opt_themes['ex_themes_activate_rtl_'];
$rtl_homes						= $opt_themes['rtl_homes'];
$cdn_on							= $opt_themes['ex_themes_cdn_photon_activate_'];
$title_on						= $opt_themes['ex_themes_title_appname']; 
$svg_icon						= $opt_themes['svg_icon_downloadx'];
$text_download					= $opt_themes['exthemes_Download'];
$gp_id_on						= get_post_meta( $post->ID, 'wp_GP_ID', true );
$title_ps						= get_post_meta( $post->ID, 'wp_title_GP', true );
$version_ps						= get_post_meta( $post->ID, 'wp_version_GP', true );
$mod_ps							= get_post_meta( $post->ID, 'wp_mods', true ); 
$whatnews_ps					= get_post_meta( $post->ID, 'wp_whatnews_GP', true );
$title_whatnews					= $opt_themes['exthemes_Whats_NewAPK'];
$download_notices_on			= $opt_themes['activate_download_notices'];
$notice_6						= $opt_themes['exthemes_download_times_notice_6'];
$notice_7						= $opt_themes['exthemes_download_times_notice_7'];
$notice_downloads				= $opt_themes['notice_download_pages'];
$random							= mt_rand(1, 3); 
$full							= 'thumbnails-post-bg'; 
$thumbnails_bg 					= wp_get_attachment_image_src(get_post_meta( $post->ID, 'background_images', true),$full);
$thumbnails_bg_alt				= get_post_meta( $post->ID, 'wp_backgrounds_GP', true ); 
$thumbnails_bg_alts				= get_post_meta( $post->ID, 'wp_images_GP', true )[$random];	
$thumbnails_gp_small_slider		= get_post_meta( $post->ID, 'wp_poster_GP', true ); 
$thumbnails						= str_replace( 'http://', '', $thumbnails_gp_small_slider );
$thumbnails						= str_replace( 'https://', '', $thumbnails_gp_small_slider );
$randoms						= mt_rand(0, 3);
$cdn_thumbnails_gp_small_slider = '//i'.$randoms.'.wp.com/'.$thumbnails.'=s30';
$link_playstore_on				= $opt_themes['activate_download_original_playstore'];
$thumbs_on						= $opt_themes['aktif_thumbnails']; 
$cdn_on							= $opt_themes['ex_themes_cdn_photon_activate_']; 
$rtl_on							= $opt_themes['ex_themes_activate_rtl_']; 
$ratings_on						= $opt_themes['ex_themes_activate_ratings_']; 
$text_mods						= $opt_themes['exthemes_MODAPK']; 
$rated_gps						= get_post_meta( $post->ID, 'wp_rated_GP', true );
$mod_gps						= get_post_meta( $post->ID, 'wp_mods', true );
$mod_gps_alt					= 'Original APK';
$svg_mods_on					= $opt_themes['svg_icon_modx'];  
$appname_on						= $opt_themes['ex_themes_title_appname']; 
$downloadlink_gma				= get_post_meta( $post->ID, 'downloadlink_gma', true );
$downloadlink_gma_1				= get_post_meta( $post->ID, 'downloadlink_gma_1', true );
$downloadlink_gma_2				= get_post_meta( $post->ID, 'downloadlink_gma_2', true );
$downloadlink_gma_3				= get_post_meta( $post->ID, 'downloadlink_gma_3', true );
$downloadlink_gma_4				= get_post_meta( $post->ID, 'downloadlink_gma_4', true );
$downloadlink_gma_5				= get_post_meta( $post->ID, 'downloadlink_gma_5', true );
	
$namedownloadlink_gma			= get_post_meta( $post->ID, 'name_downloadlinks_gma', true );
$namedownloadlink_gma_1 		= get_post_meta( $post->ID, 'name_downloadlinks_gma_1', true );
$namedownloadlink_gma_2			= get_post_meta( $post->ID, 'name_downloadlinks_gma_2', true );
$namedownloadlink_gma_3 		= get_post_meta( $post->ID, 'name_downloadlinks_gma_3', true );
$namedownloadlink_gma_4			= get_post_meta( $post->ID, 'name_downloadlinks_gma_4', true );
$namedownloadlink_gma_5			= get_post_meta( $post->ID, 'name_downloadlinks_gma_5', true );
	
$sizedownloadlink_gma			= get_post_meta( $post->ID, 'size_downloadlinks_gma', true );
$sizedownloadlink_gma_1			= get_post_meta( $post->ID, 'size_downloadlinks_gma_1', true );
$sizedownloadlink_gma_2			= get_post_meta( $post->ID, 'size_downloadlinks_gma_2', true );
$sizedownloadlink_gma_3			= get_post_meta( $post->ID, 'size_downloadlinks_gma_3', true );
$sizedownloadlink_gma_4			= get_post_meta( $post->ID, 'size_downloadlinks_gma_4', true );
$sizedownloadlink_gma_5			= get_post_meta( $post->ID, 'size_downloadlinks_gma_5', true ); 
$text_latest_update		= $opt_themes['text_latest_update'];
$text_post_on			= $opt_themes['text_post_on'];
$text_edit_post			= $opt_themes['text_edit_post'];
$x_time					= get_the_time('c');
$u_time					= get_the_time('U');
$x_modified_time 		= get_the_modified_time('c');
$u_modified_time 		= get_the_modified_time('U');
$poster_ids						= get_post_thumbnail_id($post->ID); 
 
$full							= 'thumbnails-post-old'; 
 
$poster_urls					= wp_get_attachment_image_src($poster_ids, $full, true); 
$poster_imgs					= $poster_urls[0];
 
$background_on					= $opt_themes['ex_themes_backgrounds_activate_'];
$ukuran							= '=w1400';
$random							= mt_rand(0, 2); 
$full							= 'thumbnails-post-bg'; 
$thumbnails_bg 					= wp_get_attachment_image_src(get_post_meta( $post->ID, 'background_images', true),$full);


$appname_on						= $opt_themes['ex_themes_title_appname'];  
$title							= get_post_meta( $post->ID, 'wp_title_GP', true );
$title_alt						= get_the_title();

?>

	 <!-- moddroid -->
				<div id="accordion" class="accordion-container mb-2 ">
				 
				<?php if($downloadlink) { ?> 
				<?php if($downloadlink){
				$i 					= 1;
				foreach($downloadlink as $k => $dw){
				$mask_link			= mask_link($dw['url']);
				$unmask_link		= mask_link($dw['url'], 'd');
				?> 
				<!-- downloadlink <?php echo $i; ?> -->
				  <h4 class="accordion-title js-accordion-title h6 rounded text-white bg-primary py-2 px-3 "> <?php if($dw['name']){ ?><?php echo $dw['name']; ?><?php } else{ ?> <?php if($text_download){ ?><?php echo $text_download; ?><?php } ?> <?php } ?></h4>
				  <div class="accordion-content p-3 ">
					<?php if($dw['notes']){?>
						<div class="small bg-light p-2 mb-3"><?php echo $dw['notes']; ?></div>
					<?php } ?>
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo (!empty($mask_link)) ? $mask_link : ''; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo (!empty($dw['url'])) ? $dw['url'] : ''; ?><?php } ?><?php if($dw['sizes1']){ ?>&sizes=<?php echo $dw['sizes1']; ?><?php } ?><?php if($dw['name']){ ?>&names=<?php echo $dw['name']; ?><?php } ?>" target="_blank" rel="nofollow" ><?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?><span class="align-middle"><?php if($text_download){ ?><?php echo $text_download; ?><?php } ?> <?php if($dw['tipes']){ ?> <?php echo $dw['tipes']; ?><?php } else{ ?>  <?php } ?> <?php if($dw['sizes1']){ ?>  ( <?php echo $dw['sizes1']; ?> ) <?php } else{ ?> (<?php echo $sizes; ?>) <?php } ?></span>
					</a>   
				  </div>
				   
				<?php $i++; } }  ?>
				   
				<?php } elseif ($download3) { ?>
				<?php 
				$i				= 0;
				if(count($download3)>0){
				foreach($download3 as $elemento){
				$download31		= $download3[$i];
				$download32		= $download3[$i];
				$mask_link		= mask_link($download3[$i]);
				$unmask_link	= mask_link($download3[$i], 'd');
				?>
				<!-- download3 -->
				  <h4 class="accordion-title js-accordion-title h6 rounded text-white bg-primary py-2 px-3 tabs-<?php echo $i; ?>"> 
				  <?php if($namedownload3[$i]){ ?><?php echo (!empty($namedownload3[$i])) ? $namedownload3[$i] : ''; ?> <?php } else{ ?> <?php } ?>
				  </h4>
				  <div class="accordion-content p-3 ">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo (!empty($mask_link)) ? $mask_link : ''; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo (!empty($download31)) ? $download31 : ''; ?><?php } ?><?php if($namedownload3[$i]){ ?>&names=<?php echo $namedownload3[$i]; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download){ ?><?php echo $text_download; ?><?php } ?> <?php if($namedownload3[$i]){ ?><?php echo (!empty($namedownload3[$i])) ? $namedownload3[$i] : ''; ?> <?php } else{ ?> <?php } ?> <?php echo (!empty($tipe3[$i])) ? $tipe3[$i] : ''; ?>
					</span>
					</a>   
				  </div>
				<!-- end download3 -->
				<?php $i++; } ?>
				<?php } ?> 
				<?php } elseif ($download2) { ?>
				<?php
				$download2			= get_post_meta(get_the_ID(), 'wp_downloadlink', true);
				$mask_link			= mask_link($download2);
				$unmask_link		= mask_link($download2, 'd');
				?>
				<!-- download2 -->
				  <h4 class="accordion-title js-accordion-title h6 rounded text-white bg-primary py-2 px-3 tabs-<?php echo $i; ?>"> 
				  <?php echo (!empty($namedownload2)) ? $namedownload2 : ' '; ?>
				  </h4>
				  <div class="accordion-content p-3 ">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo (!empty($mask_link)) ? $mask_link : ''; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo (!empty($download2)) ? $download2 : ''; ?><?php } ?><?php if($namedownload2){ ?>&names=<?php echo $namedownload2; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if(get_post_meta( $post->ID, 'wp_sizes', true )){ ?>  (<?php echo $sizes; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div>
				<!-- end download2 -->
				<?php } elseif ($downloadlink_gma) { ?>
				<?php if ($downloadlink_gma) { 
				$mask_link			= mask_link($downloadlink_gma);
				$unmask_link		= mask_link($downloadlink_gma, 'd');
				?>
				<!-- link 1 -->  
				  <h4 class="accordion-title js-accordion-title tabs-<?php echo $i; ?>"> 
				  <?php echo $namedownloadlink_gma; ?>
				  </h4>
				  <div class="accordion-content p-3 border rounded mb-3">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $downloadlink_gma; ?><?php } ?><?php if($namedownloadlink_gma){ ?>&names=<?php echo $namedownloadlink_gma; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($sizedownloadlink_gma){ ?> (<?php echo $sizedownloadlink_gma; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div>      
				<!-- end link 1 -->
				<?php if($downloadlink_gma_1) { 
				$mask_link			= mask_link($downloadlink_gma_1);
				$unmask_link		= mask_link($downloadlink_gma_1, 'd');
				?> 
				 
				<!-- link 2 -->   
				  <h4 class="accordion-title js-accordion-title tabs-<?php echo $i; ?>"> 
				  <?php echo $namedownloadlink_gma_1; ?>
				  </h4>
				  <div class="accordion-content p-3 border rounded mb-3">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $downloadlink_gma_1; ?><?php } ?><?php if($namedownloadlink_gma_1){ ?>&names=<?php echo $namedownloadlink_gma_1; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($sizedownloadlink_gma_1){ ?> (<?php echo $sizedownloadlink_gma_1; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div>   

				<!-- end link 2 -->
				<?php } if($downloadlink_gma_2) { 
				$mask_link			= mask_link($downloadlink_gma_2);
				$unmask_link		= mask_link($downloadlink_gma_2, 'd');
				?>
				<!-- link 3 -->  
				  <h4 class="accordion-title js-accordion-title tabs-<?php echo $i; ?>"> 
				  <?php echo $namedownloadlink_gma_2; ?>
				  </h4>
				  <div class="accordion-content p-3 border rounded mb-3">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $downloadlink_gma_2; ?><?php } ?><?php if($namedownloadlink_gma_2){ ?>&names=<?php echo $namedownloadlink_gma_2; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($sizedownloadlink_gma_2){ ?> (<?php echo $sizedownloadlink_gma_2; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div> 
				<!-- end link 3 -->
				<?php } if($downloadlink_gma_3) { 
				$mask_link			= mask_link($downloadlink_gma_3);
				$unmask_link		= mask_link($downloadlink_gma_3, 'd');
				?>
				<!-- link 4 --> 
				  <h4 class="accordion-title js-accordion-title tabs-<?php echo $i; ?>"> 
				  <?php echo $namedownloadlink_gma_3; ?>
				  </h4>
				  <div class="accordion-content p-3 border rounded mb-3">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $downloadlink_gma_3; ?><?php } ?><?php if($namedownloadlink_gma_3){ ?>&names=<?php echo $namedownloadlink_gma_3; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($sizedownloadlink_gma_3){ ?> (<?php echo $sizedownloadlink_gma_3; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div>  
				<!-- end link 4 -->
				<?php } if($downloadlink_gma_4) { 
				$mask_link			= mask_link($downloadlink_gma_4);
				$unmask_link		= mask_link($downloadlink_gma_4, 'd');
				?>
				<!-- link 5 -->
				  <h4 class="accordion-title js-accordion-title tabs-<?php echo $i; ?>"> 
				  <?php echo $namedownloadlink_gma_4; ?>
				  </h4>
				  <div class="accordion-content p-3 border rounded mb-3">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $downloadlink_gma_4; ?><?php } ?><?php if($namedownloadlink_gma_4){ ?>&names=<?php echo $namedownloadlink_gma_4; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($sizedownloadlink_gma_4){ ?> (<?php echo $sizedownloadlink_gma_4; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div> 
				<!-- end link 5 -->
				<?php } if($downloadlink_gma_5) { 
				$mask_link			= mask_link($downloadlink_gma_5);
				$unmask_link		= mask_link($downloadlink_gma_5, 'd');
				?>
				<!-- link 6 -->
				  <h4 class="accordion-title js-accordion-title tabs-<?php echo $i; ?>"> 
				  <?php echo $namedownloadlink_gma_5; ?>
				  </h4>
				  <div class="accordion-content p-3 border rounded mb-3">
					<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $downloadlink_gma_5; ?><?php } ?><?php if($namedownloadlink_gma_5){ ?>&names=<?php echo $namedownloadlink_gma_5; ?><?php } ?>" target="_blank" rel="nofollow" >
					<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
					
					<span class="align-middle">
					<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($sizedownloadlink_gma_5){ ?> (<?php echo $sizedownloadlink_gma_5; ?>) <?php } else{ ?> <?php } ?>
					</span>
					</a>   
				  </div>
				<!-- end link 6 -->
				<?php } ?>				
				<?php } ?>
				
				<?php } elseif (get_post_meta( $post->ID, 'link_apk_dw', true )) { 
				$link_download			= get_post_meta( $post->ID, 'link_apk_dw', true );
				$name_download			= get_post_meta( $post->ID, 'name_download', true );
				$size_download			= get_post_meta( $post->ID, 'size_download', true );
				
				$n = 0; 
				if ($link_download) {
				foreach ( (array) $link_download as $key => $dw ) { 
				$dw_link	= $link_download[$n];
				$dw_name	= $name_download[$n];
				$dw_size	= $size_download[$n];
				?>				
				<h4 class="accordion-title js-accordion-title tabs-<?php echo $n; ?>"><?php echo $dw_name; ?></h4>
				<div class="accordion-content p-3 border rounded mb-3">
				<a class="btn btn-secondary btn-block text-left " href="<?php global $opt_themes; if($opt_themes['ex_themes_mask_link_']){ ?><?php the_permalink() ?>file/?urls=<?php echo $mask_link; ?><?php } else{ ?><?php the_permalink() ?>file/?urls=<?php echo $dw_link; ?><?php } ?><?php if($dw_name){ ?>&names=<?php echo $dw_name; ?><?php } ?>" target="_blank" rel="nofollow" >
				<?php global $opt_themes; if($opt_themes['svg_icon_downloadx']) { ?><?php echo $opt_themes['svg_icon_downloadx']; ?><?php } ?>
								
				<span class="align-middle">
				<?php if($text_download) { ?><?php echo $text_download; ?><?php } ?> <?php if($dw_size){ ?> (<?php echo $dw_size; ?>) <?php } else{ ?> <?php } ?>
				</span>
				</a>   
				</div>
				<?php 
				$n++; 
				} } 
				} 
				?>				
				</div> 