Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -1,69 +1,58 @@
<?php
/**
* AgileBill - Open Billing Software
*
* This body of work is free software; you can redistribute it and/or
* modify it under the terms of the Open AgileBill License
* License as published at http://www.agileco.com/agilebill/license1-4.txt
*
* For questions, help, comments, discussion, etc., please join the
* Agileco community forums at http://forum.agileco.com/
*
* Originally authored by Tony Landis, AgileBill LLC
* Recent modifications by Deon George
*
* @author Deon George <deonATleenooksDOTnet>
* @copyright 2009 Deon George
* @link http://osb.leenooks.net
*
* @link http://www.agileco.com/
* @copyright 2004-2008 Agileco, LLC.
* @license http://www.agileco.com/agilebill/license1-4.txt
* @author Tony Landis <tony@agileco.com>
* @author Tony Landis <tony@agileco.com>
* @package AgileBill
* @version 1.4.93
*/
function CORE_database_delete($VAR, &$construct, $type)
{
global $C_debug, $C_translate;
# set the id
$id = $construct->table . '_id';
/**
* The main AgileBill CORE Database DELETE Method
*
* @package AgileBill
* @subpackage Core:Database
* @uses CORE_Trigger
*/
# generate the full query
$q = "DELETE FROM
".AGILE_DB_PREFIX."$construct->table
WHERE
id = '".$db->qstr($VAR["id"], get_magic_quotes_gpc())."'
AND
site_id = '" . DEFAULT_SITE . "'";
function CORE_database_delete($VAR,$construct,$type) {
global $C_debug,$C_translate;
# execute the query
$db = &DB();
$result = $db->Execute($q);
# Execute the SQL
$result = $db->Execute(sqlDelete($db,$construct->table,array('id'=>$VAR['id'])));
# Alert
$C_debug->value["id"] = $VAR[$id];
$C_debug->value["module_name"] = $C_translate->translate('menu',$construct->module,"");
$alert = $C_translate->translate('alert_delete_id',"","");
$C_debug->alert($alert);
$C_debug->value['id'] = $VAR[$construct->table.'_id'];
$C_debug->value['module_name'] = $C_translate->translate('menu',$construct->module,'');
$C_debug->alert($C_translate->translate('alert_delete_id','',''));
# error reporting
if ($result === false)
{
if ($result === false) {
global $C_debug;
$C_debug->error('database.inc.php','delete', $db->ErrorMsg());
$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
}
if(isset($construct->trigger["$type"]))
{
include_once(PATH_CORE . 'trigger.inc.php');
$trigger = new CORE_trigger;
$trigger->trigger($construct->trigger["$type"], 0, $VAR);
}
} else {
if (isset($construct->trigger[$type])) {
include_once(PATH_CORE.'trigger.inc.php');
$trigger = new CORE_trigger;
if(isset($construct->trigger["$type"]))
{
include_once(PATH_CORE . 'trigger.inc.php');
$trigger = new CORE_trigger;
$trigger->trigger($construct->trigger["$type"], 0, $VAR);
}
$trigger->trigger($construct->trigger[$type],0,$VAR);
}
}
?>
?>