mirror of
https://github.com/itflow-org/itflow
synced 2026-11-11 07:01:16 +00:00
25 lines
1.3 KiB
PHP
25 lines
1.3 KiB
PHP
<?php
|
|
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|
|
|
$name = escapeSql($_POST['name'] ?? '');
|
|
$title = escapeSql($_POST['title'] ?? '');
|
|
$department = escapeSql($_POST['department'] ?? '');
|
|
$phone_country_code = preg_replace("/[^0-9]/", '', $_POST['phone_country_code'] ?? '');
|
|
$phone = preg_replace("/[^0-9]/", '', $_POST['phone'] ?? '');
|
|
$extension = preg_replace("/[^0-9]/", '', $_POST['extension'] ?? '');
|
|
$mobile_country_code = preg_replace("/[^0-9]/", '', $_POST['mobile_country_code'] ?? '');
|
|
$mobile = preg_replace("/[^0-9]/", '', $_POST['mobile'] ?? '');
|
|
$email = escapeSql($_POST['email'] ?? '');
|
|
$notes = escapeSql($_POST['notes'] ?? '');
|
|
$contact_primary = intval($_POST['contact_primary'] ?? 0);
|
|
$contact_important = intval($_POST['contact_important'] ?? 0);
|
|
$contact_billing = intval($_POST['contact_billing'] ?? 0);
|
|
$contact_technical = intval($_POST['contact_technical'] ?? 0);
|
|
$location_id = intval($_POST['location'] ?? 0);
|
|
$pin = escapeSql($_POST['pin'] ?? '');
|
|
// The portal login is only on the form when the client portal is on - when it
|
|
// isn't posted, leave whatever access the contact has alone
|
|
$auth_method_posted = isset($_POST['auth_method']);
|
|
$auth_method = in_array($_POST['auth_method'] ?? '', ['local', 'azure'], true) ? $_POST['auth_method'] : '';
|
|
$contact_password = trim((string) ($_POST['contact_password'] ?? ''));
|