예제 #1
0
파일: View.php 프로젝트: rubensm1/hist-dot
 /**
  * Inclue o Template 
  * */
 public function incluirTemplate()
 {
     $vars = $this->vars;
     $vars['page'] = $this->page;
     $vars['name'] = $this->name;
     $this->html = func_include_x('common/template/' . $this->template . '.php', $vars);
 }
예제 #2
0
파일: Utils.php 프로젝트: rubensm1/basic
 /**
  * Inclui Model e Controller de uma classe
  * @param String $classe Nome da classe a ser inserida
  */
 public static function incluirMC($classe)
 {
     $model = 'model/' . ucfirst($classe) . '.php';
     /*cria o caminho para incluir o modelo*/
     $controller = 'controller/' . ucfirst($classe) . 'Controller.php';
     /* cira o caminho para incluir o controle*/
     $errors = "";
     ob_start();
     include_once $model;
     include_once $controller;
     $errors .= ob_get_clean();
     if ($errors) {
         header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
         echo func_include_x('common/template/default.php', ["page" => "common/errors/404.php", "titulo" => "Not Found", "echo" => $errors]);
         exit;
     }
 }
예제 #3
0
<?php

if (isset($requisicao)) {
    if ($requisicao == "panel") {
        ?>
        <div class="panel-heading">Desenho</div>
        <div class="panel-body">
            <button id="botaoIn" class="bt-padrao">Iniciar</button>
            <button id="botaoSt" class="bt-padrao">Parar</button>
            <button id="botaoCl" class="bt-padrao">Limpar</button>
            <hr />
            <input id="botao-check-pontos" checked type="checkbox" class="checkbox-panel"/>
            <label for="botao-check-pontos" style="margin-right: 20px;">Mostrar Pontos</label>
            <?php 
        echo func_include_x("view/home/includes/motores.php", array("requisicao" => "panel"));
        ?>
        </div>
        <?php 
    } else {
        if ($requisicao == "javascript") {
            ?>
 
        <script>
            var iniciado = false;

            $("#botaoIn").click(function () {
                motores.novoMotor(planoPrincipal, new Ponto(0, ESCALA));
            });
            $("#botaoSt").click(function () {
                motores.desligarTudo();
            });
예제 #4
0
파일: index.php 프로젝트: rubensm1/fractal
<script>
    var planoPrincipal = new Plano();
    document.getElementById("palco").appendChild(planoPrincipal.getSVG());
    var caneta = new Ponto(0, ESCALA);
    var pulsante = new Pulsante(INTERVALO_TEMPO_PULSOS);

    $('button.bt-padrao').button().css('width', 110);
    function dimensionar() {
        const H_BARSUP = $(".navbar.navbar-inverse.navbar-fixed-top").height();
        const MARGIN = 10;
        const W = $(window).width() - MARGIN * 3; /*largura da janela menos as margens */
        const H = $(window).height() - H_BARSUP - MARGIN * 2; /*altura da janela, menos a barra superior e margens */

        var table = $('table#area-total-corpo');
        table.find('td').first().css('height', H);
        table.find('td').first().css('width', W * 3 / 10);
        table.find('td').last().css('height', H);
        table.find('td').last().css('width', W * 7 / 10);
    }
    window.onresize = function(){dimensionar()};
    dimensionar();
    
</script>
<?php 
echo func_include_x("view/home/includes/tempo.php", array("requisicao" => "javascript"));
echo func_include_x("view/home/includes/motores.php", array("requisicao" => "javascript", "width" => $width, "height" => $height));
echo func_include_x("view/home/includes/desenho.php", array("requisicao" => "javascript"));
echo func_include_x("view/home/includes/imagem.php", array("requisicao" => "javascript", "width" => $width, "height" => $height));
echo func_include_x("view/home/includes/zoom.php", array("requisicao" => "javascript", "width" => $width, "height" => $height));
예제 #5
0
파일: default.php 프로젝트: rubensm1/basic
            function echo(texto) {
                $("#echo").html($("#echo").html() + texto);
                $("#echo").dialog('open');
            }
            var view = new View();
        </script>

    </head>
    <body>
        <?php 
func_include('common/menu/default.php');
?>

        <div id="conteudo" >
            <?php 
echo func_include_x($page, $GLOBALS['obj']->vars);
?>
        </div>
        <div id="echo" style="display:none;"><?php 
if (isset($echo)) {
    echo $echo;
}
?>
</div>
        <div id="infos" style="display:none;"><?php 
if (isset($infos)) {
    var_dump($infos);
}
?>
</div>
        <div id="errors" style="color: black; display:none;"><?php