Advertisement
Guest User

Untitled

a guest
Dec 4th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function get_view($parent_id, $cache, $prefix = '0', $disabled, $position, $add_ids = false, $to_del = false)
  15. {
  16. global $general;
  17. if ($to_del && !($general['sections']['channels_settings']['create_del_subchannels']['enabled'])) {
  18. $to_del = false;
  19. }
  20.  
  21. if ($general['sections']['channels_settings']['create_del_subchannels']['enabled']) {
  22. $parent_channels = explode( ',', $general['sections']['channels_settings']['create_del_subchannels']['parent'] );
  23.  
  24. if ($parent_channels[0] == $position) {
  25. $i = 0;
  26. }
  27. }
  28. else if (isset( $_SESSION['parent_channel'] )) {
  29. unset( $_SESSION['parent_channel'] );
  30. }
  31. if ($add_ids) {
  32. $j = 0;
  33. }
  34.  
  35. $channels_tree = '';
  36.  
  37. foreach ($cache['channels'] as $channel) {
  38. if ($channel['cid'] == $parent_id) {
  39. if ($channel['channel_maxclients'] != -1) {
  40. $ch_icon = 'ch_red_sub';
  41. }
  42. else if ($channel['channel_flag_password'] == 1) {
  43. $ch_icon = 'ch_yellow_sub';
  44. }
  45. else {
  46. $ch_icon = 'ch_green_sub';
  47. }
  48.  
  49. $channels_tree .= '<div class="ts_channel' . ((in_array( $channel['cid'], $disabled ) ? ' disabled ' : '')) . '' . (($to_del ? ' to_delete' : '')) . '" style="margin-left: ' . $prefix . 'px" data-id="' . ((in_array( $channel['cid'], $disabled ) ? '-' : $channel['cid'])) . '" data-pid="' . $channel['pid'] . '"><img class="ts_icon" src="icons/' . $ch_icon . '.svg" alt="' . $ch_icon . '">' . $channel['channel_name'] . '</div>';
  50.  
  51. if (isset( $channel['total_clients'] ) && (0 < $channel['total_clients'])) {
  52. foreach ($cache['clients'] as $client) {
  53. if ($client['cid'] == $parent_id) {
  54. if ($client['client_is_talker']) {
  55. $cli_icon = 'client_on';
  56. }
  57. else {
  58. $cli_icon = 'client_off';
  59. }
  60.  
  61. $channels_tree .= '<div class="ts_client" style="margin-left: ' . ($prefix + 15) . 'px"><img class="ts_icon" src="icons/' . $cli_icon . '.svg" alt="' . $ch_icon . '">' . $client['client_nickname'] . '</div>';
  62. }
  63. }
  64. }
  65. }
  66. else if ($channel['pid'] == $parent_id) {
  67. $added = false;
  68.  
  69. if (isset( $i )) {
  70. if ($i == $parent_channels[1]) {
  71. $_SESSION['parent_channel'] = $channel['cid'];
  72. $channels_tree .= get_view( $channel['cid'], $cache, $prefix + 15, $disabled, $position + 1, true );
  73. $added = true;
  74. $_SESSION['channel_pid'] = $channel['cid'];
  75. }
  76.  
  77. ++$i;
  78. }
  79. else if ($add_ids) {
  80. $channels_tree .= get_view( $channel['cid'], $cache, $prefix + 15, $disabled, $position + 1, false, true );
  81. $added = true;
  82. ++$j;
  83. }
  84.  
  85. if (!($added)) {
  86. $channels_tree .= get_view( $channel['cid'], $cache, $prefix + 15, $disabled, $position + 1 );
  87. }
  88. }
  89. }
  90.  
  91. if ($add_ids) {
  92. $_SESSION['subchannels'] = $j;
  93. }
  94.  
  95. return $channels_tree;
  96. }
  97.  
  98. function subchannels($channel_id)
  99. {
  100. global $cache;
  101. $i = 0;
  102.  
  103. foreach ($cache['channels'] as $ch) {
  104. if ($ch['pid'] == $channel_id) {
  105. ............................................................................
  106. ................................
  107. ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement