e1f44b2ced513e151f39f0e913be79a5b936bd45
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php     1) <?php
modules/handles/include/handles.php     2) /*
modules/handles/include/handles.php     3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/handles/include/handles.php     4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php     5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php     6)   Bernd Wurst <bernd@schokokeks.org>
modules/handles/include/handles.php     7)   Hanno Böck <hanno@schokokeks.org>
modules/handles/include/handles.php     8) 
modules/handles/include/handles.php     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.
modules/handles/include/handles.php    10) 
modules/handles/include/handles.php    11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
modules/handles/include/handles.php    12) http://creativecommons.org/publicdomain/zero/1.0/
modules/handles/include/handles.php    13) 
modules/handles/include/handles.php    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.
modules/handles/include/handles.php    15) */
modules/handles/include/handles.php    16) 
modules/handles/include/handles.php    17) require_once('inc/debug.php');
modules/handles/include/handles.php    18) require_role(array(ROLE_CUSTOMER));
modules/handles/include/handles.php    19) 
Bernd Wurst $usage ist ein array

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  33) function new_contact() {
modules/contacts/include/contacts.php  34)     return array("id" => NULL,
modules/contacts/include/contacts.php  35)         "state" => NULL,
modules/contacts/include/contacts.php  36)         "lastchange" => time(),
modules/contacts/include/contacts.php  37)         "nic_handle" => NULL,
modules/contacts/include/contacts.php  38)         "nic_id" => NULL,
modules/contacts/include/contacts.php  39)         "company" => NULL,
modules/contacts/include/contacts.php  40)         "name" => NULL,
modules/contacts/include/contacts.php  41)         "address" => NULL,
modules/contacts/include/contacts.php  42)         "zip" => NULL,
modules/contacts/include/contacts.php  43)         "city" => NULL,
modules/contacts/include/contacts.php  44)         "country" => "DE",
modules/contacts/include/contacts.php  45)         "phone" => NULL,
modules/contacts/include/contacts.php  46)         "mobile" => NULL,
modules/contacts/include/contacts.php  47)         "fax" => NULL,
modules/contacts/include/contacts.php  48)         "email" => NULL,
modules/contacts/include/contacts.php  49)         "pgp_id" => NULL,
modules/contacts/include/contacts.php  50)         "pgp_key" => NULL,
modules/contacts/include/contacts.php  51)         "customer" => $_SESSION['customerinfo']['customerno']);
modules/contacts/include/contacts.php  52) }
modules/contacts/include/contacts.php  53) 
modules/contacts/include/contacts.php  54) 
modules/contacts/include/contacts.php  55) function get_contact($id)
modules/contacts/include/contacts.php  56) {
modules/contacts/include/contacts.php  57)     $args = array(
modules/contacts/include/contacts.php  58)         "cid" => (int) $_SESSION['customerinfo']['customerno'],
modules/contacts/include/contacts.php  59)         "id" => (int) $id);
modules/contacts/include/contacts.php  60)     $result = db_query("SELECT id, state, lastchange, nic_id, nic_handle, company, name, address, zip, city, country, phone, mobile, fax, email, pgp_id, pgp_key FROM kundendaten.contacts WHERE id=:id AND customer=:cid", $args);
modules/contacts/include/contacts.php  61)     if ($result->rowCount() == 0) {
modules/contacts/include/contacts.php  62)         system_failure("Kontakt nicht gefunden oder gehört nicht diesem Kunden");
modules/contacts/include/contacts.php  63)     }
Bernd Wurst Zeige bestehende Daten in d...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  64)     $contact = $result->fetch();
Bernd Wurst Vorbereitung für edit/new

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  65)     return $contact;
modules/contacts/include/contacts.php  66) }
modules/contacts/include/contacts.php  67) 
Bernd Wurst Umbenennung Datenbank handl...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  68) function get_contacts() {
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    69)     $cid = (int) $_SESSION['customerinfo']['customerno'];
Bernd Wurst Vorbereitung für edit/new

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  70)     $result = db_query("SELECT id, state, lastchange, nic_id, nic_handle, company, name, address, zip, city, country, phone, mobile, fax, email, pgp_id, pgp_key FROM kundendaten.contacts WHERE customer=? ORDER BY id", array($cid));
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    71)     $ret = array();
Bernd Wurst Umbenennung Datenbank handl...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  72)     while ($contact = $result->fetch()) {
modules/contacts/include/contacts.php  73)         $ret[$contact['id']] = $contact;
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    74)     }
modules/handles/include/handles.php    75)     DEBUG($ret);
modules/handles/include/handles.php    76)     return $ret;
modules/handles/include/handles.php    77) }
modules/handles/include/handles.php    78) 
modules/handles/include/handles.php    79) 
Bernd Wurst Umbenennung Datenbank handl...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  80) function get_kundenkontakte() {
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    81)     $cid = (int) $_SESSION['customerinfo']['customerno'];
Bernd Wurst Umbenennung Datenbank handl...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  82)     $result = db_query("SELECT contact_kunde, contact_extern, contact_rechnung FROM kundendaten.kunden WHERE id=?", array($cid));
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    83)     $res = $result->fetch();
Bernd Wurst Umbenennung Datenbank handl...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  84)     $ret = array("kunde" => $res['contact_kunde'],
modules/contacts/include/contacts.php  85)                  "extern" => $res['contact_extern'],
modules/contacts/include/contacts.php  86)                  "rechnung" => $res['contact_rechnung']);
Bernd Wurst In neues Modul ausgelagert

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    87)     return $ret;
modules/handles/include/handles.php    88) }
modules/handles/include/handles.php    89) 
Bernd Wurst E-Mail-Adresse verifizieren...

Bernd Wurst authored 6 years ago

modules/handles/include/handles.php    90) 
Bernd Wurst Umbenennung Datenbank handl...

Bernd Wurst authored 6 years ago

modules/contacts/include/contacts.php  91) function update_pending($contactid) {
modules/contacts/include/contacts.php  92)     $contactid = (int) $contactid;
modules/contacts/include/contacts.php  93)     $result = db_query("SELECT email FROM kundendaten.mailaddress_token WHERE contact=?", array($contactid));