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 /** * FecShop file. * * @link http://www.fecshop.com/ * @copyright Copyright (c)..

Decoded Output download

<?php
/**
 * FecShop file.
 *
 * @link http://www.fecshop.com/
 * @copyright Copyright (c) 2016 FecShop Software LLC
 * @license http://www.fecshop.com/license/
 */

namespace fecshopppppfront\modules\Customerlock\order;

use Yii;

/**
 * @author Terry Zhao <[email protected]>
 * @since 1.0
 */
class View extends \yiiase\BaseObject
{
    public function getLastData()
    {
        $order_id = Yii::$app->request->get('order_id');
        $order_info = $this->getCustomerOrderInfo($order_id);
        $this->breadcrumbs(Yii::$service->page->translate->__('Customer Order Info'));
        return $order_info;
    }
    
    // 
    protected function breadcrumbs($name)
    {
        if (Yii::$app->controller->module->params['customer_order_info_breadcrumbs']) {
            Yii::$service->page->breadcrumbs->addItems(['name' => $name]);
        } else {
            Yii::$service->page->breadcrumbs->active = false;
        }
    }
    
    public function getCustomerOrderInfo($order_id)
    {
        if ($order_id) {
            $order_info = Yii::$service->order->getOrderInfoById($order_id);
            if (isset($order_info['customer_id']) && !empty($order_info['customer_id'])) {
                $identity = Yii::$app->user->identity;
                $customer_id = $identity->id;
                if ($order_info['customer_id'] == $customer_id) {
                    return $order_info;
                }
            }
        }

        return [];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * FecShop file.
 *
 * @link http://www.fecshop.com/
 * @copyright Copyright (c) 2016 FecShop Software LLC
 * @license http://www.fecshop.com/license/
 */

namespace fecshop\app\appfront\modules\Customer\block\order;

use Yii;

/**
 * @author Terry Zhao <[email protected]>
 * @since 1.0
 */
class View extends \yii\base\BaseObject
{
    public function getLastData()
    {
        $order_id = Yii::$app->request->get('order_id');
        $order_info = $this->getCustomerOrderInfo($order_id);
        $this->breadcrumbs(Yii::$service->page->translate->__('Customer Order Info'));
        return $order_info;
    }
    
    // 
    protected function breadcrumbs($name)
    {
        if (Yii::$app->controller->module->params['customer_order_info_breadcrumbs']) {
            Yii::$service->page->breadcrumbs->addItems(['name' => $name]);
        } else {
            Yii::$service->page->breadcrumbs->active = false;
        }
    }
    
    public function getCustomerOrderInfo($order_id)
    {
        if ($order_id) {
            $order_info = Yii::$service->order->getOrderInfoById($order_id);
            if (isset($order_info['customer_id']) && !empty($order_info['customer_id'])) {
                $identity = Yii::$app->user->identity;
                $customer_id = $identity->id;
                if ($order_info['customer_id'] == $customer_id) {
                    return $order_info;
                }
            }
        }

        return [];
    }
}

Function Calls

None

Variables

None

Stats

MD5 8a052e1a74086f357331642d72be75f5
Eval Count 0
Decode Time 85 ms