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); ?> toHTML(); ?>