secureString( require_once( "/home/wwwbuzzerstar/library/Config.inc.php" ); require_once( "/home/wwwbuzzerstar/library/Functions.inc.php" ); require_once( "/home/wwwbuzzerstar/library/Connection.inc.php"); require_once( "/home/wwwbuzzerstar/library/SSDTube.php" ); require_once( "/home/wwwbuzzerstar/library/mobile/Mobile_Detect.php"); $detect = new Mobile_Detect(); $func = new Functions(); $config = new Config(); $design = new Template(); $conn = new Connection(); $SSDTube = new SSDTube(); $table = $config->sql_tablename_publish_de(); $table_img = $config->sql_tablename_pictures(); $shortcode_passkey = $config->shortcode_passkey(); $pdo = $conn->prepareQuery(); $picpath = $config->picture_storepath(); $GoogleUserID = md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR']); $deviceTypeMobile = $detect->isMobile(); $deviceTypeTablet = $detect->isTablet(); $status = ""; $article_shortcode = strtolower(trim($func->stripHtml($_REQUEST['a']))); // article shortcode $article_desc = $func->stripHtml($_REQUEST['d']); // article description $stmt = $pdo->prepare("SELECT * FROM $table WHERE p_shortcode=:shortcode LIMIT 1"); // AND p_online=1 $stmt->bindValue(':shortcode', $article_shortcode, PDO::PARAM_STR); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $slidercontent = $rows[0]["p_slidercontent"]; $sliderExplode = explode(";", $slidercontent); $sliderHTMLContent = ""; if (count($sliderExplode)>=2){ $slidercss = << END; $sliderHTMLContent .= <<
END; for ($i=0;$i<=count($sliderExplode);$i++){ if (array_key_exists($i,$sliderExplode) && strlen($sliderExplode[$i]) > 4){ $myTable = $config->sql_tablename_pictures; $pdo23 = $conn->prepareQuery(); $stmt23 = $pdo23->prepare("SELECT p_title FROM $myTable WHERE p_shortcode=:shortcode LIMIT 1;"); $stmt23->bindValue(':shortcode', $sliderExplode[$i], PDO::PARAM_STR); $stmt23->execute(); $rows23 = $stmt23->fetchAll(PDO::FETCH_ASSOC); $p_imagedesc = $rows23[0]["p_title"]; // echo $stmt23->queryString; // var_dump($stmt23->errorInfo()); // var_dump($stmt23->errorCode()); $sliderHTMLContent .= <<
$p_imagedesc
Bild: $p_imagedesc
END; } // if (array_key_exists($i,$sliderExplode)){ } // for ($i=0;$i<=count($sliderExplode);$i++){ $sliderHTMLContent .= << END; } // if (count($sliderExplode)>=2){ $hashtag = $rows[0]["p_hashtag"]; $category_id = $rows[0]["p_category"]; $catg_array = $config->array_category(); $category = $catg_array[$category_id]; if (strlen($category)<=0){ $category="Entertainment"; }; $video_youtube_uri = $rows[0]["p_videolink"]; $SSDTube->identify($video_youtube_uri, true); $EmbeddedVideo = $SSDTube->embed(); $tumbnailVideoImg = $SSDTube->thumbnail_0_url; $video_duration = $func->getDuration(); $video_title = $SSDTube->title; $twitter = str_ireplace("@","",trim($rows[0]["p_twitterlink"])); $pp_link = trim($rows[0]["p_paypallink"]); $list_time = explode(" ",trim($rows[0]["p_timestamp"])); $timestamp = $list_time[0]." um ".$list_time[1] ." Uhr"; $list = explode(";",$rows[0]["p_tags"]); $headline = $rows[0]["p_headline"]; $articleURI = "http://www.buzzerstar.com/".$func->makeArticleLink($article_shortcode); $imageURI = "http://www.buzzerstar.com/i.php?s=$article_shortcode"; $p_articletext = $func->autolink($rows[0]["p_articletext"], array("target"=>"_blank","rel"=>"nofollow")); $hashtag = str_replace("#","",$hashtag); if (!empty($hashtag)){ $hashtag = "#".$hashtag; } else { $hashtag = ""; } $keywords_list = ""; $tagcode = << LIST; foreach ($list as $entry23) { $language = $func->GetLanguageFromString($entry23); if (strlen($language)!=2){ $language = "en"; } $keywords_list .= "$entry23, "; $tagcode .= <<$entry23 LIST; } $tagcode .= << LIST; if (!empty($pp_link)){ $paypalcode = <<
PP; } else { $paypalcode = ""; } $copyYear = 2012; $curYear = date('Y'); $year = $copyYear . (($copyYear != $curYear) ? '-' . $curYear : ''); $copy = "©$year BuzzerStar.com - M.Sc. Sebastian Enger"; $sentences = array(); $sentences = preg_split("/[.?!]/", $p_articletext); for ($i=0; $i<=2; $i++){ $articlehead .= $sentences[$i].". "; } for ($i=3; $i<=count($sentences)-1; $i++){ $articletail .= $sentences[$i]."."; } $tmp_http_yt_video = $func->ogTagsYoutubeVideo($video_youtube_uri); $MoreContentNavigation = $func->getNavigationContent(); if ($deviceTypeMobile === TRUE && $deviceTypeTablet === FALSE ) { $shareButtons =<<Teile mit deinen Freunden in Sozialen Netzwerken:
Teile den Inhalt mit deinen WhatsApp Freunden   Teile den Inhalt mit deinen Facebook Freunden   Teile den Inhalt mit deinen Pinterest Freunden   Teile den Inhalt mit deinen Google Plus Freunden   Teile den Inhalt mit deinen Stumpleupon Freunden

END; } elseif ($deviceTypeMobile === FALSE || $deviceTypeTablet === TRUE ) { $shareButtons =<<Teile mit deinen Freunden in Sozialen Netzwerken:
Teile den Inhalt mit deinen Facebook Freunden   Teile den Inhalt mit deinen Pinterest Freunden   Teile den Inhalt mit deinen Google Plus Freunden   Teile den Inhalt mit deinen Stumpleupon Freunden

END; $shareaholic = "

"; $shareholic_js =<< // END; } // if ($deviceTypeMobile === FALSE || $deviceTypeTablet === FALSE ) { $description_text = trim(substr($rows[0]["p_articletext"], 0, 150)); $content = array_merge( array('title'=>$headline), array('articleuri'=>$articleURI), array('image'=>$imageURI), array('keywords'=>"$keywords_list $category, BuzzerStar.com"), array('imagedesc'=>$rows[0]["p_picture_1_description"]), array('articletext'=>$p_articletext), array('articlehead'=>$articlehead), array('articletail'=>$articletail), array('articletags'=>$tagcode), array('twitter'=>$twitter), array('category'=>$category), array('copyright'=>$copy), array('author'=>$rows[0]["p_authorname"]), array('video'=>$EmbeddedVideo), array('sourcelink'=>$rows[0]["p_sourcelink"]), array('backlink'=>trim($rows[0]["p_backlink"])), array('timestamp'=>$timestamp), array('canonical_tag'=>$articleURI), array('paypal'=>$paypalcode), array('videothumbnailimg'=>$tumbnailVideoImg), array('videoduration'=>$video_duration), array('videotitle'=>$video_title), array('description'=>"$description_text ... mit Video"), array('video_yt_beautify'=>str_replace("https", "http", $tmp_http_yt_video)), array('video_yt_beautify_ssl'=>$tmp_http_yt_video), array('share_this_content_buttons'=>$shareButtons), array('shareaholic'=>$shareaholic), array('shareaholic_javascript'=>$shareholic_js), array('slider_css'=>$slidercss), array('slider_content'=>$sliderHTMLContent), array('more_content_menu_navigation'=>$MoreContentNavigation) //array('USER_ID'=>$GoogleUserID) ); $stmt = null; // doing this is mandatory for connection to get closed $pdo = null; $design->setPath( "/home/wwwbuzzerstar/tpl/" ); $design->display_cache('show_article_de', $content, true, 3600*24*3); exit(0); ?>