Advertisement
arabtion

Untitled

Oct 19th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 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.  
  64. ?>
  65. <div id="container_user">
  66. <?php if($onair_user != ''){ ?>
  67. <div class="user_count">
  68. <div class="bcell">
  69. <?php echo $lang['onair']; ?> <span class="ucount theme_btn"><?php echo $onair_count; ?></span>
  70. </div>
  71. </div>
  72. <div class="online_user"><?php echo $onair_user; ?></div>
  73. <?php } ?>
  74. <div class="user_count">
  75. <div class="bcell">
  76. <?php echo $lang['online']; ?> <span class="ucount back_theme"><?php echo $online_count; ?></span>
  77. </div>
  78. </div>
  79. <div class="online_user"><?php echo $online_user; ?></div>
  80. <?php if($offline_user != ''){ ?>
  81. <div class="user_count">
  82. <div class="bcell">
  83. <?php echo $lang['offline']; ?>
  84. </div>
  85. </div>
  86. <div class="online_user"><?php echo $offline_user; ?></div>
  87. <?php } ?>
  88. <div class="clear"></div>
  89. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement