Advertisement
arabtion

test

Oct 20th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. <?php
  2. /**
  3. * Codychat
  4. *
  5. * @package Codychat
  6. * @author www.boomcoding.com
  7. * @copyright 2018
  8. * @terms any use of this script without a legal license is prohibited
  9. * all the content of Codychat is the propriety of BoomCoding and Cannot be
  10. * used for another project.
  11. */
  12. require_once('../config_session.php');
  13.  
  14. $check_action = getDelay();
  15. $online_delay = time() - ( 86400 * 7 );
  16. $online_user = '';
  17. $offline_user = '';
  18. $online_count = 0;
  19. $onair_count = 0;
  20. $onair_user = '';
  21. $offcount = 1;
  22.  
  23. if($data['last_action'] < getDelay()){
  24. $mysqli->query("UPDATE boom_users SET last_action = '" . time() . "' WHERE user_id = '{$data['user_id']}'");
  25. }
  26.  
  27. $data_list = $mysqli->query("
  28. SELECT *
  29. FROM `boom_users`
  30. WHERE `user_roomid` = {$data["user_roomid"]} AND last_action > '$check_action' AND user_status != 6 || user_bot = 1
  31. ORDER BY `user_rank` DESC,`user_id` ASC , `user_name` ASC");
  32.  
  33. if($data['max_offcount'] > 0){
  34. $offline_list = $mysqli->query("
  35. SELECT *
  36. FROM `boom_users`
  37. WHERE `user_roomid` = {$data["user_roomid"]} AND last_action > '$online_delay' AND last_action < '$check_action' AND user_status != 6 AND user_rank != 0 AND user_bot = 0
  38. ORDER BY last_action DESC LIMIT {$data['max_offcount']}
  39. ");
  40. }
  41.  
  42. mysqli_close($mysqli);
  43.  
  44. if ($data_list->num_rows > 0){
  45. while ($list = $data_list->fetch_assoc()){
  46. if($list['user_dj'] == 1 && $list['user_onair'] == 1){
  47. $onair_user .= createUserlist($list);
  48. $onair_count++;
  49. }
  50. else {
  51. $online_user .= createUserlist($list);
  52. $online_count++;
  53. }
  54. }
  55. }
  56. if($data['max_offcount'] > 0){
  57. if($offline_list->num_rows > 0){
  58. while($offlist = $offline_list->fetch_assoc()){
  59. $offline_user .= createUserlist($offlist);
  60. }
  61. }
  62. }
  63. $getsenders = $mysqli->query("SELECT * FROM transfer_logs ORDER BY `id` DESC limit 0,3");
  64. $senders_info = '';
  65. if($getsenders->num_rows > 0){
  66. while($topsender = $getsenders->fetch_assoc()){
  67. $sender_info = TopSenderDetails($topsender['sender_id']);
  68. $rec_info = TopSenderDetails($topsender['user_id']);
  69. if(!empty($sender_info)){
  70. $senders_info .= '<div class="sender-log" style="color:#000;margin: 5px 10px;">';
  71. $senders_info .= '<span class="sender-name" style="color:'.LevelCol($sender_info["level"]).';">'.$sender_info['user_name'].'</span> gave '.$topsender['coins'].' coins to <span class="r_user_name" style="color:'.LevelCol($rec_info["level"]).';">'.$rec_info['user_name'].'</span>';
  72. $senders_info .= '</div>';
  73. }
  74. }
  75. }
  76.  
  77. ?>
  78. <div id="container_user">
  79. <?php if($onair_user != ''){ ?>
  80. <div class="user_count">
  81. <div class="bcell">
  82. <?php echo $lang['onair']; ?> <span class="ucount theme_btn"><?php echo $onair_count; ?></span>
  83. </div>
  84. </div>
  85. <div class="online_user"><?php echo $onair_user; ?></div>
  86. <?php } ?>
  87. <div class="user_count">
  88. <div class="bcell">
  89. <?php echo $lang['online']; ?> <span class="ucount back_theme"><?php echo $online_count; ?></span>
  90. </div>
  91. </div>
  92. <div class="online_user"><?php echo $online_user; ?></div>
  93. <?php if($offline_user != ''){ ?>
  94. <div class="user_count">
  95. <div class="bcell">
  96. <?php echo $lang['offline']; ?>
  97. </div>
  98. </div>
  99. <div class="online_user"><?php echo $offline_user; ?></div>
  100. <?php } ?>
  101. <div class="clear"></div>
  102. <div class="user_count">
  103. <?php echo $lang['sending_logs']; ?>
  104. <?php if($senders_info != ''){?>
  105. <div class="log_title" style="color:<?php echo LevelCol($data["level"]);?>;padding: 0px 10px;font-size: 13px;font-weight: 700;"></div>
  106. <?php echo $senders_info; ?>
  107. </div>
  108. <?php } ?>
  109. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement