git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@77 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2016-03-06 22:02:12 +00:00
parent a804de5c5d
commit 137b074d85
15 changed files with 196 additions and 756 deletions
+54 -10
View File
@@ -8,16 +8,60 @@
<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 property="og:title" content="Il Lievitario"/>
<meta itemprop="name" content="Home - Il Lievitario"/>
<meta property="og:url" content="http://app.gruppolapastamadre.it"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="http://app.gruppolapastamadre.it/previewLink.png"/>
<meta property="og:description" content="Ricettario web del il Gruppo la pasta madre" />
<meta property="description" content="Ricettario web del il Gruppo la pasta madre" />
<!-- 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'>