27 $this->setAllowDeletion(
true);
28 $this->
setSuffixes(array(
"jpg",
"jpeg",
"png",
"gif"));
40 $this->allow_deletion = $a_val;
60 $this->cache = ($a_cache) ?
true :
false;
80 $this->image = $a_image;
120 $quota_exceeded = $quota_legend =
false;
121 if(self::$check_wsp_quota)
123 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
126 $lng->loadLanguageModule(
"file");
127 $quota_exceeded = $lng->txt(
"personal_workspace_quota_exceeded_warning");
134 $quota_legend =
"<br />".$quota_legend;
139 $i_tpl =
new ilTemplate(
"tpl.prop_image_file.html",
true,
true,
"Services/Form");
145 $i_tpl->setCurrentBlock(
"delete_bl");
146 $i_tpl->setVariable(
"POST_VAR_D", $this->
getPostVar());
147 $i_tpl->setVariable(
"TXT_DELETE_EXISTING",
148 $lng->txt(
"delete_existing_file"));
149 $i_tpl->parseCurrentBlock();
154 $i_tpl->setCurrentBlock(
"has_value");
155 $i_tpl->setVariable(
"TEXT_IMAGE_NAME", $this->
getValue());
156 $i_tpl->parseCurrentBlock();
158 $i_tpl->setCurrentBlock(
"image");
161 $pos = strpos($this->
getImage(),
'?');
164 $i_tpl->setVariable(
"SRC_IMAGE", $this->
getImage() .
"&time=" . time());
168 $i_tpl->setVariable(
"SRC_IMAGE", $this->
getImage() .
"?time=" . time());
173 $i_tpl->setVariable(
"SRC_IMAGE", $this->
getImage());
175 $i_tpl->setVariable(
"ALT_IMAGE", $this->
getAlt());
176 $i_tpl->parseCurrentBlock();
182 $i_tpl->setCurrentBlock(
"pending");
183 $i_tpl->setVariable(
"TXT_PENDING", $lng->txt(
"file_upload_pending").
185 $i_tpl->parseCurrentBlock();
188 $i_tpl->setVariable(
"POST_VAR", $this->
getPostVar());
189 $i_tpl->setVariable(
"ID", $this->
getFieldId());
193 $i_tpl->setVariable(
"TXT_MAX_SIZE", $lng->txt(
"file_notice").
" ".
200 $i_tpl->setVariable(
"TXT_MAX_SIZE", $quota_exceeded);
205 $i_tpl->setVariable(
"DISABLED",
206 " disabled=\"disabled\"");
209 $a_tpl->setCurrentBlock(
"prop_generic");
210 $a_tpl->setVariable(
"PROP_GENERIC", $i_tpl->get());
211 $a_tpl->parseCurrentBlock();