25 parent::__construct($a_title, $a_postvar);
27 $this->setAllowDeletion(
true);
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_BROWSE", $lng->txt(
"select_file"));
198 $i_tpl->setVariable(
"TXT_MAX_SIZE", $lng->txt(
"file_notice").
" ".
205 $i_tpl->setVariable(
"TXT_MAX_SIZE", $quota_exceeded);
210 $i_tpl->setVariable(
"DISABLED",
211 " disabled=\"disabled\"");
214 $a_tpl->setCurrentBlock(
"prop_generic");
215 $a_tpl->setVariable(
"PROP_GENERIC", $i_tpl->get());
216 $a_tpl->parseCurrentBlock();
special template class to simplify handling of ITX/PEAR
static isUploadPossible($a_additional_size=null)
Create styles array
The data for the language used.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.