Display a confirmation message after the importation
This commit is contained in:
parent
ea27ea5855
commit
ce28dd8cbb
@ -4,6 +4,8 @@ if(!defined('ONYX')) exit;
|
|||||||
|
|
||||||
if ($SESS->level > 1)
|
if ($SESS->level > 1)
|
||||||
{
|
{
|
||||||
|
$page = "admin/import_exercices";
|
||||||
|
|
||||||
if (!empty($_FILES["inputFile"]['tmp_name']))
|
if (!empty($_FILES["inputFile"]['tmp_name']))
|
||||||
{
|
{
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
@ -70,9 +72,9 @@ if ($SESS->level > 1)
|
|||||||
erreur("Unable to add '".$ex->id."' exercice.");
|
erreur("Unable to add '".$ex->id."' exercice.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$page = "admin/import_exercices";
|
erreur("XML file successfully imported.", "success");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4,10 +4,12 @@ if(!defined('ONYX')) exit;
|
|||||||
|
|
||||||
if ($SESS->level > 1)
|
if ($SESS->level > 1)
|
||||||
{
|
{
|
||||||
|
$page = "admin/import_users";
|
||||||
|
|
||||||
if (!empty($_FILES["inputFile"]['tmp_name']))
|
if (!empty($_FILES["inputFile"]['tmp_name']))
|
||||||
{
|
{
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
if (!$doc->load($_FILES["inputFile"]['tmp_name']))
|
if (@!$doc->load($_FILES["inputFile"]['tmp_name']))
|
||||||
{
|
{
|
||||||
erreur("Unable to parse given file. A XML file was expected.");
|
erreur("Unable to parse given file. A XML file was expected.");
|
||||||
return;
|
return;
|
||||||
@ -44,12 +46,8 @@ if ($SESS->level > 1)
|
|||||||
erreur("Unable to add user ".$user->username);
|
erreur("Unable to add user ".$user->username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
erreur("XML file successfully imported.", "success");
|
||||||
// Define thema information
|
|
||||||
$theme = new Theme();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = "admin/import_users";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user