Example #1
0
function step_check($step)
{
    if ($step > 1 && !check_server()) {
        echo "Server check failed. Please re-start installation.";
        exit;
    }
}
Example #2
0
<?php

/**
 * Datawrapper main index
 *
 */
define('DATAWRAPPER_VERSION', '1.10.2');
// must match with package.json
define('ROOT_PATH', '../');
require_once ROOT_PATH . 'vendor/autoload.php';
check_server();
require ROOT_PATH . 'lib/bootstrap.php';
$twig = $app->view()->getEnvironment();
dwInitTwigEnvironment($twig);
require_once ROOT_PATH . 'controller/plugin-templates.php';
require_once ROOT_PATH . 'controller/home.php';
require_once ROOT_PATH . 'controller/login.php';
require_once ROOT_PATH . 'controller/account.php';
require_once ROOT_PATH . 'controller/chart/create.php';
require_once ROOT_PATH . 'controller/chart/edit.php';
require_once ROOT_PATH . 'controller/chart/upload.php';
require_once ROOT_PATH . 'controller/chart/describe.php';
require_once ROOT_PATH . 'controller/chart/visualize.php';
require_once ROOT_PATH . 'controller/chart/data.php';
require_once ROOT_PATH . 'controller/chart/preview.php';
require_once ROOT_PATH . 'controller/chart/embed.php';
require_once ROOT_PATH . 'controller/chart/publish.php';
require_once ROOT_PATH . 'controller/mycharts.php';
require_once ROOT_PATH . 'controller/xhr.php';
require_once ROOT_PATH . 'controller/admin.php';
$app->notFound(function () {
Example #3
0
                                find instructions on how to install it <a
                                    href="http://php.net/manual/en/book.mbstring.php" target="_blank">here.</a></p>
                        </div>
                    </div>
                <?php 
    }
    ?>


                <form method="get" id="installer" name="installer" class="form uniformForm">
                    <input type="hidden" name="step" value="2"/>


                    <div class="actions">
                        <?php 
    if (check_server()) {
        ?>
                            <button type="submit" class="btn btn-quaternary btn-large">>> Continue to Server
                                Configuration
                            </button>&nbsp;&nbsp;<?php 
    }
    ?>
                        <button type="button" onclick="javascript:location.reload(true)"
                                class="btn btn-quaternary btn-large">Refresh
                        </button>
                    </div>
                    <!-- .actions -->

                    <?php 
}
?>
Example #4
0
?>
	<div  id="headerh1" style="width:100%;height:1px">&nbsp;</div>

<?php 
require_once 'ossim_db.inc';
require_once 'ossim_conf.inc';
require_once 'classes/Server.inc';
require_once 'server_get_servers.php';
$ossim_conf = $GLOBALS["CONF"];
$db = new ossim_db();
$conn = $db->connect();
/* get the port and IP address of the server */
$address = $ossim_conf->get_conf("server_address");
$port = $ossim_conf->get_conf("server_port");
echo _("Master server at") . " <b>" . $address . ":" . $port . "</b> " . _("is") . " ";
if (check_server($conn) == true) {
    echo "<font color=\"green\">";
    echo _("UP");
    echo "</font>";
    // Server up
} else {
    echo "<font color=\"red\">";
    echo _("DOWN");
    echo "</font>";
    // Server down
}
echo ".";
//first, get the servers connected; all this servers are "actived"
list($server_list, $err) = server_get_servers($conn);
if ($err != "") {
    echo $err;
Example #5
0
function server_announce()
{
    $server_addr = isset($_POST['server_address']) ? urldecode($_POST['server_address']) : $_SERVER['REMOTE_ADDR'];
    $server_name = isset($_POST['server_name']) ? urldecode($_POST['server_name']) : $server_addr;
    $server_port = isset($_POST['server_port']) ? urldecode($_POST['server_port']) : '30000';
    if (!check_server($server_addr, $server_port)) {
        return error_send("Server Not Found");
    }
    db_connect();
    db_insert($server_name, $server_addr, $server_port);
    db_close();
    txt_send($server_addr);
}
Example #6
0
        $args[$key] = $value;
    }
}
/*
 * Basic log printing function
 */
function print_log($s)
{
    echo strftime("%Y-%m-%d %T") . " {$s}\n";
}
/* Implementation */
$file_split = $args["file-split"];
if ($file_split > 0 && $file_split < $get_max) {
    $file_split = $get_max;
}
$continue = check_server();
if ($continue === true) {
    print_log("Server OK");
    $continue = record_count();
    if ($continue === true) {
        print_log("Record count {$total_count}");
        $continue = open_file();
        if ($continue === true) {
            print_log("Output file {$current_outfile}");
            while ($this_count <= $total_count && $continue === true) {
                print_log('start:' . $this_count . ' get:' . $get_count . ' wait:' . $wait_time);
                if ($record_count >= $file_split && $file_split > 0) {
                    $chunk_count++;
                    close_file();
                    open_file();
                    print_log("Output chunk file {$current_outfile}");