4cd40851bd3eb41c739750ea9668184d0c3c05f8
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

1) <?php
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 In neues Modul ausgelagert

Bernd Wurst authored 6 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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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) */
16) 
17) require_once('inc/debug.php');
18) require_role(array(ROLE_CUSTOMER));
19) 
Bernd Wurst $usage ist ein array

Bernd Wurst authored 6 years ago

20) /*
21) require_once('external/http.net/domainRobotApi.php');
22) 
23) function api_fetch_contact($nic_id)
24) {
25)   if (! config('http.net-apikey')) {
26)     system_failure("Kein API-Key vorhanden!");
27)   }
28)   $api = new domainRobotApi(config('http.net-apikey'));
29) }
30) */
31) 
32) 
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

33) function get_handles() {
34)     $cid = (int) $_SESSION['customerinfo']['customerno'];
35)     $result = db_query("SELECT id, state, lastchange, nic_handle, company, name, address, zip, city, country, phone, mobile, fax, email, pgp_id FROM kundendaten.handles WHERE customer=? ORDER BY id", array($cid));
36)     $ret = array();
37)     while ($handle = $result->fetch()) {
38)         $ret[$handle['id']] = $handle;
39)     }
40)     DEBUG($ret);
41)     return $ret;
42) }
43) 
44) 
45) function get_kundenhandles() {
46)     $cid = (int) $_SESSION['customerinfo']['customerno'];
47)     $result = db_query("SELECT handle_kunde, handle_extern, handle_rechnung FROM kundendaten.kunden WHERE id=?", array($cid));
48)     $res = $result->fetch();
49)     $ret = array("kunde" => $res['handle_kunde'],
50)                  "extern" => $res['handle_extern'],
51)                  "rechnung" => $res['handle_rechnung']);
52)     return $ret;
53) }
54)