Browse code

Speichere E-Mail-Adresse ohne Verifizierung, wenn der Kunde diese schon benutzt Zeige Firmenname an

Bernd Wurst authored on14/01/2018 17:07:24
Showing2 changed files
... ...
@@ -99,7 +99,11 @@ function get_kundenkontakte() {
99 99
 
100 100
 function save_emailaddress($id, $email) 
101 101
 {
102
-    // FIXME
102
+    // Speichert eine E-Mail-Adresse direkt, z.B. wenn diese schonmal geprüt wurde
103
+    $args = array("cid" => (int) $_SESSION['customerinfo']['customerno'],
104
+        "id" => (int) $id,
105
+        "email" => $email);
106
+    db_query("UPDATE kundendaten.contacts SET email=:email WHERE id=:id AND customer=:cid", $args);    
103 107
 }
104 108
 
105 109
 function save_contact($c)
... ...
@@ -48,12 +48,16 @@ foreach ($contacts as $id => $contact) {
48 48
         $usage[] = 'Domain-Kontakt';
49 49
     }
50 50
     $usage = join(', ', $usage);
51
+    $name = $contact['name'];
52
+    if ($contact['company']) {
53
+        $name = $contact['company']."<br />".$contact['name'];
54
+    }
51 55
     $email = $contact['email'];
52 56
     $new_email = update_pending($id);
53 57
     if ($new_email) {
54 58
         $email = "<strike>$email</strike><br/>".$new_email.footnote('Die E-Mail-Adresse wurde noch nicht bestätigt');
55 59
     }
56
-    output("<tr><td>{$contact['id']}</td><td><strong>".internal_link('edit', $contact['name'], 'id='.$contact['id'])."</strong></td><td>$adresse</td><td>$email</td><td>$usage</td><td>...</td></tr>");
60
+    output("<tr><td>{$contact['id']}</td><td><strong>".internal_link('edit', $name, 'id='.$contact['id'])."</strong></td><td>$adresse</td><td>$email</td><td>$usage</td><td>...</td></tr>");
57 61
 }
58 62
 output('</table>');
59 63
 output("<br />");