die(json_encode($res));
}
+ public static function excelTranslationM($args)
+ {
+ $name = $_REQUEST['name'] ?? 'translations';
+
+ $o = json_decode($_REQUEST['str'], true);
+ $tmp = CubeIT_Files::tempnam();
+ $width = [];
+ foreach ($o['locales'] as $locale) {
+ $width[] = 50;
+ }
+ CubeIT_Excel::simple($name, $o['translations'], $o['locales'], $tmp, $width);
+
+ $n = $name . '.xlsx';
+
+ header('Content-Disposition: attachment; filename=' . $n);
+ header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
+ ob_end_clean();
+ readfile($tmp);
+ unlink($tmp);
+ exit;
+ }
+
public static function excelTranslation($args)
{
$name = $_REQUEST['name'] ?? 'translations';
'label' => __('Version precompilée'),
'grade' => 3,
],
- 'section_elearning' => [
- 'label' => 'E-Learning',
- 'default' => NULL,
- ],
'gamify_coins_pages' => [
'type' => 'textarea',
'default' => '',
7 => 'download_win_cd_html',
8 => 'download_win_html',
9 => 'download_precompiled',
- 10 => 'section_elearning',
],
],
'gamify' => [