Esempio n. 1
0
<?php

include "../server_header.inc";
//include("../../inc/oauthcheck.php");
$db = new databases();
if ($HTTP_RAW_POST_DATA) {
    $obj = json_decode($HTTP_RAW_POST_DATA);
}
switch ($parts[4]) {
    case "addschema":
        $response = $db->createSchema($_POST['schema']);
        break;
    case "getschemas":
        $response = $db->listAllSchemas($_POST['schema']);
        break;
    case "doesdbexist":
        $response = $db->doesDbExist($parts[5]);
        break;
}
include_once "../server_footer.inc";
Esempio n. 2
0
include 'libs/functions.php';
include 'inc/user_name_from_uri.php';
include 'model/users.php';
include 'model/databases.php';
include 'model/classes.php';
include 'model/wmslayers.php';
include 'model/settings_viewer.php';
// we need to get pw for http authentication
include 'libs/FirePHPCore/FirePHP.class.php';
include 'libs/FirePHPCore/fb.php';
if ($parts[1] == "store" || $parts[1] == "editor") {
    $db = new databases();
    if (!$parts[2]) {
        die("<script>window.location='/?db=false'</script>");
    }
    if ($db->doesDbExist(postgis::toAscii($parts[2], NULL, "_"))) {
        $postgisdb = $parts[2];
    } else {
        die("<script>window.location='/?db=false'</script>");
    }
    include "inc/oauthcheck.php";
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>MapCentia GeoCloud</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description"
          content="Analyze and visualize your data. Use a powerful API for adding maps to your own apps."/>
    <meta name="description"
Esempio n. 3
0
// Check if user is logged in - and redirect if this is not the case
if (!$_SESSION['auth'] || !$_SESSION['screen_name']) {
    die("<script>window.location='/user/login'</script>");
}
include '../header.html';
include '../../conf/main.php';
include '../../libs/functions.php';
include 'model/databases.php';
//print_r($_SESSION);
?>
<!--<p>Hi <?php 
echo $_SESSION['screen_name'];
?>
</p>-->
<?php 
$db = new databases();
if ($db->doesDbExist(postgis::toAscii($_SESSION['screen_name'], NULL, "_"))) {
    echo "<a style='margin-top:40px' href='/store/{$_SESSION['screen_name']}' class='btn btn-large btn-info'>Start MyGeoCloud</a>";
} else {
    echo "<a style='margin-top:40px' href='/createstore' class='btn btn-large btn-info'>Create MyGeoCloud</a>";
    echo "<p>It will take a minute.</p>";
}
?>
</div>
<div class="span4" style="border-left:4px solid #F1F1F1;display: block;height: 250px;margin-top: 0px;padding-left: 40px;padding-top: 40px">
	<h1></h1>
</div>
</div>
</div>
</body>
</html>