<?php 
$this->loadJavascript('/admin/media/js/utils.js');
$this->loadJavascript('/admin/media/js/prototype.js');
$this->loadJavascript('/admin/media/js/scriptaculous/scriptaculous.js');
$this->loadJavascript('/admin/media/js/scriptaculous/effects.js');
$this->loadCss('/admin/media/css/login.css');

$this->headScript()->appendScript("var baseUrl = '" . $baseUrl . "';\n");
$config = Goweb::registry('config'); ?>
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $session->lang; ?>" xml:lang="<?php echo $session->lang; ?>">
<head>
<?php $this->headMeta()->appendHttpEquiv('Content-Type',
                                   'text/html; charset=' . CHARSET)
                 ->appendHttpEquiv('Content-Language', 'pt-PT');

// setting the site in the title; possibly in the layout script:
$this->headTitle('Goweb - Sitemanager 5.0');
if (isset($titulo)) $this->headTitle(html_entity_decode($titulo, ENT_NOQUOTES, CHARSET));
// setting a separator string for segments:
$this->headTitle()->setSeparator(' / ');
$this->headMeta($config->painel->meta_copyright, 'copyright');
$this->headMeta($config->painel->meta_keywords, 'keywords');
if (isset($keywords)) $this->headMeta($keywords, 'keywords');
$this->headMeta($config->painel->meta_extra , 'keywords');
$this->headMeta($config->painel->meta_description, 'description');

?>
<?php foreach ($this->getCss() as $css): ?>
<?php $this->headLink()->appendStylesheet($baseUrl . $css) ?>
<?php endforeach; ?>
<?php foreach ($this->getJavascripts() as $javascript): ?>
<?php $this->headScript()->appendFile($baseUrl . $javascript)?>
<?php endforeach; ?>
<?php echo $this->headMeta() ?>
<?php echo $this->headTitle() ?>
<?php echo $this->headLink() ?>
<?php echo $this->headScript() ?>
</head>
<body>
<form action="<?php echo $this->link('/auth/login'); ?>" method="post" name="frmLogin" id="frmLogin">
<div id="logo"><?php echo $this->img('/admin/media/images/logointro.gif', array('alt' => 'Goweb'));?></div>

<div id="titulosite_bg"></div>
<div id="titulosite">Sitemanager 5.0</div>

<div id="messages">
<?php if ($msg): ?>
<div id="error"><?php echo $msg; ?></div>
<script type="text/javascript">new Effect.Pulsate("error");</script>
<?php endif?>
</div>
<div id="login_bg"></div>
<div id="login">
  <table style="width:100%; height:95px; border:0; cellpadding:0; cellspacing:8">
    <tr>
        <td width="55" align="center"><?php echo $this->img('/admin/media/images/icouser.gif', array('width' => 52, 'height' => 36, 'alt' => 'icouser'));?></td>
        <td><label>
            <input name="username" type="text" class="formbox" id="username" onfocus="javascript:if(document.frmLogin.username.value=='<?php echo translateAdmin('Utilizador');?>') { document.frmLogin.username.value=''; }" onblur="if(document.frmLogin.username.value=='') { document.frmLogin.username.value='<?php echo translateAdmin('Utilizador');?>'; }" value="<?php echo translateAdmin('Utilizador');?>" />
        </label></td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td width="55" align="center"><?php echo $this->img('/admin/media/images/icopass.gif', array('alt' => 'icopass', 'width' => 29, 'height' => 28));?></td>
        <td><label>
            <input name="password" type="password" class="formbox" id="password" onfocus="javascript:if(document.frmLogin.password.value=='<?php echo translateAdmin('Password');?>') { document.frmLogin.password.value=''; } " onblur="if(document.frmLogin.password.value=='') { document.frmLogin.password.value='<?php echo translateAdmin('Password');?>'; }" value="<?php echo translateAdmin('Password');?>" />
        </label></td>
        <td><input type="image" src="<?php echo $baseUrl?>/admin/media/images/entrar.gif" alt="entrar" style="align:absmiddle; border:1" /></td>
    </tr>
  </table>
</div>
<div id="txt"><?php echo translateAdmin('O acesso &agrave; &aacute;rea de administra&ccedil;&atilde;o do website <strong>Goweb</strong>, est&aacute;   restrito aos administradores, estando implementados mecanismos de seguran&ccedil;a que   asseguram esta restri&ccedil;&atilde;o, reservando-se ao propriet&aacute;rio o direito de   supervisionar, monitorizar e gravar toda a actividade no sistema com o objectivo   de identificar e localizar tentativas de acesso n&atilde;o autorizadas.');?><br />
  <?php echo translateAdmin('Assim reserva-se o direito de proceder criminalmente contra os individuos ou   organiza&ccedil;&otilde;es que iniciem tentativas de acesso n&atilde;o autorizadas.');?></div>
</form>
</body>
</html>
