24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
39 function __construct($a_parent_obj, $a_parent_cmd, $a_style_obj)
45 $this->
setTitle($lng->txt(
"sty_images"));
46 $this->style_obj = $a_style_obj;
49 $this->
addColumn($this->lng->txt(
"thumbnail"),
"",
"1");
50 $this->
addColumn($this->lng->txt(
"file"),
"",
"33%");
51 $this->
addColumn($this->lng->txt(
"sty_width_height"),
"",
"33%");
52 $this->
addColumn($this->lng->txt(
"size"),
"",
"33%");
55 $this->
setRowTemplate(
"tpl.style_image_row.html",
"Services/Style");
73 $this->
setData($this->style_obj->getImages());
83 $thumbfile = $this->style_obj->getThumbnailsDirectory().
"/".$a_set[
"entry"];
84 if (is_file($thumbfile))
86 $this->tpl->setCurrentBlock(
"thumbnail");
87 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"entry"]);
88 $this->tpl->setVariable(
"IMG_SRC", $thumbfile);
89 $this->tpl->parseCurrentBlock();
91 $image_file = $this->style_obj->getImagesDirectory().
"/".$a_set[
"entry"];
92 $image_size = @getimagesize($image_file);
94 if ($image_size[0] > 0 && $image_size[1] > 0)
96 $this->tpl->setVariable(
"VAL_WIDTH_HEIGHT",
97 $image_size[0].
"px x ".$image_size[1].
"px");
101 $this->tpl->setVariable(
"VAL_FILENAME", $a_set[
"entry"]);
102 $this->tpl->setVariable(
"VAL_SIZE", $a_set[
"size"]);
103 $this->tpl->setVariable(
"FILE", $a_set[
"entry"]);