git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@76 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -13,15 +13,40 @@
|
|||||||
<meta property="og:site_name" content="Il Lievitario"/>
|
<meta property="og:site_name" content="Il Lievitario"/>
|
||||||
<meta itemprop="name" content="Home - Il Lievitario"/>
|
<meta itemprop="name" content="Home - Il Lievitario"/>
|
||||||
<?php
|
<?php
|
||||||
$reqURI = $_SERVER['REQUEST_URI'];
|
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";
|
$ogFbTitle = "Home - Il Lievitario";
|
||||||
$ogFbUrl = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
$ogFbUrl = get_current_url();
|
||||||
$ogFbType = "website";
|
$ogFbType = "website";
|
||||||
$ogFbImage = "http://app.gruppolapastamadre.it/previewLink.png";
|
$ogFbImage = "http://app.gruppolapastamadre.it/previewLink.png";
|
||||||
$ogFbDescription = "Ricettario web del il Gruppo la pasta madre";
|
$ogFbDescription = "Ricettario web del il Gruppo la pasta madre";
|
||||||
echo $_SERVER['REQUEST_URI'];
|
$posRic = strpos($reqURI, "/#ricetta/");
|
||||||
if(strpos($reqURI, "/#ricetta/") !== false)
|
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:title" content="<?php echo $ogFbTitle; ?>"/>
|
||||||
<meta property="og:url" content="<?php echo $ogFbUrl; ?>"/>
|
<meta property="og:url" content="<?php echo $ogFbUrl; ?>"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user