예제 #1
0
파일: 1000002.php 프로젝트: carriercomm/jbs
<?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;
#-------------------------------------------------------------------------------
예제 #2
0
파일: 1000014.php 프로젝트: carriercomm/jbs
#-------------------------------------------------------------------------------
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;
#-------------------------------------------------------------------------------
예제 #3
0
파일: Gz.comp.php 프로젝트: carriercomm/jbs
<?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;
    }
}
#-------------------------------------------------------------------------------