25 $this->lng = $DIC->language();
26 $lng = $DIC->language();
30 $this->setAllowDeletion(
true);
31 $this->
setSuffixes(array(
"jpg",
"jpeg",
"png",
"gif"));
43 $this->allow_deletion = $a_val;
63 $this->cache = ($a_cache) ?
true :
false;
83 $this->image = $a_image;
123 $quota_exceeded = $quota_legend =
false;
124 $i_tpl =
new ilTemplate(
"tpl.prop_image_file.html",
true,
true,
"Services/Form");
128 $i_tpl->setCurrentBlock(
"delete_bl");
129 $i_tpl->setVariable(
"POST_VAR_D", $this->
getPostVar());
131 "TXT_DELETE_EXISTING",
132 $lng->txt(
"delete_existing_file")
134 $i_tpl->parseCurrentBlock();
138 $i_tpl->setCurrentBlock(
"has_value");
139 $i_tpl->setVariable(
"TEXT_IMAGE_NAME", $this->
getValue());
140 $i_tpl->parseCurrentBlock();
142 $i_tpl->setCurrentBlock(
"image");
144 $pos = strpos($this->
getImage(),
'?');
145 if ($pos !==
false) {
146 $i_tpl->setVariable(
"SRC_IMAGE", $this->
getImage() .
"&time=" . time());
148 $i_tpl->setVariable(
"SRC_IMAGE", $this->
getImage() .
"?time=" . time());
151 $i_tpl->setVariable(
"SRC_IMAGE", $this->
getImage());
153 $i_tpl->setVariable(
"ALT_IMAGE", $this->
getAlt());
154 $i_tpl->parseCurrentBlock();
159 $i_tpl->setCurrentBlock(
"pending");
160 $i_tpl->setVariable(
"TXT_PENDING",
$lng->txt(
"file_upload_pending") .
162 $i_tpl->parseCurrentBlock();
165 $i_tpl->setVariable(
"POST_VAR", $this->
getPostVar());
166 $i_tpl->setVariable(
"ID", $this->
getFieldId());
170 $i_tpl->setVariable(
"TXT_BROWSE",
$lng->txt(
"select_file"));
173 if (!$quota_exceeded) {
174 $i_tpl->setVariable(
"TXT_MAX_SIZE",
$lng->txt(
"file_notice") .
" " .
179 $i_tpl->setVariable(
"TXT_MAX_SIZE", $quota_exceeded);
185 " disabled=\"disabled\"" 189 $a_tpl->setCurrentBlock(
"prop_generic");
190 $a_tpl->setVariable(
"PROP_GENERIC", $i_tpl->get());
191 $a_tpl->parseCurrentBlock();
__construct(Container $dic, ilPlugin $plugin)