public function BoardRightUpToHTML()
 {
     global $infos;
     $myIndexSocial = new IndexSocial();
     echo "<div id=\"catcher2\" style=\"border:1px solid #c7d0d5; border-radius:15px;\">";
     $myIndexSocial->IndexSocialToHTML();
     echo "</div>";
     echo "<div id=\"sticky2\" style=\"margin-top:2%;width:100%;\">";
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     $connection->set_charset("utf8");
     $query = "SELECT * FROM threads WHERE threadCategory=\"" . $infos['boardCategory'] . "\" ORDER BY rand() LIMIT 2";
     $results2 = $connection->query($query);
     while ($curResult2 = $results2->fetch_assoc()) {
         $threadID2 = $curResult2["threadID"];
         $threadDate2 = $curResult2["threadDate"];
         $threadWriter2 = $curResult2["threadWriter"];
         $threadCategory2 = $curResult2["threadCategory"];
         $threadPicture2 = $curResult2["threadPicture"];
         $stepCount2 = $curResult2["stepCount"];
         $threadName2 = $curResult2["threadName"];
         $threadPoint2 = $curResult2["threadPoint"];
         $myThread2 = new Thread(array($threadID2, $threadDate2, $threadWriter2, $threadCategory2, $threadPicture2, $stepCount2, $threadName2, $threadPoint2));
         $myThread2->ThreadToPetitHTML();
     }
     echo "</div>";
     echo "<script>";
     echo "\n\t\t\$(document).ready(function(){\n\t\t\tif (\$(window).width()<=1028)\n\t\t\t{\n\t\t\t\t\$('#catcher2').remove();\n\t\t\t\t\$('#sticky2').remove();\n\t\t\t\t\$('#random_for_mobile').show();\n\t\t\t}\n\t\t});\n\tvar wid = \$('#sticky2').width();\n\tfunction isScrolledTo(elem) {\n    var docViewTop = \$(window).scrollTop(); //num of pixels hidden above current screen\n    var docViewBottom = docViewTop + \$(window).height();\n \n    var elemTop = \$(elem).offset().top; //num of pixels above the elem\n    var elemBottom = elemTop + \$(elem).height();\n \n    return ((elemTop <= docViewTop));\n}\n\n\tvar catcher = \$('#catcher2');\nvar sticky = \$('#sticky2');\n\n\t\$(window).scroll(function() {\n\tif (\$(window).width()>1028){\n    if(isScrolledTo(sticky)) {\n        sticky.css('position','fixed');\n        sticky.css('top','100px');\n\tsticky.css('max-width',wid);\n\t\$('#sticky_footer_div').show(500);\n    }\n\t\n    var stopHeight = catcher.offset().top + catcher.height(); \n\t  if ( stopHeight > sticky.offset().top) {\n        sticky.css('position','absolute');\n        sticky.css('top',stopHeight-70);\n\t\$('#sticky_footer_div').hide(500);\n    }\n}\n});\n\t\t";
     echo "</script>";
 }
 public function SuggestionsBarToHTML()
 {
     $myIndexSocial = new IndexSocial();
     echo "<div style=\"border:1px solid #c7d0d5; border-radius:15px;\">";
     $myIndexSocial->IndexSocialToHTML();
     echo "</div>";
     global $sinf;
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection2 = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     if ($connection2->connect_error) {
         echo "Database'e bağlantı sorunu";
     } else {
         $connection2->set_charset("utf8");
         echo "<div style=\"border:1px solid #c7d0d5;border-radius:15px;margin-top:3%;overflow:auto;height:100%;width:100%;max-width:100%;background-color:#e6e6e6;\">";
         echo "<div style=\"margin-top:5%;text-align:left;margin-right:5%;margin-left:5%;font-size:19px;font-family: 'Josefin Sans', sans-serif;color:#cb7c7a\">";
         echo "<p style=\"word-wrap:break-word;text-align:left;width:80%;max-width:80%;\">";
         echo "İlginizi çekebilecek başlıklar";
         echo "</p>";
         echo "<hr style=\"border:1px solid #c7d0d5;\"/>";
         echo "</div>";
         $quelloThreddo = $connection2->real_escape_string($sinf['quelleThread']);
         $sugQuery = "SELECT * FROM threads WHERE threadCategory =\"" . $sinf['quelleCategorie'] . "\" AND threadName<>\"" . $quelloThreddo . "\" ORDER BY RAND() LIMIT 30";
         $results2 = $connection2->query($sugQuery);
         while ($curResult2 = $results2->fetch_assoc()) {
             $threadID2 = $curResult2["threadID"];
             $threadDate2 = $curResult2["threadDate"];
             $threadWriter2 = $curResult2["threadWriter"];
             $threadCategory2 = $curResult2["threadCategory"];
             $threadPicture2 = $curResult2["threadPicture"];
             $stepCount2 = $curResult2["stepCount"];
             $threadName2 = $curResult2["threadName"];
             $threadPoint2 = $curResult2["threadPoint"];
             $myThread2 = new Thread(array($threadID2, $threadDate2, $threadWriter2, $threadCategory2, $threadPicture2, $stepCount2, $threadName2, $threadPoint2));
             $myThread2->ThreadToPetitHTML();
         }
         $sugQuery = "SELECT * FROM threads WHERE threadCategory <>\"" . $sinf['quelleCategorie'] . "\" AND threadName<>\"" . $quelloThreddo . "\" ORDER BY RAND() LIMIT 10";
         $results2 = $connection2->query($sugQuery);
         while ($curResult2 = $results2->fetch_assoc()) {
             $threadID2 = $curResult2["threadID"];
             $threadDate2 = $curResult2["threadDate"];
             $threadWriter2 = $curResult2["threadWriter"];
             $threadCategory2 = $curResult2["threadCategory"];
             $threadPicture2 = $curResult2["threadPicture"];
             $stepCount2 = $curResult2["stepCount"];
             $threadName2 = $curResult2["threadName"];
             $threadPoint2 = $curResult2["threadPoint"];
             $myThread2 = new Thread(array($threadID2, $threadDate2, $threadWriter2, $threadCategory2, $threadPicture2, $stepCount2, $threadName2, $threadPoint2));
             $myThread2->ThreadToPetitHTML();
         }
         echo "</div>";
         $connection2->close();
     }
 }
예제 #3
0
include_once "classes/IndexGuncel.class.php";
include_once "classes/IndexSocial.class.php";
/*
if (!isset($_SESSION["user_name"])){
include_once("fbaccess.php");
$user = $facebook->getUser();
if (isset($user)) {
	$response = file_get_contents("https://graph.facebook.com/".$user[""]."?fields=name");  
	$user2 = json_decode($reponse,true);  
	$_SESSION["user_name"] =  $user2['name']; 
}
}*/
$myUpmenu = new Upmenu();
$myIndexUp = new IndexUp();
$myIndexGuncel = new IndexGuncel();
$myIndexSocial = new IndexSocial();
$myUpmenu->UpmenuToHTML();
$myIndexUp->IndexUpToHTML();
echo "<div class=\"container\">";
echo "<div class=\"row\" style=\"margin-top:2%;\">";
echo "<div class=\"col-md-12 col-xs-12 col-lg-9\">";
$myIndexGuncel->IndexGuncelToHTML();
echo "</div>";
echo "<div class=\"col-md-12 col-xs-12 col-lg-3\" style=\"margin-top:2%\">";
$myIndexSocial->IndexSocialToHTML();
echo "</div>";
echo "</div>";
echo "</div>";
?>
<nav id="indexStickyFooter" class="navbar navbar-default navbar-fixed-bottom " role="navigation" style="display:none;background-color:#e6e6e6;border-top:1px solid #c7d0d5;font-family: 'Josefin Sans', sans-serif;">
   <div class="navbar-header">