Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. <div class="ipsWidget_inner">
  2. <img src="images/lastactivity.png" style="border: 1px solid rgb(233, 233, 233); width: 100%; margin-bottom: 8px;">
  3. <ul class="ipsDataList ipsDataList_reducedSpacing">
  4. <?php
  5. include('conf_global.php');
  6. date_default_timezone_set('Europe/Riga');
  7. $db = mysqli_connect($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass'], $INFO['sql_database']);
  8. mysqli_query($db, "SET NAMES utf8");
  9. $query = mysqli_query($db, "SELECT * FROM forums_forums LEFT JOIN forums_topics ON forums_forums.id=forums_topics.forum_id RIGHT JOIN core_members ON forums_topics.starter_id=core_members.member_id ORDER BY tid DESC LIMIT 5");
  10. while($row = mysqli_fetch_array($query)){
  11. $replies = $row['posts'] - 1;
  12. if($row['pp_thumb_photo'] == 'NULL'){
  13. $image = 'http://esrp.lv/forums/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png';
  14. }
  15. else {
  16. $image = 'http://esrp.lv/forums/uploads/'.$row['pp_thumb_photo'];
  17. }
  18. if($row['state'] == 'open'){
  19. $state = 'Atvērts';
  20. }
  21. else {
  22. $state = 'Aizvērts';
  23. }
  24. $date = date('j. M, H:i', $row['start_date']);
  25. $fulldate = date('Y.m.d. H:i', $row['start_date']);
  26. $forum = str_replace('-', ' ', $row['name_seo']);
  27. ?>
  28. <li class="ipsDataItem topics" topicid="<?php echo $row['tid']; ?>" class="ipsClearfix ipsDataItem ipsDataItem">
  29. <div class="ipsDataItem_icon ipsPos_top">
  30. <a href="http://esrp.lv/forums/index.php?/profile/<?php echo $row['starter_id']; ?>-<?php echo $row['starter_name']; ?>/" data-ipshover="" data-ipshover-target="http://esrp.lv/forums/index.php?/profile/<?php echo $row['starter_id']; ?>-<?php echo $row['starter_name']; ?>/&do=hovercard" class="ipsUserPhoto ipsUserPhoto_tiny" title="Doties uz <?php echo $row['starter_name']; ?> profilu">
  31. <img src="<?php echo $image; ?>" alt="<?php echo $row['starter_name']; ?>" itemprop="image">
  32. </a>
  33. </div>
  34. <div class="ipsDataItem_main cWidgetComments">
  35. <div class="ipsCommentCount ipsPos_right " data-ipstooltip="" title="<?php echo $replies; ?> reply"><?php echo $replies; ?></div>
  36. <div class="ipsType_break ipsContained">
  37. <a class="ipsDataItem_title" href="http://esrp.lv/forums/index.php?/topic/<?php echo $row['tid']; ?>-<?php echo $row['title_seo']; ?>/&do=getLastComment" title="View the topic <?php echo $row['title']; ?> " data-ipshover="" data-ipshover-target="http://esrp.lv/forums/index.php?/topic/<?php echo $row['tid']; ?>-<?php echo $row['title_seo']; ?>/&preview=1" data-ipshover-timeout="0.5" id="ips_uid_693_19">
  38. <span itemprop="name" id="topic_title <?php echo $row['tid'] ?>"><?php echo $row['title']; ?></span>
  39. </a>
  40. </div>
  41. <p class="ipsType_reset ipsType_medium">
  42. <span class="ipsType_light"><span class="cat">Sadaļa:<span></span> <a href="http://esrp.lv/forums/index.php?/forum/<?php echo $row['id']; ?>-<?php echo $row['name_seo']; ?>/"><?php echo $forum; ?></a>
  43. </p>
  44. <p class="ipsType_reset ipsType_medium ipsType_blendLinks">
  45. <span class="ipsType_light tdb-NoWrap">
  46. <span class="cat">Datums: <time title="<?php echo $fulldate; ?>"><?php echo $date; ?></time></span>
  47. </span>
  48. </p>
  49. </div>
  50. </li>
  51. <div class="postinfo" topicid="<?php echo $row['tid']; ?>">
  52. <div class="lastposter">Pēdējā atbilde no <span><?php echo $row['last_poster_name']; ?></span></div>
  53. <div class="state">Tēmas statuss: <?php echo $state; ?></div>
  54. </div>
  55. <?php
  56. }
  57. ?>
  58. </ul>
  59. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement