当前位置: 首页>>代码示例>>PHP>>正文


PHP Thread::ThreadToPetitHTML方法代码示例

本文整理汇总了PHP中Thread::ThreadToPetitHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP Thread::ThreadToPetitHTML方法的具体用法?PHP Thread::ThreadToPetitHTML怎么用?PHP Thread::ThreadToPetitHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Thread的用法示例。


在下文中一共展示了Thread::ThreadToPetitHTML方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: YazarBasliklariToHTML

 public function YazarBasliklariToHTML()
 {
     global $yazarAdi;
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     if ($connection->connect_error) {
         echo "Database'e bağlantı sorunu";
     } else {
         $connection->set_charset("utf8");
         echo "<div style=\"overflow:auto;border:1px solid #c7d0d5;border-radius:15px;background-color:#e6e6e6;width:100%;margin-top:4%;font-size:19px;font-family: 'Josefin Sans', sans-serif;color:#cb7c7a;max-width:100%;\">";
         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 "Aynı yazardan bazı süper başlıklar";
         echo "</p>";
         echo "<hr style=\"border:1px solid #c7d0d5;\"/>";
         echo "</div>";
         $res = $connection->query("SELECT * from threads where threadWriter='{$yazarAdi}' ORDER BY threadPoint LIMIT 10");
         while ($curres = $res->fetch_assoc()) {
             $threadID5 = $curres["threadID"];
             $threadDate5 = $curres["threadDate"];
             $threadWriter5 = $curres["threadWriter"];
             $threadCategory5 = $curres["threadCategory"];
             $threadPicture5 = $curres["threadPicture"];
             $stepCount5 = $curres["stepCount"];
             $threadName5 = $curres["threadName"];
             $threadPoint5 = $curres["threadPoint"];
             $myThread5 = new Thread(array($threadID5, $threadDate5, $threadWriter5, $threadCategory5, $threadPicture5, $stepCount5, $threadName5, $threadPoint5));
             $myThread5->ThreadToPetitHTML();
         }
         echo "</div>";
         $connection->close();
     }
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:34,代码来源:YazarBasliklari.class.php

示例2: BoardRightUpToHTML

 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>";
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:31,代码来源:BoardRightUp.class.php

示例3: IndexGuncelToHTML

 public function IndexGuncelToHTML()
 {
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     $connection->set_charset("utf8");
     echo "<div style=\"margin:2%;background-color:#e6e6e6;border-bottom:1px solid #c7d0d5;\">";
     echo "<p style=\"font-size:20px;word-wrap:break-word;color:#cb7c7a;font-family: 'Josefin Sans', sans-serif;\">";
     echo "Güncel panolar";
     echo "</p>";
     echo "</div>";
     echo "<div style=\"\">";
     $results = $connection->query("SELECT * FROM boards ORDER BY boardID DESC LIMIT 6 OFFSET 0");
     while ($boardInfos = $results->fetch_assoc()) {
         $myBoard = new Board(array($boardInfos['boardID'], $boardInfos['boardName'], $boardInfos['boardCategory'], $boardInfos['boardCreator'], $boardInfos['boardImage'], $boardInfos['boardDate']));
         $myBoard->BoardToPetitHTML();
     }
     echo "</div>";
     echo "<div id=\"x\" style=\"margin:2%;background-color:#e6e6e6;border-bottom:1px solid #c7d0d5;\">";
     echo "<p style=\"font-size:20px;word-wrap:break-word;color:#cb7c7a;font-family: 'Josefin Sans', sans-serif;\">";
     echo "Güncel içerikler";
     echo "</p>";
     echo "</div>";
     echo "<div style=\"\">";
     if (!$connection->connect_error) {
         $results = $connection->query("SELECT * FROM threads ORDER BY threadID DESC LIMIT 12 OFFSET 0 ");
         while ($curres = $results->fetch_assoc()) {
             $threadID5 = $curres["threadID"];
             $threadDate5 = $curres["threadDate"];
             $threadWriter5 = $curres["threadWriter"];
             $threadCategory5 = $curres["threadCategory"];
             $threadPicture5 = $curres["threadPicture"];
             $stepCount5 = $curres["stepCount"];
             $threadName5 = $curres["threadName"];
             $threadPoint5 = $curres["threadPoint"];
             $myThread5 = new Thread(array($threadID5, $threadDate5, $threadWriter5, $threadCategory5, $threadPicture5, $stepCount5, $threadName5, $threadPoint5));
             $myThread5->ThreadToPetitHTML();
         }
         echo "<div id=\"moreBestDiv\"></div>";
         echo "<div style=\"\">";
         echo "<form id=\"loadMoreBestForm\" method=\"post\" action=\"loadMoreRecentIndex.php\">";
         echo "<input id=\"loadMoreBestOffset\" name=\"loadMoreBestOffset\" style=\"display:none;\" value=\"" . $results->num_rows . "\"/>";
         echo "<button id=\"loadMoreBestButton\" class=\"btn btn-block btn-success\">";
         echo "<i id=\"loadMoreBestSpinner\" style=\"display:none;\" class=\"fa fa-refresh fa-spin\"></i>";
         echo "<span id=\"loadMoreBestTXT\">";
         echo "Daha fazla göster";
         echo "</span>";
         echo "</button>";
         echo "</form>";
         echo "</div>";
     }
     echo "</div>";
     echo "<script type=\"text/javascript\">";
     echo "\n\t\t\t\$(window).scroll(function(){\n\t\t\t\tvar p = \$('#x');\n\t\t\t\tvar pos = p.position();\n\t\t\t\tvar windowpos = \$(window).scrollTop();\n\t\t\t\tif (windowpos >= pos.top) {\n\t\t\t\t\t\$('#indexStickyFooter').fadeIn(500);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t\$('#indexStickyFooter').fadeOut(500);\n\t\t\t});\n\t\t\t\$('#loadMoreBestButton').click(function(e){\n\t\t\t\te.preventDefault();\n\t\t\t\t\$('#loadMoreBestTXT').hide();\n\t\t\t\t\$('#loadMoreBestSpinner').show();\n\t\t\t\t\$('#loadMoreBestForm').ajaxForm({\n\t\t\t\t\tsuccess : function(msg){\n\t\t\t\t\t\t\$('#loadMoreBestTXT').show();\n\t\t\t\t\t\t\$('#loadMoreBestSpinner').hide();\n\t\t\t\t\t\tnewoffset = msg.charAt(0);\n\t\t\t\t\t\toldoffset = \$('#loadMoreBestOffset').val();\n\t\t\t\t\t\toldint = parseInt(oldoffset);\n\t\t\t\t\t\tnewint = parseInt(newoffset);\n\t\t\t\t\t\tif (newint==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\$('#loadMoreBestTXT').html(\"Hepsi yüklendi\");\n\t\t\t\t\t\t\t\$('#loadMoreBestButton').attr(\"disabled\",true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\$('#loadMoreBestOffset').val(oldint+newint);\n\t\t\t\t\t\tmsg2 = msg.substring(1);\n\t\t\t\t\t\t\$('#moreBestDiv').append(msg2);\n\t\t\t\t\t},\n\t\t\t\t\terror : function(){\n\n\t\t\t\t\t}\n\t\t\t\t}).submit();\n\t\t\t});\t\n\t\t";
     echo "</script>";
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:56,代码来源:IndexGuncel.class.php

示例4: SuggestionsBarToHTML

 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();
     }
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:54,代码来源:SuggestionsBar.class.php

示例5: UserThreadsToHTML

 public function UserThreadsToHTML()
 {
     global $whichUsr;
     echo "<div style=\"margin-top:2%;\">";
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     if ($connection->connect_error) {
         echo "Database'e bağlantı sorunu";
     } else {
         $connection->set_charset("utf8");
         $res0 = $connection->query("SELECT * from threads where threadWriter= '{$whichUsr}'");
         $totalCount = $res0->num_rows;
         $res = $connection->query("SELECT * from threads where threadWriter='{$whichUsr}' ORDER BY threadPoint DESC LIMIT 6");
         $curCount = $res->num_rows;
         while ($curres = $res->fetch_assoc()) {
             $threadID5 = $curres["threadID"];
             $threadDate5 = $curres["threadDate"];
             $threadWriter5 = $curres["threadWriter"];
             $threadCategory5 = $curres["threadCategory"];
             $threadPicture5 = $curres["threadPicture"];
             $stepCount5 = $curres["stepCount"];
             $threadName5 = $curres["threadName"];
             $threadPoint5 = $curres["threadPoint"];
             $myThread5 = new Thread(array($threadID5, $threadDate5, $threadWriter5, $threadCategory5, $threadPicture5, $stepCount5, $threadName5, $threadPoint5));
             $myThread5->ThreadToPetitHTML();
         }
         $connection->close();
     }
     echo "<div id=\"more_data_div\" style=\"\">";
     echo "</div>";
     echo "<div style=\"margin:2%;\">";
     if ($totalCount != 0) {
         echo "<form method =\"post\" id =\"userThreadsForm\" action=\"usrThreadsLoadMore.php?usr=" . $whichUsr . "\">";
         echo "<input name=\"offsetUsrThread\" id=\"offsetUsrThread\" value=\"" . $curCount . "\" style=\"display:none;\" />";
         echo "<input name=\"totalUsrThread\" id=\"totalUsrThread\" value=\"" . $totalCount . "\" style=\"display:none;\" />";
         echo "<button id=\"loadMoreDataButton\" class=\"btn btn-block btn-success\" style=\"\">";
         echo "<i id=\"loadMoreThreadSpinner\" style=\"display:none;\" class=\"fa fa-refresh fa-spin\"></i>";
         echo "<span id=\"loadMoreDataTXT\"> Daha fazla göster </span>";
         echo "</button>";
         echo "</form>";
     } else {
         echo "<span style=\"font-family: 'Josefin Sans', sans-serif;font-size:18px;color:#6e6e6e;\"> Bu yazar henüz başlık oluşturmamış. </span>";
     }
     echo "</div>";
     echo "</div>";
     echo "<script type=\"text/javascript\">";
     echo "\n\t\t\t\$('#loadMoreDataButton').click(function(e){\n\t\t\t\te.preventDefault();\n\t\t\t\t\$('#loadMoreDataTXT').hide();\n\t\t\t\t\$('#loadMoreThreadSpinner').show();\n\t\t\t\t\$('#userThreadsForm').ajaxForm({\n\t\t\t\t\tsuccess : function(msg){\n\t\t\t\t\t\t\$('#loadMoreDataTXT').show();\n\t\t\t\t\t\t\$('#loadMoreThreadSpinner').hide();\n\t\t\t\t\t\toldoffset = \$('#offsetUsrThread').val();\n\t\t\t\t\t\tnewoffset = msg.charAt(0);\n\t\t\t\t\t\toldint = parseInt(oldoffset);\n\t\t\t\t\t\tnewint = parseInt(newoffset);\n\t\t\t\t\t\tif (newint==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\$('#loadMoreDataTXT').html('Hepsi yüklendi');\n\t\t\t\t\t\t\t \$('#loadMoreDataButton').attr(\"disabled\", true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\$('#offsetUsrThread').val(oldint+newint);\n\t\t\t\t\t\tmsg2 = msg.substring(1);\n\t\t\t\t\t\t\$('#more_data_div').append(msg2);\n\t\t\t\t\t\t\n\t\t\t\t\t},\n\t\t\t\t\terror : function(){\n\n\t\t\t\t\t}\n\t\t\t\t}).submit();\n\t\t\t});\n\t\t";
     echo "</script>";
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:50,代码来源:UserThreads.class.php

示例6: mysqli

$connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
if ($connection->connect_error) {
    echo "Bağlantı hatası.";
} else {
    $connection->set_charset("utf8");
    $query = "SELECT * from threads WHERE threadCategory=\"" . $cat . "\" ORDER BY threadID DESC LIMIT 8";
    $results = $connection->query($query);
    $offset = $results->num_rows;
    while ($curres = $results->fetch_assoc()) {
        $threadID5 = $curres["threadID"];
        $threadDate5 = $curres["threadDate"];
        $threadWriter5 = $curres["threadWriter"];
        $threadCategory5 = $curres["threadCategory"];
        $threadPicture5 = $curres["threadPicture"];
        $stepCount5 = $curres["stepCount"];
        $threadName5 = $curres["threadName"];
        $threadPoint5 = $curres["threadPoint"];
        $myThread5 = new Thread(array($threadID5, $threadDate5, $threadWriter5, $threadCategory5, $threadPicture5, $stepCount5, $threadName5, $threadPoint5));
        $myThread5->ThreadToPetitHTML();
    }
    echo "<div id=\"categoryTarieGoreSiralaMoreDataDIV\"></div>";
    echo "<div style=\"margin:2%;\">";
    echo "<form id=\"categoryTariheGoreSiralaForm\" method=\"post\" action=\"categoryTariheGoreSiralaLoadMore.php?cat=" . $cat . "\">";
    echo "<input style=\"display:none;\" type=\"text\" id=\"categoryTarieGoreSiralaOffset\" name=\"categoryTarieGoreSiralaOffset\" value=\"" . $offset . "\"/>";
    echo "<button id=\"categoryTariheGoreSiralaButton\" class=\"btn btn-block btn-success\"><i id=\"categoryTariheGoreSiralaSpinner\" style=\"display:none;\" class=\"fa fa-refresh fa-spin\"></i><span id=\"categoryTariheGoreSiralaTXT\">Daha fazla göster</span></button>";
    echo "</form>";
    echo "</div>";
    echo "<script type=\"text/javascript\">";
    echo "\n\t\t\t\$('#categoryTariheGoreSiralaButton').click(function(e){\n\t\t\t\te.preventDefault();\n\t\t\t\t\$('#categoryTariheGoreSiralaTXT').hide();\n\t\t\t\t\$('#categoryTariheGoreSiralaSpinner').show();\n\t\t\t\t\$('#categoryTariheGoreSiralaForm').ajaxForm({\n\t\t\t\t\tsuccess : function(msg)\n\t\t\t\t\t{\n\t\t\t\t\t\t\$('#categoryTariheGoreSiralaTXT').show();\n\t\t\t\t\t\t\$('#categoryTariheGoreSiralaSpinner').hide();\n\t\t\t\t\t\toldoffset = \$('#categoryTarieGoreSiralaOffset').val();\n\t\t\t\t\t\tnewoffset = msg.charAt(0);\n\t\t\t\t\t\toldint = parseInt(oldoffset);\n\t\t\t\t\t\tnewint = parseInt(newoffset);\n\t\t\t\t\t\tif (newint==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\$('#categoryTariheGoreSiralaTXT').html('Hepsi yüklendi');\n\t\t\t\t\t\t\t\$('#categoryTariheGoreSiralaButton').attr(\"disabled\", true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\$('#categoryTarieGoreSiralaOffset').val(oldint+newint);\n\t\t\t\t\t\tmsg2 = msg.substring(1);\n\t\t\t\t\t\t\$('#categoryTarieGoreSiralaMoreDataDIV').append(msg2);\n\t\t\t\t\t},\n\t\t\t\t\terror : function()\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}).submit();\n\t\t\t});\n\t\t";
    echo "</script>";
}
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:31,代码来源:categoryTariheGoreSirala.php

示例7: SearchToHTML

 public function SearchToHTML()
 {
     global $query;
     $query = htmlspecialchars($query);
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     echo "<div style=\"background-color:#e6e6e6;border:1px solid #c7d0d5; border-radius:15px;\">";
     echo "<div style=\"margin:2%;\">";
     echo "<p style=\"color:#ec583a;word-wrap:break-word;font-family: 'Josefin Sans', sans-serif;font-size:20px;\">";
     echo "\"" . $query . "\" için arama sonuçları";
     echo "</p>";
     echo "</div>";
     echo "<ul class=\"nav nav-tabs\" style=\"margin:2%;font-family: 'Josefin Sans', sans-serif;font-size:17px;\">";
     echo "<li class=\"active\"><a href=\"#\" id=\"searchThreadsLink\" data-toggle=\"tab\">Başlıklar</a></li>";
     echo "<li class=\"\"><a href=\"#\" id=\"searchWritersLink\" data-toggle=\"tab\">Yazarlar</a></li>";
     echo "</ul>";
     echo "<div class=\"tab-content\">";
     echo "<div class=\"tab-pane-active\" id=\"searchThreadsDIV\">";
     echo "<div style=\"\">";
     if ($connection->connect_error) {
         echo "Database'e bağlantı sorunu";
     } else {
         $connection->set_charset("utf8");
         $searchQuery = "SELECT * FROM threads WHERE threadName LIKE '%{$query}%' ORDER BY threadPoint desc LIMIT 8";
         $results = $connection->query($searchQuery);
         $offsetCount = $results->num_rows;
         if ($offsetCount == 0) {
             echo "<div style=\"margin:2%;\"><p style=\"color:#6e6e6e;word-wrap:break-word;font-family: 'Josefin Sans', sans-serif;font-size:17px;\"> Böyle bir başlık bulunamadı. </p></div>";
         }
         while ($curres = $results->fetch_assoc()) {
             $threadID5 = $curres["threadID"];
             $threadDate5 = $curres["threadDate"];
             $threadWriter5 = $curres["threadWriter"];
             $threadCategory5 = $curres["threadCategory"];
             $threadPicture5 = $curres["threadPicture"];
             $stepCount5 = $curres["stepCount"];
             $threadName5 = $curres["threadName"];
             $threadPoint5 = $curres["threadPoint"];
             $myThread5 = new Thread(array($threadID5, $threadDate5, $threadWriter5, $threadCategory5, $threadPicture5, $stepCount5, $threadName5, $threadPoint5));
             $myThread5->ThreadToPetitHTML();
         }
         echo "<div id=\"searchMoreThreadMoreDataDiv\"></div>";
         if ($offsetCount != 0) {
             echo "<div style=\"margin:2%;\">";
             echo "<form id=\"searchMoreThreadForm\" action=\"searchMoreThread.php?query=" . $query . "\" method=\"post\">";
             echo "<input style=\"display:none;\" name=\"showMoreSuggestionOffset\" id=\"showMoreSuggestionOffset\" value=\"" . $offsetCount . "\"/>";
             echo "<button id=\"showMoreSuggestionButton\" class=\"btn btn-block btn-success\"><i id=\"searchMoreThreadSpinner\" style=\"display:none;\" class=\"fa fa-refresh fa-spin\"></i><span id=\"searchMoreThreadTXT\"> Daha fazla göster </span> </button>";
             echo "</form>";
             echo "</div>";
         }
     }
     echo "</div>";
     echo "</div>";
     echo "<div class=\"tab-pane\" id=\"searchWritersDIV\">";
     echo "<div style=\"margin:2%;\">";
     $searchWriterQuery = "SELECT * FROM users WHERE userName LIKE '%{$query}%'";
     $writerresults = $connection->query($searchWriterQuery);
     while ($wcurres = $writerresults->fetch_assoc()) {
         echo "<p style=\";word-wrap:break-word;font-family: 'Josefin Sans', sans-serif;font-size:15px;\">";
         echo "<a href=\"user.php?name=" . $wcurres["userName"] . "\">" . $wcurres["userName"] . "</a>";
         echo "</p>";
     }
     if ($writerresults->num_rows == 0) {
         echo "<p style=\"color:#6e6e6e;word-wrap:break-word;font-family: 'Josefin Sans', sans-serif;font-size:17px;\"> Böyle bir yazar bulunamadı.</p>";
     }
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "<script type=\"text/javascript\">";
     echo "\n\t\t\$('#searchThreadsLink').click(function(){\n\t\t\t\$('#searchWritersDIV').attr('class','tab-pane');\n\t\t\t\$('#searchThreadsDIV').attr('class','tab-pane-active');\n\t\t});\n\t\t\$('#searchWritersLink').click(function(){\n\t\t\t\$('#searchThreadsDIV').attr('class','tab-pane');\n\t\t\t\$('#searchWritersDIV').attr('class','tab-pane-active');\n\t\t});\n\t\t\$('#showMoreSuggestionButton').click(function(e){\n\t\t\te.preventDefault();\n\t\t\t\$('#searchMoreThreadTXT').hide();\n\t\t\t\$('#searchMoreThreadSpinner').show();\n\t\t\t\$('#searchMoreThreadForm').ajaxForm({\n\t\t\t\tsuccess : function(msg){\n\t\t\t\t\t\$('#searchMoreThreadSpinner').hide();\n\t\t\t\t\t\$('#searchMoreThreadTXT').show();\n\t\t\t\t\toldoffset = \$('#showMoreSuggestionOffset').val();\n\t\t\t\t\tnewoffset = msg.charAt(0);\n\t\t\t\t\toldint = parseInt(oldoffset);\n\t\t\t\t\tnewint = parseInt(newoffset);\n\t\t\t\t\tif (newint==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t\$('#searchMoreThreadTXT').html('Hepsi yüklendi');\n\t\t\t\t\t\t\$('#showMoreSuggestionButton').attr(\"disabled\", true);\n\t\t\t\t\t}\n\t\t\t\t\t\$('#showMoreSuggestionOffset').val(oldint+newint);\n\t\t\t\t\tmsg2 = msg.substring(1);\n\t\t\t\t\t\$('#searchMoreThreadMoreDataDiv').append(msg2);\n\t\t\t\t},\n\t\t\t\terror : function(){\n\n\t\t\t\t}\t\n\t\t\t}).submit();\t\t\n\t\t});\n\t";
     echo "</script>";
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:74,代码来源:Search.class.php

示例8: DigerSahane

 public function DigerSahane()
 {
     $myDBConnector = new DBConnector();
     $dbARY = $myDBConnector->infos();
     $connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
     if (!$connection->connect_error) {
         $connection->set_charset("utf8");
         $results = $connection->query("SELECT * FROM threads ORDER BY threadPoint DESC LIMIT 8 OFFSET 10 ");
         while ($curres = $results->fetch_assoc()) {
             $threadID5 = $curres["threadID"];
             $threadDate5 = $curres["threadDate"];
             $threadWriter5 = $curres["threadWriter"];
             $threadCategory5 = $curres["threadCategory"];
             $threadPicture5 = $curres["threadPicture"];
             $stepCount5 = $curres["stepCount"];
             $threadName5 = $curres["threadName"];
             $threadPoint5 = $curres["threadPoint"];
             $myThread5 = new Thread(array($threadID5, $threadDate5, $threadWriter5, $threadCategory5, $threadPicture5, $stepCount5, $threadName5, $threadPoint5));
             $myThread5->ThreadToPetitHTML();
         }
         echo "<div id=\"moreBestDiv\"></div>";
         echo "<div style=\"margin:2%;\">";
         echo "<form id=\"loadMoreBestForm\" method=\"post\" action=\"loadMoreBest.php\">";
         echo "<input id=\"loadMoreBestOffset\" name=\"loadMoreBestOffset\" style=\"display:none;\" value=\"" . $results->num_rows . "\"/>";
         echo "<button id=\"loadMoreBestButton\" class=\"btn btn-block btn-success\">";
         echo "<i id=\"loadMoreBestSpinner\" style=\"display:none;\" class=\"fa fa-refresh fa-spin\"></i>";
         echo "<span id=\"loadMoreBestTXT\">";
         echo "Daha fazla göster";
         echo "</span>";
         echo "</button>";
         echo "</form>";
         echo "</div>";
     }
 }
开发者ID:oguzeroglu,项目名称:serinhikaye.com,代码行数:34,代码来源:Best.class.php


注:本文中的Thread::ThreadToPetitHTML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。