Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.8.0
- * @ Author : DeZender
- * @ Release on : 25.09.2017
- * @ Official site : http://DeZender.Net
- *
- */
- function get_view($parent_id, $cache, $prefix = '0', $disabled, $position, $add_ids = false, $to_del = false)
- {
- global $general;
- if ($to_del && !($general['sections']['channels_settings']['create_del_subchannels']['enabled'])) {
- $to_del = false;
- }
- if ($general['sections']['channels_settings']['create_del_subchannels']['enabled']) {
- $parent_channels = explode( ',', $general['sections']['channels_settings']['create_del_subchannels']['parent'] );
- if ($parent_channels[0] == $position) {
- $i = 0;
- }
- }
- else if (isset( $_SESSION['parent_channel'] )) {
- unset( $_SESSION['parent_channel'] );
- }
- if ($add_ids) {
- $j = 0;
- }
- $channels_tree = '';
- foreach ($cache['channels'] as $channel) {
- if ($channel['cid'] == $parent_id) {
- if ($channel['channel_maxclients'] != -1) {
- $ch_icon = 'ch_red_sub';
- }
- else if ($channel['channel_flag_password'] == 1) {
- $ch_icon = 'ch_yellow_sub';
- }
- else {
- $ch_icon = 'ch_green_sub';
- }
- $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>';
- if (isset( $channel['total_clients'] ) && (0 < $channel['total_clients'])) {
- foreach ($cache['clients'] as $client) {
- if ($client['cid'] == $parent_id) {
- if ($client['client_is_talker']) {
- $cli_icon = 'client_on';
- }
- else {
- $cli_icon = 'client_off';
- }
- $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>';
- }
- }
- }
- }
- else if ($channel['pid'] == $parent_id) {
- $added = false;
- if (isset( $i )) {
- if ($i == $parent_channels[1]) {
- $_SESSION['parent_channel'] = $channel['cid'];
- $channels_tree .= get_view( $channel['cid'], $cache, $prefix + 15, $disabled, $position + 1, true );
- $added = true;
- $_SESSION['channel_pid'] = $channel['cid'];
- }
- ++$i;
- }
- else if ($add_ids) {
- $channels_tree .= get_view( $channel['cid'], $cache, $prefix + 15, $disabled, $position + 1, false, true );
- $added = true;
- ++$j;
- }
- if (!($added)) {
- $channels_tree .= get_view( $channel['cid'], $cache, $prefix + 15, $disabled, $position + 1 );
- }
- }
- }
- if ($add_ids) {
- $_SESSION['subchannels'] = $j;
- }
- return $channels_tree;
- }
- function subchannels($channel_id)
- {
- global $cache;
- $i = 0;
- foreach ($cache['channels'] as $ch) {
- if ($ch['pid'] == $channel_id) {
- ............................................................................
- ................................
- ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement