<?php

include_once "classes/ActivationFinder.class.php";
include_once "classes/DBConnector.class.php";
$threadID = $_GET["id"];
$userName = $_GET["username"];
$comment = htmlspecialchars($_POST["commentholder"]);
$commentDate = date('d/m/Y H:i:s');
$myDBConnector = new DBConnector();
$dbARY = $myDBConnector->infos();
$myActivationFinder = new ActivationFinder($userName);
$activation = $myActivationFinder->Find();
if ($activation == TRUE) {
    $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
    if ($comment !== "") {
        if ($connection->connect_error) {
            echo "CONNECT_ERR";
        } else {
            $connection->set_charset("utf8");
            $querijandro = "INSERT INTO comments(`threadID`, `comment`, `commentDate`, `writerName`) VALUES ('{$threadID}',\"" . $comment . "\",\"" . $commentDate . "\",\"" . $userName . "\")";
            if ($connection->query($querijandro) === TRUE) {
                echo "OK";
            } else {
                echo "QUERY_ERR";
            }
            $connection->close();
        }
    } else {
        echo "BOS";
    }
} else {
 public function UserSettingsToHTML()
 {
     global $userName;
     echo "<ul class=\"nav nav-tabs\" style=\"font-family:Verdana,Geneva,sans-serif;font-size:13px;\">";
     echo "<li class=\"active\"><a href=\"#set_sifre_link\" id=\"set_sifre_a\" data-toggle=\"tab\">Şifre değiştirme</a></li>";
     echo "<li class=\"\"><a href=\"#set_del_link\" id=\"set_del_a\" data-toggle=\"tab\">Hesap silme</a></li>";
     echo "<li class=\"\"><a href=\"#set_activation_link\" id=\"set_activation_a\" data-toggle=\"tab\">Üyelik aktivasyonu</a></li>";
     echo "</ul>";
     echo "<div class=\"tab-content\">";
     echo "<div class=\"tab-pane-active\" id=\"set_sifre_link\">";
     echo "<div style=\"margin-top:2%;border:1px solid #c7d0d5;border-radius:15px;padding:2%;width:60%;font-family: Verdana,Geneva,sans-serif; color:#6e6e6e;font-size:15px;\">";
     echo "<form id=\"SifreDegistiriciForm\" method=\"post\" action=\"SifreDegistirici.php\">";
     echo "Eski şifre : ";
     echo "<input id=\"passChangeEskiSifre\" name=\"passChangeEskiSifre\" type=\"password\" class=\"form-control\"/>";
     echo "<br/>";
     echo "Yeni şifre : ";
     echo "<input id=\"passChangeYeniSifre\" name=\"passChangeYeniSifre\" type=\"password\" class=\"form-control\"/>";
     echo "</form>";
     echo "<br/>";
     echo "<button id=\"sifreDegistirButton\" class=\"btn btn-primary\">Değiştir</button>";
     echo "<div id=\"sifreDegistirErrDIV\" style=\"font-family: Verdana,Geneva,sans-serif;font-size:14px;color:#d1334e;display:none;margin-top:5%;margin-bottom:3%;\">";
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "<div class=\"tab-pane\" id=\"set_del_link\">";
     echo "<div style=\"margin-top:2%;border:1px solid #c7d0d5;border-radius:15px;padding:2%;width:60%;font-family: Verdana,Geneva,sans-serif; color:#6e6e6e;font-size:15px;\">";
     echo "<form id=\"deleteuserform\" method=\"post\" action=\"deleteuser.php\">";
     echo "Şifre : ";
     echo "<input name=\"deleteuserpassword\" type=\"password\" class=\"form-control\"/>";
     echo "<br/>";
     echo "Son söz:";
     echo "<input type=\"text\" class=\"form-control\"/>";
     echo "</form>";
     echo "<br/>";
     echo "<button id=\"deleteuserbtn\" class=\"btn btn-danger\">Elveda</button>";
     echo "</div>";
     echo "</div>";
     echo "<div class=\"tab-pane\" id=\"set_activation_link\">";
     echo "<div style=\"margin-top:2%;border:1px solid #c7d0d5;border-radius:15px;padding:2%;width:60%;font-family: Verdana,Geneva,sans-serif; color:#6e6e6e;font-size:15px;\">";
     if (isset($_SESSION["user_name"])) {
         $myActivationFinder = new ActivationFinder($_SESSION["user_name"]);
         if (!$myActivationFinder->Find()) {
             echo "Hesabınız aktif değil";
             echo "<br/><br/>";
             echo "<button id=\"activationResendButton\" class=\"btn btn-success\">";
             echo "Tekrar kod gönder";
             echo "</button>";
             echo "<div style=\"display:none;margin-top:2%;\" id=\"activationResendSpinner\">";
             echo "  <i class=\"fa fa-2x fa-spinner fa-spin\"></i>";
             echo "</div>";
             echo "<form id=\"activationResendForm\" style=\"display:none;\" method=\"post\" action=\"activationResend.php?userName="******"user_name"] . "\"></form>";
         } else {
             echo "Hesabınız aktif durumda";
         }
     }
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "<script type=\"text/javascript\">";
     echo "\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#deleteuserbtn').click(function(e){\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\$('#deleteuserform').ajaxForm({\n\t\t\t\t\t\t\tsuccess : function(msg){\n\t\t\t\t\t\t\t\tif(msg==\"usr_not_signed_in\")\n\t\t\t\t\t\t\t\t\talert(\"Devam etmek için kullanıcı girişi yapın.\");\n\t\t\t\t\t\t\t\tif (msg==\"password_not_match\")\n\t\t\t\t\t\t\t\t\talert(\"Hatalı şifre.\");\n\t\t\t\t\t\t\t\tif (msg==\"connect_error\")\n\t\t\t\t\t\t\t\t\talert(\"Bağlantı hatası.\");\n\t\t\t\t\t\t\t\tif (msg==\"OK\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\talert(\"Hesabınız başarıyla silindi :(\");\n\t\t\t\t\t\t\t\t\twindow.location = \"http://www.serinhikaye.com/\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function(){\n\t\t\t\t\t\t\t\talert(\"Bir hata oldu.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).submit();\n\t\t\t\t\t});\n\t\t\t\t\t\$('#activationResendButton').click(function(){\n\t\t\t\t\t\t\$('#activationResendButton').hide(100);\n\t\t\t\t\t\t\$('#activationResendSpinner').show(100);\n\t\t\t\t\t\t\$('#activationResendForm').ajaxForm({\n\t\t\t\t\t\t\tsuccess : function (msg){\n\t\t\t\t\t\t\t\tif (msg=='OK'){\n\t\t\t\t\t\t\t\t\t\$('#activationResendSpinner').hide();\n\t\t\t\t\t\t\t\t\talert(\"Aktivasyon kodunuz yollandı. Her ihtimale karşı spam kutunuzu da konrol etmenizde fayda var.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\$('#activationResendButton').show(100);\n\t\t\t\t\t\t\t\t\t\t\$('#activationResendSpinner').hide(100);\n\t\t\t\t\t\t\t\t\t\talert(\"Bir hata oldu ve kodunuzu yollayamadık.\");\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\talert(\"İstenmeyen şeyler oldu ve kodunuzu yollayamadık.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).submit();\t\n\t\t\t\t\t});\n\t\t\t\t\t\$('#set_sifre_a').click(function(){\n\t\t\t\t\t\t\$('#set_sifre_link').attr('class','tab-pane');\n\t\t\t\t\t});\t\n\t\t\t\t\t\$('#set_del_a').click(function(){\n\t\t\t\t\t\t\$('#set_sifre_link').attr('class','tab-pane');\n\t\t\t\t\t});\n\t\t\t\t\t\$('#set_activation_a').click(function(){\n\t\t\t\t\t\t\$('#set_sifre_link').attr('class','tab-pane');\n\t\t\t\t\t});\n\t\t\t\t\t\$('#sifreDegistirButton').click(function(){\n\t\t\t\t\t\t\$('#sifreDegistirErrDIV').hide();\n\t\t\t\t\t\tif (\$('#passChangeEskiSifre').val()=='' || \$('#passChangeYeniSifre').val()=='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').html('Bilgileriniz eksik');\n\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').show(100);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\t\t\n\t\t\t\t\t\t\t\$('#SifreDegistiriciForm').ajaxForm({\n\t\t\t\t\t\t\t\tsuccess: function(msg){\n\t\t\t\t\t\t\t\t\tmsg = \$.parseJSON(msg);\n\t\t\t\t\t\t\t\t\tif (msg =='SIFRE_HATALI')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').html('Şifre bilginiz hatalı');\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').show(100);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (msg =='CONNECT_ERR')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').html('Veritabanımıza bağlanamıyoruz. Bu sorunu en kısa sürede gidericez.');\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').show(100);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (msg=='QUERY_ERR')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').html('Bir sebepten ötürü şifrenizi değiştiremedik. Bu sorunu en kısa sürede gidericez.');\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').show(100);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (msg=='OK')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\talert(\"Şifreniz başarıyla değiştirildi.\");\n\t\t\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (msg=='SIFRE_TURKCE')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').html('Şifrenizde türkçe karakterler kullanmamaya gayret edin.');\n\t\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').show(100);\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\terror : function(){\n\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').html('Şifre Değiştirici LTD ŞTİ sıçtı. Bu sorunu en kısa sürede gidericez.');\n\t\t\t\t\t\t\t\t\t\$('#sifreDegistirErrDIV').show(100);\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}).submit();\n\t\t\t\t\t});\t\n\t\t\t\t});\n\t\t\t";
     echo "</script>";
 }
Exemplo n.º 3
0
 public function UpmenuToHTML()
 {
     echo "<link rel=\"stylesheet\" href=\"bootstrap-social-gh-pages/bootstrap-social.css\"/>";
     echo "<link rel=\"stylesheet\" href=\"font-awesome-4.3.0/css/font-awesome.min.css\"/>";
     echo "<link rel=\"stylesheet\" href=\"font-awesome-4.3.0/css/font-awesome.css\"/>";
     echo "<link rel=\"stylesheet\" href=\"collapse_fix.css\"/>";
     $this->signUpLogin();
     if (isset($_SESSION["user_name"])) {
         echo "<div class=\"modal fade\" id=\"upmenu_user_settings_modal\"  tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"basicModal\" aria-hidden=\"true\" >";
         echo "<div class=\"modal-dialog\">";
         echo "<div class=\"modal-content\" style=\"background-color:#e6e6e6;\">";
         echo "<div class=\"modal-header\" style=\"background-color:#e6e6e6;border-bottom:1px solid #c7d0d5;\">";
         echo "<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>";
         echo "<p style=\"color:#ec583a;margin-left:4%;font-size:23px;font-family: 'Josefin Sans', sans-serif;\">";
         echo "<img src=\"images/headerfil2.jpg\" style=\"margin-right:2%;max-width:10%;\"/>";
         echo "Hesap ayarları ";
         echo "</p>";
         echo "</div>";
         echo "<div class=\"modal-body\" style=\"background-color:#e6e6e6;\">";
         $myUserSettings = new UserSettings($_SESSION["user_name"]);
         $myUserSettings->UserSettingsToHTML();
         echo "</div>";
         echo "</div>";
         echo "</div>";
         echo "</div>";
         echo "<div id=\"upmenu_yeni_baslik\"></div>";
         echo "<div id=\"upmenu_mesajlar\"></div>";
     }
     echo "<nav class=\"navbar navbar-default navbar-fixed-top  \" style=\"border-bottom:1px solid #c7d0d5;font-size:25px;font-family: 'Amatic SC', cursive; background-color:#e6e6e6; \" role=\"navigation\">";
     echo "<div class=\"container-fluid\">";
     echo "<div class=\"navbar-header\" style=\"margin-left:1%;\">";
     echo "<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#myNavbar\">";
     echo "<span class=\"icon-bar\"></span>";
     echo "<span class=\"icon-bar\"></span>";
     echo "<span class=\"icon-bar\"></span>";
     echo "</button>";
     echo "<a class=\"\" href=\"http://www.serinhikaye.com\" style=\"\">";
     echo "<img title=\"SerinHikaye.com - Herkesin en iyi bildiği şeyler.\" src=\"images/headerfil2.jpg\" style=\"width:50px;\"/>";
     echo "</a>";
     echo "</div>";
     echo "<div class=\"collapse navbar-collapse\" id=\"myNavbar\">";
     echo "<ul style=\"margin-left:2%;\" class=\"nav navbar-nav\">";
     echo "<li  onmouseout=\"this.style.background='#e6e6e6'\" onmouseover=\"this.style.background='#ffffff'\"  class=\"dropdown\" style=\"\">";
     echo "<a href=\"javascript:void(0)\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" title=\"Neler neler..\">";
     echo "Kategoriler";
     echo "<b class=\"caret\"></b>";
     echo "</a>";
     echo "<ul class=\"dropdown-menu\" style=\"font-size:20px;background-color:#e6e6e6;  border-radius:15px;\">";
     echo "<li ><a style=\"color:#6e6e6e;\" href=\"category.php?cat=se\" title=\"O tabloyu ben de çok seviyorum Selinsu.\">#Sanat/Eğlence</a></li>";
     echo "<li><a style=\"color:#6e6e6e;\" href=\"category.php?cat=be\" title=\"Gamerlar, Freakler ve dahiler.\">#Bilgisayar/Elektronik</a></li>";
     echo "<li><a style=\"color:#6e6e6e;\" href=\"category.php?cat=yi\" title=\"Biraz kilo mu aldım ?\">#Yemek/İçmek</a></li>";
     echo "<li><a style=\"color:#6e6e6e;\" href=\"category.php?cat=ss\" title=\"Bench press ve karatay diyeti.\">#Sağlık/Spor</a></li>";
     echo "<li><a style=\"color:#6e6e6e;\" href=\"category.php?cat=s\" title=\"Eski sevgilinin yeni sevgilisi ve asansör sessizlikleri.\">#Sosyal ilişkiler</a></li>";
     echo "<li><a style=\"color:#6e6e6e;\" href=\"category.php?cat=bk\" title=\"İsviçreli bilim adamları, Norveçli balıkçılar.\">#Bilim/Kültür</a></li>";
     echo "<li><a style=\"color:#6e6e6e;\" href=\"category.php?cat=a\" title=\"Uçan midilliler, gökkuşakları ve daha fazlası.\">#Alakasız</a></li>";
     echo "</ul>";
     echo "</li>";
     echo "<li  onmouseout=\"this.style.background='#e6e6e6'\" onmouseover=\"this.style.background='#ffffff'\" style=\"\">";
     echo "<a href=\"best.php\" title=\"Süper, şahane, harkulade eserler.\">";
     echo "En iyiler";
     echo "</a>";
     echo "</li>";
     echo "<li  onmouseout=\"this.style.background='#e6e6e6'\" onmouseover=\"this.style.background='#ffffff'\" style=\"\">";
     echo "<a href=\"recent.php\" title=\"Gencecik, taptaze.\">";
     echo "En yeniler";
     echo "</a>";
     echo "</li>";
     echo "<li onmouseout=\"this.style.background='#e6e6e6'\" onmouseover=\"this.style.background='#ffffff'\" style=\"\">";
     echo "<a href=\"thread.php?mode=rand\" title=\"Ortaya karışık, bol limonlu.\">";
     echo "<span style=\"color:#007157;\">S</span><span style=\"color:#edb8b4;\">e</span><span style=\"color:#d67226;\">r</span><span style=\"color:#5d5d5d;\">i</span><span style=\"color:#d65757;\">n</span> <span style=\"color:#edb8b4;\">H</span><span style=\"color:#5d5d5d;\">i</span><span style=\"color:#007157;\">k</span><span style=\"color:#edb8b4;\">a</span><span style=\"\">y</span><span style=\"color:#d67226;\">e</span>";
     echo "</a>";
     echo "</li>";
     echo "</ul>";
     echo "<form class=\"navbar-form navbar-left\" id=\"thread_suggestion_form\" method=\"post\" action=\"threadSuggestion.php\">";
     echo "<div class=\"input-group\" style=\"font-family: 'Josefin Sans', sans-serif;\">";
     echo "<input name=\"baslik_arayici_input\" autocomplete=\"off\" id=\"baslik_arayici_input\" type=\"text\" class=\"form-control\" placeholder=\"Başlık / Yazar\">";
     echo "<div class=\"input-group-btn\">";
     echo "<button id=\"kapsamli_ara_button\" title=\"Kapsamlı ara\" type=\"submit\" class=\"btn btn-success\"><span class=\"glyphicon glyphicon-search\"></span></button>";
     echo "</div>";
     echo "</div>";
     echo "</form>";
     if (!isset($_SESSION["user_name"])) {
         echo "<ul class=\"nav navbar-nav navbar-right\" style=\"margin-right:1%;\">";
         echo "<li>";
         echo "<a title=\"\" href=\"javascript:void(0)\" id=\"up_menu_giris_yap\" > Giriş yap </a>";
         echo "</li>";
         echo "<li>";
         echo "<a title=\"\" href=\"javascript:void(0)\" id=\"up_menu_uye_ol\" > Üye ol </a>";
         echo "</li>";
         echo "</ul>";
         echo "<button id=\"fbConnectButtonUpMenu\" style=\"font-family:Verdana,sans-serif;width:100px;margin-right:2%;\" class=\"btn navbar-right navbar-btn btn-facebook\">";
         echo "<i class=\"fa fa-facebook\"></i>";
         echo "";
         echo "</button>";
         echo "<a href=\"twitter_send.php\" id=\"twtConnectButtonUpMenu\" style=\"font-family:Verdana,sans-serif;width:100px;margin-right:2%;\" class=\"btn navbar-right navbar-btn btn-twitter\">";
         echo "<i class=\"fa fa-twitter\"></i>";
         echo "</a>";
     } else {
         $myActivationFinder = new ActivationFinder($_SESSION["user_name"]);
         echo "<ul class=\"nav navbar-nav navbar-right\" style=\"\">";
         echo "<li class=\"dropdown\" style=\"\">";
         echo "<a href=\"javascript:void(0)\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">";
         echo $_SESSION["user_name"];
         echo "<b class=\"caret\"></b>";
         echo "</a>";
         echo "<ul class=\"dropdown-menu\" style=\"background-color:#e6e6e6;  border-radius:15px;\">";
         echo "<li><a style=\"font-size:23px;color:#6e6e6e;\" href=\"user.php?name=" . $_SESSION["user_name"] . "\">Profilim</a></li>";
         echo "<li><a id=\"ikinci_mesaj_kutusu_acici\" style=\"font-size:23px;color:#6e6e6e;\" href=\"javascript:void(0)\">Mesajlar</a></li>";
         if ($this->isSocial() == "NO") {
             echo "<li><a style=\"font-size:23px;color:#6e6e6e;\" id=\"hesap_ayarlari_acici_link\" href=\"javascript:void(0)\">Hesap ayarları</a></li>";
         } else {
             echo "<li style=\"display:none;\"><a style=\"color:#6e6e6e;\" id=\"hesap_ayarlari_acici_link\" href=\"javascript:void(0)\">Hesap ayarları</a></li>";
         }
         echo "<li><a style=\"font-size:23px;color:#6e6e6e;\" id=\"upmenu_cikis_linki\" href=\"javascript:void(0)\">Çıkış</a></li>";
         echo "</ul>";
         echo "</li>";
         echo "</ul>";
         echo "<form id=\"UpMenuSeenMessageSeenUpdateForm\" style=\"display:none;\" method=\"post\" action=\"UpMenuMessageSeenUpdate.php?usr="******"user_name"] . "\"></form>";
         echo "<ul id=\"upmenu_messager_ul\" style=\"border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6;\" class=\"nav navbar-nav navbar-right\" style=\"\">";
         echo "<li >";
         echo "<a id=\"upmenu_mesaj_kutusu_ac_a\" href=\"javascript:void(0)\">Mesaj\n</a>";
         echo "</li>";
         echo "</ul>";
         if ($myActivationFinder->Find()) {
             echo "\n\t\t<div class=\"dropdown navbar-btn navbar-right\" id=\"yeni_icerik_dropdown\" style=\"font-family: 'Josefin Sans', sans-serif;display:inline-block;margin-right:2%;\">\n  \t\t<button class=\"btn btn-info  dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">Yeni içerik\n  \t\t<span class=\"caret\"></span></button>\n  \t\t<ul class=\"dropdown-menu\">\n    \t\t<li><a id=\"upmenu_yeni_pano_button\" href=\"javascript:void(0);\">Yeni pano</a></li>\n    \t\t<li><a id=\"upmenu_yeni_icerik_button\" href=\"javascript:void(0);\">Yeni başlık</a></li>\n  \t\t</ul>\n\t\t</div>";
             /*echo "<button type=\"button\" title=\"Anlat ki bilmeyenler öğrensin.\" id=\"upmenu_yeni_icerik_button\" class=\"btn btn-info navbar-btn navbar-right \" style=\"font-family: 'Josefin Sans', sans-serif;margin-right:2%;\">";
             			echo "Yeni içerik oluştur";
             		echo "</button>";*/
         } else {
             echo "<button id=\"upmenu_icerik_olustur_btn_non_active\" title=\"İçerik oluşturabilmek için hesabını aktive etmen gerekiyor.\"  class=\"btn btn-info navbar-btn navbar-right\" style=\"font-family: 'Josefin Sans', sans-serif;margin-right:2%;\">";
             echo "Yeni içerik oluştur";
             echo "</button>";
         }
     }
     echo "</div>";
     echo "</div>";
     echo "</nav>";
     echo "<div style=\"display:none;border-right:1px solid #e6e6e6;border-left:1px solid #e6e6e6;border-top:1px solid #e6e6e6;z-index:2;background-color:#e6e6e6;\" id=\"baslik_arayici_datalist\"></div>";
     echo "<form id=\"upmenu_cikis_formu\" method=\"post\" action=\"sessionexit.php\"></form>";
     /*******/
     echo "<script src=\"//connect.facebook.net/en_US/all.js\"></script>";
     echo "<div id=\"fb-root\"></div>\n\t\t<script>\n  \t\twindow.fbAsyncInit = function() {\n   \t\tFB.init({\n      \t\tappId      : '662948600472315', // App ID\n      \t\tchannelUrl : 'http://www.serinhikaye.com',\n      \t\tstatus     : true, // check login status\n      \t\tcookie     : true, // enable cookies to allow the server to access the session\n      \t\txfbml      : true  // parse XFBML\n    \t\t});\n    \t\t};\n \n  \t\t(function(d){\n    \t\tvar js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];\n     \t\tif (d.getElementById(id)) {return;}\n     \t\tjs = d.createElement('script'); js.id = id; js.async = true;\n     \t\tjs.src = \"//connect.facebook.net/en_US/all.js\";\n     \t\tref.parentNode.insertBefore(js, ref);\n   \t\t}(document));\n \n\t\t</script>";
     /******/
     echo "<form id=\"facebookUpdateFormUpMenu\" method=\"post\" style=\"\" action=\"facebookUpdate.php\">";
     echo "<input type=\"text\" id=\"facebookUpdateIDTXT\" name=\"facebookUpdateIDTXT\" style=\"display:none;\"/>";
     echo "<input type=\"text\" id=\"facebookUpdateNameTXT\" name=\"facebookUpdateNameTXT\" style=\"display:none;\"/>";
     echo "</form>";
     echo "<div id=\"upmenuchoosenick\"></div>";
     echo "<script type=\"text/javascript\">";
     echo "\n\t\t\t\tfunction Login()\n    \t\t\t\t{\n \n        \t\t\t\tFB.login(function(response) {\n           \t\t\t\tif (response.authResponse)\n           \t\t\t\t{\n                \t\t\t\tgetUserInfo(); // Get User Information.\n \n            \t\t\t\t} else\n            \t\t\t\t{\n             \t\t\t\t\tconsole.log('Authorization failed.');\n            \t\t\t\t}\n         \t\t\t\t},{scope: 'email'});\n \n    \t\t\t\t}\n\n\t\t\t\tfunction getUserInfo() {\n       \t\t\t\t\tFB.api('/me',  function(response) {\n \n        \t\t\t\t//response.name       - User Full name\n        \t\t\t\t//response.link       - User Facebook URL\n       \t\t\t\t\t//response.username   - User name\n        \t\t\t\t//response.id         - id\n        \t\t\t\t//response.email      - User email\n\t\t\t\t\t\t\t\n\t\t\t\t\t\$('#facebookUpdateIDTXT').val(response.id);\n\t\t\t\t\t\$('#facebookUpdateNameTXT').val(response.name);\n\t\t\t\t\t\$('#facebookUpdateFormUpMenu').ajaxForm({\n\t\t\t\t\t\tsuccess : function(msg){\n\t\t\t\t\t\t\tif (msg=='CONNECT_ERR')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\talert(\"Bağlantı sorunu.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (msg=='YES')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#upmenuchoosenick').load('chooseNick.php?id='+msg,function(){\n\t\t\t\t\t\t\t\t\t\t\$('#nickChooserModal').modal(\"toggle\");\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror : function(){\n\t\t\t\t\t\t\talert(\"Bir sorun oldu ve Facebook ile bağlanamadık.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}).submit();\n        \t\t\t\t});\n   \t\t\t\t}\n\n\n\t\t\t\t\$('#fbConnectButtonUpMenu').click(function(){\n\t\t\t\t\tLogin();\n\t\t\t\t});\n\n\t\t\t\t\$(document).ready(function(){\n\n\t\t\t\t\t\$('#kapsamli_ara_button').click(function(e){\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tif (\$('#baslik_arayici_input').val()!='')\n\t\t\t\t\t\t\twindow.location='search.php?query='+\$('#baslik_arayici_input').val();\n\t\t\t\t\t});\t\t\t\t\t\n\t\n\t\t\t\t\t\$(document).mouseup(function (e)\n\t\t\t\t\t{\n    \t\t\t\t\t\tvar container = \$('#baslik_arayici_datalist');\n\n    \t\t\t\t\t\tif (!container.is(e.target) \n        \t\t\t\t\t&& container.has(e.target).length === 0)\n    \t\t\t\t\t\t{\n        \t\t\t\t\t\tcontainer.hide(250);\n    \t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\$('#baslik_arayici_input').keyup(function(){\n\t\t\t\t\t\tif(\$(window).width()>=1250){\n\t\t\t\t\t\tif (\$('#baslik_arayici_input').val()!='')\n\t\t\t\t\t\t\$('#thread_suggestion_form').ajaxForm({\n\t\t\t\t\t\t\tsuccess : function (msg){\n\t\t\t\t\t\t\t\tvar pos = \$('#baslik_arayici_input').position();\n\t\t\t\t\t\t\t\t\$('#baslik_arayici_datalist').css({\n\t\t\t\t\t\t\t\t\ttop: pos.top + \$('#baslik_arayici_input').height()  + 20,\n\t\t\t\t\t\t\t\t\tleft: pos.left,\n\t\t\t\t\t\t\t\t\twidth : 265 ,\n\t\t\t\t\t\t\t\t\tposition: 'absolute'\n\t\t\t\t\t\t\t\t}).insertAfter(\$('#baslik_arayici_input'));\n\t\t\t\t\t\t\t\t\$('#baslik_arayici_datalist').hide();\n\t\t\t\t\t\t\t\t\$('#baslik_arayici_datalist').html(msg);\n\t\t\t\t\t\t\t\t\$('#baslik_arayici_datalist').show(250);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function(){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).submit();\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\$('#baslik_arayici_datalist').hide(250);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\$('#ikinci_mesaj_kutusu_acici').click(function(){\n\t\t\t\t\t\t\$('#upmenu_mesajlar').load('conversations.php',function(){\n\t\t\t\t\t\t\t\$('#upmenu_mesajlar_modal').modal(\"toggle\");\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t\$('#upmenu_mesaj_kutusu_ac_a').click(function(){\n\t\t\t\t\t\t\$('#upmenu_mesajlar').load('conversations.php',function(){\n\t\t\t\t\t\t\t\$('#upmenu_mesajlar_modal').modal(\"toggle\");\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t\$('#upmenu_yeni_icerik_button').click(function(){\n\t\t\t\t\t\t\$('#upmenu_yeni_baslik').load('baslikyaratici.php',function(){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#upmenu_yeni_baslik_modal').modal(\"toggle\");\n\t\t\t\t\t\t});\t\n\t\t\t\t\t});\n\t\t\t\t\t\$('#upmenu_yeni_pano_button').click(function(){\n\t\t\t\t\t\t\$('#upmenu_yeni_baslik').load('panoyaratici.php',function(){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#upmenu_yeni_pano_modal').modal(\"toggle\");\n\t\t\t\t\t\t});\t\n\t\t\t\t\t});\n\t\t\t\t\t\$('#upmenu_icerik_olustur_btn_non_active').click(function(){\n\t\t\t\t\t\talert(\"İçerik oluşturabilmek için hesabını aktive etmen gerekiyor. Eğer aktivasyon maili ulaşmadıysa tekrar yollamak için 'Hesap ayarları' sekmesine git.\");\n\t\t\t\t\t});\n\t\t\t\t\t\$('#up_menu_giris_yap').click(function(){\n\t\t\t\t\t\t\$('#login_modal_div').modal(\"toggle\");\n\t\t\t\t\t});\t\n\t\t\t\t\t\$('#up_menu_uye_ol').click(function(){\n\t\t\t\t\t\t\$('#signup_modal_div').modal(\"toggle\");\n\t\t\t\t\t});\t\t\t\t\n\t\t\t\t\t\$('#upmenu_cikis_linki').click(function(){\n\t\t\t\t\t\t\$('#upmenu_cikis_formu').ajaxForm({\n\t\t\t\t\t\t\tsuccess : function (msg){\n\t\t\t\t\t\t\t\tmsg = \$.parseJSON(msg);\n\t\t\t\t\t\t\t\tif (msg=='OK')\n\t\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\talert(\"çıkamayış\");\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function () {\n\t\t\t\t\t\t\t\talert(\"sıçış\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).submit();\n\t\t\t\t\t});\n\t\t\t\t\t\$('#hesap_ayarlari_acici_link').click(function(){\n\t\t\t\t\t\t\$('#upmenu_user_settings_modal').modal(\"toggle\");\t\n\t\t\t\t\t});\n\t\t\t\t\tsetInterval(function() {\n\t\t\t\t\t\t\$('#UpMenuSeenMessageSeenUpdateForm').ajaxForm({\n\t\t\t\t\t\t\tsuccess : function(msg){\n\t\t\t\t\t\t\t\tif (msg=='YES')\n\t\t\t\t\t\t\t\t\t\$('#upmenu_messager_ul').css(\"box-shadow\",\"0 0 10px 10px #9bca3e inset\");\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\$('#upmenu_messager_ul').css(\"box-shadow\",\"none\");\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function(){\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).submit();\t\n\t\t\t\t\t},1000);\n\t\t\t\t});\n\n\t\t\t";
     echo "</script>";
 }