コード例 #1
0
ファイル: s3upload.php プロジェクト: lucasRolff/webpagetest
function BuildFileList($dir, &$files)
{
    global $dat_files;
    $entries = scandir($dir);
    if (isset($entries) && is_array($entries)) {
        foreach ($entries as $entry) {
            $path = "{$dir}/{$entry}";
            if (is_dir($path)) {
                if ($entry != '.' && $entry != '..') {
                    BuildFileList($path, $files);
                }
            } elseif (is_file($path)) {
                $path_parts = pathinfo($path);
                if ($path_parts['extension'] == 'dat') {
                    ProcessDatFile($path, $files);
                    $pos = strpos($path, 'installers/');
                    if ($pos > 0) {
                        $dat_files[] = substr($path, $pos);
                    }
                }
            }
        }
    }
}
コード例 #2
0
ファイル: lookforbadguys.php プロジェクト: ap0110/DarkArts
function FindAndProcessFiles($StartDir, $FileMatchRegexes, $FullpathExcludeRegexes, $FileHandlerFunction)
{
    global $AllFilesToProcess;
    ResetCounts();
    BuildFileList($StartDir, $FileMatchRegexes, $FullpathExcludeRegexes);
    sort($AllFilesToProcess, SORT_STRING);
    foreach ($AllFilesToProcess as $filename) {
        call_user_func($FileHandlerFunction, $filename);
    }
    ShowCounts();
}
コード例 #3
0
ファイル: configuration.php プロジェクト: paragm/openDCIM
            $p->execute();
        }
    }
    exit;
}
// make list of department types
$i = 0;
$classlist = "";
foreach ($config->ParameterArray["ClassList"] as $item) {
    $classlist .= $item;
    if ($i + 1 != count($config->ParameterArray["ClassList"])) {
        $classlist .= ", ";
    }
    $i++;
}
$imageselect = BuildFileList();
function formatOffset($offset)
{
    $hours = $offset / 3600;
    $remainder = $offset % 3600;
    $sign = $hours > 0 ? '+' : '-';
    $hour = (int) abs($hours);
    $minutes = (int) abs($remainder / 60);
    if ($hour == 0 and $minutes == 0) {
        $sign = ' ';
    }
    return 'GMT' . $sign . str_pad($hour, 2, '0', STR_PAD_LEFT) . ':' . str_pad($minutes, 2, '0');
}
$regions = array();
foreach (DateTimeZone::listIdentifiers() as $line) {
    $pieces = explode("/", $line);
コード例 #4
0
ファイル: install.php プロジェクト: spezialist1/openDCIM
    $path = './images';
    $dir = scandir($path);
    foreach ($dir as $i => $f) {
        if (is_file($path . DIRECTORY_SEPARATOR . $f) && round(filesize($path . DIRECTORY_SEPARATOR . $f) / 1024, 2) >= 4 && $f != "serverrack.png" && $f != "gradient.png") {
            $imageinfo = getimagesize($path . DIRECTORY_SEPARATOR . $f);
            if (preg_match('/^image/i', $imageinfo['mime'])) {
                $imageselect .= "<span>{$f}</span>\n";
            }
        }
    }
    $imageselect .= "</div>";
    return $imageselect;
}
// AJAX Requests
if (isset($_GET['fl'])) {
    echo BuildFileList();
    exit;
}
if (isset($_POST['fe'])) {
    echo is_file($_POST['fe']) ? 1 : 0;
    exit;
}
if (isset($_POST['cc'])) {
    // Cable color codes
    $col = new ColorCoding();
    $col->Name = trim($_POST['cc']);
    $col->DefaultNote = trim($_POST['ccdn']);
    if (isset($_POST['cid'])) {
        // If set we're updating an existing entry
        $col->ColorID = $_POST['cid'];
        if (isset($_POST['original'])) {