Esempio n. 1
0
<?php

#-------------------------------------------------------------------------------
$Enclosures = DB_Select('ContractsEnclosures', '*');
#-------------------------------------------------------------------------------
switch (ValueOf($Enclosures)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        # No more...
        break;
    case 'array':
        #---------------------------------------------------------------------------
        foreach ($Enclosures as $Enclosure) {
            #-------------------------------------------------------------------------
            if (@GzUnCompress($Enclosure['Document']) !== FALSE) {
                continue;
            }
            #-------------------------------------------------------------------------
            $IsUpdate = DB_Update('ContractsEnclosures', array('Document' => GzCompress($Enclosure['Document'])), array('ID' => $Enclosure['ID']));
            if (Is_Error($IsUpdate)) {
                return ERROR | @Trigger_Error(500);
            }
        }
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
return TRUE;
#-------------------------------------------------------------------------------
Esempio n. 2
0
#-------------------------------------------------------------------------------
switch (ValueOf($MotionDocuments)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        # No more...
        break;
    case 'array':
        #---------------------------------------------------------------------------
        foreach ($MotionDocuments as $MotionDocument) {
            #-------------------------------------------------------------------------
            $Document = $MotionDocument['Document'];
            #-------------------------------------------------------------------------
            if (!$Document) {
                continue;
            }
            #-------------------------------------------------------------------------
            $Document = @GzUnCompress($Document);
            #-------------------------------------------------------------------------
            $IsUpdate = DB_Update('MotionDocuments', array('Link' => $Document), array('ID' => $MotionDocument['ID']));
            if (Is_Error($IsUpdate)) {
                return ERROR | @Trigger_Error(500);
            }
        }
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
return TRUE;
#-------------------------------------------------------------------------------
Esempio n. 3
0
<?php

#-------------------------------------------------------------------------------
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('Value');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
if (strlen($Value) < 5) {
    return $Value;
} else {
    if (@GzUnCompress($Value)) {
        return GzUnCompress($Value);
    } else {
        return $Value;
    }
}
#-------------------------------------------------------------------------------