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 "<style>";
     echo "\n.navbar-brand {\n  float: none;\n  }\n\n.navbar-center\n{\n    position: absolute;\n    width: 100%;\n    left: 0;\n    top: 0;\n    text-align: center;\n    margin: auto;\n  height:100%;\n}\n";
     echo "</style>";
     echo "\n<nav class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n    <!-- Brand and toggle get grouped for better mobile display -->\n    <div class=\"navbar-header\">\n      <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#navbar-collapse-1\">\n        <span class=\"sr-only\">Toggle navigation</span>\n        <span class=\"icon-bar\"></span>\n        <span class=\"icon-bar\"></span>\n        <span class=\"icon-bar\"></span>\n      </button>\n      &nbsp;\n      <div class=\"btn-group\">    \n        <a href=\"#\" class=\"btn btn-default navbar-btn dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"glyphicon glyphicon-chevron-down\"></i> <span class=\"hidden-xs\">Discover</span></a>\n        <ul class=\"dropdown-menu\">\n          <li><a href=\"#\">Action</a></li>\n          <li><a href=\"#\">Another action</a></li>\n          <li><a href=\"#\">Something else here</a></li>\n          <li class=\"divider\"></li>\n          <li><a href=\"#\">Separated link</a></li>\n          <li class=\"divider\"></li>\n          <li><a href=\"#\">One more separated link</a></li>\n        </ul> \n      </div>  \n    </div>\n  <div class=\"navbar-center navbar-brand\" href=\"#\"><a class=\"navbar-brand\">Brand</a></div>\n    <!-- Collect the nav links, forms, and other content for toggling -->\n    <div class=\"collapse navbar-collapse\" id=\"navbar-collapse-1\">\n     \n      <form class=\"navbar-form navbar-left\" role=\"search\">\n        <div class=\"form-group\">\n          <input class=\"form-control\" placeholder=\"Search\" type=\"text\">\n        </div>\n        <button type=\"submit\" class=\"btn btn-default\"><i class=\"glyphicon glyphicon-search\"></i></button>\n      </form>\n      <ul class=\"nav navbar-nav navbar-right\">\n        <li><a href=\"#\">Link</a></li>\n        <li><a href=\"#\">Link</a></li>\n        <li><a href=\"#\">Link</a></li>\n        <li class=\"dropdown\">\n          <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">Dropdown <b class=\"caret\"></b></a>\n          <ul class=\"dropdown-menu\">\n            <li><a href=\"#\">Action</a></li>\n            <li><a href=\"#\">Another action</a></li>\n            <li><a href=\"#\">Something else here</a></li>\n            <li class=\"divider\"></li>\n            <li><a href=\"#\">Separated link</a></li>\n          </ul>\n        </li>\n      </ul>\n    </div><!-- /.navbar-collapse -->\n</nav>\n";
     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>";
 }
 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>";
 }