Example #1
0
            if (!$MD5) {
                return SPrintF("---\n%s\n---\n", Implode("\n", Array_Slice($__SYSLOG, Count($__SYSLOG) - 20)));
            }
            #-------------------------------------------------------------------------------
            $File = SubStr($File, StrLen(SYSTEM_PATH) + 1);
            #-------------------------------------------------------------------------------
            $Snapshot[SPrintF('MD5%s', MD5(SPrintF('%s-%s', $MD5, MD5($File))))] = $File;
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Files = IO_Files(SPrintF('%s/core', SYSTEM_PATH));
if (Is_Error($Files)) {
    return SPrintF("---\n%s\n---\n", Implode("\n", Array_Slice($__SYSLOG, Count($__SYSLOG) - 20)));
}
#-------------------------------------------------------------------------------
foreach ($Files as $File) {
    #-------------------------------------------------------------------------------
    $MD5 = MD5_File($File);
    if (!$MD5) {
        return SPrintF("---\n%s\n---\n", Implode("\n", Array_Slice($__SYSLOG, Count($__SYSLOG) - 20)));
    }
    #-------------------------------------------------------------------------------
    $File = SubStr($File, StrLen(SYSTEM_PATH) + 1);
    #-------------------------------------------------------------------------------
    $Snapshot[SPrintF('MD5%s', MD5(SPrintF('%s-%s', $MD5, MD5($File))))] = $File;
    #-------------------------------------------------------------------------------
Example #2
0
<?php

#-------------------------------------------------------------------------------
$Folder = SPrintF('%s/hosts/%s', SYSTEM_PATH, HOST_ID);
#-------------------------------------------------------------------------------
$Files = IO_Files($Folder);
if (Is_Error($Files)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
foreach ($Files as $File) {
    #-----------------------------------------------------------------------------
    if (!Preg_Match('/\\.xml/', $File)) {
        continue;
    }
    #-----------------------------------------------------------------------------
    $Sourse = IO_Read($File);
    if (Is_Error($Sourse)) {
        return ERROR | @Trigger_Error(500);
    }
    #-----------------------------------------------------------------------------
    $Out = Str_Replace('path="MenuLeft"', 'path="Menus/Left"', $Sourse);
    #-----------------------------------------------------------------------------
    if ($Out != $Sourse) {
        #---------------------------------------------------------------------------
        $IsWrite = IO_Write($File, $Out, TRUE);
        if (Is_Error($IsWrite)) {
            return ERROR | @Trigger_Error(500);
        }
    }
}
Example #3
0
        #---------------------------------------------------------------------------
        if ($i == $Count) {
            $Td->AddAttribs(array('style' => 'border:1px solid #DCDCDC;'));
        }
        #---------------------------------------------------------------------------
        $Tr->AddChild($Td);
    }
    #-----------------------------------------------------------------------------
    $Table->AddChild($Tr);
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Table);
#-------------------------------------------------------------------------------
foreach ($HostsIDs as $HostsID) {
    #-----------------------------------------------------------------------------
    $Files = IO_Files(SPrintF('%s/styles/%s', SYSTEM_PATH, $HostsID));
    if (Is_Error($Files)) {
        return ERROR | @Trigger_Error(500);
    }
    #-----------------------------------------------------------------------------
    if (Count($Files) < 1) {
        continue;
    }
    #-----------------------------------------------------------------------------
    # Все цвета в стиле
    $Finded = array();
    #-----------------------------------------------------------------------------
    foreach ($Files as $File) {
        #---------------------------------------------------------------------------
        if (Preg_Match('/\\/others\\//', $File)) {
            continue;
Example #4
0
#-------------------------------------------------------------------------------
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Args = Args();
#-------------------------------------------------------------------------------
$Search = (string) @$Args['Search'];
#-------------------------------------------------------------------------------
$Search = "case\\s'xception\\'\\:\n\\s+return\\s\$";
#-------------------------------------------------------------------------------
Header('Content-type: text/plain; charset=utf-8');
#-------------------------------------------------------------------------------
$Files = IO_Files(SYSTEM_PATH);
if (Is_Error($Files)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Count = Count($Files);
#-------------------------------------------------------------------------------
echo SPrintF("Finded %s files\n", $Count);
#-------------------------------------------------------------------------------
echo SPrintF("Search (%s)\n", $Search);
#-------------------------------------------------------------------------------
foreach ($Files as $File) {
    #-----------------------------------------------------------------------------
    $Source = IO_Read($File);
    if (Is_Error($Source)) {
        return ERROR | @Trigger_Error(500);
Example #5
0
function IO_Files($Path, &$Result = array())
{
    /******************************************************************************/
    $__args_types = array('string', 'array');
    #-------------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /******************************************************************************/
    $Files = IO_Scan($Path);
    if (Is_Error($Files)) {
        return ERROR | @Trigger_Error('[IO_Files]: не удалось получить содержимое папки');
    }
    #-------------------------------------------------------------------------------
    foreach ($Files as $File) {
        #-------------------------------------------------------------------------------
        $File = SPrintF('%s/%s', $Path, $File);
        #-------------------------------------------------------------------------------
        if (Is_Dir($File)) {
            #-------------------------------------------------------------------------------
            if (Is_Error(IO_Files($File, $Result))) {
                return ERROR | @Trigger_Error('[IO_Files]: не удалось осуществить рекурсивный вызов');
            }
            #-------------------------------------------------------------------------------
        } else {
            #-------------------------------------------------------------------------------
            if (Is_File($File)) {
                $Result[] = $File;
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    return $Result;
    #-------------------------------------------------------------------------------
}
Example #6
0
<?php

#-------------------------------------------------------------------------------
Header('Content-type: text/plain; charset=utf-8');
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('classes/DOM.class.php'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Files = IO_Files(SPrintF('%s/hosts', SYSTEM_PATH));
if (Is_Error($Files)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$JBsDocPath = SPrintF('%s/jbsdoc', SYSTEM_PATH);
#-------------------------------------------------------------------------------
$IsWrite = IO_Write(SPrintF('%s/Dictionary.js', $JBsDocPath), "\$Dictionary = [];\n", TRUE);
if (Is_Error($IsWrite)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$FilesList = array();
#-------------------------------------------------------------------------------
foreach ($Files as $File) {
    #-----------------------------------------------------------------------------
    if (!Preg_Match('/(.class|.php)$/', $File)) {
        continue;
    }
    #-----------------------------------------------------------------------------
    $Source = IO_Read($File);
    if (Is_Error($Source)) {