<?php

$CONFIG_ID_BANDA = 3;

$CONFIG_results = GETConfigBanda($CONFIG_ID_BANDA);

$CONFIG_NOMBRE_TIENDA = $CONFIG_results[0]->config_nombre_web;
$CONFIG_DESCRIPCION = $CONFIG_results[0]->config_descrip_web;
$CONFIG_KEYWORDS = $CONFIG_results[0]->config_keywords_web;
$CONFIG_AUTOR = $CONFIG_results[0]->config_autor_web;
$CONFIG_ICONO = $CONFIG_results[0]->config_icono_web;

/* 
TABLA MYSQL: bnd_config

config_idbanda	int	11
config_nombre_web	varchar	250
config_descrip_web	varchar	250
config_autor_web	varchar	250
config_icono_web	varchar	250
config_type_web	varchar	250
config_keywords_web	varchar	250

config_activar_lista_correos	tinyint	4
config_email

config_rrss_facebook	varchar	250
config_rrss_youtube	varchar	250
config_rrss_twitter	varchar	250
config_rrss_tiktok	varchar	250
config_rrss_spotify	varchar	250
config_rrss_instagram	varchar	250
config_rrss_whatsapp	varchar	250
config_rrss_movil	varchar	250

config_menu_inicio	tinyint	4
config_menu_tour	tinyint	4
config_menu_musica	tinyint	4
config_menu_noticias	tinyint	4
config_menu_videos	tinyint	4
config_menu_bio	tinyint	4
config_menu_contacto	tinyint	4

*/


/*
$CONFIG_NOMBRE_TIENDA = 'Plantilla Web Band';
$CONFIG_DESCRIPCION = 'Descripción de la Plantilla Web Band';
$CONFIG_KEYWORDS = 'Music Band, Music';
$CONFIG_AUTOR = 'Miguel Brown';
$CONFIG_ICONO = 'icono.ico';
*/
$CONFIG_GOOGLE_FONTS = getGoogleFonts();


/* OPEN GRAPH */
$CONFIG_OP_IMG = $CONST_PATH_IMG.'img-op.jpg'; /*300 x 200*/
$CONFIG_OP_TYPE = $CONFIG_results[0]->config_type_web;
$CONFIG_OPEN_GRAPH = getOpenGraph($CONFIG_NOMBRE_TIENDA,
                                  $CONFIG_DESCRIPCION,
                                  $CONFIG_OP_IMG,
                                  $CONFIG_OP_TYPE);

$CONFIG_EXTRAS = getExtras();

function getGoogleFonts(){

    /*
    
    <link href="https://fonts.googleapis.com/css2?family=Rowdies:wght@300;400;700&display=swap" rel="stylesheet">

    */
    $GOOGLE_FONT = 
    '
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>    
    <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap" rel="stylesheet">
    
    ';
    return $GOOGLE_FONT;
}

function getOpenGraph($tittle,$descr,$img,$type){
    $OPEN_GRAPH = 
    '
    <!-- Full link to the current webpage address -->
    <meta property="og:title" content="'.$tittle.'" />
    <!-- Descripcion -->
    <meta property="og:description" content="'.$descr.'" />

    <!-- Image(JPG or PNG) with a size less than 300KB 
     and minimum dimensions of 300 x 200 *. 
     This image should be served via a HTTPS connection 
     with a valid non-self-signed certificate.** -->
    <meta property="og:image" content="'.$img.'" />

    <!-- TYPE
     In order for your object to be represented within the graph,
     you need to specify its type.
     Heres a list of the global types available: http://ogp.me/#types.
     You can also specify your own types.
    -->
 
    <meta property="og:type" content="'.$type.'" />
 
 
    <!-- TWITTER 
    https://developer.x.com/en/docs/twitter-for-websites/cards/guides/getting-started
    -->
    <meta name="twitter:card" content="summary"></meta>
 
    <!-- FACEBOOK
 
    https://developers.facebook.com/docs/sharing/webmasters
 
    -->    
    ';
    return $OPEN_GRAPH;
}

function getExtras(){

    /*

    */
    $EXTRAS = 
    '
   
    ';
    return $EXTRAS;
}
