Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created December 9, 2011 00:54
Show Gist options
  • Save eminetto/1449567 to your computer and use it in GitHub Desktop.
Save eminetto/1449567 to your computer and use it in GitHub Desktop.
layout.phtml
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h2>Blog do Minetto</h2>
<?php
//mensagens de erro
$session = Zend_Registry::get('session');
if(isset($session->erro))
echo "<p> $session->erro </p>";
unset($session->erro);
?>
<?php echo $this->layout()->content; ?>
<?php
//usuario logado?
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) { ?>
<p><a href="/auth/logout">Sair</a></p>
<?php
}
else {
?>
<p><a href="/auth">Fazer login</a></p>
<?php
}
?>
<p>Copyleft @eminetto</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment