4require_once (
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
    5require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
 
    6require_once (
"./Services/Object/classes/class.ilObjectGUI.php");
 
   26        function ilObjMediaObjectGUI($a_data, $a_id = 0, $a_call_by_reference = 
false, $a_prepare_output = 
false)
 
   31                parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   33                $this->back_title = 
"";
 
   36                $lng->loadLanguageModule(
"mob");
 
   41                $this->header = $a_title;
 
   56                $this->enabledmapareas = $a_enabledmapareas;
 
   76                $this->width_preset = $a_val;
 
   86                return $this->width_preset;
 
   96                $this->height_preset = $a_val;
 
  106                return $this->height_preset;
 
  116                return $this->form_gui;
 
  129                $this->ctrl->returnToParent($this);
 
  140                $next_class = $this->ctrl->getNextClass($this);
 
  141                $cmd = $this->ctrl->getCmd();
 
  145                        case 'ilmdeditorgui':
 
  146                                include_once 
'Services/MetaData/classes/class.ilMDEditorGUI.php';
 
  148                                $md_gui =& 
new ilMDEditorGUI(0, $this->object->getId(), $this->object->getType());
 
  149                                $md_gui->addObserver($this->
object,
'MDUpdateListener',
'General');
 
  151                                $this->ctrl->forwardCommand($md_gui);
 
  154                        case "ilimagemapeditorgui":
 
  155                                require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
 
  157                                $ret = $this->ctrl->forwardCommand($image_map_edit);
 
  161                        case "ilfilesystemgui":
 
  162                                include_once(
"./Services/FileSystem/classes/class.ilFileSystemGUI.php");
 
  166                                $fs_gui->activateLabels(
true, $this->lng->txt(
"cont_purpose"));
 
  167                                $fs_gui->setTableId(
"mobfs".$this->object->getId());
 
  168                                $fs_gui->labelFile($this->object->getMediaItem(
"Standard")->getLocation(),
 
  169                                        $this->lng->txt(
"cont_std_view"));
 
  170                                if($this->object->hasFullscreenItem())
 
  172                                        $fs_gui->labelFile($this->object->getMediaItem(
"Fullscreen")->getLocation(),
 
  173                                                $this->lng->txt(
"cont_fullscreen"));
 
  175                                $fs_gui->addCommand($this, 
"assignStandardObject", $this->lng->txt(
"cont_assign_std"));
 
  176                                $fs_gui->addCommand($this, 
"assignFullscreenObject", $this->lng->txt(
"cont_assign_full"));
 
  178                                $ret =& $this->ctrl->forwardCommand($fs_gui);
 
  180                                include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
  186                                if (isset(
$_POST[
"editImagemapForward"]) ||
 
  187                                        isset(
$_POST[
"editImagemapForward_x"]) ||
 
  188                                        isset(
$_POST[
"editImagemapForward_y"]))
 
  190                                        $cmd = 
"editImagemapForward";
 
  205                $this->back_title = $a_title;
 
  213                global 
$tpl, $ilHelp;
 
  215                $ilHelp->setScreenId(
"create");
 
  217                $tpl->setContent($this->form_gui->getHTML());
 
  227                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  229                if ($a_mode == 
"edit")
 
  231                        $std_item = $this->
object->getMediaItem(
"Standard");
 
  239                $title->setMaxLength(120);
 
  240                $this->form_gui->addItem($title);
 
  247                        $op1->addSubItem($up);
 
  248                        $radio_prop->addOption($op1);
 
  251                        $ref->setInfo(
$lng->txt(
"cont_ref_helptext"));
 
  252                        $op2->addSubItem($ref);
 
  253                        $radio_prop->addOption($op2);
 
  254                $radio_prop->setValue(
"File");
 
  255                $this->form_gui->addItem($radio_prop);
 
  258                if ($a_mode == 
"edit")
 
  261                        $format->setValue($std_item->getFormat());
 
  262                        $this->form_gui->addItem($format);
 
  267                if ($a_mode == 
"edit")
 
  269                        if ($orig_size = $std_item->getOriginalSize())
 
  271                                $add_str = 
" (".$orig_size[
"width"].
" x ".$orig_size[
"height"].
")";
 
  281                $radio_size->addOption($op1);
 
  284                        include_once(
"./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php");
 
  286                                " / ".$lng->txt(
"cont_height"), 
"standard_width_height");
 
  287                        $width_height->setConstrainProportions(
true);
 
  288                        $op2->addSubItem($width_height);
 
  291                        if ($a_mode == 
"edit")
 
  293                                $std_item = $this->
object->getMediaItem(
"Standard");
 
  294                                if (is_int(strpos($std_item->getFormat(), 
"image"))
 
  295                                        && $std_item->getLocationType() == 
"LocalFile")
 
  298                                                , 
"standard_resize");
 
  299                                        $op2->addSubItem($resize);
 
  303                $radio_size->setValue(
"original");
 
  306                        $radio_size->setValue(
"selected");
 
  310                $radio_size->addOption($op2);
 
  311                $this->form_gui->addItem($radio_size);
 
  315                $caption->setCols(30);
 
  316                $caption->setRows(2);
 
  317                $this->form_gui->addItem($caption);
 
  325                if ($a_mode == 
"edit" && is_int(strpos($std_item->getFormat(), 
"image")))
 
  330                        $ta->setInfo(
$lng->txt(
"text_repr_info"));
 
  331                        $this->form_gui->addItem($ta);
 
  335                if ($a_mode == 
"edit" &&
 
  339                                $std_item->getFormat()))        
 
  342                                $this->form_gui->addItem($auto);
 
  349                                $this->form_gui->addItem($par);
 
  353                if ($a_mode == 
"edit")
 
  355                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
  360                $fs_sec->setTitle(
$lng->txt(
"cont_fullscreen"));
 
  361                $this->form_gui->addItem($fs_sec);
 
  365                $radio_prop2->addOption($op1);
 
  366                $op4 = 
new ilRadioOption(
$lng->txt(
"cont_use_same_resource_as_above"), 
"Standard");
 
  367                $radio_prop2->addOption($op4);
 
  373                        $op2->addSubItem($up);
 
  374                $radio_prop2->addOption($op2);
 
  377                        $ref->setInfo(
$lng->txt(
"cont_ref_helptext"));
 
  378                        $op3->addSubItem($ref);
 
  379                $radio_prop2->addOption($op3);
 
  380                $radio_prop2->setValue(
"None");
 
  381                $this->form_gui->addItem($radio_prop2);
 
  384                if ($a_mode == 
"edit")
 
  386                        if ($this->object->hasFullscreenItem())
 
  389                                $format->setValue($full_item->getFormat());
 
  390                                $this->form_gui->addItem($format);
 
  396                if ($a_mode == 
"edit")
 
  399                        if ($this->object->hasFullscreenItem() && ($orig_size = $full_item->getOriginalSize()))
 
  401                                $add_str = 
" (".$orig_size[
"width"].
" x ".$orig_size[
"height"].
")";
 
  411                $radio_size->addOption($op1);
 
  415                                " / ".$lng->txt(
"cont_height"), 
"full_width_height");
 
  416                        $width_height->setConstrainProportions(
true);
 
  417                        $op2->addSubItem($width_height);
 
  420                        if ($a_mode == 
"edit")
 
  422                                $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
  423                                if ($this->object->hasFullscreenItem() &&
 
  424                                        is_int(strpos($full_item->getFormat(), 
"image")) &&
 
  425                                        $full_item->getLocationType() == 
"LocalFile")
 
  429                                        $op2->addSubItem($resize);
 
  433                $radio_size->setValue(
"original");
 
  434                $radio_size->addOption($op2);
 
  435                $this->form_gui->addItem($radio_size);
 
  439                $caption->setCols(30);
 
  440                $caption->setRows(2);
 
  441                $this->form_gui->addItem($caption);
 
  449                if ($a_mode == 
"edit" && $this->object->hasFullscreenItem() && is_int(strpos($std_item->getFormat(), 
"image")))
 
  454                        $ta->setInfo(
$lng->txt(
"text_repr_info"));
 
  455                        $this->form_gui->addItem($ta);
 
  460                if ($a_mode == 
"edit" && $this->object->hasFullscreenItem() &&
 
  464                                $full_item->getFormat()))
 
  467                                $this->form_gui->addItem($auto);
 
  474                                $this->form_gui->addItem($par);
 
  478                $this->form_gui->setTitle(
$lng->txt(
"cont_insert_mob"));
 
  479                if ($a_mode == 
"edit")
 
  481                        $this->form_gui->addCommandButton(
"saveProperties", 
$lng->txt(
"save"));
 
  485                        $this->form_gui->addCommandButton(
"save", 
$lng->txt(
"save"));
 
  486                        $this->form_gui->addCommandButton(
"cancel", 
$lng->txt(
"cancel"));
 
  488                $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  500                $values[
"standard_title"] = $this->
object->getTitle();
 
  502                $std_item = $this->
object->getMediaItem(
"Standard");
 
  503                if ($std_item->getLocationType() == 
"LocalFile")
 
  505                        $values[
"standard_type"] = 
"File";
 
  506                        $values[
"standard_file"] = $std_item->getLocation();
 
  510                        $values[
"standard_type"] = 
"Reference";
 
  511                        $values[
"standard_reference"] = $std_item->getLocation();
 
  513                $values[
"standard_format"] = $std_item->getFormat();
 
  514                $values[
"standard_width_height"][
"width"] = $std_item->getWidth();
 
  515                $values[
"standard_width_height"][
"height"] = $std_item->getHeight();
 
  516                $values[
"standard_width_height"][
"constr_prop"] = 
true;
 
  518                $values[
"standard_size"] = 
"selected";
 
  520                if ($orig_size = $std_item->getOriginalSize())
 
  522                        if ($orig_size[
"width"] == $std_item->getWidth() &&
 
  523                                $orig_size[
"height"] == $std_item->getHeight())
 
  525                                $values[
"standard_size"] = 
"original";
 
  528                $values[
"standard_caption"] = $std_item->getCaption();
 
  529                $values[
"text_representation"] = $std_item->getTextRepresentation();
 
  531                        $std_item->getFormat()))
 
  533                        $par = $std_item->getParameters();
 
  534                        if ($par[
"autostart"])
 
  536                                $values[
"standard_autostart"] = 
true;
 
  541                        $values[
"standard_parameters"] = $std_item->getParameterString();
 
  544                $values[
"full_type"] = 
"None";
 
  545                $values[
"full_size"] = 
"original";
 
  546                if ($this->object->hasFullScreenItem())
 
  548                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
  549                        if ($full_item->getLocationType() == 
"LocalFile")
 
  551                                $values[
"full_type"] = 
"File";
 
  552                                $values[
"full_file"] = $full_item->getLocation();
 
  556                                $values[
"full_type"] = 
"Reference";
 
  557                                $values[
"full_reference"] = $full_item->getLocation();
 
  559                        $values[
"full_format"] = $full_item->getFormat();
 
  560                        $values[
"full_width_height"][
"width"] = $full_item->getWidth();
 
  561                        $values[
"full_width_height"][
"height"] = $full_item->getHeight();
 
  562                        $values[
"full_width_height"][
"constr_prop"] = 
true;
 
  564                        $values[
"full_size"] = 
"selected";
 
  566                        if ($orig_size = $full_item->getOriginalSize())
 
  568                                if ($orig_size[
"width"] == $full_item->getWidth() &&
 
  569                                        $orig_size[
"height"] == $full_item->getHeight())
 
  571                                        $values[
"full_size"] = 
"original";
 
  574                        $values[
"full_caption"] = $full_item->getCaption();
 
  576                                $full_item->getFormat()))
 
  578                                $par = $full_item->getParameters();
 
  579                                if ($par[
"autostart"])
 
  581                                        $values[
"full_autostart"] = 
true;
 
  586                                $values[
"full_parameters"] = $full_item->getParameterString();
 
  588                        $values[
"full_text_representation"] = $full_item->getTextRepresentation();
 
  591                $this->form_gui->setValuesByArray($values);
 
  602                if ($this->form_gui->checkInput())
 
  611                        $this->form_gui->setValuesByPost();
 
  612                        $tpl->setContent($this->form_gui->getHTML());
 
  625                if (!$this->form_gui->checkInput())
 
  627                        $this->form_gui->setValuesByPost();
 
  640                if (trim(
$_POST[
"standard_title"]) != 
"")
 
  642                        $title = trim(
$_POST[
"standard_title"]);
 
  646                        if (
$_POST[
"standard_type"] == 
"File")
 
  648                                $title = $_FILES[
'standard_file'][
'name'];
 
  656                $a_mob->setTitle($title);
 
  657                $a_mob->setDescription(
"");
 
  662                $a_mob->createDirectory();
 
  666                $a_mob->addMediaItem($media_item);
 
  667                $media_item->setPurpose(
"Standard");
 
  669                if (
$_POST[
"standard_type"] == 
"File")
 
  672                        $file = $mob_dir.
"/".$file_name;
 
  681                        if (
$_POST[
"standard_size"] != 
"original" &&
 
  682                                is_int(strpos($format, 
"image")))
 
  685                                        (
int) 
$_POST[
"standard_width_height"][
"height"], (
boolean) 
$_POST[
"standard_width_height"][
"contr_prop"]);
 
  689                        $media_item->setFormat($format);
 
  691                        $media_item->setLocationType(
"LocalFile");
 
  696                        $media_item->setFormat($format);
 
  698                        $media_item->setLocationType(
"Reference");
 
  700                $a_mob->setDescription($format);
 
  704                        $_POST[
"standard_type"], $mob_dir.
"/".
$location, $media_item->getLocation(),
 
  705                        $_POST[
"standard_width_height"][
"constr_prop"], (
$_POST[
"standard_size"] == 
"original"),
 
  706                        $_POST[
"standard_width_height"][
"width"], 
$_POST[
"standard_width_height"][
"height"]);
 
  707                $media_item->setWidth($wh[
"width"]);
 
  708                $media_item->setHeight($wh[
"height"]);
 
  709                if ($wh[
"info"] != 
"")
 
  714                if (
$_POST[
"standard_caption"] != 
"")
 
  720                $media_item->setHAlign(
"Left");
 
  723                if (
$_POST[
"full_type"] != 
"None")
 
  726                        $a_mob->addMediaItem($media_item2);
 
  727                        $media_item2->setPurpose(
"Fullscreen");
 
  730                        if (
$_POST[
"full_type"] == 
"File")
 
  733                                if ($_FILES[
'full_file'][
'name'] != 
"")
 
  736                                        $file = $mob_dir.
"/".$full_file_name;
 
  738                                                $full_file_name, 
$file);
 
  743                        else if (
$_POST[
"full_type"] == 
"Standard" && 
$_POST[
"standard_type"] == 
"File")
 
  749                        if (
$_POST[
"full_type"] == 
"File" ||
 
  750                                (
$_POST[
"full_type"] == 
"Standard" && 
$_POST[
"standard_type"] == 
"File"))
 
  752                                if ((
$_POST[
"full_size"] != 
"original" &&
 
  753                                                is_int(strpos($format, 
"image")))
 
  757                                                (
int) 
$_POST[
"full_width_height"][
"height"], (
boolean) 
$_POST[
"full_width_height"][
"constr_prop"]);
 
  760                                $media_item2->setFormat($format);
 
  762                                $media_item2->setLocationType(
"LocalFile");
 
  766                        if (
$_POST[
"full_type"] == 
"Reference")
 
  769                                if (
$_POST[
"full_reference"] != 
"")
 
  776                        if (
$_POST[
"full_type"] == 
"Reference" ||
 
  777                                (
$_POST[
"full_type"] == 
"Standard" && 
$_POST[
"standard_type"] == 
"Reference"))
 
  779                                $media_item2->setFormat($format);
 
  781                                $media_item2->setLocationType(
"Reference");
 
  787                                $type, $mob_dir.
"/".
$location, $media_item2->getLocation(),
 
  788                                $_POST[
"full_width_height"][
"constr_prop"], (
$_POST[
"full_size"] == 
"original"),
 
  789                                $_POST[
"full_width_height"][
"width"], 
$_POST[
"full_width_height"][
"height"]);
 
  791                        $media_item2->setWidth($wh[
"width"]);
 
  792                        $media_item2->setHeight($wh[
"height"]);
 
  794                        if (
$_POST[
"full_caption"] != 
"")
 
  802                include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
  813                $this->ctrl->returnToParent($this);
 
  827                $tpl->setContent($this->form_gui->getHTML());
 
  840                $std_item =& $this->
object->getMediaItem(
"Standard");
 
  841                if ($std_item->getLocationType() == 
"LocalFile" &&
 
  842                        is_int(strpos($std_item->getFormat(), 
"image"))
 
  845                        $file = $mob_dir.
"/".$std_item->getLocation();
 
  847                                $std_item->getHeight());
 
  853                if($this->object->hasFullScreenItem())
 
  855                        $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
  856                        if ($full_item->getLocationType() == 
"LocalFile" &&
 
  857                                is_int(strpos($full_item->getFormat(), 
"image"))
 
  860                                $file = $mob_dir.
"/".$full_item->getLocation();
 
  862                                        $full_item->getHeight());
 
  864                                $full_item->update();
 
  868                $this->ctrl->redirect($this, 
"edit");
 
  877                $std_item = $this->
object->getMediaItem(
"Standard");
 
  880                if ($std_item->getLocationType() == 
"LocalFile")
 
  882                        $file = $mob_dir.
"/".$std_item->getLocation();
 
  884                        include_once(
"./Services/MediaObjects/classes/class.ilMediaImageUtil.php");
 
  887                        $std_item->setWidth(
$size[0]);
 
  888                        $std_item->setHeight(
$size[1]);
 
  889                        $this->
object->update();
 
  891                $this->ctrl->redirect($this, 
"edit");
 
  900                $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
  903                if ($full_item->getLocationType() == 
"LocalFile")
 
  905                        $file = $mob_dir.
"/".$full_item->getLocation();
 
  906                        include_once(
"./Services/MediaObjects/classes/class.ilMediaImageUtil.php");
 
  908                        $full_item->setWidth(
$size[0]);
 
  909                        $full_item->setHeight(
$size[1]);
 
  910                        $this->
object->update();
 
  912                $this->ctrl->redirect($this, 
"edit");
 
  923                if ($this->form_gui->checkInput())
 
  925                        $title = trim(
$_POST[
"standard_title"]);
 
  926                        $this->
object->setTitle($title);
 
  928                        $std_item = $this->
object->getMediaItem(
"Standard");
 
  930                        $format = $std_item->getFormat();
 
  931                        if (
$_POST[
"standard_type"] == 
"Reference")
 
  934                                $std_item->setFormat($format);
 
  936                                $std_item->setLocationType(
"Reference");
 
  939                        if (
$_POST[
"standard_type"] == 
"File")
 
  942                                if ($_FILES[
'standard_file'][
'name'] != 
"")
 
  945                                        $file = $mob_dir.
"/".$file_name;
 
  955                                else if (
$_POST[
"standard_resize"])
 
  964                                        if (
$_POST[
"standard_size"] != 
"original" &&
 
  965                                                is_int(strpos($format, 
"image")))
 
  968                                                        (
int) 
$_POST[
"standard_width_height"][
"height"], (
boolean) 
$_POST[
"standard_width_height"][
"contr_prop"]);
 
  970                                        $std_item->setFormat($format);
 
  974                                $std_item->setLocationType(
"LocalFile");
 
  976                        $this->
object->setDescription($format);
 
  980                                $_POST[
"standard_type"], $mob_dir.
"/".
$location, $std_item->getLocation(),
 
  981                                $_POST[
"standard_width_height"][
"constr_prop"], (
$_POST[
"standard_size"] == 
"original"),
 
  982                                $_POST[
"standard_width_height"][
"width"], 
$_POST[
"standard_width_height"][
"height"]);
 
  983                        if ($wh[
"info"] != 
"")
 
  988                        $std_item->setWidth($wh[
"width"]);
 
  989                        $std_item->setHeight($wh[
"height"]);
 
 1001                                        $std_item->getFormat()))
 
 1003                                        if (
$_POST[
"standard_autostart"])       
 
 1005                                                $std_item->setParameters(
'autostart="true"');
 
 1009                                                $std_item->setParameters(
"");
 
 1019                        if (
$_POST[
"full_type"] == 
"None")
 
 1021                                if ($this->object->hasFullscreenItem())         
 
 1023                                        $this->
object->removeMediaItem(
"Fullscreen");
 
 1028                                if ($this->object->hasFullscreenItem()) 
 
 1030                                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
 1035                                        $this->
object->addMediaItem($full_item);
 
 1036                                        $full_item->setPurpose(
"Fullscreen");
 
 1039                                $format = $full_item->getFormat();
 
 1040                                if (
$_POST[
"full_type"] == 
"Reference")
 
 1043                                        $full_item->setFormat($format);
 
 1044                                        $full_item->setLocationType(
"Reference");                                       
 
 1046                                        $type = 
"Reference";
 
 1049                                if (
$_POST[
"full_type"] == 
"File")
 
 1052                                        if ($_FILES[
'full_file'][
'name'] != 
"")
 
 1055                                                $file = $mob_dir.
"/".$full_file_name;
 
 1057                                                        $full_file_name, 
$file);
 
 1064                                        else if (
$_POST[
"full_resize"])
 
 1073                                                if (
$_POST[
"full_size"] != 
"original" &&
 
 1074                                                        is_int(strpos($format, 
"image")))
 
 1077                                                                (
int) 
$_POST[
"full_width_height"][
"height"], (
boolean) 
$_POST[
"full_width_height"][
"contr_prop"]);
 
 1079                                                $full_item->setFormat($format);
 
 1083                                        $full_item->setLocationType(
"LocalFile");
 
 1086                                if (
$_POST[
"full_type"] == 
"Standard")
 
 1088                                        $format = $std_item->getFormat();
 
 1090                                        $full_item->setLocationType($std_item->getLocationType());
 
 1091                                        $full_item->setFormat($format);
 
 1093                                        $type = $std_item->getLocationType();
 
 1094                                        if ($type == 
"LocalFile")
 
 1100                                        if (
$_POST[
"full_size"] != 
"original" &&
 
 1101                                                is_int(strpos($format, 
"image")) &&
 
 1102                                                $full_item->getLocationType() == 
"LocalFile")
 
 1106                                                        (
int) 
$_POST[
"full_width_height"][
"height"], (
boolean) 
$_POST[
"full_width_height"][
"contr_prop"]);
 
 1112                                        $type, $mob_dir.
"/".
$location, $full_item->getLocation(),
 
 1113                                        $_POST[
"full_width_height"][
"constr_prop"], (
$_POST[
"full_size"] == 
"original"),
 
 1114                                        $_POST[
"full_width_height"][
"width"], 
$_POST[
"full_width_height"][
"height"]);
 
 1115                                if ($wh[
"info"] != 
"")
 
 1120                                $full_item->setWidth($wh[
"width"]);
 
 1121                                $full_item->setHeight($wh[
"height"]);
 
 1134                                                $std_item->getFormat()))
 
 1136                                                if (
$_POST[
"full_autostart"])   
 
 1138                                                        $full_item->setParameters(
'autostart="true"');
 
 1142                                                        $full_item->setParameters(
"");
 
 1153                        include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
 1156                        $this->
object->update();
 
 1158                        $this->ctrl->redirect($this, 
"edit");
 
 1162                        $this->form_gui->setValuesByPost();
 
 1163                        $tpl->setContent($this->form_gui->getHTML());
 
 1174                $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1175                if($this->object->hasFullscreenItem())
 
 1177                        $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
 1181                require_once(
"./Services/Table/classes/class.ilTableGUI.php");
 
 1185                $cur_subdir = 
$_GET[
"cdir"];
 
 1186                if(
$_GET[
"newdir"] == 
"..")
 
 1188                        $cur_subdir = substr($cur_subdir, 0, strrpos($cur_subdir, 
"/"));
 
 1192                        if (!empty(
$_GET[
"newdir"]))
 
 1194                                if (!empty($cur_subdir))
 
 1196                                        $cur_subdir = $cur_subdir.
"/".
$_GET[
"newdir"];
 
 1200                                        $cur_subdir = 
$_GET[
"newdir"];
 
 1205                $cur_subdir = str_replace(
".", 
"", $cur_subdir);
 
 1207                $cur_dir = (!empty($cur_subdir))
 
 1208                        ? $mob_dir.
"/".$cur_subdir
 
 1212                $this->tpl->addBlockfile(
"ADM_CONTENT", 
"adm_content", 
"tpl.mob_files.html", 
"Services/MediaObjects");
 
 1214                $this->ctrl->setParameter($this, 
"cdir", urlencode($cur_subdir));
 
 1215                $this->tpl->setVariable(
"FORMACTION1", $this->ctrl->getFormAction($this));
 
 1218                $this->tpl->setVariable(
"TXT_NEW_DIRECTORY", $this->lng->txt(
"cont_new_dir"));
 
 1219                $this->tpl->setVariable(
"TXT_NEW_FILE", $this->lng->txt(
"cont_new_file"));
 
 1220                $this->tpl->setVariable(
"CMD_NEW_DIR", 
"createDirectory");
 
 1221                $this->tpl->setVariable(
"CMD_NEW_FILE", 
"uploadFile");
 
 1222                $this->tpl->setVariable(
"BTN_NEW_DIR", $this->lng->txt(
"create"));
 
 1223                $this->tpl->setVariable(
"BTN_NEW_FILE", $this->lng->txt(
"upload"));
 
 1226                $this->tpl->addBlockfile(
"FILE_TABLE", 
"files", 
"tpl.table.html");
 
 1229                $this->tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.mob_file_row.html", 
"Services/MediaObjects");
 
 1233                $obj_str = ($this->call_by_reference) ? 
"" : 
"&obj_id=".$this->obj_id;
 
 1234                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1236                $tbl->setTitle($this->lng->txt(
"cont_files").
" ".$cur_subdir);
 
 1239                $tbl->setHeaderNames(array(
"", 
"", $this->lng->txt(
"cont_dir_file"),
 
 1240                        $this->lng->txt(
"cont_size"), $this->lng->txt(
"cont_purpose")));
 
 1242                $cols = array(
"", 
"", 
"dir_file", 
"size", 
"purpose");
 
 1243                $header_params = array(
"ref_id" => 
$_GET[
"ref_id"], 
"obj_id" => 
$_GET[
"obj_id"],
 
 1244                        "cmd" => 
"editFiles", 
"hier_id" => 
$_GET[
"hier_id"], 
"item_id" => 
$_GET[
"item_id"]);
 
 1245                $tbl->setHeaderVars($cols, $header_params);
 
 1246                $tbl->setColumnWidth(array(
"1%", 
"1%", 
"33%", 
"33%", 
"32%"));
 
 1249                $tbl->setOrderColumn(
$_GET[
"sort_by"]);
 
 1250                $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 1251                $tbl->setLimit(
$_GET[
"limit"]);
 
 1252                $tbl->setOffset(
$_GET[
"offset"]);
 
 1253                $tbl->setMaxCount($this->maxcount);             
 
 1256                $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
 
 1260                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 1261                $this->tpl->setVariable(
"BTN_NAME", 
"deleteFile");
 
 1262                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
 
 1263                $this->tpl->parseCurrentBlock();
 
 1265                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 1266                $this->tpl->setVariable(
"BTN_NAME", 
"assignStandard");
 
 1267                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"cont_assign_std"));
 
 1268                $this->tpl->parseCurrentBlock();
 
 1270                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 1271                $this->tpl->setVariable(
"BTN_NAME", 
"assignFullscreen");
 
 1272                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"cont_assign_full"));
 
 1273                $this->tpl->parseCurrentBlock();
 
 1276                $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 1282                $tbl->setMaxCount(count($entries));
 
 1283                $entries = array_slice($entries, 
$_GET[
"offset"], 
$_GET[
"limit"]);
 
 1286                if(count($entries) > 0)
 
 1289                        foreach($entries as $entry)
 
 1291                                if(($entry[
"entry"] == 
".") || ($entry[
"entry"] == 
".." && empty($cur_subdir)))
 
 1297                                if($entry[
"type"] == 
"dir")
 
 1299                                        $this->tpl->setCurrentBlock(
"FileLink");
 
 1300                                        $this->ctrl->setParameter($this, 
"cdir", $cur_subdir);
 
 1301                                        $this->ctrl->setParameter($this, 
"newdir", rawurlencode($entry[
"entry"]));
 
 1302                                        $this->tpl->setVariable(
"LINK_FILENAME", $this->ctrl->getLinkTarget($this, 
"editFiles"));
 
 1303                                        $this->tpl->setVariable(
"TXT_FILENAME", $entry[
"entry"]);
 
 1304                                        $this->tpl->parseCurrentBlock();
 
 1306                                        $this->tpl->setVariable(
"ICON", 
"<img src=\"".
 
 1311                                        $this->tpl->setCurrentBlock(
"File");
 
 1312                                        $this->tpl->setVariable(
"TXT_FILENAME2", $entry[
"entry"]);
 
 1313                                        $this->tpl->parseCurrentBlock();
 
 1316                                $this->tpl->setCurrentBlock(
"tbl_content");
 
 1318                                $this->tpl->setVariable(
"CSS_ROW", $css_row);
 
 1320                                $this->tpl->setVariable(
"TXT_SIZE", $entry[
"size"]);
 
 1321                                $this->tpl->setVariable(
"CHECKBOX_ID", $entry[
"entry"]);
 
 1322                                $compare = (!empty($cur_subdir))
 
 1323                                        ? $cur_subdir.
"/".$entry[
"entry"]
 
 1326                                if ($std_item->getLocation() == $compare)
 
 1328                                        $purpose[] = $this->lng->txt(
"cont_std_view");
 
 1330                                if($this->object->hasFullscreenItem())
 
 1332                                        if ($full_item->getLocation() == $compare)
 
 1334                                                $purpose[] = $this->lng->txt(
"cont_fullscreen");
 
 1337                                $this->tpl->setVariable(
"TXT_PURPOSE", implode($purpose, 
", "));
 
 1339                                $this->tpl->parseCurrentBlock();
 
 1344                        $this->tpl->setCurrentBlock(
"notfound");
 
 1345                        $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
 
 1346                        $this->tpl->setVariable(
"NUM_COLS", 4);
 
 1347                        $this->tpl->parseCurrentBlock();
 
 1350                $this->tpl->parseCurrentBlock();
 
 1361                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1363                $cur_dir = (!empty($cur_subdir))
 
 1364                        ? $mob_dir.
"/".$cur_subdir
 
 1367                $new_dir = str_replace(
".", 
"", 
$_POST[
"new_dir"]);
 
 1368                $new_dir = str_replace(
"/", 
"", $new_dir);
 
 1370                if (!empty($new_dir))
 
 1374                $this->ctrl->saveParameter($this, 
"cdir");
 
 1375                $this->ctrl->redirect($this, 
"editFiles");
 
 1384                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1386                $cur_dir = (!empty($cur_subdir))
 
 1387                        ? $mob_dir.
"/".$cur_subdir
 
 1389                if (is_file($_FILES[
"new_file"][
"tmp_name"]))
 
 1394                        $file = $cur_dir.
"/".$file_name;
 
 1400                include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
 1403                $this->ctrl->saveParameter($this, 
"cdir");
 
 1404                $this->ctrl->redirect($this, 
"editFiles");
 
 1412                if (!isset(
$_POST[
"file"]))
 
 1414                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1417                if (count(
$_POST[
"file"]) > 1)
 
 1419                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
 
 1423                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1425                $cur_dir = (!empty($cur_subdir))
 
 1426                        ? $mob_dir.
"/".$cur_subdir
 
 1430                        ? $cur_subdir.
"/".
$_POST[
"file"][0]
 
 1435                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_file"),$this->
ilias->error_obj->MESSAGE);
 
 1438                $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1439                $std_item->setLocationType(
"LocalFile");
 
 1442                $std_item->setFormat($format);
 
 1443                $this->
object->update();
 
 1445                $this->ctrl->redirectByClass(
"ilfilesystemgui", 
"listFiles");
 
 1454                if (!isset(
$_POST[
"file"]))
 
 1456                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1459                if (count(
$_POST[
"file"]) > 1)
 
 1461                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
 
 1465                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1467                $cur_dir = (!empty($cur_subdir))
 
 1468                        ? $mob_dir.
"/".$cur_subdir
 
 1472                        ? $cur_subdir.
"/".
$_POST[
"file"][0]
 
 1477                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_file"),$this->
ilias->error_obj->MESSAGE);
 
 1480                if(!$this->object->hasFullScreenItem())
 
 1482                        $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1486                        $full_item->setMobId($std_item->getMobId());
 
 1488                        $full_item->setLocationType(
"LocalFile");
 
 1490                        $full_item->setPurpose(
"Fullscreen");
 
 1491                        $this->
object->addMediaItem($full_item);
 
 1495                        $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
 1497                        $full_item->setLocationType(
"LocalFile");
 
 1500                        $full_item->setFormat($format);
 
 1502                $this->
object->update();
 
 1504                $this->ctrl->redirectByClass(
"ilfilesystemgui", 
"listFiles");
 
 1513                $this->
object->removeMediaItem(
"Fullscreen");
 
 1514                $this->
object->update();
 
 1516                $this->ctrl->redirect($this, 
"edit");
 
 1525                if (!$this->object->hasFullScreenItem())
 
 1527                        $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1529                        $full_item->setMobId($std_item->getMobId());
 
 1530                        $full_item->setLocation($std_item->getLocation());
 
 1531                        $full_item->setLocationType($std_item->getLocationType());
 
 1532                        $full_item->setFormat($std_item->getFormat());
 
 1533                        $full_item->setWidth($std_item->getWidth());
 
 1534                        $full_item->setHeight($std_item->getHeight());
 
 1535                        $full_item->setCaption($std_item->getCaption());
 
 1536                        $full_item->setTextRepresentation($std_item->getTextRepresentation());
 
 1537                        $full_item->setPurpose(
"Fullscreen");
 
 1538                        $this->
object->addMediaItem($full_item);
 
 1540                        $this->
object->update();
 
 1543                $this->ctrl->redirect($this, 
"edit");
 
 1552                if (!isset(
$_POST[
"file"]))
 
 1554                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1557                if (count(
$_POST[
"file"]) > 1)
 
 1559                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
 
 1562                if (
$_POST[
"file"][0] == 
"..")
 
 1564                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1567                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1569                $cur_dir = (!empty($cur_subdir))
 
 1570                        ? $mob_dir.
"/".$cur_subdir
 
 1574                        ? $cur_subdir.
"/".
$_POST[
"file"][0]
 
 1577                $full_item =& $this->object->getMediaItem(
"Fullscreen");
 
 1578                $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1580                if (
$location == $std_item->getLocation())
 
 1582                        $this->
ilias->raiseError($this->lng->txt(
"cont_cant_del_std"),$this->
ilias->error_obj->MESSAGE);
 
 1585                if($this->object->hasFullScreenItem())
 
 1587                        if (
$location == $full_item->getLocation())
 
 1589                                $this->
ilias->raiseError($this->lng->txt(
"cont_cant_del_full"),$this->
ilias->error_obj->MESSAGE);
 
 1597                                $this->
ilias->raiseError($this->lng->txt(
"cont_std_is_in_dir"),$this->
ilias->error_obj->MESSAGE);
 
 1600                        if($this->object->hasFullScreenItem())
 
 1604                                        $this->
ilias->raiseError($this->lng->txt(
"cont_full_is_in_dir"),$this->
ilias->error_obj->MESSAGE);
 
 1609                if (@is_file(
$file))
 
 1619                $this->ctrl->saveParameter($this, 
"cdir");
 
 1620                $this->ctrl->redirect($this, 
"editFiles");
 
 1639                $ilTabs->addSubTab(
"current_usages", 
$lng->txt(
"cont_current_usages"),
 
 1640                        $ilCtrl->getLinkTarget($this, 
"showUsages"));
 
 1642                $ilTabs->addSubTab(
"all_usages", 
$lng->txt(
"cont_all_usages"),
 
 1643                        $ilCtrl->getLinkTarget($this, 
"showAllUsages"));
 
 1647                        $ilTabs->activateSubTab(
"all_usages");
 
 1648                        $cmd = 
"showAllUsages";
 
 1652                        $ilTabs->activateSubTab(
"current_usages");
 
 1653                        $cmd = 
"showUsages";
 
 1656                include_once(
"./Services/MediaObjects/classes/class.ilMediaObjectUsagesTableGUI.php");
 
 1658                        $this->
object, $a_all);
 
 1659                $tpl->setContent($usages_table->getHTML());
 
 1669                $tpl =& 
new ilTemplate(
"tpl.media_info.html", 
true, 
true, 
"Services/MediaObjects");
 
 1670                $types = array(
"Standard", 
"Fullscreen");
 
 1671                foreach ($types as $type)
 
 1673                        if($type == 
"Fullscreen" && !$a_mob->hasFullScreenItem())
 
 1678                        $med = $a_mob->getMediaItem($type);
 
 1684                        $tpl->setCurrentBlock(
"media_info");
 
 1685                        if ($type == 
"Standard")
 
 1687                                $tpl->setVariable(
"TXT_PURPOSE", 
$lng->txt(
"cont_std_view"));
 
 1691                                $tpl->setVariable(
"TXT_PURPOSE", 
$lng->txt(
"cont_fullscreen"));
 
 1693                        $tpl->setVariable(
"TXT_TYPE", 
$lng->txt(
"cont_".strtolower($med->getLocationType())));
 
 1694                        $tpl->setVariable(
"VAL_LOCATION", $med->getLocation());
 
 1695                        if ($med->getLocationType() == 
"LocalFile")
 
 1706                                $tpl->setVariable(
"VAL_FILE_SIZE", 
" ($size ".
$lng->txt(
"bytes").
")");
 
 1708                        $tpl->setVariable(
"TXT_FORMAT", 
$lng->txt(
"cont_format"));
 
 1709                        $tpl->setVariable(
"VAL_FORMAT", $med->getFormat());
 
 1710                        if ($med->getWidth() != 
"" && $med->getHeight() != 
"")
 
 1712                                $tpl->setCurrentBlock(
"size");
 
 1713                                $tpl->setVariable(
"TXT_SIZE", 
$lng->txt(
"size"));
 
 1714                                $tpl->setVariable(
"VAL_SIZE", $med->getWidth().
"x".$med->getHeight());
 
 1715                                $tpl->parseCurrentBlock();
 
 1719                        if ($orig_size = $med->getOriginalSize())
 
 1721                                if ($orig_size[
"width"] != $med->getWidth() ||
 
 1722                                        $orig_size[
"height"] != $med->getHeight())
 
 1724                                        $tpl->setCurrentBlock(
"orig_size");
 
 1725                                        $tpl->setVariable(
"TXT_ORIG_SIZE", 
$lng->txt(
"cont_orig_size"));
 
 1726                                        $tpl->setVariable(
"ORIG_WIDTH", $orig_size[
"width"]);
 
 1727                                        $tpl->setVariable(
"ORIG_HEIGHT", $orig_size[
"height"]);
 
 1728                                        $tpl->parseCurrentBlock();
 
 1733                        if($med && strlen($med->getCaption()))
 
 1735                                $tpl->setCurrentBlock(
'additional_info');
 
 1736                                $tpl->setVariable(
'ADD_INFO',
$lng->txt(
'cont_caption').
': '.$med->getCaption());
 
 1737                                $tpl->parseCurrentBlock();
 
 1741                        if ($type == 
"Standard")
 
 1743                                include_once 
'./Services/MetaData/classes/class.ilMDKeyword.php';
 
 1746                                        $tpl->setCurrentBlock(
'additional_info');
 
 1747                                        $tpl->setVariable(
'ADD_INFO',
$lng->txt(
'keywords').
': '.implode(
', ',$kws));
 
 1748                                        $tpl->parseCurrentBlock();
 
 1752                        $tpl->setCurrentBlock(
"media_info");
 
 1753                        $tpl->parseCurrentBlock();
 
 1768                $this->
getTabs($this->tabs_gui);
 
 1771                $this->tpl->clearHeader();
 
 1772                if (is_object($this->
object) && strtolower(get_class($this->
object)) == 
"ilobjmediaobject")
 
 1775                        $this->tpl->setTitle($this->object->getTitle());
 
 1781                        $this->tpl->setTitle($this->lng->txt(
"cont_create_mob"));
 
 1791                global $ilTabs, $ilHelp;
 
 1793                $ilHelp->setScreenIdComponent(
"mob");
 
 1796                if (is_object($this->
object) && strtolower(get_class($this->
object)) == 
"ilobjmediaobject" 
 1797                        && $this->object->getId() > 0)
 
 1800                        $ilTabs->addTarget(
"cont_mob_def_prop",
 
 1801                                $this->ctrl->getLinkTarget($this, 
"edit"), 
"edit",
 
 1804                        $st_item =& $this->
object->getMediaItem(
"Standard");
 
 1807                        if (substr($st_item->getFormat(), 0, 6) == 
"video/" && DEVMODE)
 
 1809                                $ilTabs->addTarget(
"mob_video_tools",
 
 1810                                        $this->ctrl->getLinkTargetByClass(
"ilobjmediaobjectgui", 
"showVideoTool"),
 
 1811                                        "showVideoTool", 
"ilobjmediaobjectgui");
 
 1818                                $format = $st_item->getFormat();
 
 1819                                if (substr($format, 0, 5) == 
"image" && !is_int(strpos($format, 
"svg")))
 
 1821                                        $ilTabs->addTarget(
"cont_def_map_areas",
 
 1822                                                $this->ctrl->getLinkTargetByClass(
 
 1823                                                        array(
"ilobjmediaobjectgui", 
"ilimagemapeditorgui"), 
"editMapAreas"), 
"editMapAreas",
 
 1824                                                "ilimagemapeditorgui");
 
 1829                        $ilTabs->addTarget(
"cont_mob_usages",
 
 1830                                $this->ctrl->getLinkTarget($this, 
"showUsages"), 
"showUsages",
 
 1834                        $std_item = $this->
object->getMediaItem(
"Standard");
 
 1835                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
 1837                        if ($mset->get(
"file_manager_always") ||
 
 1846                                $ilTabs->addTarget(
"cont_files",
 
 1847                                        $this->ctrl->getLinkTargetByClass(
 
 1848                                        array(
"ilobjmediaobjectgui", 
"ilfilesystemgui"), 
"listFiles"), 
"",
 
 1852                        $ilTabs->addTarget(
"meta_data",
 
 1853                                $this->ctrl->getLinkTargetByClass(
 
 1854                                        array(
"ilobjmediaobjectgui", 
"ilmdeditorgui"),
'listSection'),
 
 1855                                "", 
"ilmdeditorgui");
 
 1860                if ($this->back_title != 
"")
 
 1862                        $tabs_gui->setBackTarget($this->back_title,
 
 1863                                $this->ctrl->getParentReturn($this));
 
 1877                include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
 
 1884                $formats_str = implode($formats, 
"<br />");
 
 1885                $tpl->setContent($formats_str);
 
 1901                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1902                iljQueryUtil::initjQUery($a_tpl);
 
 1903                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1905                $a_tpl->addJavascript(
"./Services/COPage/js/ilCOPagePres.js");
 
 1907                include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
 
 1920                $ilTabs->activateTab(
"cont_mob_def_prop");
 
 1922                $ilTabs->addSubTab(
"general",
 
 1923                        $lng->txt(
"mob_general"),
 
 1924                        $ilCtrl->getLinkTarget($this, 
"edit"));
 
 1926                if ($this->object->getMediaItem(
"Standard")->getFormat() == 
"video/webm" ||
 
 1927                        $this->object->getMediaItem(
"Standard")->getFormat() == 
"video/mp4")
 
 1929                        $ilTabs->addSubTab(
"subtitles",
 
 1930                                $lng->txt(
"mob_subtitles"),
 
 1931                                $ilCtrl->getLinkTarget($this, 
"listSubtitleFiles"));
 
 1934                $ilTabs->activateSubTab($a_active);
 
 1950                $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this), 
true);
 
 1951                include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 1953                $fi->setSuffixes(array(
"srt"));
 
 1954                $ilToolbar->addInputItem($fi, 
true);
 
 1957                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 1958                include_once(
"./Services/MetaData/classes/class.ilMDLanguageItem.php");
 
 1963                $ilToolbar->addInputItem(
$si, 
true);
 
 1965                $ilToolbar->addFormButton(
$lng->txt(
"upload"), 
"uploadSubtitleFile");
 
 1967                include_once(
"./Services/MediaObjects/classes/class.ilMobSubtitleTableGUI.php");
 
 1970                $tpl->setContent(
$tab->getHTML());
 
 1987                $ilCtrl->redirect($this, 
"listSubtitleFiles");
 
 1997                $lng->loadLanguageModule(
"meta");
 
 1999                if (!is_array(
$_POST[
"srt"]) || count(
$_POST[
"srt"]) == 0)
 
 2002                        $ilCtrl->redirect($this, 
"listSubtitleFiles");
 
 2006                        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 2008                        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
 2009                        $cgui->setHeaderText(
$lng->txt(
"mob_really_delete_srt"));
 
 2010                        $cgui->setCancel(
$lng->txt(
"cancel"), 
"listSubtitleFiles");
 
 2011                        $cgui->setConfirm(
$lng->txt(
"delete"), 
"deleteSrtFiles");
 
 2013                        foreach (
$_POST[
"srt"] as $i)
 
 2015                                $cgui->addItem(
"srt[]", $i, 
"subtitle_".$i.
".srt (".
$lng->txt(
"meta_l_".$i).
")");
 
 2018                        $tpl->setContent($cgui->getHTML());
 
 2029                foreach (
$_POST[
"srt"] as $i)
 
 2031                        if (strlen($i) == 2 && !is_int(strpos($i, 
".")))
 
 2033                                $this->
object->removeAdditionalFile(
"srt/subtitle_".$i.
".srt");
 
 2037                $ilCtrl->redirect($this, 
"listSubtitleFiles");
 
Confirmation screen class.
static getSupportedFormatsInfo()
Get all supported formats.
File System Explorer GUI class.
User interface class for map editor.
static lookupKeywords($a_rbac_id, $a_obj_id, $a_return_ids=false)
Lookup Keywords.
TableGUI class for subtitle list.
This class represents a non editable value in a property form.
Class ilObjectGUI Basic methods of all Output classes.
static initMediaElementJs($a_tpl=null)
Init mediaelement.js scripts.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getWebspaceDir($mode="filesystem")
get webspace directory
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static secureLink($a_str)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
getLocalMaphilightPath()
Get local path of maphilight file.
if(!file_exists(getcwd().'/ilias.ini.php')) if(isset( $_GET["client_id"]))
registration confirmation script for ilias
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options