4require_once 
'Services/Form/classes/class.ilIdentifiedMultiValuesInputGUI.php';
 
    5require_once 
'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
 
   49                parent::__construct($a_title, $a_postvar);
 
   51                $this->
setSuffixes(array(
"jpg", 
"jpeg", 
"png", 
"gif"));
 
   53                $this->validationRegexp = 
"";
 
   55                require_once 
'Services/Form/classes/class.ilMultipleImagesAdditionalIndexLevelRemover.php';
 
   60                require_once 
'Services/Form/classes/class.ilMultipleImagesFileSubmissionDataCompletion.php';
 
   65                require_once 
'Services/Form/classes/class.ilIdentifiedMultiFilesJsPositionIndexRemover.php';
 
   70                require_once 
'Services/Form/classes/class.ilMultiFilesSubmitRecursiveSlashesStripper.php';
 
   83                $this->suffixes = $a_suffixes;
 
  176                if( $this->
getRequired() && !is_array($F[
'error']) )
 
  181                else foreach( $F[
'error'] as $index => 
$error )
 
  188                                        case UPLOAD_ERR_INI_SIZE:
 
  189                                                $this->
setAlert(
$lng->txt(
"form_msg_file_size_exceeds"));
 
  193                                        case UPLOAD_ERR_FORM_SIZE:
 
  194                                                $this->
setAlert(
$lng->txt(
"form_msg_file_size_exceeds"));
 
  198                                        case UPLOAD_ERR_PARTIAL:
 
  199                                                $this->
setAlert(
$lng->txt(
"form_msg_file_partially_uploaded"));
 
  203                                        case UPLOAD_ERR_NO_FILE:
 
  208                                                elseif( strlen($F[self::FILE_DATA_INDEX_DODGING_FILE][$index]) )
 
  216                                        case UPLOAD_ERR_NO_TMP_DIR:
 
  217                                                $this->
setAlert(
$lng->txt(
"form_msg_file_missing_tmp_dir"));
 
  221                                        case UPLOAD_ERR_CANT_WRITE:
 
  222                                                $this->
setAlert(
$lng->txt(
"form_msg_file_cannot_write_to_disk"));
 
  226                                        case UPLOAD_ERR_EXTENSION:
 
  227                                                $this->
setAlert(
$lng->txt(
"form_msg_file_upload_stopped_ext"));
 
  234                if (is_array($F[
'tmp_name']))
 
  236                        foreach ($F[
'tmp_name'] as $index => $tmpname)
 
  240                                $suffix = $filename_arr[
"extension"];
 
  241                                $mimetype = $F[
'type'][$index];
 
  242                                $size_bytes = $F[
'size'][$index];
 
  244                                if (strlen($tmpname) && is_array($this->
getSuffixes()))
 
  248                                                $this->
setAlert(
$lng->txt(
"form_msg_file_wrong_file_type"));
 
  255                foreach ($F[
'tmp_name'] as $index => $tmpname)
 
  259                        $suffix = $filename_arr[
"extension"];
 
  260                        $mimetype = $F[
'type'][$index];
 
  261                        $size_bytes = $F[
'size'][$index];
 
  263                        if (strlen($tmpname))
 
  266                                if ($vir[0] == 
false)
 
  268                                        $this->
setAlert(
$lng->txt(
"form_msg_file_virus_found").
"<br />".$vir[1]);
 
  291                                $tpl->setCurrentBlock(
'image');
 
  298                                $tpl->setVariable(
"TXT_DELETE_EXISTING", 
$lng->txt(
"delete_existing_file"));
 
  301                                $tpl->parseCurrentBlock();
 
  304                        $tpl->setCurrentBlock(
'addimage');
 
  306                        $tpl->setVariable(
"IMAGE_BROWSE", $lng->txt(
'select_file'));
 
  308                        $tpl->setVariable(
"TXT_IMAGE_SUBMIT", 
$lng->txt(
"upload"));
 
  313                        $tpl->parseCurrentBlock();
 
  317                                $tpl->setCurrentBlock(
"move");
 
  324                                $tpl->parseCurrentBlock();
 
  329                                $tpl->setCurrentBlock(
"row");
 
  336                                $tpl->parseCurrentBlock();
 
  344                        $suff_str = $delim = 
"";
 
  347                                $suff_str.= $delim.
".".
$suffix;
 
  350                        $tpl->setCurrentBlock(
'allowed_image_suffixes');
 
  351                        $tpl->setVariable(
"TXT_ALLOWED_SUFFIXES", 
$lng->txt(
"file_allowed_suffixes").
" ".$suff_str);
 
  352                        $tpl->parseCurrentBlock();
 
  362                $tpl->setVariable(
"TEXT_YES", $lng->txt(
'yes'));
 
  363                $tpl->setVariable(
"TEXT_NO", 
$lng->txt(
'no'));
 
  364                $tpl->setVariable(
"DELETE_IMAGE_HEADER", 
$lng->txt(
'delete_image_header'));
 
  365                $tpl->setVariable(
"DELETE_IMAGE_QUESTION", 
$lng->txt(
'delete_image_question'));
 
  366                $tpl->setVariable(
"ANSWER_TEXT", 
$lng->txt(
'answer_text'));
 
  367                $tpl->setVariable(
"COMMANDS_TEXT", 
$lng->txt(
'actions'));
 
  371                        $tpl->setCurrentBlock(
'js_engine_initialisation');
 
  374                        $tpl->setVariable(
'ITERATOR', self::ITERATOR_SUBFIELD_NAME);
 
  375                        $tpl->setVariable(
'STORED_IMAGE_POSTVAR', self::STORED_IMAGE_SUBFIELD_NAME);
 
  376                        $tpl->setVariable(
'UPLOAD_IMAGE_POSTVAR', self::IMAGE_UPLOAD_SUBFIELD_NAME);
 
  377                        $tpl->parseCurrentBlock();
 
  380                        $globalTpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
 
  381                        $globalTpl->addJavascript(
"./Services/Form/js/ServiceFormIdentifiedWizardInputExtend.js");
 
  417                return isset(
$value[
'title']) && strlen(
$value[
'title']);
 
  438                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.