Пример #1
0
$y = intval(substr(strstr($_GET['pos'], '.'), 1));
$area = Mapa::getArea($x, $y);
$scroll = Mapa::getScrollByPos($x, $y);
if (is_null($area)) {
    throw new Exception('Esse hexagono não existe nesse mapa.!');
}
if (count($_POST) > 0) {
    //var_dump($_POST);
    //$x = intval($_POST['x']);
    //$y = intval($_POST['y']);
    try {
        $area->carregarDoPost();
    } catch (Exception $e) {
        $msgerro = $e->getMessage();
    }
    Mapa::alterarEstrutura();
    $msgsuccess = "Dados do mapa gravados com sucesso.";
}
require 'header.php';
if (!is_null($msgerro)) {
    ?>
<div class="row">
    <div class="twelve columns">
        <div class="alert-box alert"><?php 
    echo $msgerro;
    ?>
</div>
    </div>
</div>
<?php 
}