* * yourCMDB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with yourCMDB. If not, see <http://www.gnu.org/licenses/>. * *********************************************************************/ /** * WebUI element: import from file after preview * @author Michael Batz <*****@*****.**> */ use yourCMDB\fileimporter\Importer; use Exception; //required parameters: $paramFilename, $paramFormat, $importOptions $fileImporter = new Importer($paramFilename, $paramFormat, $importOptions, $authUser); $output = 0; try { //get data for preview $output = $fileImporter->import(); } catch (Exception $e) { //print error $output = gettext("Error importing objects"); } //output echo $output; ?>