コード例 #1
0
ファイル: VPSCreate.comp.php プロジェクト: carriercomm/jbs
#-------------------------------------------------------------------------------
switch (ValueOf($VPSOrder)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'array':
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$VPSServer = new VPSServer();
#-------------------------------------------------------------------------------
$IsSelected = $VPSServer->Select((int) $VPSOrder['ServerID']);
#-------------------------------------------------------------------------------
switch (ValueOf($IsSelected)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'true':
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$VPSScheme = DB_Select('VPSSchemes', '*', array('UNIQ', 'ID' => $VPSOrder['SchemeID']));
#-------------------------------------------------------------------------------
コード例 #2
0
        return TRUE;
    case 'array':
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
foreach ($Servers as $iServer) {
    #-------------------------------------------------------------------------------
    if (!$iServer['Params']['IsUpdateDiskTemplates']) {
        continue;
    }
    #-------------------------------------------------------------------------------
    $VPSServer = new VPSServer();
    #-------------------------------------------------------------------------------
    $IsSelected = $VPSServer->Select((int) $iServer['ID']);
    #-------------------------------------------------------------------------------
    switch (ValueOf($IsSelected)) {
        case 'error':
            return ERROR | @Trigger_Error(500);
        case 'exception':
            return ERROR | @Trigger_Error(400);
        case 'true':
            break;
        default:
            return ERROR | @Trigger_Error(101);
    }
    #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    $Templates = $VPSServer->GetDiskTemplates();
    #-------------------------------------------------------------------------------