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 'ilobjectmetadatagui':
 
  146                                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
  149                                $md_gui->addMDObserver($this->
object, 
'MDUpdateListener', 
'General');
 
  150                                $this->ctrl->forwardCommand($md_gui);
 
  153                        case "ilimagemapeditorgui":
 
  154                                require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
 
  156                                $ret = $this->ctrl->forwardCommand($image_map_edit);
 
  160                        case "ilfilesystemgui":
 
  161                                include_once(
"./Services/FileSystem/classes/class.ilFileSystemGUI.php");
 
  165                                $fs_gui->activateLabels(
true, $this->lng->txt(
"cont_purpose"));
 
  166                                $fs_gui->setTableId(
"mobfs".$this->object->getId());
 
  167                                $fs_gui->labelFile($this->object->getMediaItem(
"Standard")->getLocation(),
 
  168                                        $this->lng->txt(
"cont_std_view"));
 
  169                                if($this->object->hasFullscreenItem())
 
  171                                        $fs_gui->labelFile($this->object->getMediaItem(
"Fullscreen")->getLocation(),
 
  172                                                $this->lng->txt(
"cont_fullscreen"));
 
  174                                $fs_gui->addCommand($this, 
"assignStandardObject", $this->lng->txt(
"cont_assign_std"));
 
  175                                $fs_gui->addCommand($this, 
"assignFullscreenObject", $this->lng->txt(
"cont_assign_full"));
 
  177                                $ret =& $this->ctrl->forwardCommand($fs_gui);
 
  179                                include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
  185                                if (isset(
$_POST[
"editImagemapForward"]) ||
 
  186                                        isset(
$_POST[
"editImagemapForward_x"]) ||
 
  187                                        isset(
$_POST[
"editImagemapForward_y"]))
 
  189                                        $cmd = 
"editImagemapForward";
 
  204                $this->back_title = $a_title;
 
  212                global 
$tpl, $ilHelp;
 
  214                $ilHelp->setScreenId(
"create");
 
  216                $tpl->setContent($this->form_gui->getHTML());
 
  226                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  228                if ($a_mode == 
"edit")
 
  230                        $std_item = $this->
object->getMediaItem(
"Standard");
 
  238                $title->setMaxLength(120);
 
  239                $this->form_gui->addItem($title);
 
  246                        $op1->addSubItem($up);
 
  247                        $radio_prop->addOption($op1);
 
  250                        $ref->setInfo(
$lng->txt(
"cont_ref_helptext"));
 
  251                        $op2->addSubItem($ref);
 
  252                        $radio_prop->addOption($op2);
 
  253                $radio_prop->setValue(
"File");
 
  254                $this->form_gui->addItem($radio_prop);
 
  257                if ($a_mode == 
"edit")
 
  260                        $format->setValue($std_item->getFormat());
 
  261                        $this->form_gui->addItem($format);
 
  266                if ($a_mode == 
"edit")
 
  268                        if ($orig_size = $std_item->getOriginalSize())
 
  270                                $add_str = 
" (".$orig_size[
"width"].
" x ".$orig_size[
"height"].
")";
 
  280                $radio_size->addOption($op1);
 
  283                        include_once(
"./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php");
 
  285                                " / ".$lng->txt(
"cont_height"), 
"standard_width_height");
 
  286                        $width_height->setConstrainProportions(
true);
 
  287                        $op2->addSubItem($width_height);
 
  290                        if ($a_mode == 
"edit")
 
  292                                $std_item = $this->
object->getMediaItem(
"Standard");
 
  293                                if (is_int(strpos($std_item->getFormat(), 
"image"))
 
  294                                        && $std_item->getLocationType() == 
"LocalFile")
 
  297                                                , 
"standard_resize");
 
  298                                        $op2->addSubItem($resize);
 
  302                $radio_size->setValue(
"original");
 
  305                        $radio_size->setValue(
"selected");
 
  309                $radio_size->addOption($op2);
 
  310                $this->form_gui->addItem($radio_size);
 
  314                $caption->setCols(30);
 
  315                $caption->setRows(2);
 
  316                $this->form_gui->addItem($caption);
 
  324                if ($a_mode == 
"edit" && is_int(strpos($std_item->getFormat(), 
"image")))
 
  329                        $ta->setInfo(
$lng->txt(
"text_repr_info"));
 
  330                        $this->form_gui->addItem($ta);
 
  334                if ($a_mode == 
"edit" &&
 
  338                                $std_item->getFormat()))        
 
  341                                $this->form_gui->addItem($auto);
 
  348                                $this->form_gui->addItem($par);
 
  352                if ($a_mode == 
"edit")
 
  354                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
  359                $fs_sec->setTitle(
$lng->txt(
"cont_fullscreen"));
 
  360                $this->form_gui->addItem($fs_sec);
 
  364                $radio_prop2->addOption($op1);
 
  365                $op4 = 
new ilRadioOption(
$lng->txt(
"cont_use_same_resource_as_above"), 
"Standard");
 
  366                $radio_prop2->addOption($op4);
 
  372                        $op2->addSubItem($up);
 
  373                $radio_prop2->addOption($op2);
 
  376                        $ref->setInfo(
$lng->txt(
"cont_ref_helptext"));
 
  377                        $op3->addSubItem($ref);
 
  378                $radio_prop2->addOption($op3);
 
  379                $radio_prop2->setValue(
"None");
 
  380                $this->form_gui->addItem($radio_prop2);
 
  383                if ($a_mode == 
"edit")
 
  385                        if ($this->object->hasFullscreenItem())
 
  388                                $format->setValue($full_item->getFormat());
 
  389                                $this->form_gui->addItem($format);
 
  395                if ($a_mode == 
"edit")
 
  398                        if ($this->object->hasFullscreenItem() && ($orig_size = $full_item->getOriginalSize()))
 
  400                                $add_str = 
" (".$orig_size[
"width"].
" x ".$orig_size[
"height"].
")";
 
  410                $radio_size->addOption($op1);
 
  414                                " / ".$lng->txt(
"cont_height"), 
"full_width_height");
 
  415                        $width_height->setConstrainProportions(
true);
 
  416                        $op2->addSubItem($width_height);
 
  419                        if ($a_mode == 
"edit")
 
  421                                $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
  422                                if ($this->object->hasFullscreenItem() &&
 
  423                                        is_int(strpos($full_item->getFormat(), 
"image")) &&
 
  424                                        $full_item->getLocationType() == 
"LocalFile")
 
  428                                        $op2->addSubItem($resize);
 
  432                $radio_size->setValue(
"original");
 
  433                $radio_size->addOption($op2);
 
  434                $this->form_gui->addItem($radio_size);
 
  438                $caption->setCols(30);
 
  439                $caption->setRows(2);
 
  440                $this->form_gui->addItem($caption);
 
  448                if ($a_mode == 
"edit" && $this->object->hasFullscreenItem() && is_int(strpos($std_item->getFormat(), 
"image")))
 
  453                        $ta->setInfo(
$lng->txt(
"text_repr_info"));
 
  454                        $this->form_gui->addItem($ta);
 
  459                if ($a_mode == 
"edit" && $this->object->hasFullscreenItem() &&
 
  463                                $full_item->getFormat()))
 
  466                                $this->form_gui->addItem($auto);
 
  473                                $this->form_gui->addItem($par);
 
  477                $this->form_gui->setTitle(
$lng->txt(
"cont_insert_mob"));
 
  478                if ($a_mode == 
"edit")
 
  480                        $this->form_gui->addCommandButton(
"saveProperties", 
$lng->txt(
"save"));
 
  484                        $this->form_gui->addCommandButton(
"save", 
$lng->txt(
"save"));
 
  485                        $this->form_gui->addCommandButton(
"cancel", 
$lng->txt(
"cancel"));
 
  487                $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  499                $values[
"standard_title"] = $this->
object->getTitle();
 
  501                $std_item = $this->
object->getMediaItem(
"Standard");
 
  502                if ($std_item->getLocationType() == 
"LocalFile")
 
  504                        $values[
"standard_type"] = 
"File";
 
  505                        $values[
"standard_file"] = $std_item->getLocation();
 
  509                        $values[
"standard_type"] = 
"Reference";
 
  510                        $values[
"standard_reference"] = $std_item->getLocation();
 
  512                $values[
"standard_format"] = $std_item->getFormat();
 
  513                $values[
"standard_width_height"][
"width"] = $std_item->getWidth();
 
  514                $values[
"standard_width_height"][
"height"] = $std_item->getHeight();
 
  515                $values[
"standard_width_height"][
"constr_prop"] = 
true;
 
  517                $values[
"standard_size"] = 
"selected";
 
  519                if ($orig_size = $std_item->getOriginalSize())
 
  521                        if ($orig_size[
"width"] == $std_item->getWidth() &&
 
  522                                $orig_size[
"height"] == $std_item->getHeight())
 
  524                                $values[
"standard_size"] = 
"original";
 
  527                $values[
"standard_caption"] = $std_item->getCaption();
 
  528                $values[
"text_representation"] = $std_item->getTextRepresentation();
 
  530                        $std_item->getFormat()))
 
  532                        $par = $std_item->getParameters();
 
  533                        if ($par[
"autostart"])
 
  535                                $values[
"standard_autostart"] = 
true;
 
  540                        $values[
"standard_parameters"] = $std_item->getParameterString();
 
  543                $values[
"full_type"] = 
"None";
 
  544                $values[
"full_size"] = 
"original";
 
  545                if ($this->object->hasFullScreenItem())
 
  547                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
  548                        if ($full_item->getLocationType() == 
"LocalFile")
 
  550                                $values[
"full_type"] = 
"File";
 
  551                                $values[
"full_file"] = $full_item->getLocation();
 
  555                                $values[
"full_type"] = 
"Reference";
 
  556                                $values[
"full_reference"] = $full_item->getLocation();
 
  558                        $values[
"full_format"] = $full_item->getFormat();
 
  559                        $values[
"full_width_height"][
"width"] = $full_item->getWidth();
 
  560                        $values[
"full_width_height"][
"height"] = $full_item->getHeight();
 
  561                        $values[
"full_width_height"][
"constr_prop"] = 
true;
 
  563                        $values[
"full_size"] = 
"selected";
 
  565                        if ($orig_size = $full_item->getOriginalSize())
 
  567                                if ($orig_size[
"width"] == $full_item->getWidth() &&
 
  568                                        $orig_size[
"height"] == $full_item->getHeight())
 
  570                                        $values[
"full_size"] = 
"original";
 
  573                        $values[
"full_caption"] = $full_item->getCaption();
 
  575                                $full_item->getFormat()))
 
  577                                $par = $full_item->getParameters();
 
  578                                if ($par[
"autostart"])
 
  580                                        $values[
"full_autostart"] = 
true;
 
  585                                $values[
"full_parameters"] = $full_item->getParameterString();
 
  587                        $values[
"full_text_representation"] = $full_item->getTextRepresentation();
 
  590                $this->form_gui->setValuesByArray($values);
 
  601                if ($this->form_gui->checkInput())
 
  610                        $this->form_gui->setValuesByPost();
 
  611                        $tpl->setContent($this->form_gui->getHTML());
 
  624                if (!$this->form_gui->checkInput())
 
  626                        $this->form_gui->setValuesByPost();
 
  639                if (trim(
$_POST[
"standard_title"]) != 
"")
 
  641                        $title = trim(
$_POST[
"standard_title"]);
 
  645                        if (
$_POST[
"standard_type"] == 
"File")
 
  647                                $title = $_FILES[
'standard_file'][
'name'];
 
  655                $a_mob->setTitle($title);
 
  656                $a_mob->setDescription(
"");
 
  661                $a_mob->createDirectory();
 
  665                $a_mob->addMediaItem($media_item);
 
  666                $media_item->setPurpose(
"Standard");
 
  668                if (
$_POST[
"standard_type"] == 
"File")
 
  671                        $file = $mob_dir.
"/".$file_name;
 
  680                        if (
$_POST[
"standard_size"] != 
"original" &&
 
  681                                is_int(strpos($format, 
"image")))
 
  684                                        (
int) 
$_POST[
"standard_width_height"][
"height"], (
boolean) 
$_POST[
"standard_width_height"][
"contr_prop"]);
 
  688                        $media_item->setFormat($format);
 
  690                        $media_item->setLocationType(
"LocalFile");
 
  695                        $media_item->setFormat($format);
 
  697                        $media_item->setLocationType(
"Reference");
 
  699                $a_mob->setDescription($format);
 
  703                        $_POST[
"standard_type"], $mob_dir.
"/".
$location, $media_item->getLocation(),
 
  704                        $_POST[
"standard_width_height"][
"constr_prop"], (
$_POST[
"standard_size"] == 
"original"),
 
  705                        $_POST[
"standard_width_height"][
"width"], 
$_POST[
"standard_width_height"][
"height"]);
 
  706                $media_item->setWidth($wh[
"width"]);
 
  707                $media_item->setHeight($wh[
"height"]);
 
  708                if ($wh[
"info"] != 
"")
 
  713                if (
$_POST[
"standard_caption"] != 
"")
 
  719                $media_item->setHAlign(
"Left");
 
  722                if (
$_POST[
"full_type"] != 
"None")
 
  725                        $a_mob->addMediaItem($media_item2);
 
  726                        $media_item2->setPurpose(
"Fullscreen");
 
  729                        if (
$_POST[
"full_type"] == 
"File")
 
  732                                if ($_FILES[
'full_file'][
'name'] != 
"")
 
  735                                        $file = $mob_dir.
"/".$full_file_name;
 
  737                                                $full_file_name, 
$file);
 
  742                        else if (
$_POST[
"full_type"] == 
"Standard" && 
$_POST[
"standard_type"] == 
"File")
 
  748                        if (
$_POST[
"full_type"] == 
"File" ||
 
  749                                (
$_POST[
"full_type"] == 
"Standard" && 
$_POST[
"standard_type"] == 
"File"))
 
  751                                if ((
$_POST[
"full_size"] != 
"original" &&
 
  752                                                is_int(strpos($format, 
"image")))
 
  756                                                (
int) 
$_POST[
"full_width_height"][
"height"], (
boolean) 
$_POST[
"full_width_height"][
"constr_prop"]);
 
  759                                $media_item2->setFormat($format);
 
  761                                $media_item2->setLocationType(
"LocalFile");
 
  765                        if (
$_POST[
"full_type"] == 
"Reference")
 
  768                                if (
$_POST[
"full_reference"] != 
"")
 
  775                        if (
$_POST[
"full_type"] == 
"Reference" ||
 
  776                                (
$_POST[
"full_type"] == 
"Standard" && 
$_POST[
"standard_type"] == 
"Reference"))
 
  778                                $media_item2->setFormat($format);
 
  780                                $media_item2->setLocationType(
"Reference");
 
  786                                $type, $mob_dir.
"/".
$location, $media_item2->getLocation(),
 
  787                                $_POST[
"full_width_height"][
"constr_prop"], (
$_POST[
"full_size"] == 
"original"),
 
  788                                $_POST[
"full_width_height"][
"width"], 
$_POST[
"full_width_height"][
"height"]);
 
  790                        $media_item2->setWidth($wh[
"width"]);
 
  791                        $media_item2->setHeight($wh[
"height"]);
 
  793                        if (
$_POST[
"full_caption"] != 
"")
 
  801                include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
  812                $this->ctrl->returnToParent($this);
 
  826                $tpl->setContent($this->form_gui->getHTML());
 
  839                $std_item =& $this->
object->getMediaItem(
"Standard");
 
  840                if ($std_item->getLocationType() == 
"LocalFile" &&
 
  841                        is_int(strpos($std_item->getFormat(), 
"image"))
 
  844                        $file = $mob_dir.
"/".$std_item->getLocation();
 
  846                                $std_item->getHeight());
 
  852                if($this->object->hasFullScreenItem())
 
  854                        $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
  855                        if ($full_item->getLocationType() == 
"LocalFile" &&
 
  856                                is_int(strpos($full_item->getFormat(), 
"image"))
 
  859                                $file = $mob_dir.
"/".$full_item->getLocation();
 
  861                                        $full_item->getHeight());
 
  863                                $full_item->update();
 
  867                $this->ctrl->redirect($this, 
"edit");
 
  876                $std_item = $this->
object->getMediaItem(
"Standard");
 
  879                if ($std_item->getLocationType() == 
"LocalFile")
 
  881                        $file = $mob_dir.
"/".$std_item->getLocation();
 
  883                        include_once(
"./Services/MediaObjects/classes/class.ilMediaImageUtil.php");
 
  886                        $std_item->setWidth(
$size[0]);
 
  887                        $std_item->setHeight(
$size[1]);
 
  888                        $this->
object->update();
 
  890                $this->ctrl->redirect($this, 
"edit");
 
  899                $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
  902                if ($full_item->getLocationType() == 
"LocalFile")
 
  904                        $file = $mob_dir.
"/".$full_item->getLocation();
 
  905                        include_once(
"./Services/MediaObjects/classes/class.ilMediaImageUtil.php");
 
  907                        $full_item->setWidth(
$size[0]);
 
  908                        $full_item->setHeight(
$size[1]);
 
  909                        $this->
object->update();
 
  911                $this->ctrl->redirect($this, 
"edit");
 
  922                if ($this->form_gui->checkInput())
 
  924                        $title = trim(
$_POST[
"standard_title"]);
 
  925                        $this->
object->setTitle($title);
 
  927                        $std_item = $this->
object->getMediaItem(
"Standard");
 
  929                        $format = $std_item->getFormat();
 
  930                        if (
$_POST[
"standard_type"] == 
"Reference")
 
  933                                $std_item->setFormat($format);
 
  935                                $std_item->setLocationType(
"Reference");
 
  938                        if (
$_POST[
"standard_type"] == 
"File")
 
  941                                if ($_FILES[
'standard_file'][
'name'] != 
"")
 
  944                                        $file = $mob_dir.
"/".$file_name;
 
  954                                else if (
$_POST[
"standard_resize"])
 
  963                                        if (
$_POST[
"standard_size"] != 
"original" &&
 
  964                                                is_int(strpos($format, 
"image")))
 
  967                                                        (
int) 
$_POST[
"standard_width_height"][
"height"], (
boolean) 
$_POST[
"standard_width_height"][
"contr_prop"]);
 
  969                                        $std_item->setFormat($format);
 
  973                                $std_item->setLocationType(
"LocalFile");
 
  975                        $this->
object->setDescription($format);
 
  979                                $_POST[
"standard_type"], $mob_dir.
"/".
$location, $std_item->getLocation(),
 
  980                                $_POST[
"standard_width_height"][
"constr_prop"], (
$_POST[
"standard_size"] == 
"original"),
 
  981                                $_POST[
"standard_width_height"][
"width"], 
$_POST[
"standard_width_height"][
"height"]);
 
  982                        if ($wh[
"info"] != 
"")
 
  987                        $std_item->setWidth($wh[
"width"]);
 
  988                        $std_item->setHeight($wh[
"height"]);
 
 1000                                        $std_item->getFormat()))
 
 1002                                        if (
$_POST[
"standard_autostart"])       
 
 1004                                                $std_item->setParameters(
'autostart="true"');
 
 1008                                                $std_item->setParameters(
"");
 
 1018                        if (
$_POST[
"full_type"] == 
"None")
 
 1020                                if ($this->object->hasFullscreenItem())         
 
 1022                                        $this->
object->removeMediaItem(
"Fullscreen");
 
 1027                                if ($this->object->hasFullscreenItem()) 
 
 1029                                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
 1034                                        $this->
object->addMediaItem($full_item);
 
 1035                                        $full_item->setPurpose(
"Fullscreen");
 
 1038                                $format = $full_item->getFormat();
 
 1039                                if (
$_POST[
"full_type"] == 
"Reference")
 
 1042                                        $full_item->setFormat($format);
 
 1043                                        $full_item->setLocationType(
"Reference");                                       
 
 1045                                        $type = 
"Reference";
 
 1048                                if (
$_POST[
"full_type"] == 
"File")
 
 1051                                        if ($_FILES[
'full_file'][
'name'] != 
"")
 
 1054                                                $file = $mob_dir.
"/".$full_file_name;
 
 1056                                                        $full_file_name, 
$file);
 
 1063                                        else if (
$_POST[
"full_resize"])
 
 1072                                                if (
$_POST[
"full_size"] != 
"original" &&
 
 1073                                                        is_int(strpos($format, 
"image")))
 
 1076                                                                (
int) 
$_POST[
"full_width_height"][
"height"], (
boolean) 
$_POST[
"full_width_height"][
"contr_prop"]);
 
 1078                                                $full_item->setFormat($format);
 
 1082                                        $full_item->setLocationType(
"LocalFile");
 
 1085                                if (
$_POST[
"full_type"] == 
"Standard")
 
 1087                                        $format = $std_item->getFormat();
 
 1089                                        $full_item->setLocationType($std_item->getLocationType());
 
 1090                                        $full_item->setFormat($format);
 
 1092                                        $type = $std_item->getLocationType();
 
 1093                                        if ($type == 
"LocalFile")
 
 1099                                        if (
$_POST[
"full_size"] != 
"original" &&
 
 1100                                                is_int(strpos($format, 
"image")) &&
 
 1101                                                $full_item->getLocationType() == 
"LocalFile")
 
 1105                                                        (
int) 
$_POST[
"full_width_height"][
"height"], (
boolean) 
$_POST[
"full_width_height"][
"contr_prop"]);
 
 1111                                        $type, $mob_dir.
"/".
$location, $full_item->getLocation(),
 
 1112                                        $_POST[
"full_width_height"][
"constr_prop"], (
$_POST[
"full_size"] == 
"original"),
 
 1113                                        $_POST[
"full_width_height"][
"width"], 
$_POST[
"full_width_height"][
"height"]);
 
 1114                                if ($wh[
"info"] != 
"")
 
 1119                                $full_item->setWidth($wh[
"width"]);
 
 1120                                $full_item->setHeight($wh[
"height"]);
 
 1133                                                $std_item->getFormat()))
 
 1135                                                if (
$_POST[
"full_autostart"])   
 
 1137                                                        $full_item->setParameters(
'autostart="true"');
 
 1141                                                        $full_item->setParameters(
"");
 
 1152                        include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
 1155                        $this->
object->update();
 
 1157                        $this->ctrl->redirect($this, 
"edit");
 
 1161                        $this->form_gui->setValuesByPost();
 
 1162                        $tpl->setContent($this->form_gui->getHTML());
 
 1173                $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1174                if($this->object->hasFullscreenItem())
 
 1176                        $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
 1180                require_once(
"./Services/Table/classes/class.ilTableGUI.php");
 
 1184                $cur_subdir = 
$_GET[
"cdir"];
 
 1185                if(
$_GET[
"newdir"] == 
"..")
 
 1187                        $cur_subdir = substr($cur_subdir, 0, strrpos($cur_subdir, 
"/"));
 
 1191                        if (!empty(
$_GET[
"newdir"]))
 
 1193                                if (!empty($cur_subdir))
 
 1195                                        $cur_subdir = $cur_subdir.
"/".
$_GET[
"newdir"];
 
 1199                                        $cur_subdir = 
$_GET[
"newdir"];
 
 1204                $cur_subdir = str_replace(
".", 
"", $cur_subdir);
 
 1206                $cur_dir = (!empty($cur_subdir))
 
 1207                        ? $mob_dir.
"/".$cur_subdir
 
 1211                $this->tpl->addBlockfile(
"ADM_CONTENT", 
"adm_content", 
"tpl.mob_files.html", 
"Services/MediaObjects");
 
 1213                $this->ctrl->setParameter($this, 
"cdir", urlencode($cur_subdir));
 
 1214                $this->tpl->setVariable(
"FORMACTION1", $this->ctrl->getFormAction($this));
 
 1217                $this->tpl->setVariable(
"TXT_NEW_DIRECTORY", $this->lng->txt(
"cont_new_dir"));
 
 1218                $this->tpl->setVariable(
"TXT_NEW_FILE", $this->lng->txt(
"cont_new_file"));
 
 1219                $this->tpl->setVariable(
"CMD_NEW_DIR", 
"createDirectory");
 
 1220                $this->tpl->setVariable(
"CMD_NEW_FILE", 
"uploadFile");
 
 1221                $this->tpl->setVariable(
"BTN_NEW_DIR", $this->lng->txt(
"create"));
 
 1222                $this->tpl->setVariable(
"BTN_NEW_FILE", $this->lng->txt(
"upload"));
 
 1225                $this->tpl->addBlockfile(
"FILE_TABLE", 
"files", 
"tpl.table.html");
 
 1228                $this->tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.mob_file_row.html", 
"Services/MediaObjects");
 
 1232                $obj_str = ($this->call_by_reference) ? 
"" : 
"&obj_id=".$this->obj_id;
 
 1233                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1235                $tbl->setTitle($this->lng->txt(
"cont_files").
" ".$cur_subdir);
 
 1238                $tbl->setHeaderNames(array(
"", 
"", $this->lng->txt(
"cont_dir_file"),
 
 1239                        $this->lng->txt(
"cont_size"), $this->lng->txt(
"cont_purpose")));
 
 1241                $cols = array(
"", 
"", 
"dir_file", 
"size", 
"purpose");
 
 1242                $header_params = array(
"ref_id" => 
$_GET[
"ref_id"], 
"obj_id" => 
$_GET[
"obj_id"],
 
 1243                        "cmd" => 
"editFiles", 
"hier_id" => 
$_GET[
"hier_id"], 
"item_id" => 
$_GET[
"item_id"]);
 
 1244                $tbl->setHeaderVars($cols, $header_params);
 
 1245                $tbl->setColumnWidth(array(
"1%", 
"1%", 
"33%", 
"33%", 
"32%"));
 
 1249                $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 1252                $tbl->setMaxCount($this->maxcount);             
 
 1255                $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
 
 1259                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 1260                $this->tpl->setVariable(
"BTN_NAME", 
"deleteFile");
 
 1261                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
 
 1262                $this->tpl->parseCurrentBlock();
 
 1264                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 1265                $this->tpl->setVariable(
"BTN_NAME", 
"assignStandard");
 
 1266                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"cont_assign_std"));
 
 1267                $this->tpl->parseCurrentBlock();
 
 1269                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 1270                $this->tpl->setVariable(
"BTN_NAME", 
"assignFullscreen");
 
 1271                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"cont_assign_full"));
 
 1272                $this->tpl->parseCurrentBlock();
 
 1275                $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 1281                $tbl->setMaxCount(count($entries));
 
 1282                $entries = array_slice($entries, 
$_GET[
"offset"], 
$_GET[
"limit"]);
 
 1285                if(count($entries) > 0)
 
 1288                        foreach($entries as $entry)
 
 1290                                if(($entry[
"entry"] == 
".") || ($entry[
"entry"] == 
".." && empty($cur_subdir)))
 
 1296                                if($entry[
"type"] == 
"dir")
 
 1298                                        $this->tpl->setCurrentBlock(
"FileLink");
 
 1299                                        $this->ctrl->setParameter($this, 
"cdir", $cur_subdir);
 
 1300                                        $this->ctrl->setParameter($this, 
"newdir", rawurlencode($entry[
"entry"]));
 
 1301                                        $this->tpl->setVariable(
"LINK_FILENAME", $this->ctrl->getLinkTarget($this, 
"editFiles"));
 
 1302                                        $this->tpl->setVariable(
"TXT_FILENAME", $entry[
"entry"]);
 
 1303                                        $this->tpl->parseCurrentBlock();
 
 1305                                        $this->tpl->setVariable(
"ICON", 
"<img src=\"".
 
 1310                                        $this->tpl->setCurrentBlock(
"File");
 
 1311                                        $this->tpl->setVariable(
"TXT_FILENAME2", $entry[
"entry"]);
 
 1312                                        $this->tpl->parseCurrentBlock();
 
 1315                                $this->tpl->setCurrentBlock(
"tbl_content");
 
 1317                                $this->tpl->setVariable(
"CSS_ROW", $css_row);
 
 1319                                $this->tpl->setVariable(
"TXT_SIZE", $entry[
"size"]);
 
 1320                                $this->tpl->setVariable(
"CHECKBOX_ID", $entry[
"entry"]);
 
 1321                                $compare = (!empty($cur_subdir))
 
 1322                                        ? $cur_subdir.
"/".$entry[
"entry"]
 
 1325                                if ($std_item->getLocation() == $compare)
 
 1327                                        $purpose[] = $this->lng->txt(
"cont_std_view");
 
 1329                                if($this->object->hasFullscreenItem())
 
 1331                                        if ($full_item->getLocation() == $compare)
 
 1333                                                $purpose[] = $this->lng->txt(
"cont_fullscreen");
 
 1336                                $this->tpl->setVariable(
"TXT_PURPOSE", implode($purpose, 
", "));
 
 1338                                $this->tpl->parseCurrentBlock();
 
 1343                        $this->tpl->setCurrentBlock(
"notfound");
 
 1344                        $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
 
 1345                        $this->tpl->setVariable(
"NUM_COLS", 4);
 
 1346                        $this->tpl->parseCurrentBlock();
 
 1349                $this->tpl->parseCurrentBlock();
 
 1360                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1362                $cur_dir = (!empty($cur_subdir))
 
 1363                        ? $mob_dir.
"/".$cur_subdir
 
 1366                $new_dir = str_replace(
".", 
"", 
$_POST[
"new_dir"]);
 
 1367                $new_dir = str_replace(
"/", 
"", $new_dir);
 
 1369                if (!empty($new_dir))
 
 1373                $this->ctrl->saveParameter($this, 
"cdir");
 
 1374                $this->ctrl->redirect($this, 
"editFiles");
 
 1383                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1385                $cur_dir = (!empty($cur_subdir))
 
 1386                        ? $mob_dir.
"/".$cur_subdir
 
 1388                if (is_file($_FILES[
"new_file"][
"tmp_name"]))
 
 1391                        $file = $cur_dir.
"/".$file_name;
 
 1397                include_once(
"./Services/MediaObjects/classes/class.ilMediaSvgSanitizer.php");
 
 1400                $this->ctrl->saveParameter($this, 
"cdir");
 
 1401                $this->ctrl->redirect($this, 
"editFiles");
 
 1410                $cur_subdir = dirname($a_file);
 
 1412                $cur_dir = (!empty($cur_subdir))
 
 1413                        ? $mob_dir.
"/".$cur_subdir
 
 1415                $file = $cur_dir.
"/".basename($a_file);
 
 1420                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_file"),$this->
ilias->error_obj->MESSAGE);
 
 1423                $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1424                $std_item->setLocationType(
"LocalFile");
 
 1427                $std_item->setFormat($format);
 
 1428                $this->
object->update();
 
 1430                $this->ctrl->redirectByClass(
"ilfilesystemgui", 
"listFiles");
 
 1440                $cur_subdir = dirname($a_file);
 
 1442                $cur_dir = (!empty($cur_subdir))
 
 1443                        ? $mob_dir.
"/".$cur_subdir
 
 1445                $file = $cur_dir.
"/".basename($a_file);
 
 1450                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_file"),$this->
ilias->error_obj->MESSAGE);
 
 1453                if(!$this->object->hasFullScreenItem())
 
 1455                        $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1459                        $full_item->setMobId($std_item->getMobId());
 
 1461                        $full_item->setLocationType(
"LocalFile");
 
 1463                        $full_item->setPurpose(
"Fullscreen");
 
 1464                        $this->
object->addMediaItem($full_item);
 
 1468                        $full_item =& $this->
object->getMediaItem(
"Fullscreen");
 
 1470                        $full_item->setLocationType(
"LocalFile");
 
 1473                        $full_item->setFormat($format);
 
 1475                $this->
object->update();
 
 1477                $this->ctrl->redirectByClass(
"ilfilesystemgui", 
"listFiles");
 
 1486                $this->
object->removeMediaItem(
"Fullscreen");
 
 1487                $this->
object->update();
 
 1489                $this->ctrl->redirect($this, 
"edit");
 
 1498                if (!$this->object->hasFullScreenItem())
 
 1500                        $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1502                        $full_item->setMobId($std_item->getMobId());
 
 1503                        $full_item->setLocation($std_item->getLocation());
 
 1504                        $full_item->setLocationType($std_item->getLocationType());
 
 1505                        $full_item->setFormat($std_item->getFormat());
 
 1506                        $full_item->setWidth($std_item->getWidth());
 
 1507                        $full_item->setHeight($std_item->getHeight());
 
 1508                        $full_item->setCaption($std_item->getCaption());
 
 1509                        $full_item->setTextRepresentation($std_item->getTextRepresentation());
 
 1510                        $full_item->setPurpose(
"Fullscreen");
 
 1511                        $this->
object->addMediaItem($full_item);
 
 1513                        $this->
object->update();
 
 1516                $this->ctrl->redirect($this, 
"edit");
 
 1525                if (!isset(
$_POST[
"file"]))
 
 1527                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1530                if (count(
$_POST[
"file"]) > 1)
 
 1532                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
 
 1535                if (
$_POST[
"file"][0] == 
"..")
 
 1537                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1540                $cur_subdir = str_replace(
".", 
"", 
$_GET[
"cdir"]);
 
 1542                $cur_dir = (!empty($cur_subdir))
 
 1543                        ? $mob_dir.
"/".$cur_subdir
 
 1547                        ? $cur_subdir.
"/".
$_POST[
"file"][0]
 
 1550                $full_item =& $this->object->getMediaItem(
"Fullscreen");
 
 1551                $std_item =& $this->
object->getMediaItem(
"Standard");
 
 1553                if (
$location == $std_item->getLocation())
 
 1555                        $this->
ilias->raiseError($this->lng->txt(
"cont_cant_del_std"),$this->
ilias->error_obj->MESSAGE);
 
 1558                if($this->object->hasFullScreenItem())
 
 1560                        if (
$location == $full_item->getLocation())
 
 1562                                $this->
ilias->raiseError($this->lng->txt(
"cont_cant_del_full"),$this->
ilias->error_obj->MESSAGE);
 
 1570                                $this->
ilias->raiseError($this->lng->txt(
"cont_std_is_in_dir"),$this->
ilias->error_obj->MESSAGE);
 
 1573                        if($this->object->hasFullScreenItem())
 
 1577                                        $this->
ilias->raiseError($this->lng->txt(
"cont_full_is_in_dir"),$this->
ilias->error_obj->MESSAGE);
 
 1582                if (@is_file(
$file))
 
 1592                $this->ctrl->saveParameter($this, 
"cdir");
 
 1593                $this->ctrl->redirect($this, 
"editFiles");
 
 1612                $ilTabs->addSubTab(
"current_usages", 
$lng->txt(
"cont_current_usages"),
 
 1613                        $ilCtrl->getLinkTarget($this, 
"showUsages"));
 
 1615                $ilTabs->addSubTab(
"all_usages", 
$lng->txt(
"cont_all_usages"),
 
 1616                        $ilCtrl->getLinkTarget($this, 
"showAllUsages"));
 
 1620                        $ilTabs->activateSubTab(
"all_usages");
 
 1621                        $cmd = 
"showAllUsages";
 
 1625                        $ilTabs->activateSubTab(
"current_usages");
 
 1626                        $cmd = 
"showUsages";
 
 1629                include_once(
"./Services/MediaObjects/classes/class.ilMediaObjectUsagesTableGUI.php");
 
 1631                        $this->
object, $a_all);
 
 1632                $tpl->setContent($usages_table->getHTML());
 
 1642                $tpl =& 
new ilTemplate(
"tpl.media_info.html", 
true, 
true, 
"Services/MediaObjects");
 
 1643                $types = array(
"Standard", 
"Fullscreen");
 
 1644                foreach ($types as $type)
 
 1646                        if($type == 
"Fullscreen" && !$a_mob->hasFullScreenItem())
 
 1651                        $med = $a_mob->getMediaItem($type);
 
 1657                        $tpl->setCurrentBlock(
"media_info");
 
 1658                        if ($type == 
"Standard")
 
 1660                                $tpl->setVariable(
"TXT_PURPOSE", 
$lng->txt(
"cont_std_view"));
 
 1664                                $tpl->setVariable(
"TXT_PURPOSE", 
$lng->txt(
"cont_fullscreen"));
 
 1666                        $tpl->setVariable(
"TXT_TYPE", 
$lng->txt(
"cont_".strtolower($med->getLocationType())));
 
 1667                        $tpl->setVariable(
"VAL_LOCATION", $med->getLocation());
 
 1668                        if ($med->getLocationType() == 
"LocalFile")
 
 1679                                $tpl->setVariable(
"VAL_FILE_SIZE", 
" ($size ".
$lng->txt(
"bytes").
")");
 
 1681                        $tpl->setVariable(
"TXT_FORMAT", 
$lng->txt(
"cont_format"));
 
 1682                        $tpl->setVariable(
"VAL_FORMAT", $med->getFormat());
 
 1683                        if ($med->getWidth() != 
"" && $med->getHeight() != 
"")
 
 1685                                $tpl->setCurrentBlock(
"size");
 
 1686                                $tpl->setVariable(
"TXT_SIZE", 
$lng->txt(
"size"));
 
 1687                                $tpl->setVariable(
"VAL_SIZE", $med->getWidth().
"x".$med->getHeight());
 
 1688                                $tpl->parseCurrentBlock();
 
 1692                        if ($orig_size = $med->getOriginalSize())
 
 1694                                if ($orig_size[
"width"] != $med->getWidth() ||
 
 1695                                        $orig_size[
"height"] != $med->getHeight())
 
 1697                                        $tpl->setCurrentBlock(
"orig_size");
 
 1698                                        $tpl->setVariable(
"TXT_ORIG_SIZE", 
$lng->txt(
"cont_orig_size"));
 
 1699                                        $tpl->setVariable(
"ORIG_WIDTH", $orig_size[
"width"]);
 
 1700                                        $tpl->setVariable(
"ORIG_HEIGHT", $orig_size[
"height"]);
 
 1701                                        $tpl->parseCurrentBlock();
 
 1706                        if($med && strlen($med->getCaption()))
 
 1708                                $tpl->setCurrentBlock(
'additional_info');
 
 1709                                $tpl->setVariable(
'ADD_INFO',
$lng->txt(
'cont_caption').
': '.$med->getCaption());
 
 1710                                $tpl->parseCurrentBlock();
 
 1714                        if ($type == 
"Standard")
 
 1716                                include_once 
'./Services/MetaData/classes/class.ilMDKeyword.php';
 
 1719                                        $tpl->setCurrentBlock(
'additional_info');
 
 1720                                        $tpl->setVariable(
'ADD_INFO',
$lng->txt(
'keywords').
': '.implode(
', ',$kws));
 
 1721                                        $tpl->parseCurrentBlock();
 
 1725                        $tpl->setCurrentBlock(
"media_info");
 
 1726                        $tpl->parseCurrentBlock();
 
 1741                $this->
getTabs($this->tabs_gui);
 
 1744                $this->tpl->clearHeader();
 
 1745                if (is_object($this->
object) && strtolower(get_class($this->
object)) == 
"ilobjmediaobject")
 
 1748                        $this->tpl->setTitle($this->object->getTitle());
 
 1754                        $this->tpl->setTitle($this->lng->txt(
"cont_create_mob"));
 
 1764                global $ilTabs, $ilHelp;
 
 1766                $ilHelp->setScreenIdComponent(
"mob");
 
 1769                if (is_object($this->
object) && strtolower(get_class($this->
object)) == 
"ilobjmediaobject" 
 1770                        && $this->object->getId() > 0)
 
 1773                        $ilTabs->addTarget(
"cont_mob_def_prop",
 
 1774                                $this->ctrl->getLinkTarget($this, 
"edit"), 
"edit",
 
 1777                        $st_item =& $this->
object->getMediaItem(
"Standard");
 
 1780                        if (substr($st_item->getFormat(), 0, 6) == 
"video/" && DEVMODE)
 
 1782                                $ilTabs->addTarget(
"mob_video_tools",
 
 1783                                        $this->ctrl->getLinkTargetByClass(
"ilobjmediaobjectgui", 
"showVideoTool"),
 
 1784                                        "showVideoTool", 
"ilobjmediaobjectgui");
 
 1791                                $format = $st_item->getFormat();
 
 1792                                if (substr($format, 0, 5) == 
"image" && !is_int(strpos($format, 
"svg")))
 
 1794                                        $ilTabs->addTarget(
"cont_def_map_areas",
 
 1795                                                $this->ctrl->getLinkTargetByClass(
 
 1796                                                        array(
"ilobjmediaobjectgui", 
"ilimagemapeditorgui"), 
"editMapAreas"), 
"editMapAreas",
 
 1797                                                "ilimagemapeditorgui");
 
 1802                        $ilTabs->addTarget(
"cont_mob_usages",
 
 1803                                $this->ctrl->getLinkTarget($this, 
"showUsages"), 
"showUsages",
 
 1807                        $std_item = $this->
object->getMediaItem(
"Standard");
 
 1808                        $full_item = $this->
object->getMediaItem(
"Fullscreen");
 
 1810                        if ($mset->get(
"file_manager_always") ||
 
 1819                                $ilTabs->addTarget(
"cont_files",
 
 1820                                        $this->ctrl->getLinkTargetByClass(
 
 1821                                        array(
"ilobjmediaobjectgui", 
"ilfilesystemgui"), 
"listFiles"), 
"",
 
 1825                        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
 1827                        $mdtab = $mdgui->getTab(
"ilobjmediaobjectgui");
 
 1830                                $ilTabs->addTarget(
"meta_data",
 
 1832                                        "", 
"ilmdeditorgui");
 
 1838                if ($this->back_title != 
"")
 
 1840                        $tabs_gui->setBackTarget($this->back_title,
 
 1841                                $this->ctrl->getParentReturn($this));
 
 1855                include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
 
 1862                $formats_str = implode($formats, 
"<br />");
 
 1863                $tpl->setContent($formats_str);
 
 1879                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1880                iljQueryUtil::initjQUery($a_tpl);
 
 1881                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1883                $a_tpl->addJavascript(
"./Services/COPage/js/ilCOPagePres.js");
 
 1885                include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
 
 1898                $ilTabs->activateTab(
"cont_mob_def_prop");
 
 1900                $ilTabs->addSubTab(
"general",
 
 1901                        $lng->txt(
"mob_general"),
 
 1902                        $ilCtrl->getLinkTarget($this, 
"edit"));
 
 1904                if ($this->object->getMediaItem(
"Standard")->getFormat() == 
"video/webm" ||
 
 1905                        $this->object->getMediaItem(
"Standard")->getFormat() == 
"video/mp4")
 
 1907                        $ilTabs->addSubTab(
"subtitles",
 
 1908                                $lng->txt(
"mob_subtitles"),
 
 1909                                $ilCtrl->getLinkTarget($this, 
"listSubtitleFiles"));
 
 1912                $ilTabs->activateSubTab($a_active);
 
 1928                $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this), 
true);
 
 1929                include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 1931                $fi->setSuffixes(array(
"srt"));
 
 1932                $ilToolbar->addInputItem($fi, 
true);
 
 1935                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 1936                include_once(
"./Services/MetaData/classes/class.ilMDLanguageItem.php");
 
 1941                $ilToolbar->addInputItem(
$si, 
true);
 
 1943                $ilToolbar->addFormButton(
$lng->txt(
"upload"), 
"uploadSubtitleFile");
 
 1945                $ilToolbar->addSeparator();
 
 1946                $ilToolbar->addFormButton(
$lng->txt(
"mob_upload_multi_srt"), 
"uploadMultipleSubtitleFileForm");
 
 1948                include_once(
"./Services/MediaObjects/classes/class.ilMobSubtitleTableGUI.php");
 
 1951                $tpl->setContent(
$tab->getHTML());
 
 1968                $ilCtrl->redirect($this, 
"listSubtitleFiles");
 
 1978                $lng->loadLanguageModule(
"meta");
 
 1980                if (!is_array(
$_POST[
"srt"]) || count(
$_POST[
"srt"]) == 0)
 
 1983                        $ilCtrl->redirect($this, 
"listSubtitleFiles");
 
 1987                        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1989                        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
 1990                        $cgui->setHeaderText(
$lng->txt(
"mob_really_delete_srt"));
 
 1991                        $cgui->setCancel(
$lng->txt(
"cancel"), 
"listSubtitleFiles");
 
 1992                        $cgui->setConfirm(
$lng->txt(
"delete"), 
"deleteSrtFiles");
 
 1994                        foreach (
$_POST[
"srt"] as $i)
 
 1996                                $cgui->addItem(
"srt[]", $i, 
"subtitle_".$i.
".srt (".
$lng->txt(
"meta_l_".$i).
")");
 
 1999                        $tpl->setContent($cgui->getHTML());
 
 2010                foreach (
$_POST[
"srt"] as $i)
 
 2012                        if (strlen($i) == 2 && !is_int(strpos($i, 
".")))
 
 2014                                $this->
object->removeAdditionalFile(
"srt/subtitle_".$i.
".srt");
 
 2018                $ilCtrl->redirect($this, 
"listSubtitleFiles");
 
 2036                $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this), 
true);
 
 2037                include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 2039                $fi->setSuffixes(array(
"zip"));
 
 2040                $ilToolbar->addInputItem($fi, 
true);
 
 2042                $ilToolbar->addFormButton(
$lng->txt(
"upload"), 
"uploadMultipleSubtitleFile");
 
 2053                        $this->ctrl->redirect($this, 
"showMultiSubtitleConfirmationTable");
 
 2058                        $this->ctrl->redirect($this, 
"uploadMultipleSubtitleFileForm");
 
 2072                include_once(
"./Services/MediaObjects/classes/class.ilMultiSrtConfirmationTable2GUI.php");
 
 2082                $this->
object->clearMultiSrtDirectory();
 
 2083                $this->ctrl->redirect($this, 
"listSubtitleFiles");
 
 2092                $srt_files = $this->
object->getMultiSrtFiles();
 
 2093                if (is_array(
$_POST[
"file"]))
 
 2095                        foreach (
$_POST[
"file"] as $f)
 
 2097                                foreach ($srt_files as $srt_file)
 
 2099                                        if ($f == $srt_file[
"filename"])
 
 2101                                                $this->
object->uploadSrtFile($this->object->getMultiSrtUploadDir().
"/".$srt_file[
"filename"], $srt_file[
"lang"], 
"rename");
 
 2106                $this->
object->clearMultiSrtDirectory();
 
 2107                $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.
List srt files from zip file for upload confirmation.
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 sendFailure($a_info="", $a_keep=false)
Send Failure 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 ...
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
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