mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Add support for client-specific API keys
Refactoring API. Added a contact update endpoint. Small misc changes.
This commit is contained in:
11
api/v1/contacts/contact_model.php
Normal file
11
api/v1/contacts/contact_model.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_name'])));
|
||||
$title = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_title'])));
|
||||
$department = intval($_POST['contact_department']);
|
||||
$phone = preg_replace("/[^0-9]/", '',$_POST['contact_phone']);
|
||||
$extension = preg_replace("/[^0-9]/", '',$_POST['contact_extension']);
|
||||
$mobile = preg_replace("/[^0-9]/", '',$_POST['contact_mobile']);
|
||||
$email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_email'])));
|
||||
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_notes'])));
|
||||
$auth_method = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_auth_method'])));
|
||||
$location_id = intval($_POST['contact_location_id']);
|
||||
Reference in New Issue
Block a user