admin/model/extension/d_opencart_patch/modification.php

(开头部分) 25KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/*
 *  location: admin/model/extension/d_opencart_patch/modification.php
 *
 */

class ModelExtensionDOpencartPatchModification extends Model {

    /*
    *   Ocmod: turn on or off
    */

    public function setModification($xml, $status = 1){
        //finding file

        //by full path.
        $file = str_replace("system/", "", DIR_SYSTEM).$xml;
        if (!file_exists($file)) {
            $file =  DIR_SYSTEM.'library/d_shopunity/install/'.$xml;
        }

        //old format - depricated
        if (!file_exists($file)) {
            $file =  DIR_SYSTEM.'mbooth/install/'.$xml;
        }

        if (!file_exists($file)) {
            return false;
        }

        $json = array();
        if(VERSION >= '3.0.0.0'){
            $this->load->model('setting/modification');
        }else{
            $this->load->model('extension/modification');
        }
        
        if($status){
           

            // If xml file just put it straight into the DB
            $xml = file_get_contents($file);

            if ($xml) {
                try {
                    $dom = new DOMDocument('1.0', 'UTF-8');
                    $dom->loadXml($xml);

                    $name = $dom->getElementsByTagName('name')->item(0);

                    if ($name) {
                        $name = $name->nodeValue;
                    } else {
                        $name = '';
                    }

                    $code = $dom->getElementsByTagName('code')->item(0);

                    if ($code) {
                        $code = $code->nodeValue;
后面还有 534 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。