5 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
20 function __construct($a_parent_obj, $a_parent_cmd, $a_style_obj)
26 $this->
setTitle($lng->txt(
"sty_images"));
27 $this->style_obj = $a_style_obj;
30 $this->
addColumn($this->lng->txt(
"thumbnail"),
"",
"1");
31 $this->
addColumn($this->lng->txt(
"file"),
"",
"33%");
32 $this->
addColumn($this->lng->txt(
"sty_width_height"),
"",
"33%");
33 $this->
addColumn($this->lng->txt(
"size"),
"",
"33%");
36 $this->
setRowTemplate(
"tpl.style_image_row.html",
"Services/Style");
41 if ($rbacsystem->checkAccess(
"write", (
int)
$_GET[
"ref_id"]))
57 $this->
setData($this->style_obj->getImages());
67 $thumbfile = $this->style_obj->getThumbnailsDirectory().
"/".$a_set[
"entry"];
68 if (is_file($thumbfile))
70 $this->tpl->setCurrentBlock(
"thumbnail");
71 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"entry"]);
72 $this->tpl->setVariable(
"IMG_SRC", $thumbfile);
73 $this->tpl->parseCurrentBlock();
75 $image_file = $this->style_obj->getImagesDirectory().
"/".$a_set[
"entry"];
76 $image_size = @getimagesize($image_file);
78 if ($image_size[0] > 0 && $image_size[1] > 0)
80 $this->tpl->setVariable(
"VAL_WIDTH_HEIGHT",
81 $image_size[0].
"px x ".$image_size[1].
"px");
85 $this->tpl->setVariable(
"VAL_FILENAME", $a_set[
"entry"]);
86 $this->tpl->setVariable(
"VAL_SIZE", $a_set[
"size"]);
87 $this->tpl->setVariable(
"FILE", $a_set[
"entry"]);