示例#1
0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ********************************************************************************/
session_start();
require_once 'Smarty_setup.php';
require_once 'include/database/PearDatabase.php';
require_once 'include/utils/utils.php';
require_once 'include/utils/CommonUtils.php';
require_once 'modules/Accounting/AjaxUtils.php';
require_once 'modules/Accounting/Accounting.php';
global $mod_strings;
if ($_REQUEST["command"] == "activemods") {
    Accounting::updateActiveModules($_REQUEST["mod"], $_REQUEST["search"], $_REQUEST["checked"]);
    Accounting::updateCustomLinks(true);
} else {
    if ($_REQUEST["command"] == "refreshcredits") {
        $config = Accounting::loadConfigParams();
        if ($config["username"] != "" && $config["password"] != "") {
            $credits = getCredits($config);
            if ($credits == "-1") {
                echo $mod_strings['_LBL_FAX_SETTINGS_CONNECTIVITY_ERROR'];
            } else {
                $errCode = split(":", $credits);
                if ($errCode[0] == "ERR") {
                    echo $mod_strings['LBL_GET_CREDITS_ERROR'] . " (" . $errCode[1] . ")";
                } else {
                    echo $errCode[1];
                }