fa4c5125ff883e836bf87d5c9d3d2e58cdd3cd89
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

16) 
17) require_once('inc/base.php');
18) require_once('inc/security.php');
19) 
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

20) use_module('contacts');
21) require_once('contacts.php');
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

22) 
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

23) function my_invoices()
24) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

25)     $c = (int) $_SESSION['customerinfo']['customerno'];
26)     $result = db_query("SELECT id,datum,betrag,bezahlt,abbuchung,sepamandat FROM kundendaten.ausgestellte_rechnungen WHERE kunde=? ORDER BY id DESC", array($c));
27)     $ret = array();
28)     while ($line = $result->fetch()) {
29)         array_push($ret, $line);
30)     }
31)     return $ret;
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

32) }
33) 
34) 
35) function get_pdf($id)
36) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

37)     $c = (int) $_SESSION['customerinfo']['customerno'];
38)     $id = (int) $id;
39)     $result = db_query("SELECT pdfdata FROM kundendaten.ausgestellte_rechnungen WHERE kunde=:c AND id=:id", array(":c" => $c, ":id" => $id));
40)     if ($result->rowCount() == 0) {
41)         system_failure('Ungültige Rechnungsnummer oder nicht eingeloggt');
42)     }
43)     return $result->fetch(PDO::FETCH_OBJ)->pdfdata;
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

44) }
45) 
46) 
Hanno codingstyle fixes

Hanno authored 5 years ago

47) function invoice_address($customer = null)
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

48) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

49)     $c = (int) $_SESSION['customerinfo']['customerno'];
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

50)     if ($customer != null && have_role(ROLE_SYSADMIN)) {
51)         $c = (int) $customer;
52)     }
53)     $result = db_query("SELECT contact_kunde, contact_rechnung FROM kundendaten.kunden WHERE id=?", array($c));
54)     $kontakte = $result->fetch();
55)     $kunde = get_contact($kontakte['contact_kunde'], $c);
56)     if ($kontakte['contact_rechnung']) {
57)         $rechnung = get_contact($kontakte['contact_rechnung'], $c);
58)         foreach (array('company', 'name', 'address', 'zip', 'city', 'country', 'email') as $field) {
59)             if ($rechnung[$field]) {
60)                 $kunde[$field] = $rechnung[$field];
61)             }
62)         }
63)     }
64)     // Hier ist $kunde der bereinigte Rechnungskontakt
65)     return $kunde;
66) }
67) 
68) 
69) function invoice_details($id)
70) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

71)     $id = (int) $id;
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

72)     $result = db_query("SELECT kunde,datum,betrag,bezahlt,sepamandat,abbuchung FROM kundendaten.ausgestellte_rechnungen WHERE id=:id", array(":id" => $id));
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

73)     if ($result->rowCount() == 0) {
74)         system_failure('Ungültige Rechnungsnummer oder nicht eingeloggt');
75)     }
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

76)     $data = $result->fetch();
77)     if (!have_role(ROLE_SYSADMIN) && $data['kunde'] != (int) $_SESSION['customerinfo']['customerno']) {
78)         system_failure('Ungültige Rechnungsnummer für diesen Login');
79)     }
80)     return $data;
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

81) }
82) 
83) function invoice_items($id)
84) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

85)     $id = (int) $id;
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

86)     $result = db_query("SELECT id, beschreibung, datum, enddatum, betrag, einheit, brutto, mwst, anzahl FROM kundendaten.rechnungsposten WHERE rechnungsnummer=:id", array(":id" => $id));
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

87)     if ($result->rowCount() == 0) {
88)         system_failure('Ungültige Rechnungsnummer oder nicht eingeloggt');
89)     }
90)     $ret = array();
91)     while ($line = $result->fetch()) {
92)         array_push($ret, $line);
93)     }
94)     return $ret;
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

95) }
96) 
97) 
98) function upcoming_items()
99) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

100)     $c = (int) $_SESSION['customerinfo']['customerno'];
101)     $result = db_query("SELECT quelle, id, anzahl, beschreibung, startdatum, enddatum, betrag, einheit, brutto, mwst FROM kundendaten.upcoming_items WHERE kunde=? ORDER BY startdatum ASC", array($c));
102)     $ret = array();
103)     while ($line = $result->fetch()) {
104)         array_push($ret, $line);
105)     }
106)     return $ret;
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

107) }
108) 
109) 
Hanno rename generate_qrcode_imag...

Hanno authored 5 years ago

110) function generate_qrcode_image_invoice($id)
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

111) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

112)     $invoice = invoice_details($id);
113)     $customerno = $invoice['kunde'];
114)     $amount = 'EUR'.sprintf('%.2f', $invoice['betrag']);
115)     $datum = $invoice['datum'];
116)     $data = 'BCD
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

117) 001
118) 1
119) SCT
120) GENODES1VBK
121) schokokeks.org GbR
122) DE91602911200041512006
123) '.$amount.'
124) 
125) 
Bernd Wurst Beschreibung entfernt, mach...

Bernd Wurst authored 10 years ago

126) RE '.$id.' KD '.$customerno.' vom '.$datum;
Hanno remove whitespace in empty...

Hanno authored 5 years ago

127) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

128)     $descriptorspec = array(
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

129)     0 => array("pipe", "r"),  // STDIN ist eine Pipe, von der das Child liest
130)     1 => array("pipe", "w"),  // STDOUT ist eine Pipe, in die das Child schreibt
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

131)     2 => array("pipe", "w")
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

132)   );
133) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

134)     $process = proc_open('qrencode -t PNG -o - -l M', $descriptorspec, $pipes);
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

135) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

136)     if (is_resource($process)) {
137)         // $pipes sieht nun so aus:
138)         // 0 => Schreibhandle, das auf das Child STDIN verbunden ist
139)         // 1 => Lesehandle, das auf das Child STDOUT verbunden ist
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

140) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

141)         fwrite($pipes[0], $data);
142)         fclose($pipes[0]);
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

143) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

144)         $pngdata = stream_get_contents($pipes[1]);
145)         fclose($pipes[1]);
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

146) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

147)         // Es ist wichtig, dass Sie alle Pipes schließen bevor Sie
148)         // proc_close aufrufen, um Deadlocks zu vermeiden
149)         $return_value = proc_close($process);
Hanno remove whitespace in empty...

Hanno authored 5 years ago

150) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

151)         return $pngdata;
152)     } else {
153)         warning('Es ist ein interner Fehler im Webinterface aufgetreten, aufgrund dessen kein QR-Code erstellt werden kann. Sollte dieser Fehler mehrfach auftreten, kontaktieren Sie bitte die Administratoren.');
154)     }
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

155) }
156) 
157) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

158) function get_lastschrift($rechnungsnummer)
159) {
160)     $rechnungsnummer = (int) $rechnungsnummer;
161)     $result = db_query("SELECT rechnungsnummer, rechnungsdatum, sl.betrag, buchungsdatum, sl.status FROM kundendaten.sepalastschrift sl LEFT JOIN kundendaten.ausgestellte_rechnungen re ON (re.sepamandat=sl.mandatsreferenz) WHERE rechnungsnummer=?", array($rechnungsnummer));
162)     if ($result->rowCount() == 0) {
163)         return null;
164)     }
165)     $item = $result->fetch();
166)     return $item;
Bernd Wurst Vorgemerkte Lastschriften a...

Bernd Wurst authored 10 years ago

167) }
168) 
169) function get_lastschriften($mandatsreferenz)
170) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

171)     $result = db_query("SELECT rechnungsnummer, rechnungsdatum, betrag, buchungsdatum, status FROM kundendaten.sepalastschrift WHERE mandatsreferenz=? ORDER BY buchungsdatum DESC", array($mandatsreferenz));
172)     $ret = array();
173)     while ($item = $result->fetch()) {
174)         $ret[] = $item;
175)     }
176)     return $ret;
Bernd Wurst Vorgemerkte Lastschriften a...

Bernd Wurst authored 10 years ago

177) }
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

178) 
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

179) 
Hanno codingstyle fixes

Hanno authored 5 years ago

180) function get_sepamandat($id)
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

181) {
182)     $result = db_query("SELECT id, kunde, mandatsreferenz, glaeubiger_id, erteilt, medium, gueltig_ab, gueltig_bis, erstlastschrift, kontoinhaber, adresse, iban, bic, bankname FROM kundendaten.sepamandat WHERE id=? OR mandatsreferenz=?", array($id, $id));
183)     return $result->fetch();
Hanno codingstyle fixes

Hanno authored 5 years ago

184) }
Bernd Wurst Erzeuge HTML als Eingabe fü...

Bernd Wurst authored 5 years ago

185) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

186) function get_sepamandate()
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

187) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

188)     $cid = (int) $_SESSION['customerinfo']['customerno'];
189)     $result = db_query("SELECT id, mandatsreferenz, glaeubiger_id, erteilt, medium, gueltig_ab, gueltig_bis, erstlastschrift, kontoinhaber, adresse, iban, bic, bankname FROM kundendaten.sepamandat WHERE kunde=?", array($cid));
190)     $ret = array();
191)     while ($entry = $result->fetch()) {
192)         array_push($ret, $entry);
193)     }
194)     return $ret;
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

195) }
196) 
197) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

198) function yesterday($date)
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

199) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

200)     $result = db_query("SELECT ? - INTERVAL 1 DAY", array($date));
201)     return $result->fetch()[0];
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

202) }
203) 
204) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

205) function invalidate_sepamandat($id, $date)
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

206) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

207)     $args = array(":cid" => (int) $_SESSION['customerinfo']['customerno'],
Bernd Wurst Weitere Prepared-Statement-...

Bernd Wurst authored 10 years ago

208)                 ":id" => (int) $id,
209)                 ":date" => $date);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

210)     db_query("UPDATE kundendaten.sepamandat SET gueltig_bis=:date WHERE id=:id AND kunde=:cid", $args);
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

211) }
212) 
213) 
214) function sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab)
215) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

216)     $cid = (int) $_SESSION['customerinfo']['customerno'];
217) 
218)     $first_date = date('Y-m-d');
219)     $invoices = my_invoices();
220)     foreach ($invoices as $i) {
221)         if ($i['bezahlt'] == 0 && $i['datum'] < $first_date) {
222)             $first_date = $i['datum'];
223)         }
224)     }
225)     if ($gueltig_ab < date('Y-m-d') && $gueltig_ab != $first_date) {
226)         system_failure('Das Mandat kann nicht rückwirkend erteilt werden. Bitte geben Sie ein Datum in der Zukunft an.');
Bernd Wurst Speichere Gläubiger-ID mit...

Bernd Wurst authored 10 years ago

227)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

228)     $alte_mandate = get_sepamandate();
229)     $referenzen = array();
230)     foreach ($alte_mandate as $mandat) {
231)         if ($mandat['gueltig_bis'] == null || $mandat['gueltig_bis'] >= $gueltig_ab) {
232)             DEBUG('Altes Mandat wird für ungültig erklärt.');
233)             DEBUG($mandat);
234)             invalidate_sepamandat($mandat['id'], yesterday($gueltig_ab));
235)         }
236)         array_push($referenzen, $mandat['mandatsreferenz']);
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

237)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

238)     $counter = 1;
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

239)     $referenz = sprintf('K%04d-M%03d', $cid, $counter);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

240)     while (in_array($referenz, $referenzen)) {
241)         $counter++;
242)         $referenz = sprintf('K%04d-M%03d', $cid, $counter);
243)     }
244)     DEBUG('Nächste freie Mandatsreferenz: '. $referenz);
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

245) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

246)     $glaeubiger_id = config('glaeubiger_id');
Bernd Wurst Speichere Gläubiger-ID mit...

Bernd Wurst authored 10 years ago

247) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

248)     $today = date('Y-m-d');
249)     db_query(
Hanno Update codingstyle accordin...

Hanno authored 5 years ago

250)         "INSERT INTO kundendaten.sepamandat (mandatsreferenz, glaeubiger_id, kunde, erteilt, medium, gueltig_ab, kontoinhaber, adresse, iban, bic, bankname) VALUES (:referenz, :glaeubiger_id, :cid, :today, 'online', :gueltig_ab, :name, :adresse, :iban, :bic, :bankname)",
251)         array(":referenz" => $referenz, ":glaeubiger_id" => $glaeubiger_id, ":cid" => $cid,
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

252)                 ":today" => $today, ":gueltig_ab" => $gueltig_ab, ":name" => $name, ":adresse" => $adresse,
253)                 ":iban" => $iban, ":bic" => $bic, ":bankname" => $bankname)
254)   );
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

255) }
256) 
257) 
Bernd Wurst QR-Codes für Überweisung be...

Bernd Wurst authored 10 years ago

258) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

259) function get_bank_info($iban)
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

260) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

261)     if (strlen($iban) != 22 || substr($iban, 0, 2) != 'DE') {
262)         // Geht nur bei deutschen IBANs
263)         echo 'Fehler!';
264)         echo '$iban = '.$iban;
265)         echo 'strlen($iban): '.strlen($iban);
266)         echo 'substr($iban, 0, 2): '.substr($iban, 0, 2);
267)         return null;
268)     }
269)     $blz = substr($iban, 4, 8);
270)     // FIXME: Liste der BLZs muss vorhanden sein!
271)     $bankinfofile = dirname(__FILE__).'/bankinfo.txt';
272)     $f = file($bankinfofile);
273)     $match = '';
274)     foreach ($f as $line) {
275)         if (substr($line, 0, 9) == $blz.'1') {
276)             $match = $line;
277)             break;
278)         }
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

279)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

280)     $bank = array();
281)     $bank['name'] = iconv('latin1', 'utf8', chop(substr($match, 9, 58)));
282)     $bank['bic'] = chop(substr($match, 139, 11));
283)     return $bank;
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

284) }
285) 
286) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

287) function find_iban($blz, $kto)
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

288) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

289)     $iban = sprintf('DE00%08s%010s', $blz, $kto);
290)     $iban = iban_set_checksum($iban);
291)     return $iban;
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

292) }
293) 
294) 
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

295) function get_customerquota()
296) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

297)     $cid = (int) $_SESSION['customerinfo']['customerno'];
298)     $result = db_query("SELECT quota FROM system.customerquota WHERE cid=:cid", array(":cid" => $cid));
299)     $data = $result->fetch();
300)     return $data["quota"];
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

301) }
302) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

303) function save_more_storage($items, $storage)
304) {
305)     $cid = (int) $_SESSION['customerinfo']['customerno'];
Hanno remove whitespace in empty...

Hanno authored 5 years ago

306) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

307)     $queries = array();
308) 
309)     if ($storage < 1024 || $storage > 10240) {
310)         input_error('Speicherplatz nicht im erwarteten Bereich');
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

311)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

312)     $oldcustomerquota = get_customerquota();
313)     if ($oldcustomerquota > 102400) {
314)         # Über 100 GB soll die Automatik nichts machen
315)         system_failure("Ihr Speicherplatz kann über diese Funktion nicht weiter erhöht werden. Bitte wenden Sie sich an die Administratoren.");
316)     }
317)     $result = db_query("SELECT quota FROM system.customerquota WHERE cid=:cid AND lastchange > CURDATE()", array(":cid" => $cid));
318)     if ($result->rowcount() > 0) {
319)         system_failure("Ihr Speicherplatz wurde heute bereits verändert. Sie können dies nur einmal am Tag machen.");
320)     }
321) 
322)     $queries[] = array("UPDATE system.customerquota SET quota=quota+:storage WHERE cid=:cid", array(":storage" => $storage, ":cid" => $cid));
323) 
324)     foreach ($items as $data) {
325)         if ($data['anzahl'] == 0) {
326)             continue;
327)         }
328)         $data['kunde'] = $cid;
329)         $data['notizen'] = 'Bestellt via Webinterface';
330)         if (!isset($data['anzahl']) ||
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

331)         !isset($data['beschreibung']) ||
332)         !isset($data['datum']) ||
333)         !array_key_exists('kuendigungsdatum', $data) ||
334)         !isset($data['betrag']) ||
335)         !isset($data['monate'])) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

336)             DEBUG($data);
337)             input_error("Ungültige Daten");
338)             return;
339)         }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

340) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

341)         $param = array();
342)         foreach ($data as $k => $v) {
343)             $param[':'.$k] = $v;
344)         }
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

345) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

346)         $queries[] = array("INSERT INTO kundendaten.leistungen (kunde,periodisch,beschreibung,datum,kuendigungsdatum,betrag,brutto,monate,anzahl,notizen) VALUES ".
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

347)                        "(:kunde,1,:beschreibung,:datum,:kuendigungsdatum,:betrag,:brutto,:monate,:anzahl,:notizen)", $param);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

348)     }
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

349) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

350)     if (count($queries) < 2) {
351)         system_failure("irgendwas stimmt jetzt nicht");
352)     }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

353) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

354)     foreach ($queries as $q) {
355)         db_query($q[0], $q[1]);
356)     }
357)     $allstorage = $oldcustomerquota+$storage;
358)     $emailaddr = $_SESSION['customerinfo']['email'];
359)     $message = "Hallo,\n\nsoeben wurde im Webinterface von ".config('company_name')." eine Bestellung über zusätzlichen Speicherplatz ausgeführt.\nSollten Sie diese Bestellung nicht getätigt haben, antworten Sie bitte auf diese E-Mail um unseren Support zu erreichen.\n\nBei dieser Bestellung wurden {$storage} MB zusätzlicher Speicherplatz bestellt. Ihnen stehen ab sofort insgesamt {$allstorage} MB zur Verfügung.\n\nIhre Kundennummer: {$_SESSION['customerinfo']['customerno']} ({$_SESSION['customerinfo']['name']})\n";
Bernd Wurst fix encoding mail headers a...

Bernd Wurst authored 4 years ago

360)     send_mail($emailaddr, 'Auftragsbestätigung: Mehr Speicherplatz bei schokokeks.org', $message);