Beispiel #1
0
        <title>Oraculum Framework :: <?php 
echo $titulo;
?>
</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="shortcut icon" href="<?php 
echo URL;
?>
public/favicon.ico" type="image/x-icon" title="&Iacute;cone" />
        <link rel="icon" href="<?php 
echo URL;
?>
public/favicon.gif" type="image/gif" />
        <link rel='stylesheet' media='screen' href='<?php 
echo URL;
?>
public/css/geral.css' type='text/css' />
        <link rel='stylesheet' media='screen' href='<?php 
echo URL;
?>
public/css/bootstrap.css' type='text/css' />
    </head>
    <body>
		<div id="all">
<?php 
/*
	Carregando o Elemento Menu (/views/elements/menu.php)
                Um elemento pode ser chamado dentro de outro elemento
*/
Oraculum_Views::LoadElement('menu');
 public static function loadview($view = null, $modulo = "index", $titulo = null, $vars = array())
 {
     if (!defined('PROJECT')) {
         return Oraculum_Views::LoadElement($view);
     } else {
         foreach ($vars as $key => $value) {
             ${$key} = $value;
         }
         if (!is_null($view)) {
             $viewsdir = "./apps/" . PROJECT . "/views/modulos/";
             $viewphp = $viewsdir . $modulo . "/" . $view . ".php";
             $viewshtml = $viewsdir . $modulo . "/" . $view . ".shtml";
             $viewhtml = $viewsdir . $modulo . "/" . $view . ".html";
             if (file_exists($viewshtml)) {
                 include $viewshtml;
                 return true;
             } else {
                 if (file_exists($viewhtml)) {
                     include $viewhtml;
                     return true;
                 } else {
                     if (file_exists($viewphp)) {
                         include $viewphp;
                         return true;
                     } else {
                         return false;
                     }
                 }
             }
         } else {
             return false;
         }
     }
 }
Oraculum_Register::set('titulo', 'Home');
Oraculum_Views::LoadElement('header');
$error = Oraculum_Register::get('error');
if (isset($error)) {
    ?>
    <?php 
    alert($error);
}
?>
<form method="post" action="<?php 
echo URL;
?>
">
    <fieldset>
        <legend>Login</legend>
        <label for="user">
            Usu&aacute;rio: 
        </label>
        <input type="text" name="user" id="user" />
        
        <label for="pass">
            Senha: 
        </label>
        <input type="password" name="pass" id="pass" />
        
        <input type="submit" name="send" id="send" value="Entrar" />
    </fieldset>
</form>
<?php 
Oraculum_Views::LoadElement('footer');