# you will need to find a good value for your own server
# value is in seconds (or you can play with the autothrottle below)
define('MAILQUEUE_THROTTLE', 0);



/*
 *		GLOBAL USED VARIABLE
 */
$PHP_SELF = $_SERVER["PHP_SELF"];

$CURRENT_DATETIME = date("Y-m-d H:i:s");

// Store script start time
$_START_TIME = time();
mt_start();


// A2BILLING COPYRIGHT & CONTACT
define ("TEXTCONTACT", gettext("This software has been created by Areski under AGPL licence. For futher information, feel free to contact me:"));
define ("EMAILCONTACT", "*****@*****.**");

// A2BILLING INFO  
define ("COPYRIGHT", "A2Billing 1.7.0 (Larch VT), A2Billing is software licensed under the ".'<a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" target="_blank">AGPL 3</a>' . ". <br/>" . "Copyright (C) 2004-2010 - Star2billing S.L. <a href=\"http://www.star2billing.com\" target=\"_blank\">http://www.star2billing.com/</a>");

define ("CCMAINTITLE", gettext("A2Billing Portal"));




/*
Beispiel #2
0
function find_beans($phone_number, $module_order = "accounts,contacts", $stop_on_find = false, $current_user)
{
    $beans = array();
    mt_start();
    $modules = explode(',', $module_order);
    foreach ($modules as $currModuleName) {
        $configName = 'asterisk_' . rtrim($currModuleName, 's') . '_phone_fields';
        // TODO here find all the phone fields for a particular module name.
        $phoneFields = "phone_work,phone_mobile";
        if (!empty($GLOBALS['sugar_config'][$configName])) {
            $phoneFields = $GLOBALS['sugar_config'][$configName];
        }
        $result = find_beans_db_query($currModuleName, $phoneFields, $phone_number, $current_user);
        $beans = array_merge($beans, convert_bean_to_simple_array($currModuleName, $result, $current_user));
        if ($stop_on_find && count($beans) > 0) {
            break;
        }
    }
    $timer = mt_end();
    //logLine("find_beans_db_query $timer");
    return $beans;
}