403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/burlakastudio.realcommenter/ajax/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/burlakastudio.realcommenter/ajax/_admin_more_from.php
<?php

use Bitrix\Main\Localization\Loc;
use Burlakastudio\Realcommenter\DEBUGGER;
use Burlakastudio\Realcommenter\GRANT_AND_ACCESS;
use Burlakastudio\Realcommenter\Sanctions;
use Burlakastudio\Realcommenter\USER;

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die();
}

/**
 * ����� "��������� ����������� D7" ��� �������
 * �������� ���� �����: www.realcommenter.com
 * �������� ���� �����������: burlaka.studio
 * ����� � ����������: ������� ������� (AlexeyGfi) -> alexeygfi@gmail.com
 */
/**
 * ��� ������ �����, ����� �������� ��� ��������, ����� ������ �������
 * ��� ������� ������
 *
 * ���� ������ �� ������ �������������� ������������.
 * ��� ��� ����� ������������ ����� ��������, �� � �� �� ����
 * �������� ������ ������ - �����������, ������� �� ������� ������� ����������
 *
 */

if (GRANT_AND_ACCESS::is_any_moder($arParams)) {

    require_once __DIR__ . '/ajax_comment_id_to_url_validator.php';

    if (!$json_return['ERROR']) {

        /**
         * @var array $comment_info
         */

        /**
         * ���� � ��� ����������� � ����������������� ����������,
         * ...� � ���� ���� ��� ���� ��������,
         */

        $commentsList = USER::getCommentsByUser($comment_info['UF_USER_ID']);

        // ���� 1! (���� 1, ����� � ��� ��� �����, ������ �� �)
//        if (count($commentsList) > 1) {

            $listBox = <<<BOX
            <div class="more_from_user">
                <div class="mfu_header">#LANG_COMMENTS_OF##CNT#:
                    <del data-title="#LANG_CLOSE#"></del>
                </div>

                <div class="mfu_body">#ROWS#</div>
                <div class="mfu_footer" data-button-label="#LANG_DELETE_CHOOSED#"></div>
            </div>
BOX;

            $listRow = <<<BOX
            <li data-comment-id="#ID#">
                <a href="#URL##URLSUFF#itape=#ID#"><span>#TEXT#</span> <ins data-title="#LANG_ANSWERS_THERE# ">#SUB_CNT#</ins></a>
                <del></del>
            </li>
BOX;

            $rows = [];

            foreach ($commentsList as $comment) {
                $rows[] = str_replace(
                    [
                        '#ID#',
                        '#URL#',
                        '#TEXT#',
                        '#SUB_CNT#',
                        '#URLSUFF#',
                    ],
                    [
                        $comment['ID'],
                        $comment['URL_NAME'],
                        $comment['UF_COMMENT'],
                        // there are :empty, so we need really empty string
                        $comment['UF_COMMENTS_INSIDE'] ? $comment['UF_COMMENTS_INSIDE'] : '',
                        strpos($comment['URL_NAME'], '?') ? '&' : '?',
                    ],
                    $listRow
                );
            }

            $wholeList = USER::getCommentsByUser($comment_info['UF_USER_ID'], -1);
            $cnt = count($wholeList) > count($commentsList)
                ? ' (<span>#LANG_TOTAL# ' . count($wholeList) . '</span>)'
                : '';

            if (count($rows)) {
                $rowsHtml = '<ul>' . implode('', $rows) . '</ul>';
            } else {
                $rowsHtml = '<aside>' . Loc::getMessage('LANG_EMPTY_LIST') . '</aside>';
            }


            $result = str_replace(
                [
                    '#CNT#',
                    '#ROWS#',
                ],
                [
                    $cnt,
                    $rowsHtml,
                ],
                $listBox
            );

            /**
             * LANG_ANSWERS_THERE = ������� � �����:
             * LANG_DELETE_CHOOSED = ������ �������
             * LANG_CLOSE = �����
             * LANG_COMMENTS_OF = ����������� ����������
             * LANG_TOTAL = �����
             * LANG_EMPTY_LIST = ������ ����
             */
            $result = preg_replace_callback('~#(LANG_[^#]+?)#~', static function ($matches) {
                return Loc::getMessage($matches[1]);
            }, $result);

            $json_return['LIST'] = $result;

            $css = '/bitrix/js/burlakastudio.realcommenter/css/more_from_user.css';
            $js = '/bitrix/js/burlakastudio.realcommenter/more_from_user.js';
            $json_return['UPLOAD_ASSETS'] = [
                [
                    'ext' => 'css',
                    'url' => $css . '?' . filemtime($_SERVER['DOCUMENT_ROOT'] . $css)
                ],
                [
                    'ext' => 'js',
                    'url' => $js . '?' . filemtime($_SERVER['DOCUMENT_ROOT'] . $js)
                ],
            ];
            $json_return['UPLOAD_CALLBACK'] = 'realcommenterMoreFromUserScanAndInit';

//        } else {
//            $json_return['LIST'] = '';
//        }

    }

} else {
    DEBUGGER::error(
        Loc::getMessage('OPERATION_ACCESS_DENIED'), [], false
    );

    $json_return['ERROR'][] = Loc::getMessage('OPERATION_ACCESS_DENIED');

}

Youez - 2016 - github.com/yon3zu
LinuXploit