private static function convertFile($filename, $convertType, $options = null) { $convertObject = new PHPExelLoadModel($filename); if (!$convertObject) { die("Error create Convert object"); return; } $data = $convertObject->getExelData(); $export = new SaveModel($data); $export->createExport($filename, $convertType, $options); }
public static function index() { self::setHtmlHead(); self::setHtmlHead(); if (!self::checkAndLoadInputParams()) { self::wrongParams(); return; } $convertObject = new PHPExelLoadModel(InputData::getPost('file')); if (!$convertObject) { $this->dump("Error create Convert object"); return; } $data = $convertObject->getExelData(); $hotelsNames = array_keys($data['hotels']); $data = array('hotelsNames' => $hotelsNames, 'formAction' => Settings::getRoute('pageConvert'), 'filename' => InputData::getPost('file'), 'convertType' => InputData::getPost('convertType')); view::template('pageSetOptions', $data); }