Advertisement
arabtion

Untitled

Oct 19th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 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 user_name, user_color, user_rank, user_dj, user_onair, user_join, user_tumb, user_status, user_sex,
  29. user_id, ureg_mute, user_mute, user_temp_mute, room_mute, last_action, user_bot, user_role, user_mood, country
  30. FROM `boom_users`
  31. WHERE `user_roomid` = {$data["user_roomid"]} AND last_action > '$check_action' AND user_status != 6 || user_bot = 1
  32. ORDER BY `user_rank` DESC, `user_name` ASC
  33. ");
  34.  
  35. if($data['max_offcount'] > 0){
  36. $offline_list = $mysqli->query("
  37. SELECT user_name, user_color, user_rank, user_dj, user_onair, user_join, user_tumb, user_status, user_sex,
  38. user_id, ureg_mute,user_mute, user_temp_mute, room_mute, last_action, user_bot, user_role, user_mood, country
  39. FROM `boom_users`
  40. 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
  41. ORDER BY last_action DESC LIMIT {$data['max_offcount']}
  42. ");
  43. }
  44.  
  45. mysqli_close($mysqli);
  46.  
  47. if ($data_list->num_rows > 0){
  48. while ($list = $data_list->fetch_assoc()){
  49. if($list['user_dj'] == 1 && $list['user_onair'] == 1){
  50. $onair_user .= createUserlist($list);
  51. }
  52. else {
  53. $online_user .= createUserlist($list);
  54. }
  55. }
  56. }
  57. if($data['max_offcount'] > 0){
  58. if($offline_list->num_rows > 0){
  59. while($offlist = $offline_list->fetch_assoc()){
  60. $offline_user .= createUserlist($offlist);
  61. }
  62. }
  63. }
  64.  
  65. ?>
  66. <div id="container_user">
  67. <?php if($onair_user != ''){ ?>
  68. <div class="user_count">
  69. <div class="bcell">
  70. <?php echo $lang['onair']; ?> <span class="ucount theme_btn"><?php echo $onair_count; ?></span>
  71. </div>
  72. </div>
  73. <div class="online_user"><?php echo $onair_user; ?></div>
  74. <?php } ?>
  75. <div class="user_count">
  76. <div class="bcell">
  77. <?php echo $lang['online']; ?> <span class="ucount back_theme"><?php echo $online_count; ?></span>
  78. </div>
  79. </div>
  80. <div class="online_user"><?php echo $online_user; ?></div>
  81. <?php if($offline_user != ''){ ?>
  82. <div class="user_count">
  83. <div class="bcell">
  84. <?php echo $lang['offline']; ?>
  85. </div>
  86. </div>
  87. <div class="online_user"><?php echo $offline_user; ?></div>
  88. <?php } ?>
  89. <div class="clear"></div>
  90. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement