<?php
//Page Settings
$page_settings = mysqli_query($conn, "SELECT * from page_settings WHERE page_link = '$page_name'");
$page_total    = mysqli_num_rows($page_settings);
$page_Data     = mysqli_fetch_array($page_settings);

//General Settings
$general_settings = mysqli_query($conn, "SELECT * FROM general_settings WHERE settings_id = 1");
$settings_total   = mysqli_num_rows($general_settings);
$settings_Data    = mysqli_fetch_array($general_settings);

//Page Map
$page_map       = mysqli_query($conn, "SELECT * FROM page_map WHERE map_id = 1");
$page_map_total = mysqli_num_rows($page_map);
$page_mapData   = mysqli_fetch_array($page_map);

//Currency Code
$currency_code 		= mysqli_query($conn, "SELECT code from currency");
$currency_total    	= mysqli_num_rows($currency_code);

//Variables General Settings
if ($page_total > 0) {
    $settings_id           = $settings_Data['settings_id'];
    $settings_logo         = $settings_Data['settings_logo'];
    $settings_icon         = $settings_Data['settings_icon'];
    $settings_css          = $settings_Data['settings_css'];
    $settings_css_texture  = $settings_Data['settings_css_texture'];
    $settings_phone        = $settings_Data['settings_phone'];
    $settings_script       = $settings_Data['settings_script'];
    $settings_copyright    = $settings_Data['settings_copyright'];
    $settings_twitter      = $settings_Data['settings_twitter'];
    $settings_facebook     = $settings_Data['settings_facebook'];
    $settings_google       = $settings_Data['settings_google'];
    //Home Banner
    $settings_banner       = $settings_Data['settings_banner'];
    $settings_banner_title = $settings_Data['settings_banner_title'];
    $settings_banner_txt   = $settings_Data['settings_banner_txt'];
    //Special Offers
    $special_offer         = $settings_Data['special_offer'];
    $special_offer_txt     = $settings_Data['special_offer_txt'];
    //Slide
    $settings_slide1       = $settings_Data['settings_slide1'];
    $settings_slide1_link  = $settings_Data['settings_slide1_link'];
    $settings_slide2       = $settings_Data['settings_slide2'];
    $settings_slide2_link  = $settings_Data['settings_slide2_link'];
    $settings_slide3       = $settings_Data['settings_slide3'];
    $settings_slide3_link  = $settings_Data['settings_slide3_link'];
    $settings_slide4       = $settings_Data['settings_slide4'];
    $settings_slide4_link  = $settings_Data['settings_slide4_link'];
}

//Variables Page Settings
if ($settings_total > 0) {
    $page_link      = $page_Data['page_link'];
    $page_title     = $page_Data['page_title'];
    $page_keywords  = $page_Data['page_keywords'];
    $page_meta_desc = $page_Data['page_meta_desc'];
    $page_script    = $page_Data['page_script'];
}

//Varibles Page Map
if ($page_map_total > 0) {
    $map_latitude  = $page_mapData['latitude'];
    $map_longitude = $page_mapData['longitude'];
    $map_address   = $page_mapData['address'];
    $map_zoom      = $page_mapData['zoom'];
    $map_zoom_clic = $page_mapData['zoom_clic'];
}
?>