34 $this->lng = $DIC->language();
35 parent::__construct($a_title, $a_postvar);
40 $this->parameters = array();
60 if (is_array($a_value)) {
61 if (array_key_exists(
'width', $a_value)) {
64 if (array_key_exists(
'height', $a_value)) {
67 if (array_key_exists(
'filename', $a_value)) {
70 if (is_array($a_value[
'flash_param_name'])) {
71 $this->parameters = array();
72 foreach ($a_value[
'flash_param_name'] as $idx => $val) {
73 $this->parameters[$val] = $a_value[
'flash_param_value'][$idx];
92 $filename_arr = pathinfo($_FILES[$this->
getPostVar()][
"name"]);
93 $suffix = $filename_arr[
"extension"];
94 $mimetype = $_FILES[$this->
getPostVar()][
"type"];
95 $size_bytes = $_FILES[$this->
getPostVar()][
"size"];
96 $temp_name = $_FILES[$this->
getPostVar()][
"tmp_name"];
97 $error = $_FILES[$this->
getPostVar()][
"error"];
102 case UPLOAD_ERR_INI_SIZE:
103 $this->
setAlert(
$lng->txt(
"form_msg_file_size_exceeds"));
107 case UPLOAD_ERR_FORM_SIZE:
108 $this->
setAlert(
$lng->txt(
"form_msg_file_size_exceeds"));
112 case UPLOAD_ERR_PARTIAL:
113 $this->
setAlert(
$lng->txt(
"form_msg_file_partially_uploaded"));
117 case UPLOAD_ERR_NO_FILE:
126 case UPLOAD_ERR_NO_TMP_DIR:
127 $this->
setAlert(
$lng->txt(
"form_msg_file_missing_tmp_dir"));
131 case UPLOAD_ERR_CANT_WRITE:
132 $this->
setAlert(
$lng->txt(
"form_msg_file_cannot_write_to_disk"));
136 case UPLOAD_ERR_EXTENSION:
137 $this->
setAlert(
$lng->txt(
"form_msg_file_upload_stopped_ext"));
144 if ($_FILES[$this->
getPostVar()][
"tmp_name"] !=
"" &&
146 if (!in_array(strtolower($suffix), $this->
getSuffixes())) {
147 $this->
setAlert(
$lng->txt(
"form_msg_file_wrong_file_type"));
153 if ($_FILES[$this->
getPostVar()][
"tmp_name"] !=
"") {
155 if ($vir[0] ==
false) {
156 $this->
setAlert(
$lng->txt(
"form_msg_file_virus_found") .
"<br />" . $vir[1]);
169 if (strlen($val) == 0 || strlen(
$_POST[$this->
getPostVar()][
'flash_param_value'][$idx]) == 0) {
187 $this->applet = $a_applet;
207 $this->applet_path_web = $a_path;
237 $this->width = $a_width;
257 $this->height = $a_height;
277 $this->parameters = $a_parameters;
288 $this->parameters[
$name] = $value;
298 unset($this->parameters[
$name]);
306 $this->parameters = array();
323 array_push(
$params, urlencode(
$name) .
"=" . urlencode($value));
324 $template->setCurrentBlock(
"applet_param_input");
331 $template->setVariable(
"TEXT_DELETE_PARAM",
$lng->txt(
"delete_parameter"));
335 $template->setCurrentBlock(
"applet_parameter");
338 $template->setCurrentBlock(
"flash_vars");
343 $template->setVariable(
"TEXT_ADD_PARAM",
$lng->txt(
"add_parameter"));
360 "TXT_DELETE_EXISTING",
361 $lng->txt(
"delete_existing_file")
366 $js_tpl =
new ilTemplate(
'tpl.flashAddParam.js',
true,
true,
'Services/Form');
367 $js_tpl->setVariable(
"TEXT_NAME",
$lng->txt(
"name"));
368 $js_tpl->setVariable(
"TEXT_VALUE",
$lng->txt(
"value"));
369 $js_tpl->setVariable(
"POST_VAR", $this->
getPostVar());
370 $js_tpl->setVariable(
"TEXT_DELETE_PARAM",
$lng->txt(
"delete_parameter"));
371 $js_tpl->setVariable(
"TEXT_CONFIRM_DELETE_PARAMETER",
$lng->txt(
"confirm_delete_parameter"));
376 $template->setVariable(
"JAVASCRIPT_FLASH", $js_tpl->get());
378 $a_tpl->setCurrentBlock(
"prop_generic");
379 $a_tpl->setVariable(
"PROP_GENERIC",
$template->get());
380 $a_tpl->parseCurrentBlock();
382 include_once
"./Services/YUI/classes/class.ilYuiUtil.php";
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
special template class to simplify handling of ITX/PEAR
static initConnectionWithAnimation()
Init YUI Connection module.