$favicons $html_meta_image $html_meta_description HTML_CODE; echo $html; exit; } } $query = "SELECT code,name,meta_title,meta_description,meta_image FROM svt_globes WHERE show_in_first_page=1 LIMIT 1;"; $result = $mysqli->query($query); if($result) { if($result->num_rows==1) { $row = $result->fetch_array(MYSQLI_ASSOC); $code_globe = $row['code']; $name_globe = $row['name']; if(empty($row['meta_title'])) { $meta_title = $name_globe; } else { $meta_title = $row['meta_title']; } $meta_description = $row['meta_description']; $meta_image = $row['meta_image']; $html_meta_image = ""; $html_meta_description = ""; if(!empty($meta_image)) { $html_meta_image = ' '; } if(!empty($meta_description)) { $html_meta_description = ' '; } $url_iframe = "globe/index.php?code=$code_globe"; $favicons = print_favicons_globe($code_globe); $html = << $meta_title $favicons $html_meta_image $html_meta_description HTML_CODE; echo $html; exit; } } $query = "SELECT code,name,meta_title,meta_description,meta_image FROM svt_showcases WHERE show_in_first_page=1 LIMIT 1;"; $result = $mysqli->query($query); if($result) { if($result->num_rows==1) { $row = $result->fetch_array(MYSQLI_ASSOC); $code_showcase = $row['code']; $name_showcase = $row['name']; if(empty($row['meta_title'])) { $meta_title = $name_showcase; } else { $meta_title = $row['meta_title']; } $meta_description = $row['meta_description']; $meta_image = $row['meta_image']; $html_meta_image = ""; $html_meta_description = ""; if(!empty($meta_image)) { $html_meta_image = ' '; } if(!empty($meta_description)) { $html_meta_description = ' '; } $url_iframe = "showcase/index.php?code=$code_showcase"; $favicons = print_favicons_showcase($code_showcase); $html = << $meta_title $favicons $html_meta_image $html_meta_description HTML_CODE; echo $html; exit; } } header("Location: backend/login.php"); } else { header("Location: index.html"); } } function print_favicons_vt($code) { $path = ''; $version = time(); $path_m = 'v_'.$code.'/'; if (file_exists(dirname(__FILE__).'/favicons/v_'.$code.'/favicon.ico')) { $path = $path_m; } else if (file_exists(dirname(__FILE__).'/favicons/custom/favicon.ico')) { $path = 'custom/'; } $path = "favicons/".$path; if (file_exists(dirname(__FILE__).'/favicons/v_'.$code.'/site.webmanifest')) { $manifest = ''; } else { $manifest = ""; } $favicon16 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-16x16.png')) { $favicon16 = ''; } $favicon32 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-32x32.png')) { $favicon32 = ''; } $favicon96 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-96x96.png')) { $favicon96 = ''; } return ' '.$favicon16.$favicon32.$favicon96.' '.$manifest.' '; } function print_favicons_globe($code) { $path = ''; $version = time(); $path_m = 'g_'.$code.'/'; if (file_exists(dirname(__FILE__).'/favicons/g_'.$code.'/favicon.ico')) { $path = 'g_'.$code.'/'; } else if (file_exists(dirname(__FILE__).'/favicons/custom/favicon.ico')) { $path = 'custom/'; } $favicon16 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-16x16.png')) { $favicon16 = ''; } $favicon32 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-32x32.png')) { $favicon32 = ''; } $favicon96 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-96x96.png')) { $favicon96 = ''; } return ' '.$favicon16.$favicon32.$favicon96.' '; } function print_favicons_showcase($code) { $path = ''; $version = time(); $path_m = 's_'.$code.'/'; if (file_exists(dirname(__FILE__).'/favicons/s_'.$code.'/favicon.ico')) { $path = 's_'.$code.'/'; } else if (file_exists(dirname(__FILE__).'/favicons/custom/favicon.ico')) { $path = 'custom/'; } $favicon16 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-16x16.png')) { $favicon16 = ''; } $favicon32 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-32x32.png')) { $favicon32 = ''; } $favicon96 = ""; if (file_exists(dirname(__FILE__).'/favicons/'.$path_m.'/favicon-96x96.png')) { $favicon96 = ''; } return ' '.$favicon16.$favicon32.$favicon96.' '; }