function delete($aSource)
 {
     global $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_CONTACT, DCL_PERM_DELETE)) {
         return PrintPermissionDenied();
     }
     if (($id = @DCL_Sanitize::ToInt($aSource['contact_id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$this->oDB->HasFKRef($id)) {
         $this->oDB->Execute("DELETE FROM dcl_contact_addr WHERE contact_id = {$id}");
         $this->oDB->Execute("DELETE FROM dcl_org_contact WHERE contact_id = {$id}");
         $this->oDB->Execute("DELETE FROM dcl_contact_email WHERE contact_id = {$id}");
         $this->oDB->Execute("DELETE FROM dcl_contact_note WHERE contact_id = {$id}");
         $this->oDB->Execute("DELETE FROM dcl_contact_phone WHERE contact_id = {$id}");
         $this->oDB->Execute("DELETE FROM dcl_contact_type_xref WHERE contact_id = {$id}");
     }
     parent::delete($aSource);
 }
 function dbdelete()
 {
     global $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_SEVERITY, DCL_PERM_DELETE)) {
         return PrintPermissionDenied();
     }
     if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     parent::delete(array('id' => $iID));
     $objHTML =& CreateObject('dcl.htmlSeverities');
     $objHTML->PrintAll();
 }