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 /** * Created by PhpStorm. * User: Administrator * Date: 2020/5/30 * Time: ..

Decoded Output download

<?php 
/** 
 * Created by PhpStorm. 
 * User: Administrator 
 * Date: 2020/5/30 
 * Time: 9:52 
 */ 
 
namespace appdmin\controller; 
use think\Db; 
use thinkacade\Request; 
 
class Shop extends  Common 
{ 
    // 
    public function shopSet(){ 
        if(Request::isAjax()){ 
            $page =input('page')?input('page'):1; 
            $pageSize =input('limit')?input('limit'):config('pageSize'); 
            $list = Db::table('shop')->order('sort') 
                ->paginate(array('list_rows'=>$pageSize,'page'=>$page)) 
                ->toArray(); 
            if($list['data']){ 
                foreach ($list['data'] as $k=>&$v){ 
                    $v['addtime'] = data_f($v['addtime']); 
                } 
            } 
            return $result = ['code'=>0,'msg'=>'!','data'=>$list['data'],'count'=>$list['total'],'rel'=>1]; 
        } 
        return view(); 
    } 
    //   
    public function shopsetAdd(){ 
        if(Request::isAjax()) { 
            // 
            $data = Request::except('file'); 
            $data['addtime'] = time(); 
//            $data['type'] = 'qt'; 
 
            Db::name('shop')->insert($data); 
            $result['code'] = 1; 
            $result['msg'] = '!'; 
            cache('adList', NULL); 
            $result['url'] = url('shopSet'); 
            return $result; 
        }else{ 
            $this->assign('title',lang('add').lang('ad')); 
            $this->assign('info','null'); 
            return $this->fetch('shopsetForm'); 
        } 
    } 
    //   
    public function shopsetEdit(){ 
        if(Request::isAjax()) { 
            $data = Request::except('file'); 
            $wx_k_v = Db::name('shop')->where('id',$data['id'])->find(); 
            if($wx_k_v){ 
                Db::name('shop')->update($data); 
                $result['code'] = 1; 
                $result['msg'] = '!'; 
                cache('adList', NULL); 
                $result['url'] = url('shopSet'); 
                return $result; 
            }else{ 
                $result['code'] = 0; 
                $result['msg'] = '!'; 
                return $result; 
            } 
        }else{ 
            $id=input('id'); 
            $adInfo = Db::name('shop')->where(array('id'=>$id))->find(); 
            $this->assign('info',json_encode($adInfo,true)); 
            $this->assign('title',lang('edit').lang('ad')); 
            return $this->fetch('shopsetForm'); 
        } 
 
    } 
    //  
    public function shopsetDel(){ 
        Db::name('shop')->delete(['id'=>input('id')]); 
        return $result = ['code'=>1,'msg'=>'!']; 
    } 
} ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/5/30
 * Time: 9:52
 */

namespace app\admin\controller;
use think\Db;
use think\facade\Request;

class Shop extends  Common
{
    //
    public function shopSet(){
        if(Request::isAjax()){
            $page =input('page')?input('page'):1;
            $pageSize =input('limit')?input('limit'):config('pageSize');
            $list = Db::table('shop')->order('sort')
                ->paginate(array('list_rows'=>$pageSize,'page'=>$page))
                ->toArray();
            if($list['data']){
                foreach ($list['data'] as $k=>&$v){
                    $v['addtime'] = data_f($v['addtime']);
                }
            }
            return $result = ['code'=>0,'msg'=>'!','data'=>$list['data'],'count'=>$list['total'],'rel'=>1];
        }
        return view();
    }
    //  
    public function shopsetAdd(){
        if(Request::isAjax()) {
            //
            $data = Request::except('file');
            $data['addtime'] = time();
//            $data['type'] = 'qt';

            Db::name('shop')->insert($data);
            $result['code'] = 1;
            $result['msg'] = '!';
            cache('adList', NULL);
            $result['url'] = url('shopSet');
            return $result;
        }else{
            $this->assign('title',lang('add').lang('ad'));
            $this->assign('info','null');
            return $this->fetch('shopsetForm');
        }
    }
    //  
    public function shopsetEdit(){
        if(Request::isAjax()) {
            $data = Request::except('file');
            $wx_k_v = Db::name('shop')->where('id',$data['id'])->find();
            if($wx_k_v){
                Db::name('shop')->update($data);
                $result['code'] = 1;
                $result['msg'] = '!';
                cache('adList', NULL);
                $result['url'] = url('shopSet');
                return $result;
            }else{
                $result['code'] = 0;
                $result['msg'] = '!';
                return $result;
            }
        }else{
            $id=input('id');
            $adInfo = Db::name('shop')->where(array('id'=>$id))->find();
            $this->assign('info',json_encode($adInfo,true));
            $this->assign('title',lang('edit').lang('ad'));
            return $this->fetch('shopsetForm');
        }

    }
    // 
    public function shopsetDel(){
        Db::name('shop')->delete(['id'=>input('id')]);
        return $result = ['code'=>1,'msg'=>'!'];
    }
}

Function Calls

None

Variables

None

Stats

MD5 a86ee47e2fc680e70ffb20c3b93c7b0f
Eval Count 0
Decode Time 103 ms