From 20d8801440d4dc03c213e59cd278183bb37f24b2 Mon Sep 17 00:00:00 2001 From: artem Date: Sat, 10 May 2008 10:55:37 +0000 Subject: - [DEV-169] improved msg functionality in GUI (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5694 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/exp_imp.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'frontends/php/exp_imp.php') diff --git a/frontends/php/exp_imp.php b/frontends/php/exp_imp.php index 028b2d5f..27255442 100644 --- a/frontends/php/exp_imp.php +++ b/frontends/php/exp_imp.php @@ -137,19 +137,22 @@ include_once "include/page_header.php"; $form->AddItem($cmbConfig); show_table_header($title, $form); - echo SBR; - if($config == 1){ if(isset($_FILES['import_file'])){ include_once "include/import.inc.php"; + DBstart(); + $importer = new CZabbixXMLImport(); $importer->SetRules($rules['host'],$rules['template'],$rules['item'],$rules['trigger'],$rules['graph']); $importer->Parse($_FILES['import_file']['tmp_name']); unset($importer); + + $result = DBend(); + + show_messages($result, S_IMPORTED.SPACE.S_SUCCESSEFULLY_SMALL, S_IMPORT.SPACE.S_FAILED_SMALL); } - show_messages(); $form = new CFormTable($frm_title,null,"post","multipart/form-data"); $form->AddVar('config', $config); @@ -182,7 +185,7 @@ include_once "include/page_header.php"; $form->Show(); } else{ - + echo SBR; if($preview){ $table = new CTableInfo(S_NO_DATA_FOR_EXPORT); $table->SetHeader(array(S_HOST, S_ELEMENTS)); -- cgit