function delete() { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_ORG, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($id = DCL_Sanitize::ToInt($_REQUEST['org_id'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj = CreateObject('dcl.dbOrg'); $obj->Load(array('org_id' => $id)); ShowDeleteYesNo('Organization', 'htmlOrgForm.submitDelete', $obj->org_id, $obj->name); }
function delete() { global $g_oSec; commonHeader(); if (($id = DCL_Sanitize::ToInt($_REQUEST['contact_id'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_CONTACT, DCL_PERM_DELETE, $id)) { return PrintPermissionDenied(); } $obj = CreateObject('dcl.dbContact'); if ($obj->Load($id) == -1) { return; } ShowDeleteYesNo('Contact', 'htmlContactForm.submitDelete', $obj->contact_id, $obj->last_name . ', ' . $obj->first_name); }
function delete() { global $g_oSec; commonHeader(); if (($wo_task_id = DCL_Sanitize::ToInt($_REQUEST['wo_task_id'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_ACTION)) { return PrintPermissionDenied(); } $obj = CreateObject('dcl.dbWorkOrderTask'); if ($obj->Load($wo_task_id) == -1) { return; } ShowDeleteYesNo('Work Order Task', 'htmlWorkOrderTask.submitDelete', $obj->wo_task_id, $obj->task_summary); }
function delete() { global $g_oSec; commonHeader(); if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj =& CreateObject('dcl.dbViews'); if ($obj->Load($iID) == -1) { return; } if (!$g_oSec->HasPerm(DCL_ENTITY_SAVEDSEARCH, DCL_PERM_DELETE, $iID)) { // Users can delete their own saved searches if ($obj->whoid != $GLOBALS['DCLID']) { return PrintPermissionDenied(); } } if ($obj->whoid == $GLOBALS['DCLID'] || $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_PERM_ADMIN)) { ShowDeleteYesNo(STR_CMMN_VIEW, 'boViews.dbdelete', $obj->viewid, $obj->name, false); } else { PrintPermissionDenied(); } }
function delete() { global $g_oSec; commonHeader(); if (($id = DCL_Sanitize::ToInt($_REQUEST['role_id'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_ROLE, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } $obj = CreateObject('dcl.dbRole'); if ($obj->Load($id) == -1) { return; } ShowDeleteYesNo('Role', 'htmlRoleForm.submitDelete', $obj->role_id, $obj->role_desc); }
function delete() { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_LOOKUP, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj =& CreateObject('dcl.dbLookup'); if ($obj->Load($iID) == -1) { return; } ShowDeleteYesNo('Lookup', 'boLookup.dbdelete', $obj->dcl_lookup_id, $obj->dcl_lookup_name); }
function delete() { 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; } if ($this->oDB->Load($iID) == -1) { return; } ShowDeleteYesNo('Severity', 'boSeverities.dbdelete', $this->oDB->id, $this->oDB->name); }
function delete() { global $g_oSec; commonHeader(); if (($iID = @DCL_Sanitize::ToInt($_REQUEST['questionid'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_FAQQUESTION, DCL_PERM_DELETE, $iID)) { return PrintPermissionDenied(); } $obj =& CreateObject('dcl.dbFaqquestions'); if ($obj->Load($iID) == -1) { return; } ShowDeleteYesNo(STR_FAQ_QUESTION, 'boFaqquestions.dbdelete', $iID, $obj->questiontext, false, 'questionid'); }
function delete() { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($iID = @DCL_Sanitize::ToInt($_REQUEST['ticketid'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj =& CreateObject('dcl.dbTickets'); if ($obj->Load($iID) == -1) { return; } if ($obj->is_public == 'N' && $g_oSec->IsPublicUser()) { trigger_error('Cannot access private item.', E_USER_ERROR); return; } ShowDeleteYesNo('Delete Ticket [' . $iID . ']', 'boTickets.dbdelete', $iID, $obj->summary, false, 'ticketid'); }
function delete() { global $g_oSec; commonHeader(); if (($iID = @DCL_Sanitize::ToInt($_REQUEST['jcn'])) === null) { trigger_error('Data sanitize failed.'); return; } if (($iSeq = @DCL_Sanitize::ToInt($_REQUEST['seq'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_DELETE, $iID, $iSeq)) { return PrintPermissionDenied(); } $oWO =& CreateObject('dcl.dbWorkorders'); if ($oWO->Load($iID, $iSeq) == -1) { return; } ShowDeleteYesNo('Delete Work Order [' . $iID . '-' . $iSeq . ']', 'boWorkorders.dbdelete', $iID, $oWO->summary, false, 'jcn', $iSeq, 'seq'); }
function delete() { commonHeader(); if (($iID = @DCL_Sanitize::ToInt($_REQUEST['watchid'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj =& CreateObject('dcl.dbWatches'); if ($obj->Load($iID) == -1) { return; } if ($obj->whoid != $GLOBALS['DCLID']) { return PrintPermissionDenied(); } ShowDeleteYesNo('Watch', 'boWatches.dbdelete', $obj->watchid, $this->getWatchDescription($obj)); }
function delete() { global $dcl_info, $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_FORMS, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($iID = @DCL_Sanitize::ToInt($_REQUEST['dcl_chklst_id'])) === null) { trigger_error('Data sanitize failed.'); return; } $o =& CreateObject('dcl.dbChklst'); if ($o->Load($iID) != -1) { ShowDeleteYesNo('Checklist', 'boChecklists.dbdelete', $o->dcl_chklst_id, $o->dcl_chklst_summary, false, 'dcl_chklst_id'); } }
function delete() { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_ATTRIBUTESETS, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj =& CreateObject('dcl.dbAttributesets'); if ($obj->Load($iID) == -1) { return; } ShowDeleteYesNo('Attribute Set', 'boAttributesets.dbdelete', $obj->id, $obj->name); }
function delete() { global $g_oSec; commonHeader(); if (($projectid = @DCL_Sanitize::ToInt($_REQUEST['projectid'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_DELETE, $projectid)) { return PrintPermissionDenied(); } $obj =& CreateObject('dcl.dbProjects'); if ($obj->Load($projectid) == -1) { return; } ShowDeleteYesNo('Project', 'boProjects.dbdelete', $obj->projectid, $obj->name, false, 'projectid'); }
function delete() { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_PERSONNEL, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj =& CreateObject('dcl.dbPersonnel'); if ($obj->Load($iID) == -1) { return; } ShowDeleteYesNo('User', 'boPersonnel.dbdelete', $obj->id, $obj->short); }
function delete() { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_EMAILTYPE, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($id = DCL_Sanitize::ToInt($_REQUEST['email_type_id'])) === null) { trigger_error('Data sanitize failed.'); return; } $obj = CreateObject('dcl.dbEmailType'); if ($obj->Load($id) == -1) { return; } ShowDeleteYesNo('Email Type', 'htmlEmailType.submitDelete', $obj->email_type_id, $obj->email_type_name); }
function delete() { global $g_oSec; commonHeader(); if (($id = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) { trigger_error('Data sanitize failed.'); return; } if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_DELETE, $id)) { return PrintPermissionDenied(); } $obj = CreateObject('dcl.dbProducts'); if ($obj->Load($id) == -1) { return; } ShowDeleteYesNo('Product', 'htmlProducts.submitDelete', $obj->id, $obj->name); }
function delete() { global $dcl_info, $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_FORMTEMPLATES, DCL_PERM_DELETE)) { return PrintPermissionDenied(); } if (($iID = @DCL_Sanitize::ToInt($_REQUEST['dcl_chklst_tpl_id'])) === null) { trigger_error('Data sanitize failed.'); return; } $o =& CreateObject('dcl.dbChklstTpl'); if ($o->Load($iID) != -1) { ShowDeleteYesNo(STR_CHK_CHECKLISTTEMPLATE, 'boChecklistTpl.dbdelete', $o->dcl_chklst_tpl_id, $o->dcl_chklst_tpl_name, true, 'dcl_chklst_tpl_id'); } }