<?php
/* Smarty version 3.1.29, created on 2019-03-31 23:12:43
  from "D:\DEV\wamp\www\tunevoyage\application\views\frontend\gate.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_5ca11f3b6eea05_59657163',
  'file_dependency' => 
  array (
    'fcff70ae1ea40455d5174cbd0ad68f846fb58da7' => 
    array (
      0 => 'D:\\DEV\\wamp\\www\\tunevoyage\\application\\views\\frontend\\gate.tpl',
      1 => 1554063162,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5ca11f3b6eea05_59657163 ($_smarty_tpl) {
if (isset($_smarty_tpl->tpl_vars['blur']->value)) {?>
	<?php if (!empty($_smarty_tpl->tpl_vars['cover']->value)) {?>
		<?php $_smarty_tpl->tpl_vars['page_background'] = new Smarty_Variable($_smarty_tpl->tpl_vars['supplement_m']->value->showPic($_smarty_tpl->tpl_vars['background_thumb']->value->filename), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'page_background', 0);?>
	<?php } else { ?>
		<?php $_smarty_tpl->tpl_vars['page_background'] = new Smarty_Variable('assets/img/unknown.png', null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'page_background', 0);?>
	<?php }?>

	<div class="background-blur <?php if ($_smarty_tpl->tpl_vars['settings']->value->blur_level == 0) {?>blur-normal<?php } elseif ($_smarty_tpl->tpl_vars['settings']->value->blur_level == 1) {?>blur-low<?php } elseif ($_smarty_tpl->tpl_vars['settings']->value->blur_level == 2) {?>blur-high<?php }?>" style="background-image: url('<?php echo $_smarty_tpl->tpl_vars['page_background']->value;?>
'); background-position: center;"></div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['settings']->value->show_logo == 0) {?>
	<div class="row text-center logodiv">
	  <?php if (!empty($_smarty_tpl->tpl_vars['logo_pic']->value)) {?>
	      <img src="<?php echo $_smarty_tpl->tpl_vars['supplement_m']->value->showPic($_smarty_tpl->tpl_vars['logo_pic']->value->filename);?>
" class="logo-ongate" />
	    <?php } else { ?>
	      <img src="<?php echo $_smarty_tpl->tpl_vars['img']->value;?>
/logo.png" class="logo-ongate" />
	    <?php }?>
	</div>
<?php }?>

<div class="row">
	<div class="col-md-12">
		<div class="text-center white gate-page">

			<div class="row">
			    <h1 class="h1em text-blur upper"><?php echo $_smarty_tpl->tpl_vars['gate']->value->name;?>
</h1>
			    <?php if (strlen($_smarty_tpl->tpl_vars['gate']->value->creator) > 0) {?>
			    	<h5 class="text-blur">by <?php echo $_smarty_tpl->tpl_vars['gate']->value->creator;?>
</h5>
			    <?php }?>
			</div>

		    <div id="preview" class="row" style="<?php if (isset($_smarty_tpl->tpl_vars['token']->value)) {?>display: none;<?php }?>">
		    	<div class="empty-space"></div>
		        <?php if (strlen($_smarty_tpl->tpl_vars['gate']->value->preview) < 1) {?>
		        	<?php if (!empty($_smarty_tpl->tpl_vars['cover']->value)) {?>
		        		<img src="<?php echo $_smarty_tpl->tpl_vars['supplement_m']->value->showPic($_smarty_tpl->tpl_vars['cover_thumb']->value->filename);?>
" class="preview-image img-rounded"/>
		        	<?php } else { ?>
		        		<img src="<?php echo $_smarty_tpl->tpl_vars['img']->value;?>
/unknown.png" class="preview-image img-rounded"/>
		        	<?php }?>
		        <?php } else { ?>
		        	<?php if ($_smarty_tpl->tpl_vars['hasCloudPreview']->value == true) {?>
		        		<iframe width="90%" height="350" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $_smarty_tpl->tpl_vars['previewTrack']->value;?>
&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true" class="preview"></iframe>
		        	<?php } else { ?>
		        		<iframe class="yt-preview" width="50%" height="315" src="https://www.youtube.com/embed/<?php echo $_smarty_tpl->tpl_vars['previewTrack']->value;?>
" frameborder="0" allowfullscreen></iframe>
		        	<?php }?>
		        <?php }?>
		    </div>

		    <?php if ($_smarty_tpl->tpl_vars['gate']->value->lock_downloads > 0 && ($_smarty_tpl->tpl_vars['stat_m']->value->totalGateDownloads($_smarty_tpl->tpl_vars['gate']->value->id) >= $_smarty_tpl->tpl_vars['gate']->value->lock_downloads)) {?>
		    	<div class="row" style="padding: 8px;" id="combined">
			        <div class="song-info">

			            <div class="dnl-btns">
			                <div class="row">
								<br/>
								<div class="col-md-12 upper">
									This gate was limited to <?php echo $_smarty_tpl->tpl_vars['gate']->value->lock_downloads;?>
 downloads and is now locked...
								</div>
								<br/><br/>
								<div class="row">
				                    <div class="col-md-12 small">
				                        Browse the <a href="catalog">catalog</a> for more.
				                    </div>
				                </div>

							</div>
						</div>
					</div>
				</div>
		    <?php } else { ?>
			    <?php if ($_smarty_tpl->tpl_vars['bridge']->value != 0 && !isset($_smarty_tpl->tpl_vars['token']->value)) {?>
				    <div class="row" style="padding: 8px;" id="combined">
				        <div class="song-info">

				            <div class="dnl-btns">
				                <div class="row">
									
									<div class="col-md-12 upper"> 
										&nbsp;What do you want to do?&nbsp;
										<br/><br/>
									</div>

									<div class="col-md-3 colmd col-centered">
				                        <a href="javascript:void(0);" onclick="show_gate()">
					                        <button type="button" class="btn btn-default btndnl">
					                        	<i class="fa fa-download" aria-hidden="true"></i>
					                        	&nbsp;&nbsp;Download
					                        </button>
				                        </a>
				                    </div>

				                    <div class="col-md-3 colmd col-centered">
				                        <a href="<?php echo $_smarty_tpl->tpl_vars['bridgeObj']->value->keyword;?>
">
					                        <button type="button" class="btn btn-default btndnl">
					                        	<i class="fa fa-play" aria-hidden="true"></i>
					                        	&nbsp;&nbsp;Buy / Stream
					                        </button>
				                        </a>
				                    </div>

								</div>
							</div>

							<div class="row">
			                    <div class="col-md-12 small">
			                        Browse the <a href="catalog">catalog</a> for more.
			                    </div>
			                </div>

						</div>
					</div>
				<?php }?>

				<?php if (!isset($_smarty_tpl->tpl_vars['smartlink']->value)) {?>
				    <div class="row" style="padding: 8px; <?php if (isset($_smarty_tpl->tpl_vars['token']->value) || $_smarty_tpl->tpl_vars['bridge']->value != 0) {?>display: none;<?php }?>" id="gate-content">
				        <div class="song-info">

				            <div class="dnl-btns">
				                <div class="row">
									
									<div class="col-md-12 upper"> 
										&nbsp;Download options&nbsp;
										<br/><br/>
									</div>
									
				                	<?php if ($_smarty_tpl->tpl_vars['gate']->value->soundcloud_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->soundcloud_active == 1) {?>
					                    <div class="col-md-3 colmd col-centered">
					                        <button type="button" class="btn btn-warning btndnl" onclick="soundcloud_terms()" data-toggle="modal" data-target="#soundcloud_terms">
					                        	<i class="fa fa-soundcloud" aria-hidden="true"></i>
					                        	&nbsp;&nbsp;Soundcloud
					                        </button>
					                    </div>
					                <?php }?>

					                <?php if ($_smarty_tpl->tpl_vars['gate']->value->youtube_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->youtube_active == 1) {?>
					                    <div class="col-md-3 colmd col-centered">
											<a href="javascript:void(0);" onclick="youtube_terms()" data-toggle="modal" data-target="#youtube_terms">
												<button type="button" class="btn btn-danger btndnl">
													<i class="fa fa-youtube-play" aria-hidden="true"></i>
													&nbsp;&nbsp;YouTube
												</button>
											</a>
					                    </div>
					                <?php }?>

					                <?php if ($_smarty_tpl->tpl_vars['gate']->value->spotify_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->spotify_active == 1) {?>
					                    <div class="col-md-3 colmd col-centered">
					                    	<a href="javascript:void(0);" onclick="spotify_terms()" data-toggle="modal" data-target="#spotify_terms">
					                    	<!-- href="<?php echo $_smarty_tpl->tpl_vars['spoti_url']->value;?>
&state=<?php echo $_smarty_tpl->tpl_vars['gate']->value->id;?>
"> -->
						                        <button type="button" class="btn btn-success btndnl">
						                        	<i class="fa fa-spotify" aria-hidden="true"></i>
						                        	&nbsp;&nbsp;Spotify
						                        </button>
						                    </a>
					                    </div>
					                <?php }?>

					                <?php if ($_smarty_tpl->tpl_vars['gate']->value->deezer_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->deezer_active == 1) {?>
					                    <div class="col-md-3 colmd col-centered">
					                    	<a href="javascript:void(0);" onclick="deezer_terms()" data-toggle="modal" data-target="#deezer_terms">
					                    	<!-- href="<?php echo $_smarty_tpl->tpl_vars['spoti_url']->value;?>
&state=<?php echo $_smarty_tpl->tpl_vars['gate']->value->id;?>
"> -->
						                        <button type="button" class="btn btn-deezer btndnl">
						                        	<!-- <i class="fa fa-headphones" aria-hidden="true"></i> -->
						                        	<img src="<?php echo site_url();?>
assets/img/deezer_icon.png" class="deezer-icon" />
						                        	&nbsp;&nbsp;Deezer
						                        </button>
						                    </a>
					                    </div>
					                <?php }?>

					                <?php if ($_smarty_tpl->tpl_vars['gate']->value->mixcloud_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->mixcloud_active == 1) {?>
					                    <div class="col-md-3 colmd col-centered">
					                        <a href="javascript:void(0);" onclick="mixcloud_terms()" data-toggle="modal" data-target="#mixcloud_terms">
						                        <button type="button" class="btn btn-primary btndnl">
						                        	<i class="fa fa-mixcloud" aria-hidden="true"></i>
						                        	&nbsp;&nbsp;Mixcloud
						                        </button>
					                        </a>
					                    </div>
					                <?php }?>

				                </div>
				            </div>

				            <?php if ($_smarty_tpl->tpl_vars['gate']->value->show_counter) {?>
					            <div class="row">
				                    <div class="col-md-12 text-muted">
				                    	TOTAL DOWNLOADS: <?php echo number_format($_smarty_tpl->tpl_vars['stat_m']->value->totalGateDownloads($_smarty_tpl->tpl_vars['gate']->value->id),'0',',',' ');?>

				                    </div>
				                </div>
				            <?php }?>

				            <div class="row">
			                    <div class="col-md-12 small">
			                        Browse the <a href="catalog">catalog</a> for more.
			                        <br/>
			                        By using this service you agree to our <a href="javascript:void(0);" onclick="" data-toggle="modal" data-target="#terms">terms</a>.
			                    </div>
			                </div>

			                <?php if ($_smarty_tpl->tpl_vars['settings']->value->social_share == 1) {?>
				                <div class="row">
				                	<br/>
				         			SHARE ON SOCIAL MEDIA
				         			<br/><br/>
				                	<div class="share42init" data-url="<?php echo site_url();
echo $_smarty_tpl->tpl_vars['gate']->value->keyword;?>
"></div>
				                </div>
				            <?php }?>

				        </div>
			        </div>

			        <div class="row" style="padding: 8px; <?php if (!isset($_smarty_tpl->tpl_vars['token']->value)) {?>display: none<?php } else { ?>display: block<?php }?>;" id="download">
			        	
				        <?php if (!isset($_smarty_tpl->tpl_vars['cheater']->value)) {?>
					        <div class="song-info">
					            <mark>Thank you for supporting! Your download is now unlocked.</mark>
					            <div class="empty-space"></div>

					            <?php if ($_smarty_tpl->tpl_vars['gate']->value->use_external_url == 1) {?>

						            <div>
						            	<a id="unlocked_download" <?php if (isset($_smarty_tpl->tpl_vars['token']->value)) {?>href="<?php echo $_smarty_tpl->tpl_vars['gate']->value->external_url;?>
"<?php }?> class="btn btn-info btn-lg" target="_blank"><i class="fa fa-download" aria-hidden="true"></i>&nbsp; DOWNLOAD</a>
						            </div>
						            <div class="empty-space"></div>

						        <?php } else { ?>
						        	<?php if ($_smarty_tpl->tpl_vars['settings']->value->strong_security == 1) {?>
						        		<kbd>
							            	Download will start automatically any moment now ...
							            </kbd>
							            <div class="empty-space"></div>
						        	<?php } else { ?>
							        	<div>
							            	<a id="unlocked_download" <?php if (isset($_smarty_tpl->tpl_vars['token']->value)) {?>href="<?php echo site_url();?>
uploads/gates/<?php echo $_smarty_tpl->tpl_vars['download_file']->value->filename;?>
"<?php }?> class="btn btn-info btn-lg" target="_blank" download><i class="fa fa-download" aria-hidden="true"></i>&nbsp; DOWNLOAD</a>
							            </div>
							            <div>
							            	<br/>
							            	<kbd>
								            	Your browser is streaming, instead of downloading?
								            </kbd>
								            <br/>
								            <kbd>
								            	Try right click -> "save link as... " on the download button.
								            </kbd>
							            </div>
							            <div class="empty-space"></div>
							        <?php }?>
						        <?php }?>

					            <div>
					            	<a href="<?php echo site_url();?>
catalog" class="btn btn-default">GO BACK</a>
					            </div>

					            <?php if ($_smarty_tpl->tpl_vars['settings']->value->facebook_include == 1) {?>
						            <!-- Facebook Page Plugin -->
						            <div class="empty-space"></div>
						            <div>
						            	<p class="bg-primary text-muted font-normal">
						            		You can show even more appreciation by clicking the like button for the page bellow:
						            	</p>
						            	<div class="empty-space"></div>
						            	<div class="fb-page" 
										  data-href="https://www.facebook.com/<?php echo $_smarty_tpl->tpl_vars['settings']->value->facebook_page;?>
"
										  data-width="280" 
										  data-hide-cover="false"
										  data-show-facepile="false" 
										  data-show-posts="false">
										</div>
										<div class="empty-space"></div>
						            </div>
						        <?php }?>

					            <?php $_smarty_tpl->tpl_vars['soc_website'] = new Smarty_Variable($_smarty_tpl->tpl_vars['settings']->value->soc_website, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'soc_website', 0);?>
					            <?php $_smarty_tpl->tpl_vars['soc_facebook'] = new Smarty_Variable($_smarty_tpl->tpl_vars['settings']->value->soc_facebook, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'soc_facebook', 0);?>
					            <?php $_smarty_tpl->tpl_vars['soc_twitter'] = new Smarty_Variable($_smarty_tpl->tpl_vars['settings']->value->soc_twitter, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'soc_twitter', 0);?>
					            <?php $_smarty_tpl->tpl_vars['soc_instagram'] = new Smarty_Variable($_smarty_tpl->tpl_vars['settings']->value->soc_instagram, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'soc_instagram', 0);?>

					            <?php if ($_smarty_tpl->tpl_vars['settings']->value->social_active == 1 && (!empty($_smarty_tpl->tpl_vars['soc_website']->value) || !empty($_smarty_tpl->tpl_vars['soc_facebook']->value) || !empty($_smarty_tpl->tpl_vars['soc_twitter']->value) || !empty($_smarty_tpl->tpl_vars['soc_instagram']->value))) {?>
						            <!-- More Social Media -->
						            <div>
						            	<div class="empty-space"></div>
						            	<p class="bg-primary text-muted font-normal">
						            		MORE SOCIAL LINKS
						            	</p>
						            	<div class="empty-space"></div>

						            	<?php if (!empty($_smarty_tpl->tpl_vars['soc_website']->value)) {?>
							            	<div class="soc-icon">
							            		<a href="<?php echo $_smarty_tpl->tpl_vars['soc_website']->value;?>
" target="_blank">
							            			<i class="fa fa-globe fa-4x" aria-hidden="true"></i>
							            		</a>
							            	</div>
							            <?php }?>

							            <?php if (!empty($_smarty_tpl->tpl_vars['soc_facebook']->value)) {?>
							            	<div class="soc-icon">
							            		<a href="http://fb.com/<?php echo $_smarty_tpl->tpl_vars['soc_facebook']->value;?>
" target="_blank">
							            			<i class="fa fa-facebook-official fa-4x" aria-hidden="true"></i>
							            		</a>
							            	</div>
							            <?php }?>

							            <?php if (!empty($_smarty_tpl->tpl_vars['soc_twitter']->value)) {?>
							            	<div class="soc-icon">
							            		<a href="http://twitter.com/<?php echo $_smarty_tpl->tpl_vars['soc_twitter']->value;?>
" target="_blank">
							            			<i class="fa fa-twitter-square fa-4x" aria-hidden="true"></i>
							            		</a>
							            	</div>
							            <?php }?>

								        <?php if (!empty($_smarty_tpl->tpl_vars['soc_instagram']->value)) {?>
							            	<div class="soc-icon">
								            	<a href="http://instagram.com/<?php echo $_smarty_tpl->tpl_vars['soc_instagram']->value;?>
" target="_blank">
								            		<i class="fa fa-instagram fa-4x" aria-hidden="true"></i>
								            	</a>
							            	</div>
							            <?php }?>

						            	<br/>
						            </div>
						        <?php }?>

					        </div>
					    <?php } else { ?>
					    	<div class="song-info">
					            <mark>Heeeey! Don't try to cheat!</mark>
					            <div class="empty-space"></div>
					        </div>
					    <?php }?>
				    </div>
				<?php } else { ?>
					<div class="row">
						<div class="col-md-12 smart-link-container"> 

							<ul class="list-group text-muted upper text-left smartlink-links">

								<?php
$_from = $_smarty_tpl->tpl_vars['stores']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_store_0_saved_item = isset($_smarty_tpl->tpl_vars['store']) ? $_smarty_tpl->tpl_vars['store'] : false;
$_smarty_tpl->tpl_vars['store'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['store']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['store']->value) {
$_smarty_tpl->tpl_vars['store']->_loop = true;
$__foreach_store_0_saved_local_item = $_smarty_tpl->tpl_vars['store'];
?>
								
									<?php $_smarty_tpl->tpl_vars['store_link'] = new Smarty_Variable($_smarty_tpl->tpl_vars['gate_m']->value->getUrl($_smarty_tpl->tpl_vars['gate']->value->id,$_smarty_tpl->tpl_vars['store']->value->id), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'store_link', 0);?>

									<?php if (strlen($_smarty_tpl->tpl_vars['store_link']->value) > 0) {?>
										<li class="list-group-item">
											
											<a href="<?php echo site_url();?>
click/link/<?php echo $_smarty_tpl->tpl_vars['store']->value->id;?>
/<?php echo $_smarty_tpl->tpl_vars['gate']->value->id;?>
">
												<div class="smartlinks-store-logo">
													<img style="height: 42px;" src="<?php echo $_smarty_tpl->tpl_vars['supplement_m']->value->showPic($_smarty_tpl->tpl_vars['store_m']->value->logo($_smarty_tpl->tpl_vars['store']->value->id));?>
" />
												</div>
											</a>
											<div class="btn-smartlink">
												<a href="<?php echo site_url();?>
click/link/<?php echo $_smarty_tpl->tpl_vars['store']->value->id;?>
/<?php echo $_smarty_tpl->tpl_vars['gate']->value->id;?>
" class="btn btn-default"><?php echo $_smarty_tpl->tpl_vars['store']->value->button_text;?>
</a>
											</div>

											
										</li>
									<?php }?>

								<?php
$_smarty_tpl->tpl_vars['store'] = $__foreach_store_0_saved_local_item;
}
if ($__foreach_store_0_saved_item) {
$_smarty_tpl->tpl_vars['store'] = $__foreach_store_0_saved_item;
}
?>

							</ul>

							<div class="row">
			                    <div class="col-md-12 small">
			                        Browse the <a href="catalog">catalog</a> for more.
			                        <br/>
			                        By using this service you agree to our <a href="javascript:void(0);" onclick="" data-toggle="modal" data-target="#terms">terms</a>.
			                    </div>
			                    <br/>

			                    <?php if ($_smarty_tpl->tpl_vars['settings']->value->social_share == 1) {?>
					                <div class="row">
					                	<br/>
					         			SHARE ON SOCIAL MEDIA
					         			<br/><br/>
					                	<div class="share42init" data-url="<?php echo site_url();
echo $_smarty_tpl->tpl_vars['gate']->value->keyword;?>
"></div>
					                </div>
					            <?php }?>

					            <?php if ($_smarty_tpl->tpl_vars['settings']->value->embed_links == 1) {?>
					            	<!-- COPY EMBED CODE -->
						            <div class="row">

						            	<small><a href="javascript:void(0);" onclick="copy();">Copy embed code</a>.</small>

						            	
						            		<?php echo '<script'; ?>
 type="text/javascript">
							            		function copy() {
							            			embed = '<iframe width="100%" allowtransparency="true" height="<?php echo $_smarty_tpl->tpl_vars['frame_height']->value;?>
" scrolling="no" frameborder="no" src="<?php echo site_url();
echo $_smarty_tpl->tpl_vars['gate']->value->keyword;?>
/embed"></iframe>';
							            			window.prompt("Copy to clipboard: Ctrl+C, Enter", embed);
						            			}
						            		<?php echo '</script'; ?>
>
						            	

						            </div>
						        <?php }?>
			                </div>

						</div>
					</div>
				<?php }?>
			<?php }?>
		</div>
	</div>
</div>

<?php if ($_smarty_tpl->tpl_vars['gate']->value->soundcloud_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->soundcloud_active == 1) {?>
	<div id="soundcloud_terms" class="modal fade" role="dialog">
	  <div class="modal-dialog">

	    <!-- Modal content-->
	    <div class="modal-content">
	      <div class="modal-header">
	      	In order to unlock the free download you have to:
	        <button type="button" class="close" data-dismiss="modal">&times;</button>
	      </div>
	      <div class="modal-body text-center">
	      	<div id="soundcloudContainer">
	      		<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
	      		&nbsp; Please wait while details are being loaded...
	      	</div>
	      </div>
	      <div class="modal-footer">
	        
	      </div>
	    </div>

	  </div>
	</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['gate']->value->youtube_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->youtube_active == 1 && $_smarty_tpl->tpl_vars['gate']->value->youtube_include == 1) {?>
	<div id="youtube_terms" class="modal fade" role="dialog">
		<div class="modal-dialog">

	    <!-- Modal content-->
	    <div class="modal-content">
	      <div class="modal-header">
	      	In order to unlock the free download you have to:
	        <button type="button" class="close" data-dismiss="modal">&times;</button>
	      </div>
	      <div class="modal-body text-center">
	      	<div id="youtubeContainer">
	      		<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
	      		&nbsp; Please wait while details are being loaded...
	      	</div>
	      </div>
	      <div class="modal-footer">
	        
	      </div>
	    </div>

	  </div>
	</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['gate']->value->spotify_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->spotify_active == 1 && $_smarty_tpl->tpl_vars['gate']->value->spotify_include == 1) {?>
	<div id="spotify_terms" class="modal fade" role="dialog">
		<div class="modal-dialog">

		    <!-- Modal content-->
		    <div class="modal-content">
		      <div class="modal-header">
		      	In order to unlock the free download you have to:
		        <button type="button" class="close" data-dismiss="modal">&times;</button>
		      </div>
		      <div class="modal-body text-center">
		      	<div id="spotifyContainer">
		      		<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
		      		&nbsp; Please wait while details are being loaded...
		      	</div>
		      </div>
		      <div class="modal-footer">

		      </div>
		    </div>

	  	</div>
	</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['gate']->value->deezer_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->deezer_active == 1 && $_smarty_tpl->tpl_vars['gate']->value->deezer_include == 1) {?>
	<div id="deezer_terms" class="modal fade" role="dialog">
		<div class="modal-dialog">

		    <!-- Modal content-->
		    <div class="modal-content">
		      <div class="modal-header">
		      	In order to unlock the free download you have to:
		        <button type="button" class="close" data-dismiss="modal">&times;</button>
		      </div>
		      <div class="modal-body text-center">
		      	<div id="deezerContainer">
		      		<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
		      		&nbsp; Please wait while details are being loaded...
		      	</div>
		      </div>
		      <div class="modal-footer">
		        
		      </div>
		    </div>

	  	</div>
	</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['gate']->value->mixcloud_include == 1 && $_smarty_tpl->tpl_vars['settings']->value->mixcloud_active == 1 && $_smarty_tpl->tpl_vars['gate']->value->mixcloud_include == 1) {?>
	<div id="mixcloud_terms" class="modal fade" role="dialog">
		<div class="modal-dialog">

		    <!-- Modal content-->
		    <div class="modal-content">
		      <div class="modal-header">
		      	In order to unlock the free download you have to:
		        <button type="button" class="close" data-dismiss="modal">&times;</button>
		      </div>
		      <div class="modal-body text-center">
		      	<div id="mixcloudContainer">
		      		<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
		      		&nbsp; Please wait while details are being loaded...
		      	</div>
		      </div>
		      <div class="modal-footer">
		        
		      </div>
		    </div>

	  	</div>
	</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['bridge']->value != 0) {?>
	<?php echo '<script'; ?>
 type="text/javascript">
		function show_gate() {
			$('#gate-content').css('display', 'block');
			$('#combined').css('display', 'none');
		}
	<?php echo '</script'; ?>
>
<?php }?>


<div id="terms" class="modal fade" role="dialog">
	<div class="modal-dialog">

	    <!-- Modal content-->
	    <div class="modal-content" style="opacity: 1;">
	      <div class="modal-header">
	      	TERMS AND PRIVICY
	        <button type="button" class="close" data-dismiss="modal">&times;</button>
	      </div>
	      <div class="modal-body text-center terms">
      		<?php $_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, $_smarty_tpl->tpl_vars['sections']->value['privacy'], $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, true);
?>

      		<div class="row">
      			<br/>
      			<button type="button" class="btn btn-success" data-dismiss="modal">CLOSE</button>
      		</div>
	      </div>
	      <div class="modal-footer">

	      </div>
	    </div>

  	</div>
</div>


	<?php echo '<script'; ?>
 type="text/javascript">
		function openPrivacy() {
		    window.open("gate/privacy");
		}
	<?php echo '</script'; ?>
>

	<?php echo '<script'; ?>
 type="text/javascript">
        function add_youtube_comment() {
        	var cur_link = $('#authLink').attr('href');
        	var split_cur_link = cur_link.split('&state=');
          	$('#authLink').attr('href', split_cur_link[0] + '&state=' + $('#comment').val());
        }
    <?php echo '</script'; ?>
>
<?php }
}
