Database class integration. Add HTML step attribute to Contact Address lat and lon fields to support decimal values.
This commit is contained in:
@@ -39,25 +39,26 @@
|
||||
$text = $language->get();
|
||||
|
||||
//get the http values and set as variables
|
||||
if (count($_GET) > 0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
$contact_attachment_uuid = $_GET["id"];
|
||||
$contact_uuid = $_GET["contact_uuid"];
|
||||
|
||||
//delete the record
|
||||
if (is_uuid($id)) {
|
||||
$sql = "delete from v_contact_attachments ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and contact_attachment_uuid = :contact_attachment_uuid ";
|
||||
$bind[':contact_attachment_uuid'] = $id;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute(is_array($bind) ? $bind : null);
|
||||
unset($sql);
|
||||
if (is_uuid($contact_attachment_uuid) && is_uuid($contact_uuid)) {
|
||||
$array['contact_attachments'][0]['contact_attachment_uuid'] = $contact_attachment_uuid;
|
||||
$array['contact_attachments'][0]['domain_uuid'] = $domain_uuid;
|
||||
$array['contact_attachments'][0]['contact_uuid'] = $contact_uuid;
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'contacts';
|
||||
$database->app_uuid = '04481e0e-a478-c559-adad-52bd4174574c';
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
|
||||
//redirect the browser
|
||||
message::add($text['message-delete']);
|
||||
//redirect
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
exit;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user