Пример #1
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: sergio.ambel
 * Date: 15/06/12
 * Time: 13:22
 */
define('ROOT_PATH', realpath(dirname(__FILE__) . '/../..'));
require_once ROOT_PATH . '/instances/Bootstrap.php';
require_once ROOT_PATH . '/libs/PHPUnit-3.5.0/Text/Template.php';
$instance_name = "common";
// Default.
foreach ($_SERVER['argv'] as $param) {
    if (preg_match('/instances[\\\\|\\/]([^\\\\|^\\/]*)/i', $param, $matches)) {
        $instance_name = $matches[1];
        break;
    }
}
\Sifo\Bootstrap::$instance = $instance_name;
\Sifo\Bootstrap::autoload();
Пример #2
0
        }
    } elseif (!is_writable($_GET['dir'])) {
        if ($_GET['type'] == 'dir') {
            echo 'Directory is not writable! (Check permissions.)';
        } else {
            echo 'File is not writable! (Check permissions.)';
        }
    } else {
        echo 'OK';
    }
    exit;
}
require 'config.php';
define('ROOT_PATH', realpath(dirname(__FILE__) . '/../../..'));
require_once ROOT_PATH . '/instances/Bootstrap.php';
\Sifo\Bootstrap::$instance = 'common';
if (empty($_POST) && !isset($_GET['file'])) {
    $results = array();
    $handler = opendir(SNAPSHOT_DIRECTORY);
    while ($file = readdir($handler)) {
        if ($file != "." && $file != "..") {
            $results[] = $file;
        }
    }
    closedir($handler);
    arsort($results);
    include 'ui/index.html';
    exit;
}
if (!empty($_GET['file'])) {
    $_POST['view_snapshot'] = 0;