function delete($VAR) { # this function removed in v1.4.2 return false; $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->associated_DELETE[] = array('table' => 'static_relation', 'field' => 'static_var_id'); $this->associated_DELETE[] = array('table' => 'static_var_record', 'field' => 'static_var_id'); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->static_page_category_construct(); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->charge_construct(); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->construct(); $dbx = new CORE_database(); $db =& DB(); ### Get the array if (isset($VAR["delete_id"])) { $id = explode(',', $VAR["delete_id"]); } elseif (isset($VAR["id"])) { $id = explode(',', $VAR["id"]); } ### Loop: for ($i = 0; $i < count($id); $i++) { $arr['id'] = $id[$i]; $del = true; ### Update the queue status to 'delete' $db =& DB(); $q = "UPDATE " . AGILE_DB_PREFIX . "service SET\n\t\t\t\t queue\t\t= " . $db->qstr('delete') . " WHERE\n\t\t\t\t id = " . $db->qstr($id[$i]) . " AND\n\t\t\t\t site_id = " . $db->qstr(DEFAULT_SITE); $db->Execute($q); ### Call the appropriate service deletion method $this->queue_one($id[$i], false); ### Determine if this service should be automatically deleted. ### If it is a non-realtime hosting record, we must leave the record in the db. $db =& DB(); $q = "SELECT type,host_server_id FROM " . AGILE_DB_PREFIX . "service WHERE\n\t\t\t\t id\t \t\t= " . $db->qstr($id[$i]) . " AND\n\t\t\t\t site_id = " . $db->qstr(DEFAULT_SITE); $result = $db->Execute($q); if ($result && $result->RecordCount() == 0) { $del = false; } else { if ($result->fields['type'] == 'host' || $result->fields['type'] == 'host_group') { $host_id = $result->fields['host_server_id']; $sql = 'SELECT debug,provision_plugin FROM ' . AGILE_DB_PREFIX . 'host_server WHERE id = ' . $db->qstr($host_id) . ' AND site_id = ' . $db->qstr(DEFAULT_SITE); $rs = $db->Execute($sql); $file = $rs->fields['provision_plugin']; if (!empty($file) && is_file(PATH_PLUGINS . 'provision/' . $file . '.php')) { require_once PATH_PLUGINS . 'provision/' . $file . '.php'; eval('$_plg = new plgn_prov_' . $file . ';'); if (@$_plg->remote_based == false) { $del = false; } } } } ### Delete the service record if ($del) { $dbx->mass_delete($arr, $this, ""); } } }
function delete($VAR) { $this->associated_DELETE = array(array('table' => 'product_cat_translate', 'field' => 'product_cat_id')); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { global $C_auth; $this->associated_DELETE[] = array('table' => 'account_group', 'field' => 'group_id'); $this->associated_DELETE[] = array('table' => 'group_method', 'field' => 'group_id'); #remove any group ids <= 1001 from the mass delete array: global $C_debug; $id_list = ''; if (isset($VAR["delete_id"])) { $id = explode(',', $VAR["delete_id"]); } elseif (isset($VAR["id"])) { $id = explode(',', $VAR["id"]); } for ($i = 0; $i < count($id); $i++) { if (!empty($id[$i]) && $id[$i] > 1001) { if ($i == 0) { $id_list .= $id[$i]; } else { $id_list .= ',' . $id[$i]; } # Check if group allowed: if (!$C_auth->auth_group_by_id(1001) && !$C_auth->auth_group_by_id($id[$i])) { $C_debug->alert('The selected group cannot be modified as your account is not authorized for it.'); return; } } else { $C_debug->alert('One or more of the groups selected to be deleted are part of the core and cannot be removed.'); } } $VAR['id'] = $id_list; $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->associated_DELETE[] = array('table' => 'faq_translate', 'field' => 'faq_id'); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->associated_DELETE[] = array('table' => 'invoice_commission', 'field' => 'affiliate_commission_id'); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); # Delete all associated discounts: if (isset($VAR['id'])) { $id = $VAR['id']; for ($i = 0; $i < count($id); $i++) { if ($id[$i] != '') { $q = '%Affiliate Commission ID ' . $id[$i] . '%'; $db =& DB(); $sql = "DELETE FROM " . AGILE_DB_PREFIX . "discount WHERE\n\t\t\t\t\t\t notes LIKE " . $db->qstr($q) . " AND\n\t\t\t\t\t\t site_id = " . $db->qstr(DEFAULT_SITE); $result = $db->Execute($sql); } } } else { $id = $VAR['delete_id']; $q = '%Affiliate Commission ID ' . $id . '%'; $db =& DB(); $sql = "DELETE FROM " . AGILE_DB_PREFIX . "discount WHERE\n\t\t\t\tnotes LIKE " . $db->qstr($q) . " AND\n\t\t\t\tsite_id = " . $db->qstr(DEFAULT_SITE); $result = $db->Execute($sql); } }
function delete($VAR) { $this->construct(); $this->associated_DELETE[] = array('table' => 'ticket_message', 'field' => 'ticket_id'); $this->associated_DELETE[] = array('table' => 'ticket_attachment', 'field' => 'ticket_id'); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
function delete($VAR) { $this->construct(); $this->associated_DELETE[] = array('table' => 'email_template_translate', 'field' => 'email_template_id'); $db = new CORE_database(); $db->mass_delete($VAR, $this, ""); }
/** DELETE */ function delete($VAR) { $this->invoice_construct(); $dbx = new CORE_database(); $db =& DB(); ### Get the array if (isset($VAR["delete_id"])) { $id = explode(',', $VAR["delete_id"]); } elseif (isset($VAR["id"])) { $id = explode(',', $VAR["id"]); } ### Load the service module include_once PATH_MODULES . 'service/service.inc.php'; $service = new service(); ### Loop: for ($i = 0; $i < count($id); $i++) { ### Loop through all services for this invoice and delete: $q = "SELECT * FROM " . AGILE_DB_PREFIX . "service WHERE\n\t\t\t\t invoice_id = " . $db->qstr($id[$i]) . " AND\n\t\t\t\t site_id = " . $db->qstr(DEFAULT_SITE); $rs = $db->Execute($q); if ($rs === false) { global $C_debug; $C_debug->error('invoice.inc.php', 'delete', $db->ErrorMsg()); return false; } if (@$rs->RecordCount() > 0) { while (!$rs->EOF) { $arr['id'] = $rs->fields['id']; $service->delete($arr, $service); $rs->MoveNext(); } } ### Delete the service record $arr['id'] = $id[$i]; $this->associated_DELETE[] = array('table' => 'invoice_commission', 'field' => 'invoice_id'); $this->associated_DELETE[] = array('table' => 'invoice_item', 'field' => 'invoice_id'); $this->associated_DELETE[] = array('table' => 'invoice_memo', 'field' => 'invoice_id'); $this->associated_DELETE[] = array('table' => 'service', 'field' => 'invoice_id'); $this->associated_DELETE[] = array('table' => 'invoice_item_tax', 'field' => 'invoice_id'); $this->associated_DELETE[] = array('table' => 'invoice_item_discount', 'field' => 'invoice_id'); $dbx->mass_delete($arr, $this, ""); } }