4require_once 
'Services/Form/classes/class.ilIdentifiedMultiValuesInputGUI.php';
 
    5require_once 
'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
 
   51        $this->lng = 
$DIC->language();
 
   52        parent::__construct($a_title, $a_postvar);
 
   54        $this->
setSuffixes(array(
"jpg", 
"jpeg", 
"png", 
"gif"));
 
   56        $this->validationRegexp = 
"";
 
   58        require_once 
'Services/Form/classes/class.ilMultipleImagesAdditionalIndexLevelRemover.php';
 
   63        require_once 
'Services/Form/classes/class.ilMultipleImagesFileSubmissionDataCompletion.php';
 
   68        require_once 
'Services/Form/classes/class.ilIdentifiedMultiFilesJsPositionIndexRemover.php';
 
   73        require_once 
'Services/Form/classes/class.ilMultiFilesSubmitRecursiveSlashesStripper.php';
 
   86        $this->suffixes = $a_suffixes;
 
  178        if ($F && isset($_REQUEST[$this->
getPostVar()][self::FILE_DATA_INDEX_DODGING_FILE])) {
 
  179            $F = array_merge(array(self::FILE_DATA_INDEX_DODGING_FILE => $_REQUEST[$this->
getPostVar()][self::FILE_DATA_INDEX_DODGING_FILE]), $F);
 
  182        if ($this->
getRequired() && !is_array($F[
'error'])) {
 
  190                    case UPLOAD_ERR_INI_SIZE:
 
  191                        $this->
setAlert(
$lng->txt(
"form_msg_file_size_exceeds"));
 
  195                    case UPLOAD_ERR_FORM_SIZE:
 
  196                        $this->
setAlert(
$lng->txt(
"form_msg_file_size_exceeds"));
 
  200                    case UPLOAD_ERR_PARTIAL:
 
  201                        $this->
setAlert(
$lng->txt(
"form_msg_file_partially_uploaded"));
 
  205                    case UPLOAD_ERR_NO_FILE:
 
  208                        } elseif (strlen($F[self::FILE_DATA_INDEX_DODGING_FILE][
$index])) {
 
  215                    case UPLOAD_ERR_NO_TMP_DIR:
 
  216                        $this->
setAlert(
$lng->txt(
"form_msg_file_missing_tmp_dir"));
 
  220                    case UPLOAD_ERR_CANT_WRITE:
 
  221                        $this->
setAlert(
$lng->txt(
"form_msg_file_cannot_write_to_disk"));
 
  225                    case UPLOAD_ERR_EXTENSION:
 
  226                        $this->
setAlert(
$lng->txt(
"form_msg_file_upload_stopped_ext"));
 
  234        if (is_array($F[
'tmp_name'])) {
 
  235            foreach ($F[
'tmp_name'] as 
$index => $tmpname) {
 
  238                $suffix = $filename_arr[
"extension"];
 
  239                $mimetype = $F[
'type'][
$index];
 
  240                $size_bytes = $F[
'size'][
$index];
 
  242                if (strlen($tmpname) && is_array($this->
getSuffixes())) {
 
  244                        $this->
setAlert(
$lng->txt(
"form_msg_file_wrong_file_type"));
 
  251        foreach ($F[
'tmp_name'] as 
$index => $tmpname) {
 
  254            $suffix = $filename_arr[
"extension"];
 
  255            $mimetype = $F[
'type'][
$index];
 
  256            $size_bytes = $F[
'size'][
$index];
 
  258            if (strlen($tmpname)) {
 
  260                if ($vir[0] == 
false) {
 
  261                    $this->
setAlert(
$lng->txt(
"form_msg_file_virus_found") . 
"<br />" . $vir[1]);
 
  282                $tpl->setCurrentBlock(
'image');
 
  289                $tpl->setVariable(
"TXT_DELETE_EXISTING", 
$lng->txt(
"delete_existing_file"));
 
  292                $tpl->parseCurrentBlock();
 
  295            $tpl->setCurrentBlock(
'addimage');
 
  297            $tpl->setVariable(
"IMAGE_BROWSE", 
$lng->txt(
'select_file'));
 
  299            $tpl->setVariable(
"TXT_IMAGE_SUBMIT", 
$lng->txt(
"upload"));
 
  304            $tpl->parseCurrentBlock();
 
  307                $tpl->setCurrentBlock(
"move");
 
  314                $tpl->parseCurrentBlock();
 
  318                $tpl->setCurrentBlock(
"row");
 
  325                $tpl->parseCurrentBlock();
 
  332            $suff_str = $delim = 
"";
 
  334                $suff_str.= $delim . 
"." . 
$suffix;
 
  337            $tpl->setCurrentBlock(
'allowed_image_suffixes');
 
  338            $tpl->setVariable(
"TXT_ALLOWED_SUFFIXES", 
$lng->txt(
"file_allowed_suffixes") . 
" " . $suff_str);
 
  339            $tpl->parseCurrentBlock();
 
  349        $tpl->setVariable(
"TEXT_YES", 
$lng->txt(
'yes'));
 
  350        $tpl->setVariable(
"TEXT_NO", 
$lng->txt(
'no'));
 
  351        $tpl->setVariable(
"DELETE_IMAGE_HEADER", 
$lng->txt(
'delete_image_header'));
 
  352        $tpl->setVariable(
"DELETE_IMAGE_QUESTION", 
$lng->txt(
'delete_image_question'));
 
  353        $tpl->setVariable(
"ANSWER_TEXT", 
$lng->txt(
'answer_text'));
 
  354        $tpl->setVariable(
"COMMANDS_TEXT", 
$lng->txt(
'actions'));
 
  357            $tpl->setCurrentBlock(
'js_engine_initialisation');
 
  360            $tpl->setVariable(
'ITERATOR', self::ITERATOR_SUBFIELD_NAME);
 
  361            $tpl->setVariable(
'STORED_IMAGE_POSTVAR', self::STORED_IMAGE_SUBFIELD_NAME);
 
  362            $tpl->setVariable(
'UPLOAD_IMAGE_POSTVAR', self::IMAGE_UPLOAD_SUBFIELD_NAME);
 
  363            $tpl->parseCurrentBlock();
 
  366            $globalTpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
 
  367            $globalTpl->addJavascript(
"./Services/Form/js/ServiceFormIdentifiedWizardInputExtend.js");
 
  402        return isset(
$value[
'title']) && strlen(
$value[
'title']);
 
  422        return new ilTemplate(self::RENDERING_TEMPLATE, 
true, 
true, 
"Services/Form");
 
An exception for terminatinating execution or to throw for unit testing.
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
setSize($a_size)
Set Size.
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
$GLOBALS['loaded']
Global hash that tracks already loaded includes.