34 $this->lang_variables_as_fallback = $a_status;
63 $this->data = $a_data;
79 if (!is_array($this->amail[$a_lang]))
81 require_once(
'./Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php');
83 $this->amail[
"body"] = trim($this->amail[
"body"]);
84 $this->amail[
"subject"] = trim($this->amail[
"subject"]);
87 return $this->amail[$a_lang];
105 if ($amail[
'body'] ==
'' || $amail[
'subject'] ==
'')
108 $lang = $ilSetting->get(
'language');
112 $lang = $this->data[
'language'];
117 ($amail[
'body'] ==
'' || $amail[
'subject'] ==
''))
119 $lang = $this->data[
'language'];
123 $mail_subject = $tmp_lang->txt(
'disk_quota_mail_subject');
126 $mail_body = $tmp_lang->txt(
'disk_quota_mail_body_salutation').
' '.
$data[
'firstname'].
' '.
$data[
'lastname'].
",\n\n".
127 $tmp_lang->txt(
'disk_quota_body_text1').
"\n\n".
128 $tmp_lang->txt(
'disk_quota_body_text2').
"\n".
129 ILIAS_HTTP_PATH.
'/login.php?client_id='.CLIENT_ID.
"\n";
130 $mail_body .= $tmp_lang->txt(
'login').
': '.
$data[
'firstname'].
"\n";
132 $mail_body .= $tmp_lang->txt(
'disk_quota_mail_body_text3').
"\n\r";
143 include_once
'Services/Mail/classes/class.ilMimeMail.php';
145 $mmail->autoCheck(
false);
146 $mmail->From($ilSetting->get(
'admin_email'));
147 $mmail->Subject($mail_subject);
148 $mmail->To($this->data[
'email']);
149 $mmail->Body($mail_body);
152 include_once
'Services/Mail/classes/class.ilMail.php';
154 $mail->sendMail($this->data[
'login'],
"",
"",$mail_subject,$mail_body,array(),array(
"normal"));
162 if ($this->tmp_lng == null || $this->tmp_lng->lang_key != $a_lang)
173 $tmp_lang = $this->
getLng($a_lang);
176 switch ($this->data[
'gender'])
178 case "f" : $gender_salut = $a_amail[
"sal_f"];
180 case "m" : $gender_salut = $a_amail[
"sal_m"];
182 default : $gender_salut = $a_amail[
"sal_g"];
184 $gender_salut = trim($gender_salut);
186 $a_string = str_replace(
"[MAIL_SALUTATION]", $gender_salut, $a_string);
187 $a_string = str_replace(
"[LOGIN]", $this->data[
'login'], $a_string);
188 $a_string = str_replace(
"[FIRST_NAME]", $this->data[
'firstname'], $a_string);
189 $a_string = str_replace(
"[LAST_NAME]", $this->data[
'lastname'], $a_string);
191 $a_string = str_replace(
"[EMAIL]", $this->data[
'email'], $a_string);
192 $a_string = str_replace(
"[ILIAS_URL]",
193 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID, $a_string);
194 $a_string = str_replace(
"[CLIENT_NAME]", CLIENT_NAME, $a_string);
195 $a_string = str_replace(
"[ADMIN_MAIL]", $ilSetting->get(
"admin_email"),
198 require_once
'./Services/Utilities/classes/class.ilFormat.php';
199 $a_string = str_replace(
"[DISK_QUOTA]",
ilFormat::formatSize($this->data[
'disk_quota'],
'short',$tmp_lang), $a_string);
200 $a_string = str_replace(
"[DISK_USAGE]",
ilFormat::formatSize($this->data[
'disk_usage'],
'short',$tmp_lang), $a_string);
202 $disk_usage_details =
'';
203 foreach ($this->data[
'disk_usage_details'] as $details)
207 $a_string = str_replace(
"[DISK_USAGE_DETAILS]", $disk_usage_details, $a_string);