$usage ist ein array
Bernd Wurst

Bernd Wurst commited on 2018-01-24 10:34:58
Zeige 2 geänderte Dateien mit 21 Einfügungen und 4 Löschungen.

... ...
@@ -17,6 +17,19 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r
17 17
 require_once('inc/debug.php');
18 18
 require_role(array(ROLE_CUSTOMER));
19 19
 
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
+
20 33
 function get_handles() {
21 34
     $cid = (int) $_SESSION['customerinfo']['customerno'];
22 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));
... ...
@@ -34,16 +34,20 @@ output('<p>Sie haben aktuell diese Adressen gespeichert:</p>
34 34
 ');
35 35
 foreach ($handles as $id => $handle) {
36 36
     $adresse = nl2br($handle['address']."\n".$handle['country'].'-'.$handle['zip'].' '.$handle['city']);
37
-    $usage = '';
37
+    $usage = array();
38 38
     if ($id == $kundenhandles['kunde']) {
39
-        $usage .= 'Stamm-Adresse';
39
+        $usage[] = 'Stamm-Adresse';
40 40
     }
41 41
     if ($id == $kundenhandles['extern']) {
42
-        $usage .= 'Ersatz-Adresse';
42
+        $usage[] = 'Ersatz-Adresse';
43 43
     }
44 44
     if ($id == $kundenhandles['rechnung']) {
45
-        $usage .= 'Rechnungs-Adresse';
45
+        $usage[] = 'Rechnungs-Adresse';
46 46
     }
47
+    if ($handle['nic_handle']) {
48
+        $usage[] = 'Domain-Kontakt';
49
+    }
50
+    $usage = join(', ', $usage);
47 51
     $email = $handle['email'];
48 52
     $new_email = update_pending($id);
49 53
     if ($new_email) {
50 54