<?php
/*
 **************************************************************************************************
 *    Copyright (c) 2010-2012 Just Another Video script
 *
 * 	  This file is part of Just Another Video Script.
 *    Version 1.4.3
 *    info@justanothervideoscript.com
 **************************************************************************************************
 *    Come to website for support or buying additional plugins/modules.
 *    http://justanothervideoscript.com/
 **************************************************************************************************
 *    By using this software you agree that you have read and acknowledged our End-User License
 *    Agreement available at http://justanothervideoscript.com/license and can be bound by it.
 **********************************************************************************
 */
global $sitepath;
$accountManagementPage = false ;

$ad23 = getad('footer');

if (($_GET['id'] == '56') && (getSetting("accountpageon", $db) == 0)) {
      $_GET['id'] = '1' ;
}
      switch ($_GET['id']) {
            //Accessible to all


            case '1':
            	  $ad1 = getad('allheader');	
            	  $ad2 = getad('homeabove');
            	  $ad3 = getad('homeright');
            	  $ad4 = getad('homemiddle');
            	  $ad5 = getad('homeunder');
            	  $frontpage = getSetting("showfrontpage", $db) ;
                  $c_file = '/'.$frontpage.'.tpl' ;
                  $c_header = getSetting('meta_'.$frontpage.'_header', $db) ;
                  $mediaKeywords = getSetting('meta_'.$frontpage.'_key', $db) ;
		  $mediaDescription =  getSetting('meta_'.$frontpage.'_desc', $db) ;
                  break ;
            case '2':
                  $ad1 = getad('allheader');	
            	  $ad6 = getad('topratedabove');
            	  $ad7 = getad('topratedunder');
                  $c_file = '/toprated.tpl' ;
                  $c_header = getSetting('meta_toprated_header', $db) ;
                  $mediaKeywords = getSetting('meta_toprated_key', $db) ;
		  $mediaDescription = getSetting('meta_toprated_desc', $db) ;
                  break ;
            case '3':
                  $ad1 = getad('allheader');	
            	  $ad8 = getad('populairabove');
            	  $ad9 = getad('populairunder');
                  $c_file = '/mostviewed.tpl' ;
                  $c_header = getSetting('meta_mostviewed_header', $db) ;
                  $mediaKeywords = getSetting('meta_mostviewed_key', $db) ;
		  $mediaDescription = getSetting('meta_mostviewed_desc', $db) ;
                  break ;
            case '4':
                  $ad1 = getad('allheader');
                  $c_file = '/forgot.tpl' ;
                  $c_header = 'Forgotten Login' ;
                  $mediaKeywords = "Forgot," ;
		  $mediaDescription = "Forgot" ;
                  break ;
            case '5':
                  $ad1 = getad('allheader');
                  $c_file = '/upload.tpl' ;
                  $c_header = 'Upload Media' ;
                  $mediaKeywords = "Upload, video" ;
		  $mediaDescription = "Upload Video" ;                  
                  break ;
            case '6':
                  $ad1 = getad('allheader');
                  $c_file = '/signup.tpl' ;
                  $c_header = 'Signup' ;
                  $mediaKeywords = "User, signup," ;
		  $mediaDescription = "User signup" ;
                  break ;
            case '7':
                  $ad1 = getad('allheader');
            	  $ad10 = getad('videoabove');
            	  $ad11 = getad('videounder');
                  $c_file = '/videos.tpl' ;
                  $c_header = getSetting('meta_allvideos_header', $db) ;
                  $mediaKeywords = getSetting('meta_allvideos_key', $db) ;
		  $mediaDescription = getSetting('meta_allvideos_desc', $db) ;
                  break ;
            case '8':
                  $ad1 = getad('allheader');
            	  $ad12 = getad('playerabove');
            	  $ad13 = getad('playerright');
            	  $ad14 = getad('playunder');
                  $ad15 = getad('playrelated');
            	  $ad16 = getad('playrelated2');
                  $c_file = '/play.tpl' ;
                  $c_header = dec_VID ;
                  break ;
            case '9':
                  $ad1 = getad('allheader');
                  $c_file = '/embed.tpl' ;
                  $c_header = 'Embed Media' ;
                  $mediaKeywords = "Embed, video" ;
		  $mediaDescription = "Embed Video" ;                  
                  break ;
            case '10':
                  $ad1 = getad('allheader');
                  $c_file = '/activate.tpl' ;
                  $c_header = 'Activate Your Account' ;
                  $mediaKeywords = "Activate, Your Account" ;
		  $mediaDescription = "Activate Your Account" ;
                  break ;
            case '11':
                  $ad1 = getad('allheader');
                  $c_file = '/upload2.tpl' ;
                  $c_header = 'Name your upload' ;
                  $mediaKeywords = "Upload2, video" ;
		  $mediaDescription = "Upload2 Video" ;  
                  break ;
            case '12':
                  $ad1 = getad('allheader');
                  $c_file = '/login.tpl' ;
                  $c_header = 'Login' ;
                  $mediaKeywords = "Login, video" ;
		  $mediaDescription = "Login to site" ;  
                  break ;   
            case '16':
                  $ad1 = getad('allheader');
                  $c_file = '/terms.tpl' ;
                  $c_header = 'Terms of Service' ;
              	  $mediaKeywords = "Terms, Service" ;
		  $mediaDescription = "Terms of Service" ;
                  break ;
             case '18':
                  $ad1 = getad('allheader');
                  $c_file = '/profile.tpl' ;
                  $c_header = getSetting('meta_profile_header', $db) ;
                  $mediaKeywords = getSetting('meta_profile_key', $db) ;
                  $mediaDescription = getSetting('meta_profile_desc', $db) ;
                  break ;
            case '21':
                  $ad1 = getad('allheader');
            	  $ad21 = getad('catabove');
            	  $ad22 = getad('catunder');
                  $c_file = '/category.tpl' ;
                  $c_header = getSetting('meta_category_header', $db) ;
                  $mediaKeywords = getSetting('meta_category_key', $db) ;
		  $mediaDescription = getSetting('meta_category_desc', $db) ;
                  break ;
           case '33':
                  $ad1 = getad('allheader');
		  $c_file = '/dmca.tpl' ;
		  $c_header = 'DMCA' ;
		  $mediaKeywords = "DMCA," ;
		  $mediaDescription = "DMCA notice" ; 
                  break ;
            case '34':
             $ad1 = getad('allheader');
		  $c_file = '/2257.tpl' ;
		  $c_header = '2257' ;
		  $mediaKeywords = "2257," ;
		  $mediaDescription = "2257 notice" ; 
                  break ;
            case '88':
                  $ad1 = getad('allheader'); 
           	  $ad17 = getad('communityabove');
            	  $ad18 = getad('communitybelow');
                  $c_file = '/community.tpl' ;
                  $c_header = getSetting('meta_community_header', $db) ;
                  $mediaKeywords = getSetting('meta_community_key', $db) ;
		  $mediaDescription = getSetting('meta_community_desc', $db) ;
                  break ;

            case '22':
                  $ad1 = getad('allheader');
                  $c_file = '/mediasearch.tpl' ;
                  $c_header = getSetting('meta_search_header', $db) ;
                  $mediaKeywords = getSetting('meta_search_key', $db) ;
		  $mediaDescription = getSetting('meta_search_desc', $db) ;
                  break ;
            case '29':
                  $c_file = '/rss.tpl' ;
                  $c_header = 'Rss Feeds' ;
                  $mediaKeywords = "RSS," ;
		  $mediaDescription = "RSS" ; 
                  break ;
            case '56':
                  $ad1 = getad('allheader');
                  $c_file = '/account.tpl' ;
                  $c_header = 'Account Management' ;
                  $mediaKeywords = "Account, Management," ;
		  $mediaDescription = "Account Management" ; 
                  $accountManagementPage = true ;
                  break ;
            case '14':
                  $ad1 = getad('allheader');
           	  $ad19 = getad('catlistabove');
            	  $ad20 = getad('catlistunder');
                  $c_file = '/catlist.tpl' ;
                  $c_header = getSetting('meta_catlist_header', $db) ;
		  $mediaKeywords = getSetting('meta_catlist_key', $db) ;
		  $mediaDescription = getSetting('meta_catlist_desc', $db) ;
                  break ;

            default:
                  $c_file = '/error.php' ;
                  $c_header = 'Error 404' ;
                  $mediaKeywords = "Error 404," ;
		  $mediaDescription = "Error 404" ; 
                  break ;
      }

?>
