32 require_once
'./Services/Payment/classes/class.ilERPDebtor.php';
33 require_once
'./Services/Payment/classes/class.ilERP_none.php';
134 foreach ($values as $key => $value)
135 $this->$key = $value;
145 $fp = @fopen(
$file,
'w+' );
150 fwrite($fp, $contens);
155 public function sendInvoice($subject, $message, $to = null, $bytes, $fname =
"faktura")
158 $content = chunk_split(base64_encode($bytes));
163 $uid = md5(uniqid(time()));
167 $header .=
"MIME-Version: 1.0\r\n";
168 $header .=
"Content-Type: multipart/mixed; boundary=\"".$uid.
"\"\r\n\r\n";
169 $header .=
"This is a multi-part message in MIME format.\r\n";
170 $header .=
"--".$uid.
"\r\n";
171 $header .=
"Content-type:text/plain; charset=utf-8\r\n";
172 $header .=
"Content-Transfer-Encoding: 7bit\r\n\r\n";
173 $header .= $message.
"\r\n\r\n";
174 $header .=
"--".$uid.
"\r\n";
175 $header .=
"Content-Type: application/octet-stream; name=\"".$filename.
"\"\r\n";
176 $header .=
"Content-Transfer-Encoding: base64\r\n";
177 $header .=
"Content-Disposition: attachment; filename=\"".$filename.
"\"\r\n\r\n";
178 $header .= $content.
"\r\n\r\n";
179 $header .=
"--".$uid.
"--";
194 $restore_me = ini_get(
'display_errors');
195 ini_set(
'display_errors', 0);
196 mail($to, $subject,
"", $header);
197 ini_set(
'display_errors', $restore_me);
206 $fname = array(
"Jesper",
"Nicolai",
"Alex",
"Stefan",
"Helmut",
"Elvis");
207 $lname = array(
"Gødvad",
"Lundgaard",
"Killing",
"Meyer",
"Schottmüller",
"Presly");
208 $city = array(
"Copenhagen",
"Århus",
"Collonge",
"Bremen",
"SecretPlace" );
209 $country = array(
"Denmark",
"Germany",
"France",
"Ümlaudia",
"Graceland");
210 $road = array(
" Straße",
" Road",
"vej",
" Boulevard");
212 $this->number = rand(1000,1010);
213 $this->name = $fname[rand(0,5)] .
" " . $lname[rand(0,5)];
214 $this->email =
"noreply@ilias.dk";
215 $this->address=
"Ilias" . $road[rand(0,3)] .
" " . rand(1,100);
216 $this->postalcode = rand(2000,7000);
217 $this->city =
$city[rand(0,3)];
218 $this->country =
$country[rand(0,4)];
219 $this->phone =
"+" . rand(1,45) .
" " . rand(100,999) .
" " . rand(1000, 9999);