git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
2aa16ed
Branches
Tags
master
bibweb.git
internal
ajax_kunde_aendern.php
Kundendaten ändern, Gitterbox hinzufügen / entfernen
Bernd Wurst
commited
2aa16ed
at 2020-06-15 20:45:48
ajax_kunde_aendern.php
Blame
History
Raw
<?php require_once 'lib/api.php'; require_once 'lib/tools.php'; // some sort of limit?! session_start(); $ret = ''; $data = array("kunde" => array(), "uuid" => ''); $fields = array("kundennr", "firma", "vorname", "nachname", "adresse", "plz", "ort"); foreach ($fields as $key) { if (isset($_GET[$key])) { $data['kunde'][$key] = $_GET[$key]; } } if (isset($_GET['telefon'])) { $data['kunde']['kontakt'] = array(); $data['kunde']['kontakt'][] = array( "typ" => "telefon", "wert" => $_GET['telefon']); } $ret = api_call('kunde/aendern', $data); if (!isset($ret['kunde'])) { return; } $ret['kunde']['html'] = adresse($ret['kunde'], 'kundendaten'); header('Content-Type: application/json'); echo json_encode($ret['kunde']);