ob_start("ob_gzhandler"); $host = str_replace('www.', '', $_SERVER["HTTP_HOST"]); //echo $host.'<='; $domain = 'ostentus.pl'; if (strpos($host, 'ostentus.eu') !== false) $domain = 'ostentus.eu'; if (strpos($host, 'ostentus.net') !== false) $domain = 'ostentus.net'; if (($host != 'ostentus.pl') && ($host != 'ostentus.eu') && ($host != 'ostentus.net')) { $host = str_replace('.ostentus.pl', '', $host); $host = str_replace('.ostentus.eu', '', $host); $host = str_replace('.ostentus.net', '', $host); //echo $host.'<='; $user = $host; } else $user = ''; //if ($host == $user) $user = ''; //echo $host.'='.$user; $div = isset($_GET['div']) ? addslashes($_GET['div']) : ''; $sub = isset($_GET['sub']) ? addslashes($_GET['sub']) : ''; $item = isset($_GET['item']) ? addslashes($_GET['item']) : ''; $owner = 0; session_set_cookie_params(0, '/', '.'.$domain); session_start(); //$expires = 60*60*24*14; //if (($div == 'pms') || ($div == 'ums')) $expires = 60; $expires = 60; header('Pragma: public'); header('Cache-Control: maxage='.$expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT'); header('Server: gcdc.pl'); header('X-Powered-By: GCL.pl'); $etag = md5_file($_SERVER['SCRIPT_FILENAME']); //$etag = md5_file($_SERVER['REQUEST_URI']); header('Etag: "'.$etag.'"'); header('Content-Type: text/html; charset=utf-8'); include('includes/config.php'); include('includes/funkcje.php'); include('includes/functions.php'); include('includes/dzial_item_social.php'); require_once('includes/open-graph-protocol.php'); /* Facebook */ //require 'facebook/facebook.php'; //require 'facebook/fbconfig.php'; /* Social Auth */ //require 'social/social.php'; /* if (is_numeric($div)) $sql = "SELECT * FROM `$db_users` WHERE user='$div'"; else $sql = "SELECT * FROM `$db_users` WHERE login='$div'"; $result = $mysql->query($sql) or Die(gcl_mysql_error()); if ($result->num_rows == 1) { $wynik = $result->fetch_array(); $user = $wynik['user']; } */ $user = $div; //echo $user; if (strlen($user) > 0) { //echo $user.'<='; if (is_numeric($user)) { //echo $user.'<=n'; $sql = "SELECT * FROM $db_users WHERE user='".$user."'"; $result = $mysql->query($sql) or Die(mysql_error()); $wynik = $result->fetch_array(); $ilosc = $result->num_rows; //echo $ilosc; } else { //echo $user.'<=l'; $sql = "SELECT * FROM $db_users WHERE login='".$user."'"; $result = $mysql->query($sql) or Die(mysql_error()); $wynik = $result->fetch_array(); $ilosc = $result->num_rows; //echo $ilosc; } if ($ilosc == 1) $userid = $wynik['user']; else $userid = 0; //echo 'userid='.$userid; if ($userid > 0) { $sql = "SELECT * FROM $db_users WHERE user='".$userid."'"; $result = $mysql->query($sql) or Die(mysql_error()); $wiersz = $result->fetch_array(); //print_r($wiersz); $template_data = $wiersz; $templateid = $wiersz['template']; //echo '>>'.$templateid.'<<'; } } //echo strpos($host, 'ostentus.') === false; $pos = strpos(str_replace('www.', '', $_SERVER["HTTP_HOST"]), 'ostentus.'); //echo 'pos='.$pos; if ($pos === false) { //$sql = "SELECT * FROM $db_users WHERE domain='".$host."'"; $sql = "SELECT * FROM $db_users WHERE domain LIKE '%".$host."%'"; $result = $mysql->query($sql) or Die(mysql_error()); $wiersz = $result->fetch_array(); $ilosc = $result->num_rows; //echo 'userid='.$userid; if ($ilosc == 1) $userid = $wiersz['user']; else $userid = 0; //echo 'userid='.$userid; if ($userid > 0) { //$sql = "SELECT * FROM $db_users WHERE user='".$userid."'"; //$result = mysql_query($sql) or Die(mysql_error()); //$wiersz = mysql_fetch_array($result); $template_data = $wiersz; $templateid = $wiersz['template']; //echo $templateid; } } //echo 'userid='.$userid; //echo '>'.$templateid.'<'; if(isset($_SERVER['HTTPS'])) { if ($_SERVER['HTTPS'] == "on") { $protokol = 'https://'; } } else { $protokol = 'http://'; } $host = $protokol.$_SERVER["HTTP_HOST"]; $page_path = '/'; $page_host = $host; $website_url = $protokol.$_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $website_title = 'Ostentus - Sztuka naszą pasją'; $website_image = $protokol.$_SERVER['SERVER_NAME'].'/favicon/favicon-96x96.png'; $website_image_type = 'image/jpeg'; $website_image_width = 640; $website_image_height = 640; $website_decription = 'Ostentus jest internetową galerią sztuki pozwalającą artystom na zamieszczanie swoich prac, które prezentowane są w działach: fotografia, malarstwo, grafika, rysunek, rękodzieło, rzeźba, ceramika, meble itp. Każdy miłośnik sztuki może odwiedzić nas o dowolnej porze z sobie tylko znanego miejsca na świecie i spokojnie przyjrzeć się wielu pracom. Po dłuższym, a może też krótkim zastanowieniu można wybrać dzieło, które stanie się ozdobą naszego domu, mieszkania lub biura, albo też będzie idealnym prezentem dla kogoś bliskiego.'; $website_keywords = 'natura, ludzie, zwierzęta, architektura, obrazy, fotografia, zdjęcia, malarstwo, galeria, rysunki, ceramika, rękodzieło'; $website_decription_default = $website_decription; if ($userid > 0) { if (strlen($template_data['seo_description']) > 16) $website_decription = $template_data['seo_description']; if (strlen($template_data['seo_keywords']) > 16) $website_keywords = $template_data['seo_keywords']; if (strlen($template_data['seo_title']) > 2) $website_title = $template_data['seo_title']; } if (strlen($website_decription) > 16) $website_decription_default = $website_decription; if (($userid > 0) && ($templateid > 0)) { // Szablon użytkownika //echo '>'.$templateid.'<'; include('templates/index.php'); } else { // Domyślna strona // obsluga uzytkownika include('includes/funkcje_uzytkownik.php'); include('includes/uzytkownik_inc.php'); $content = ''; if (($div != 'ostentus') && ($div != 'pms') && ($div != 'ums')) include('includes/content.php'); if (strlen($website_decription) < 16) $website_decription = $website_decription_default; //if (strlen($website_keywords < 16) $website_keywords = $website_keywords_default; //if (strlen($website_title < 16) $website_title = $website_title_default; $image = new OpenGraphProtocolImage(); $image->setURL($website_image); //$image->setSecureURL($website_image); $image->setType($website_image_type); $image->setWidth($website_image_width); $image->setHeight($website_image_height); $ogp = new OpenGraphProtocol(); $ogp->setLocale('pl'); $ogp->setSiteName('Ostentus'); $ogp->setTitle($website_title); $ogp->setDescription($website_decription); $ogp->setType('website'); $ogp->setURL($website_url); //$ogp->setDeterminer('the'); $ogp->addImage($image); //$ogp->addAudio($audio); //$ogp->addVideo($video); ?>
echo $ogp->toHTML(); ?>