first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
class smImportCsvBackendComponents extends sfComponents {
public function executeImport() {
$this->importType = null;
if ($this->getRequest()->getMethod() == sfRequest::POST) {
if ($this->hasRequestParameter('import_full'))
$this->importType = 'full';
if($this->importType !== null && $this->getRequest()->getFileName('filename')) {
$filename = sfConfig::get('sf_cache_dir').'/import_custom.csv';
$this->getRequest()->moveFile('filename', $filename);
$this->importFileSize = filesize($filename);
} else
$this->importType = null;
}
}
}

View File

@@ -0,0 +1,35 @@
<?php use_helper('stProgressBar');?>
<?php if (!$importType):?>
<?php echo form_tag('stProduct/importCustom', array('multipart' => true, 'id' => 'sf_admin_config_form'));?>
<fieldset id="sf_fieldset_none">
<div id="sf_fieldset_none_slide" class="st_fieldset-content">
<div class="form-row">
<label for="product_import_format">
<?php echo __("Plik z danymi:");?>
</label>
<div class="content">
<?php echo input_file_tag('filename', 'filename');?>
</div>
</div>
</div>
</fieldset>
<?php echo st_get_admin_actions_head('style="float: right"');?>
<?php echo st_get_admin_action('save', __('Importuj plik CSV'), null, array ('name' => 'import_full'));?>
<?php echo st_get_admin_actions_foot() ?>
</form>
<?php else:?>
<div id="sf_admin_content_config">
<?php echo form_tag('stProduct/importCustom', array('multipart' => true, 'id' => 'sf_admin_config_form'));?>
<fieldset id="sf_fieldset_none">
<div id="sf_fieldset_none_slide" class="st_fieldset-content">
<div class="form-row">
<?php
if ($importType == 'full') echo progress_bar('custom_import_full','smImportCsvFull','import', $importFileSize, array('fatal_msg' => 'Nieprawidłowy format pliku.'));
?>
</div>
</div>
</fieldset>
</form>
</div>
<?php endif;?>
<br class="st_clear_all" />