<div class="panel panel-default"> <div class="panel-heading">Posledné komentáre</div> <ul class="list-group"> <?php $result = dbquery("SELECT * FROM bg_comments WHERE comment_delete='0' ORDER BY comment_id DESC LIMIT 0,8"); $rows1 = dbrows($result); if ($rows1 >= "1") { while ($data = dbarray($result)) { $type = articleurl($data["comment_pageid"], trimlink(articlename($data["comment_pageid"]), 22), 1, 1); $tname = articlename($data["comment_pageid"]); echo '<li class="list-group-item"> ' . (useravatar($data["comment_userid"]) != "/file/avatars/avatar.png" ? '<img src="' . useravatar($data["comment_userid"]) . '" alt="" class="img-circle pull-left" style="width:40px;margin-right:5px">' : '<img src="' . useravatar($data["comment_userid"]) . '" alt="" class="img-circle pull-left" style="width:40px;margin-right:5px">') . ' <span class="badge">' . timeago($data["comment_time"]) . '</span> ' . username($data["comment_userid"], 1) . ' > <a href="' . $type . '" style="font-size:9px">' . trimlink($tname, 32) . '</a><br> <small>' . trimlink(bbcoderemove(badwords($data["comment_text"])), 100) . '</small><br> </li>'; } } else { echo "Žiadne komentáre k článkom."; } ?> </ul> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading">Najnovšie témy (nezamknuté)</div>
</div> <div class="tab-pane fade in active" id="comments"> <div class="list-group" style="margin-top:15px;"> '; while ($datap = dbarray($result_comments)) { if ($datap["comment_type"] == "A") { $type = articleurl($datap["comment_pageid"], trimlink(articlename($datap["comment_pageid"]), 22), 1, 1); $name = articlename($datap["comment_pageid"]); } else { if ($datap["comment_type"] == "P") { $type = projekturl($datap["comment_pageid"], trimlink(projektname($datap["comment_pageid"]), 22), 1, 1); $name = projektname($datap["comment_pageid"]); } } echo '<a href="' . $type . '" class="list-group-item">' . $name . '<br/><small>' . trimlink(bbcoderemove(badwords($datap["comment_text"])), 70) . '</small> <span class="badge">' . timeago($datap["comment_time"]) . '</span></a>'; } echo ' </div> </div> <div class="tab-pane fade" id="forum"> <div class="list-group" style="margin-top:15px;"> '; while ($datap = dbarray($result_forumt)) { echo '<a href="/tema/' . $datap["forumt_id"] . '/' . bezd($datap["forumt_name"]) . '" class="list-group-item">' . $datap["forumt_name"] . ' <span class="badge">' . timeago($datap["forumt_time"]) . '</span></a>'; } echo ' </div>