public function __construct(umiFile $vb1e3840c73bd1d04e68740c009214532)
 {
     if ($vb1e3840c73bd1d04e68740c009214532->getIsBroken()) {
         throw new coreException('CSV file doesn\'t exists: "' . $vb1e3840c73bd1d04e68740c009214532->getFilePath() . '"');
     }
     $this->forceObjectCreation = umiObjectProperty::$USE_FORCE_OBJECTS_CREATION;
     if (getRequest('ignore-id')) {
         umiObjectProperty::$USE_FORCE_OBJECTS_CREATION = true;
     }
     $this->csvFile = $vb1e3840c73bd1d04e68740c009214532;
     $this->openFile();
 }
 public function subscribers_import_do()
 {
     $select_csvfile = getRequest('select_csvfile');
     if (!($csvfile = umiFile::upload("data", "csvfile", "./files/"))) {
         $csvfile = new umiFile("./files/" . $select_csvfile);
     }
     if ($filepath = $csvfile->getFilePath()) {
         $csv = file_get_contents($filepath);
         $csv = iconv("CP1251", "UTF-8//IGNORE", $csv);
         $csv_arr = explode("\n", $csv);
         foreach ($csv_arr as $csv_line) {
             $arr = explode(";", $csv_line);
             if (sizeof($arr) < 2) {
                 continue;
             }
             list($email, $fname) = $arr;
             $lname = isset($arr[2]) ? $arr[2] : false;
             $this->import_subscriber($email, $fname, $lname);
         }
     }
     $this->redirect($this->pre_lang . "/admin/dispatches/subscribers/");
 }
 public function export($v92ec19ffde05e15769b1bb3ee05ad745)
 {
     set_time_limit(0);
     if (!count($v92ec19ffde05e15769b1bb3ee05ad745)) {
         $v8be74552df93e31bbdd6b36ed74bdb6a = new selector('pages');
         $v8be74552df93e31bbdd6b36ed74bdb6a->where('hierarchy')->page(0)->childs(0);
         $v92ec19ffde05e15769b1bb3ee05ad745 = $v8be74552df93e31bbdd6b36ed74bdb6a->result;
     }
     if (getRequest('as_file') === '0') {
         $ved780287e302ec3b9fd3c5e78771919f = new xmlExporter($this->getSourceName());
         $ved780287e302ec3b9fd3c5e78771919f->addBranches($v92ec19ffde05e15769b1bb3ee05ad745);
         $result = $ved780287e302ec3b9fd3c5e78771919f->execute();
         return $result->saveXML();
     }
     $v857a5246dff0c3c79e476b004684f6d3 = "./sys-temp/export/";
     $vb80bb7740288fda1f201890375a60c8f = getRequest('param0');
     $v97fd815a3803a0588876bdd862014fed = $v857a5246dff0c3c79e476b004684f6d3 . $vb80bb7740288fda1f201890375a60c8f . "." . parent::getFileExt();
     $v6990a54322d9232390a784c5c9247dd6 = $v857a5246dff0c3c79e476b004684f6d3 . $vb80bb7740288fda1f201890375a60c8f;
     if (!is_dir($v6990a54322d9232390a784c5c9247dd6)) {
         mkdir($v6990a54322d9232390a784c5c9247dd6, 0777, true);
     }
     if (file_exists($v97fd815a3803a0588876bdd862014fed) && !file_exists(CURRENT_WORKING_DIR . '/sys-temp/runtime-cache/' . md5($this->getSourceName()))) {
         unlink($v97fd815a3803a0588876bdd862014fed);
     }
     if ($v92ec19ffde05e15769b1bb3ee05ad745) {
         $v33030abc929f083da5f6c3f755b46034 = array('./tpls/', './xsltTpls/', './css/', './js/', './usels/', './umaps/', './templates/');
         foreach ($v33030abc929f083da5f6c3f755b46034 as $v100664c6e2c0333b19a729f2f3ddb7dd) {
             if (is_dir($v100664c6e2c0333b19a729f2f3ddb7dd)) {
                 $v736007832d2167baaae763fd3a3f3cf1 = new umiDirectory($v100664c6e2c0333b19a729f2f3ddb7dd);
                 $v45b963397aa40d4a0063e0d85e4fe7a1 = $v736007832d2167baaae763fd3a3f3cf1->getAllFiles(1);
                 foreach ($v45b963397aa40d4a0063e0d85e4fe7a1 as $vd6fe1d0be6347b8ef2427fa629c04485 => $vb068931cc450442b63f5b3d276ea4297) {
                     $v8c7dd922ad47494fc02c388e12c00eac = new umiFile($vd6fe1d0be6347b8ef2427fa629c04485);
                     if (!is_dir($v6990a54322d9232390a784c5c9247dd6 . ltrim($v8c7dd922ad47494fc02c388e12c00eac->getDirName(), '.'))) {
                         mkdir($v6990a54322d9232390a784c5c9247dd6 . ltrim($v8c7dd922ad47494fc02c388e12c00eac->getDirName(), '.'), 0777, true);
                     }
                     copy($v8c7dd922ad47494fc02c388e12c00eac->getFilePath(), $v6990a54322d9232390a784c5c9247dd6 . $v8c7dd922ad47494fc02c388e12c00eac->getFilePath(true));
                 }
             }
         }
     }
     $v71b70dd1e455c477220693d84ccd5682 = $v97fd815a3803a0588876bdd862014fed . '.tmp';
     $v480d1b61a0432d1319f7504a3d7318dd = (int) mainConfiguration::getInstance()->get("modules", "exchange.export.limit");
     if ($v480d1b61a0432d1319f7504a3d7318dd <= 0) {
         $v480d1b61a0432d1319f7504a3d7318dd = 25;
     }
     $ved780287e302ec3b9fd3c5e78771919f = new xmlExporter($this->getSourceName(), $v480d1b61a0432d1319f7504a3d7318dd);
     $ved780287e302ec3b9fd3c5e78771919f->addBranches($v92ec19ffde05e15769b1bb3ee05ad745);
     $vdd988cfd769c9f7fbd795a0f5da8e751 = $ved780287e302ec3b9fd3c5e78771919f->execute();
     if (file_exists($v97fd815a3803a0588876bdd862014fed)) {
         $v1de9b0a30075ae8c303eb420c103c320 = new XMLReader();
         $va82feee3cc1af8bcabda979e8775ef0f = new XMLWriter();
         $v1de9b0a30075ae8c303eb420c103c320->open($v97fd815a3803a0588876bdd862014fed);
         $va82feee3cc1af8bcabda979e8775ef0f->openURI($v71b70dd1e455c477220693d84ccd5682);
         $va82feee3cc1af8bcabda979e8775ef0f->startDocument('1.0', 'utf-8');
         $va82feee3cc1af8bcabda979e8775ef0f->startElement('umidump');
         $va82feee3cc1af8bcabda979e8775ef0f->writeAttribute('version', '2.0');
         $va82feee3cc1af8bcabda979e8775ef0f->writeAttribute('xmlns:xlink', 'http://www.w3.org/TR/xlink');
         $v7aa28ed115707345d0274032757e8991 = $v1de9b0a30075ae8c303eb420c103c320->read();
         while ($v7aa28ed115707345d0274032757e8991) {
             if ($v1de9b0a30075ae8c303eb420c103c320->nodeType == XMLReader::ELEMENT) {
                 $ve24455211a964330063a18670d943835 = $v1de9b0a30075ae8c303eb420c103c320->name;
                 if ($ve24455211a964330063a18670d943835 != 'umidump') {
                     $va82feee3cc1af8bcabda979e8775ef0f->startElement($ve24455211a964330063a18670d943835);
                     if ($ve24455211a964330063a18670d943835 != 'meta') {
                         if (!$v1de9b0a30075ae8c303eb420c103c320->isEmptyElement) {
                             $v7852ddca47412c0d947ebf27eb83ed3a = $v1de9b0a30075ae8c303eb420c103c320->read();
                             while ($v7852ddca47412c0d947ebf27eb83ed3a) {
                                 if ($v1de9b0a30075ae8c303eb420c103c320->nodeType == XMLReader::ELEMENT) {
                                     $vcf7f5c76225a101e6320a96c02f92fc1 = $v1de9b0a30075ae8c303eb420c103c320->name;
                                     $va82feee3cc1af8bcabda979e8775ef0f->writeRaw($v1de9b0a30075ae8c303eb420c103c320->readOuterXML());
                                     $v7852ddca47412c0d947ebf27eb83ed3a = $v1de9b0a30075ae8c303eb420c103c320->next();
                                 } elseif ($v1de9b0a30075ae8c303eb420c103c320->nodeType == XMLReader::END_ELEMENT && $v1de9b0a30075ae8c303eb420c103c320->name == $ve24455211a964330063a18670d943835) {
                                     $v7852ddca47412c0d947ebf27eb83ed3a = false;
                                 } else {
                                     $v7852ddca47412c0d947ebf27eb83ed3a = $v1de9b0a30075ae8c303eb420c103c320->next();
                                 }
                             }
                         }
                         if ($vdd988cfd769c9f7fbd795a0f5da8e751->getElementsByTagName($ve24455211a964330063a18670d943835)->item(0)->hasChildNodes()) {
                             $v268184c12df027f536154d099d497b31 = $vdd988cfd769c9f7fbd795a0f5da8e751->getElementsByTagName($ve24455211a964330063a18670d943835)->item(0)->childNodes;
                             foreach ($v268184c12df027f536154d099d497b31 as $v1b7d5726533ab525a8760351e9b5e415) {
                                 $va5e171f642af8e3bd24c50cdc4d66fe3 = new DOMDocument();
                                 $va5e171f642af8e3bd24c50cdc4d66fe3->formatOutput = true;
                                 $v36c4536996ca5615dcf9911f068786dc = $va5e171f642af8e3bd24c50cdc4d66fe3->importNode($v1b7d5726533ab525a8760351e9b5e415, true);
                                 $va5e171f642af8e3bd24c50cdc4d66fe3->appendChild($v36c4536996ca5615dcf9911f068786dc);
                                 $va82feee3cc1af8bcabda979e8775ef0f->writeRaw($va5e171f642af8e3bd24c50cdc4d66fe3->saveXML($v36c4536996ca5615dcf9911f068786dc, LIBXML_NOXMLDECL));
                             }
                         }
                     } elseif ($ve24455211a964330063a18670d943835 == 'meta') {
                         $va82feee3cc1af8bcabda979e8775ef0f->writeRaw($v1de9b0a30075ae8c303eb420c103c320->readInnerXML());
                         $v92ec19ffde05e15769b1bb3ee05ad745 = $vdd988cfd769c9f7fbd795a0f5da8e751->getElementsByTagName('branches');
                         if ($v92ec19ffde05e15769b1bb3ee05ad745->item(0)) {
                             $va82feee3cc1af8bcabda979e8775ef0f->writeRaw($vdd988cfd769c9f7fbd795a0f5da8e751->saveXML($v92ec19ffde05e15769b1bb3ee05ad745->item(0), LIBXML_NOXMLDECL));
                         }
                     }
                     $va82feee3cc1af8bcabda979e8775ef0f->fullEndElement();
                     $v7aa28ed115707345d0274032757e8991 = $v1de9b0a30075ae8c303eb420c103c320->next();
                     continue;
                 }
             }
             $v7aa28ed115707345d0274032757e8991 = $v1de9b0a30075ae8c303eb420c103c320->read();
         }
         $va82feee3cc1af8bcabda979e8775ef0f->fullEndElement();
         $v1de9b0a30075ae8c303eb420c103c320->close();
         $va82feee3cc1af8bcabda979e8775ef0f->endDocument();
         $va82feee3cc1af8bcabda979e8775ef0f->flush();
         unlink($v97fd815a3803a0588876bdd862014fed);
         rename($v71b70dd1e455c477220693d84ccd5682, $v97fd815a3803a0588876bdd862014fed);
     } else {
         file_put_contents($v97fd815a3803a0588876bdd862014fed, $vdd988cfd769c9f7fbd795a0f5da8e751->saveXML());
     }
     $this->completed = $ved780287e302ec3b9fd3c5e78771919f->isCompleted();
     return false;
 }
 protected function exportFile(umiFile $v8c7dd922ad47494fc02c388e12c00eac)
 {
     $vd6fe1d0be6347b8ef2427fa629c04485 = $v8c7dd922ad47494fc02c388e12c00eac->getFilePath();
     if (isset($this->exported_files[$vd6fe1d0be6347b8ef2427fa629c04485])) {
         return false;
     }
     if ($this->limit) {
         if ($this->position >= $this->limit) {
             $this->break = true;
             return false;
         }
     }
     $v5b063e275d506f65ebf1b02d926f19a4 = $v8c7dd922ad47494fc02c388e12c00eac->getFileName();
     $v4a8a08f09d37b73795649038408b5f33 = $this->doc->createElement('file');
     $this->files_container->appendChild($v4a8a08f09d37b73795649038408b5f33);
     $this->translateEntity($v8c7dd922ad47494fc02c388e12c00eac, $v4a8a08f09d37b73795649038408b5f33);
     $v0800fc577294c34e0b28ad2839435945 = md5_file($vd6fe1d0be6347b8ef2427fa629c04485);
     $v4493ba1ac6e2a63455acda96db3da768 = $this->doc->createAttribute("hash");
     $v4a8a08f09d37b73795649038408b5f33->appendChild($v4493ba1ac6e2a63455acda96db3da768);
     $va14ef8ab1dc3a33642fcbdc20b856dbb = $this->doc->createTextNode("{$v0800fc577294c34e0b28ad2839435945}");
     $v4493ba1ac6e2a63455acda96db3da768->appendChild($va14ef8ab1dc3a33642fcbdc20b856dbb);
     $v5b063e275d506f65ebf1b02d926f19a4 = $v8c7dd922ad47494fc02c388e12c00eac->getFileName();
     $vc29a0c0bef824ee1691bc91da9b60bb7 = $this->doc->createAttribute("name");
     $v4a8a08f09d37b73795649038408b5f33->appendChild($vc29a0c0bef824ee1691bc91da9b60bb7);
     $v7affb12a524a065ba5ff47dc80e5bd68 = $this->doc->createTextNode("{$v5b063e275d506f65ebf1b02d926f19a4}");
     $vc29a0c0bef824ee1691bc91da9b60bb7->appendChild($v7affb12a524a065ba5ff47dc80e5bd68);
     if ($this->destination) {
         $v47826cacc65c665212b821e6ff80b9b0 = $this->destination . $v8c7dd922ad47494fc02c388e12c00eac->getFilePath(true);
         $vaedcc8bf00dbfd959b5898fe1e21c7ab = dirname($v47826cacc65c665212b821e6ff80b9b0);
         if (!file_exists($vaedcc8bf00dbfd959b5898fe1e21c7ab)) {
             mkdir($vaedcc8bf00dbfd959b5898fe1e21c7ab, 0777, true);
         }
         if (copy($vd6fe1d0be6347b8ef2427fa629c04485, $v47826cacc65c665212b821e6ff80b9b0)) {
             chmod($v47826cacc65c665212b821e6ff80b9b0, 0777);
         } else {
             $this->reportError("File \"{$vd6fe1d0be6347b8ef2427fa629c04485} \" cannot be copied to \"{$v47826cacc65c665212b821e6ff80b9b0}\"");
         }
     } else {
         $this->reportError('Files cannot be copied because destination folder isn\'t defined');
     }
     $this->exported_files[$vd6fe1d0be6347b8ef2427fa629c04485] = $vd6fe1d0be6347b8ef2427fa629c04485;
     $this->position++;
     return true;
 }