Files
IlLievitario-App/index.php
T

92 lines
5.1 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<title>Il Lievitario</title>
<meta name="google" value="notranslate" />
<meta http-equiv="expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<!-- Meta tag per FB-->
<meta property="og:locale" content="it_IT"/>
<meta property="og:site_name" content="Il Lievitario"/>
<meta itemprop="name" content="Home - Il Lievitario"/>
<?php
require_once "../Service_Manut/config.inc.php";
// inclusione del file contenente la classe
require_once "../Service_Manut/MySqlClass.php";
require_once "../Service_Manut/utility.php";
$ogFbTitle = "Home - Il Lievitario";
$ogFbUrl = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ogFbType = "website";
$ogFbImage = "http://app.gruppolapastamadre.it/previewLink.png";
$ogFbDescription = "Ricettario web del il Gruppo la pasta madre";
if(!empty($_GET["ricetta"]))
{
$ricetta = $_GET['ricetta'];
$ogFbUrl .= "#ricetta/" . $ricetta;
$ogFbType = "article";
$mysqlconnetion = new MysqlClass;
$query = "SELECT categorie.name AS categoria_name, " .
"titolo, procedimento, autore FROM ricette " .
"INNER JOIN categorie ON categorie.ID = ricette.id_categoria WHERE ricette.ID = " . $ricetta;
$retObj = $mysqlconnetion->queryToObject($query);
$ogFbTitle = urldecode($retObj[0]["titolo"]);
$ogFbTitle = $ogFbTitle . " di " . urldecode($retObj[0]["autore"]);
$ogFbDescription = "Categoria: " . $retObj[0]["categoria_name"] . " Descrizione: " . substr(strip_tags(html_entity_decode($retObj[0]["procedimento"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1')), 0, 200);
$query = "select medium_link, type_format from immagini where immagini.id_ricette = " . $ricetta . " and bCover = 1";
$retObj = $mysqlconnetion->queryToObject($query);
$ogFbImage2 = str_replace("?dl=0", "",$retObj[0]["medium_link"]);
$ogFbTypeFormat = $retObj[0]["type_format"];
if($ogFbImage2 != ""){
echo "<meta property='og:image' content='" . $ogFbImage2 . "'/>";
echo "<meta property='og:image:type' content='" . $ogFbTypeFormat . "'/>";
}
else{
echo "<meta property='og:image' content='" . $ogFbImage . "'/>";
}
}
else{
echo "<meta property='og:image' content='" . $ogFbImage . "'/>";
}
?>
<meta property="fb:app_id" content="1466942266882168" />
<meta property="og:title" content="<?php echo $ogFbTitle; ?>"/>
<meta property="og:url" content="<?php echo $ogFbUrl; ?>"/>
<meta property="og:type" content="<?php echo $ogFbType; ?>"/>
<meta property="og:description" content="<?php echo $ogFbDescription; ?>" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" >
<link rel="stylesheet" href="css/style.min.<?php echo filemtime('css/style.min.css'); ?>.css">
<link href='http://fonts.googleapis.com/css?family=Pompiere' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" sizes="196x196" href="https://dl.dropboxusercontent.com/s/l26w7lk0zwnpehf/Icon_Android196.png">
<link rel="apple-touch-icon" href="https://dl.dropboxusercontent.com/s/9cc174ato4hckl5/Icon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="https://dl.dropboxusercontent.com/s/onehseqh6cusbo0/Icon~ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="https://dl.dropboxusercontent.com/s/tcxl91zd502mapa/Icon%402x.png" />
<link rel="apple-touch-icon" sizes="144x144" href="https://dl.dropboxusercontent.com/s/pj3fk1lgc4cefwx/Icon~ipad%402x.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui"/>
<meta http-equiv="Access-Control-Allow-Origin" content="*"/>
<script async defer src="https://maps.googleapis.com/maps/api/js?libraries=places,drawing"></script>
<script type='text/javascript' src="js/common.min.<?php echo filemtime('js/common.min.js'); ?>.js"></script>
<script type='text/javascript'>
<?php echo file_get_contents("js/manifest.js"); ?>
</script>
<script data-main="js/config.<?php echo filemtime('js/config.js'); ?>" src="js/libs/require.<?php echo filemtime('js/libs/require.js'); ?>.js"></script>
</head>
<body style="background-color: #3b5998;">
<?php include_once("analyticstracking.php") ?>
<div id="loadingFrm" style="text-align: center;">
<div class="loadingSfondo"></div><br>
<div style="color: #ffffff;">
<b>Il Lievitario</b><br><br>
<i>...Caricamento in corso...</i>
</div>
</div>
</body>
</html>