Ejemplo n.º 1
0
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
if (Is_Error(System_Load('modules/Authorisation.mod', 'classes/DOM.class.php', 'libs/Server.php'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Args = Args();
#-------------------------------------------------------------------------------
$ISPswGroupID = (int) @$Args['ISPswGroupID'];
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if (!Is_Array(SelectServerSettingsByService(51000))) {
    return SelectServerErrorMessage(51000);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if ($ISPswGroupID) {
    #-----------------------------------------------------------------------------
    $ISPswGroup = DB_Select('ISPswGroups', '*', array('UNIQ', 'ID' => $ISPswGroupID));
    #-----------------------------------------------------------------------------
    switch (ValueOf($ISPswGroup)) {
        case 'error':
            return ERROR | @Trigger_Error(500);
        case 'exception':
            return ERROR | @Trigger_Error(400);
        case 'array':
            # No more...
Ejemplo n.º 2
0
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
if (Is_Error(System_Load('libs/BillManager.php', 'libs/HTTP.php', 'libs/Server.php'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
# get config values
$Config = Config();
#-------------------------------------------------------------------------------
if (!$Config['Tasks']['Types']['GC']['ISPswCheckLicensesSettings']) {
    return TRUE;
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Settings = SelectServerSettingsByService(51000);
#-------------------------------------------------------------------------------
if (!Is_Array($Settings)) {
    #-------------------------------------------------------------------------------
    Debug(SPrintF('[comp/Tasks/ISPswCheckLicenses]: no configured servers for ISPsw service'));
    #-------------------------------------------------------------------------------
    return TRUE;
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# достаём лицензии с сайта ispsystem
$Doc = BillManager_Get_List_Licenses($Settings);
# проверяем, что вернулось
switch (ValueOf($Doc)) {
    case 'array':
Ejemplo n.º 3
0
/******************************************************************************/
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Args = Args();
#-------------------------------------------------------------------------------
$ServiceID = (int) @$Args['ServiceID'];
$ContractID = (int) @$Args['ContractID'];
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('modules/Authorisation.mod', 'libs/Upload.php', 'libs/Server.php'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$ServerSettings = SelectServerSettingsByService($ServiceID);
#-------------------------------------------------------------------------------
if (!Is_Array($ServerSettings)) {
    $ServerSettings = array('ID' => NULL);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Service = DB_Select('Services', array('ID', 'Name', 'IsActive'), array('UNIQ', 'ID' => $ServiceID));
#-------------------------------------------------------------------------------
switch (ValueOf($Service)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'array':
        #---------------------------------------------------------------------------