Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<link href="https://cdn.datatables.net/v/dt/dt-1.13.5/datatables.min.css" rel="stylesheet"..

Decoded Output download

<link href="https://cdn.datatables.net/v/dt/dt-1.13.5/datatables.min.css" rel="stylesheet"/> 
<link href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css" rel="stylesheet"/> 
<script src="https://cdn.datatables.net/v/dt/dt-1.13.5/datatables.min.js"></script> 
 
<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script> 
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script> 
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script> 
<script src="https://cdn.datatables.net/rowgroup/1.4.0/js/dataTables.rowGroup.min.js"></script> 
 
<?php 
 
/** 
 * @global  \CMain $APPLICATION 
 */ 
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php'); 
IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/intranet/public/crm/deal/index.php'); 
$APPLICATION->SetTitle(' '); 
CJSCore::Init(array('jquery2')); 
 
use Bitrix\Main\UI\Extension; 
 
Extension::load('ui.bootstrap4'); 
\Bitrix\Main\UI\Extension::load("ui.forms"); 
 
$arSubdivisions = CIBlockSection::GetList(Array("SORT" => "ASC"), Array("IBLOCK_ID" => 3), false, Array(), false); 
$arResult['SUBDIVISION'] = []; 
while ($row = $arSubdivisions->Fetch()) { 
    $arResult['SUBDIVISION'][$row['ID']] = [ 
        "NAME" => $row['NAME'] 
    ]; 
} 
//echo '<pre>'; 
 
foreach ($arResult['SUBDIVISION'] as $ksub => $valsub) { 
    $userResult = \CUser::getList( 
        'ID', 'ASC', 
        [ 
            'ACTIVE' => 'Y' 
        ], 
        array( 
            'FIELDS' => ['ID', 'LAST_NAME', 'NAME', 'SECOND_NAME', 'WORK_POSITION'], 
            'SELECT' => ['UF_DEPARTMENT'], 
        ) 
    ); 
 
    while ($user = $userResult->fetch()) { 
        if (in_array($ksub, $user['UF_DEPARTMENT'])) { 
 
            $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']] = $user; 
            $arUsers[$user['ID']] = $user; 
            if (CModule::IncludeModule("tasks")) { 
                $arFilter = array(); 
                if ($chosen_group_id) 
                    $arFilter['=GROUP_ID'] = $chosen_group_id; 
                if ($date_from) 
                    $arFilter['>=CREATED_DATE'] = $date_from; 
                if ($date_to) 
                    $arFilter['<=CREATED_DATE'] = $date_to; 
                $arFilter['RESPONSIBLE_ID'] = $user['ID']; 
                $res = CTasks::GetList( 
                    Array("TITLE" => "ASC"), 
                    $arFilter 
                ); 
                while ($arTask = $res->GetNext()) { 
                    $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['TASKS'][] = $arTask; 
                    $arUsers[$user['ID']]['TASKS'][] = $arTask; 
                    if ($arTask['STATUS'] == '5') { 
                        $arUsers[$user['ID']]['STATE_COMPLETED'][] = $arTask; 
                        $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['STATE_COMPLETED'][] = $arTask; 
                    } 
                    if ($arTask['STATUS'] == '3') { 
                        $arUsers[$user['ID']]['STATE_IN_PROGRESS'][] = $arTask; 
                        $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['STATE_IN_PROGRESS'][] = $arTask; 
                    } 
                    if ($arTask['STATUS'] == '-3') { 
                        $arUsers[$user['ID']]['METASTATE_EXPIRED_SOON'][] = $arTask; 
                        $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['METASTATE_EXPIRED_SOON'][] = $arTask; 
                    } 
 
 
                } 
            } 
 
        } 
 
 
    } 
} 
//print_r($arResult); 
?> 
<script> 
    function send_properties(ttype) { 
        if (ttype == 'step1') { 
            // 
            var chosen_group_id = $('#chosen_group_id').val(); 
            // 
            var date_from = $('#date_from').val(); 
            var date_to = $('#date_to').val(); 
            // 
            var chosen_status_id = $('#chosen_status_id').val(); 
 
            //    
            $.get("index.php", { 
                chosen_group_id: chosen_group_id, 
                action: 'step2', 
                date_from: date_from, 
                date_to: date_to, 
                chosen_status_id: chosen_status_id 
            }, function (data) { 
 
            }); 
        } 
 
        if (ttype == 'back') { 
            // 
            var chosen_group_id = $('#chosen_group_id').val(); 
            // 
            var date_from = $('#date_from').val(); 
            var date_to = $('#date_to').val(); 
            // 
            var chosen_status_id = $('#chosen_status_id').val(); 
 
            //    
            $.get("index.php", { 
                chosen_group_id: chosen_group_id, 
                action: 'step1_back', 
                date_from: date_from, 
                date_to: date_to, 
                chosen_status_id: chosen_status_id 
            }, function (data) { 
 
            }); 
        } 
 
    } 
 
    $(document).ready(function () { 
        $('#table_id').DataTable( 
            { 
                "pageLength": 50, 
                "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], 
                dom: 'Blfrtip', 
                buttons: [ 
                    { 
                        extend: 'copy' 
                    }, 
                    { 
                        extend: 'pdf', 
                        exportOptions: { 
                            columns: [0, 1] // Column index which needs to export 
                        } 
                    }, 
                    { 
                        extend: 'csv', 
                    }, 
                    { 
                        extend: 'excel', 
                    } 
                ], 
                order: [ 
                    [1, 'asc'] 
                ], 
                rowGroup: { 
                    dataSrc: [1] 
                }, 
                columnDefs: [ 
                    { 
                        targets: [1], 
                        visible: false 
                    } 
                ] 
            } 
        ); 
    }); 
 
 
 
</script> 
 
<br> 
<br> 
<br> 
<br> 
<div class="container"> 
 
 
    <? 
    $arGroups = array(); 
    $hGroups = CSocNetGroup::GetList(); 
    while ($row = $hGroups->Fetch()) 
        $arGroups[$row['ID']] = $row; 
    $chosen_group_id = ($_REQUEST['chosen_group_id'] ? $_REQUEST['chosen_group_id'] : array()); 
    $date_from = ($_REQUEST['date_from'] ? $_REQUEST['date_from'] : ''); 
    $date_to = ($_REQUEST['date_to'] ? $_REQUEST['date_to'] : ''); 
    $chosen_status_id = ($_REQUEST['chosen_status_id'] ? $_REQUEST['chosen_status_id'] : array()); 
    //(condition ? action_if_true: action_if_false;) 
    ?> 
    <form action="index.php" method="get" name="form1" id="form1"> 
        <div class="container"> 
            <div class="row"> 
                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> 
                    <h1></h1> 
                    <br> 
 
                    <div class="ui-ctl ui-ctl-multiple-select"> 
                        <select name="chosen_group_id[]" id="chosen_group_id" class="ui-ctl-element" multiple size="20"> 
                            <? foreach ($arGroups as $group_id => $ar_group) { 
                                ?> 
                                <option value="<?= $group_id ?>"<? if (in_array($group_id, $chosen_group_id)) { 
                                    echo ' selected'; 
                                } ?>><?= $ar_group['NAME'] . '[' . $group_id . ']' ?></option> 
                            <? } ?> 
                        </select> 
                    </div> 
                </div> 
                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> 
 
                    <h1></h1> 
                    <br> 
                    <p> 
                        <? $APPLICATION->IncludeComponent('bitrix:main.calendar', '', Array( 
                                'SHOW_INPUT' => 'Y', 
                                'FORM_NAME' => '', 
                                'INPUT_NAME' => 'date_from', 
                                'INPUT_NAME_FINISH' => 'date_to', 
                                'INPUT_VALUE' => $date_from, 
                                'INPUT_VALUE_FINISH' => $date_to, 
                                'SHOW_TIME' => 'N', 
                                'HIDE_TIMEBAR' => 'Y', 
                                'INPUT_ADDITIONAL_ATTR' => 'placeholder=".."' 
                            ) 
                        ); ?> 
                    </p> 
                    <p> 
 
                    </p> 
                </div> 
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin-top: 30px;"> 
                    <!--            <input type="button" onClick="send_properties('step1')" value="  ">--> 
                    <button type="submit" class="ui-btn ui-btn-success ui-btn-sm" 
                            value="  ">   
                    </button> 
                </div> 
            </div> 
        </div> 
    </form> 
    <br> 
    <br> 
    <br> 
    <table id="table_id" class="display" style="width:100%"> 
        <thead> 
        <tr> 
            <th></th> 
            <th></th> 
            <th>- </th> 
            <th>-   </th> 
            <th>-  </th> 
            <th>-  </th> 
 
        </tr> 
        </thead> 
        <tbody> 
        <? foreach ($arResult['SUBDIVISION'] as $kusub => $kvsub): ?> 
            <? //print_r($kvsub);?> 
            <? foreach ($kvsub['USER'] as $ku => $kv): ?> 
                <? if (count($kv['TASKS']) > 0): ?> 
                    <tr> 
                        <td> 
                            <a target="_blank" 
                               href="user.php?id=<?= $kv['ID'] ?>&<?= $_SERVER['QUERY_STRING'] ?>"><?= $kv['LAST_NAME'] . ' ' . $kv['NAME'] . ' ' . $kv['SECOND_NAME'] ?></a> 
                        </td> 
                        <td><?= $kvsub['NAME'] ?></td> 
                        <td><?= count($kv['TASKS']) ?></td> 
                        <td><?= count($kv['STATE_IN_PROGRESS']) ?></td> 
                        <td><?= count($kv['STATE_COMPLETED']) ?></td> 
                        <td><?= count($kv['METASTATE_EXPIRED_SOON']) ?></td> 
                    </tr> 
                <? endif ?> 
            <? endforeach ?> 
        <? endforeach ?> 
        </tbody> 
    </table> 
</div> 
 
<?php 
 
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/footer.php'); ?>

Did this file decode correctly?

Original Code

<link href="https://cdn.datatables.net/v/dt/dt-1.13.5/datatables.min.css" rel="stylesheet"/>
<link href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css" rel="stylesheet"/>
<script src="https://cdn.datatables.net/v/dt/dt-1.13.5/datatables.min.js"></script>

<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/rowgroup/1.4.0/js/dataTables.rowGroup.min.js"></script>

<?php

/**
 * @global  \CMain $APPLICATION
 */
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php');
IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/intranet/public/crm/deal/index.php');
$APPLICATION->SetTitle(' ');
CJSCore::Init(array('jquery2'));

use Bitrix\Main\UI\Extension;

Extension::load('ui.bootstrap4');
\Bitrix\Main\UI\Extension::load("ui.forms");

$arSubdivisions = CIBlockSection::GetList(Array("SORT" => "ASC"), Array("IBLOCK_ID" => 3), false, Array(), false);
$arResult['SUBDIVISION'] = [];
while ($row = $arSubdivisions->Fetch()) {
    $arResult['SUBDIVISION'][$row['ID']] = [
        "NAME" => $row['NAME']
    ];
}
//echo '<pre>';

foreach ($arResult['SUBDIVISION'] as $ksub => $valsub) {
    $userResult = \CUser::getList(
        'ID', 'ASC',
        [
            'ACTIVE' => 'Y'
        ],
        array(
            'FIELDS' => ['ID', 'LAST_NAME', 'NAME', 'SECOND_NAME', 'WORK_POSITION'],
            'SELECT' => ['UF_DEPARTMENT'],
        )
    );

    while ($user = $userResult->fetch()) {
        if (in_array($ksub, $user['UF_DEPARTMENT'])) {

            $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']] = $user;
            $arUsers[$user['ID']] = $user;
            if (CModule::IncludeModule("tasks")) {
                $arFilter = array();
                if ($chosen_group_id)
                    $arFilter['=GROUP_ID'] = $chosen_group_id;
                if ($date_from)
                    $arFilter['>=CREATED_DATE'] = $date_from;
                if ($date_to)
                    $arFilter['<=CREATED_DATE'] = $date_to;
                $arFilter['RESPONSIBLE_ID'] = $user['ID'];
                $res = CTasks::GetList(
                    Array("TITLE" => "ASC"),
                    $arFilter
                );
                while ($arTask = $res->GetNext()) {
                    $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['TASKS'][] = $arTask;
                    $arUsers[$user['ID']]['TASKS'][] = $arTask;
                    if ($arTask['STATUS'] == '5') {
                        $arUsers[$user['ID']]['STATE_COMPLETED'][] = $arTask;
                        $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['STATE_COMPLETED'][] = $arTask;
                    }
                    if ($arTask['STATUS'] == '3') {
                        $arUsers[$user['ID']]['STATE_IN_PROGRESS'][] = $arTask;
                        $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['STATE_IN_PROGRESS'][] = $arTask;
                    }
                    if ($arTask['STATUS'] == '-3') {
                        $arUsers[$user['ID']]['METASTATE_EXPIRED_SOON'][] = $arTask;
                        $arResult['SUBDIVISION'][$ksub]['USER'][$user['ID']]['METASTATE_EXPIRED_SOON'][] = $arTask;
                    }


                }
            }

        }


    }
}
//print_r($arResult);
?>
<script>
    function send_properties(ttype) {
        if (ttype == 'step1') {
            //
            var chosen_group_id = $('#chosen_group_id').val();
            //
            var date_from = $('#date_from').val();
            var date_to = $('#date_to').val();
            //
            var chosen_status_id = $('#chosen_status_id').val();

            //   
            $.get("index.php", {
                chosen_group_id: chosen_group_id,
                action: 'step2',
                date_from: date_from,
                date_to: date_to,
                chosen_status_id: chosen_status_id
            }, function (data) {

            });
        }

        if (ttype == 'back') {
            //
            var chosen_group_id = $('#chosen_group_id').val();
            //
            var date_from = $('#date_from').val();
            var date_to = $('#date_to').val();
            //
            var chosen_status_id = $('#chosen_status_id').val();

            //   
            $.get("index.php", {
                chosen_group_id: chosen_group_id,
                action: 'step1_back',
                date_from: date_from,
                date_to: date_to,
                chosen_status_id: chosen_status_id
            }, function (data) {

            });
        }

    }

    $(document).ready(function () {
        $('#table_id').DataTable(
            {
                "pageLength": 50,
                "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
                dom: 'Blfrtip',
                buttons: [
                    {
                        extend: 'copy'
                    },
                    {
                        extend: 'pdf',
                        exportOptions: {
                            columns: [0, 1] // Column index which needs to export
                        }
                    },
                    {
                        extend: 'csv',
                    },
                    {
                        extend: 'excel',
                    }
                ],
                order: [
                    [1, 'asc']
                ],
                rowGroup: {
                    dataSrc: [1]
                },
                columnDefs: [
                    {
                        targets: [1],
                        visible: false
                    }
                ]
            }
        );
    });



</script>

<br>
<br>
<br>
<br>
<div class="container">


    <?
    $arGroups = array();
    $hGroups = CSocNetGroup::GetList();
    while ($row = $hGroups->Fetch())
        $arGroups[$row['ID']] = $row;
    $chosen_group_id = ($_REQUEST['chosen_group_id'] ? $_REQUEST['chosen_group_id'] : array());
    $date_from = ($_REQUEST['date_from'] ? $_REQUEST['date_from'] : '');
    $date_to = ($_REQUEST['date_to'] ? $_REQUEST['date_to'] : '');
    $chosen_status_id = ($_REQUEST['chosen_status_id'] ? $_REQUEST['chosen_status_id'] : array());
    //(condition ? action_if_true: action_if_false;)
    ?>
    <form action="index.php" method="get" name="form1" id="form1">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                    <h1></h1>
                    <br>

                    <div class="ui-ctl ui-ctl-multiple-select">
                        <select name="chosen_group_id[]" id="chosen_group_id" class="ui-ctl-element" multiple size="20">
                            <? foreach ($arGroups as $group_id => $ar_group) {
                                ?>
                                <option value="<?= $group_id ?>"<? if (in_array($group_id, $chosen_group_id)) {
                                    echo ' selected';
                                } ?>><?= $ar_group['NAME'] . '[' . $group_id . ']' ?></option>
                            <? } ?>
                        </select>
                    </div>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">

                    <h1></h1>
                    <br>
                    <p>
                        <? $APPLICATION->IncludeComponent('bitrix:main.calendar', '', Array(
                                'SHOW_INPUT' => 'Y',
                                'FORM_NAME' => '',
                                'INPUT_NAME' => 'date_from',
                                'INPUT_NAME_FINISH' => 'date_to',
                                'INPUT_VALUE' => $date_from,
                                'INPUT_VALUE_FINISH' => $date_to,
                                'SHOW_TIME' => 'N',
                                'HIDE_TIMEBAR' => 'Y',
                                'INPUT_ADDITIONAL_ATTR' => 'placeholder=".."'
                            )
                        ); ?>
                    </p>
                    <p>

                    </p>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin-top: 30px;">
                    <!--            <input type="button" onClick="send_properties('step1')" value="  ">-->
                    <button type="submit" class="ui-btn ui-btn-success ui-btn-sm"
                            value="  ">  
                    </button>
                </div>
            </div>
        </div>
    </form>
    <br>
    <br>
    <br>
    <table id="table_id" class="display" style="width:100%">
        <thead>
        <tr>
            <th></th>
            <th></th>
            <th>- </th>
            <th>-   </th>
            <th>-  </th>
            <th>-  </th>

        </tr>
        </thead>
        <tbody>
        <? foreach ($arResult['SUBDIVISION'] as $kusub => $kvsub): ?>
            <? //print_r($kvsub);?>
            <? foreach ($kvsub['USER'] as $ku => $kv): ?>
                <? if (count($kv['TASKS']) > 0): ?>
                    <tr>
                        <td>
                            <a target="_blank"
                               href="user.php?id=<?= $kv['ID'] ?>&<?= $_SERVER['QUERY_STRING'] ?>"><?= $kv['LAST_NAME'] . ' ' . $kv['NAME'] . ' ' . $kv['SECOND_NAME'] ?></a>
                        </td>
                        <td><?= $kvsub['NAME'] ?></td>
                        <td><?= count($kv['TASKS']) ?></td>
                        <td><?= count($kv['STATE_IN_PROGRESS']) ?></td>
                        <td><?= count($kv['STATE_COMPLETED']) ?></td>
                        <td><?= count($kv['METASTATE_EXPIRED_SOON']) ?></td>
                    </tr>
                <? endif ?>
            <? endforeach ?>
        <? endforeach ?>
        </tbody>
    </table>
</div>

<?php

require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/footer.php');

Function Calls

None

Variables

None

Stats

MD5 41364c31e2f4df4fe008f793563728b4
Eval Count 0
Decode Time 47 ms