You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
840 B
33 lines
840 B
![]()
13 years ago
|
<?php
|
||
|
/* For licensing terms, see /license.txt */
|
||
![]()
11 years ago
|
|
||
![]()
13 years ago
|
$cidReset = true;
|
||
|
|
||
![]()
9 years ago
|
require_once __DIR__.'/../inc/global.inc.php';
|
||
![]()
13 years ago
|
$this_section = SECTION_PLATFORM_ADMIN;
|
||
|
|
||
![]()
7 years ago
|
$userGroup = new UserGroup();
|
||
|
$userGroup->protectScript();
|
||
![]()
13 years ago
|
|
||
|
$tool_name = get_lang('Export');
|
||
![]()
8 years ago
|
$interbreadcrumb[] = ['url' => 'usergroups.php', 'name' => get_lang('Classes')];
|
||
![]()
13 years ago
|
|
||
|
set_time_limit(0);
|
||
|
|
||
|
$form = new FormValidator('export_users');
|
||
![]()
12 years ago
|
$form->addElement('header', $tool_name);
|
||
![]()
11 years ago
|
$form->addButtonExport(get_lang('Export'));
|
||
![]()
13 years ago
|
|
||
|
if ($form->validate()) {
|
||
![]()
8 years ago
|
$header = [['id', 'name', 'description', 'users']];
|
||
![]()
11 years ago
|
$data = $userGroup->getDataToExport();
|
||
![]()
12 years ago
|
$data = array_merge($header, $data);
|
||
|
$filename = 'export_classes_'.api_get_local_time();
|
||
![]()
11 years ago
|
Export::arrayToCsv($data, $filename);
|
||
![]()
13 years ago
|
exit;
|
||
![]()
13 years ago
|
}
|
||
![]()
11 years ago
|
|
||
![]()
7 years ago
|
Display::display_header($tool_name);
|
||
![]()
13 years ago
|
$form->display();
|
||
![]()
12 years ago
|
Display::display_footer();
|