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

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); namespace App\Controllers\Admin\Setting; use App\Control..

Decoded Output download

<?php

declare(strict_types=1);

namespace App\Controllers\Admin\Setting;

use App\Controllers\BaseController;
use App\Models\Config;
use Exception;
use Psr\Http\Message\ResponseInterface;
use Slim\Http\Response;
use Slim\Http\ServerRequest;

final class RefController extends BaseController
{
    private static array $update_field = [
        'invite_reg_money_reward',
        'invite_reg_traffic_reward',
        'invite_mode',
        'invite_reward_mode',
        'invite_reward_rate',
        'invite_reward_count_limit',
        'invite_reward_total_limit',
    ];

    /**
     * @throws Exception
     */
    public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
    {
        $settings = Config::getClass('ref');

        return $response->write(
            $this->view()
                ->assign('update_field', self::$update_field)
                ->assign('settings', $settings)
                ->fetch('admin/setting/ref.tpl')
        );
    }

    public function save(ServerRequest $request, Response $response, array $args): ResponseInterface
    {
        foreach (self::$update_field as $item) {
            if (! Config::set($item, $request->getParam($item))) {
                return $response->withJson([
                    'ret' => 0,
                    'msg' => ' ' . $item . ' ',
                ]);
            }
        }

        return $response->withJson([
            'ret' => 1,
            'msg' => '',
        ]);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace App\Controllers\Admin\Setting;

use App\Controllers\BaseController;
use App\Models\Config;
use Exception;
use Psr\Http\Message\ResponseInterface;
use Slim\Http\Response;
use Slim\Http\ServerRequest;

final class RefController extends BaseController
{
    private static array $update_field = [
        'invite_reg_money_reward',
        'invite_reg_traffic_reward',
        'invite_mode',
        'invite_reward_mode',
        'invite_reward_rate',
        'invite_reward_count_limit',
        'invite_reward_total_limit',
    ];

    /**
     * @throws Exception
     */
    public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
    {
        $settings = Config::getClass('ref');

        return $response->write(
            $this->view()
                ->assign('update_field', self::$update_field)
                ->assign('settings', $settings)
                ->fetch('admin/setting/ref.tpl')
        );
    }

    public function save(ServerRequest $request, Response $response, array $args): ResponseInterface
    {
        foreach (self::$update_field as $item) {
            if (! Config::set($item, $request->getParam($item))) {
                return $response->withJson([
                    'ret' => 0,
                    'msg' => ' ' . $item . ' ',
                ]);
            }
        }

        return $response->withJson([
            'ret' => 1,
            'msg' => '',
        ]);
    }
}

Function Calls

None

Variables

None

Stats

MD5 95d621ccf25b9d67ed791f3ef38254fd
Eval Count 0
Decode Time 81 ms