first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

43
admin/import.generic.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
global $cfg;
require_once $cfg['Path']['shared_version'].'admin/import.xml_feed_new.php';
$main_class = 'Import_Generic';
class Import_Generic extends Import_XMLfeed_New
{
protected $template = 'window/import.generic.tpl';
public function getImportParams()
{
global $cfg;
$params = parent::getImportParams();
$params['transformation'] = file_get_contents($cfg['Path']['shared_version'].'admin/templates/import/generic.xslt');
$params['type'] = AutomaticImport::TYPE_XLS;
$params['add_new'] = getVal('import_type', null, 1);
return $params;
}
public function getFeedFile()
{
global $cfg;
$import_real = getVal('import_real');
$synchronize_try = getVal('synchronize_try');
if (empty($_FILES['file']['tmp_name']) && empty($import_real) && empty($synchronize_try)) {
return '';
}
$path = $cfg['Path']['data'].'tmp/generic_import.xsl';
if (!empty($import_real) || !empty($synchronize_try)) {
return $path;
}
move_uploaded_file($_FILES['file']['tmp_name'], $path);
return $path;
}
}