Files
IlLievitario-App/index.php
T

84 lines
4.8 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
function get_current_url() {
$url = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://'
. $_SERVER['SERVER_NAME']
. ($_SERVER['SERVER_PORT'] !== 80 ? ':' . $_SERVER['SERVER_PORT'] : '')
. $_SERVER['REQUEST_URI'];
return $url;
}
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";
$reqURI = $_SERVER['SCRIPT_FILENAME'];
$ogFbTitle = "Home - Il Lievitario";
$ogFbUrl = get_current_url();
$ogFbType = "website";
$ogFbImage = "http://app.gruppolapastamadre.it/previewLink.png";
$ogFbDescription = "Ricettario web del il Gruppo la pasta madre";
$posRic = strpos($reqURI, "/#ricetta/");
if( $posRic !== false)
{
$idRicetta = substr($reqURI, $posRic + 10);
$ogFbType = "article";
$mysqlconnetion = new MysqlClass;
$query = "SELECT categorie.name AS categoria_name, " .
"titolo, procedimento, autore, valutazione FROM ricette " .
"INNER JOIN categorie ON categorie.ID = ricette.id_categoria WHERE ricette.ID = " . $itemID;
$retObj = $mysqlconnetion->queryToObject($query);
$ogFbTitle = html_entity_decode($retObj[0]["titolo"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
$ogFbTitle = $ogFbTitle . " di " . html_entity_decode($retObj[0]["autore"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
$ogFbDescription = substr(html_entity_decode($retObj[0]["procedimento"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1'), 0, 30);
}
?>
<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:image" content="<?php echo $ogFbImage; ?>"/>
<meta property="og:description" content="<?php echo $ogFbDescription; ?>" />
<meta property="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 src="https://maps.googleapis.com/maps/api/js?libraries=places"></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>