<?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(' / ');
if ($config && $config->painel){
$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>
<div id="container">
	<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.png', array('alt' => 'Goweb'));?>
	<span class="span_hidden">
	<?php echo Goweb_Version::VERSION ?>
	</span>
	</div>
	<div id="content">
		<div id="frame">
		<?php if (goweb::isOnline()):?>
			<iframe id="frame_goweb" src="http://www.goweb.pt/media/flash/entrada.html" scrolling="no" frameborder="0"  style="width:300px; height:170px; border:none;"></iframe> 
			<?php /* echo $this->htmlFlash($baseUrl . '/admin/media/flash/entrada.swf', array('width' => '100', 'height' => '20','id' => 'entrada', 'align' => 'middle', 'class' => 'flash', 'name' => 'entrada'), array('quality' => 'high', 'wmode' => 'transparent', 'bgcolor' => '#ffffff', 'allowscriptaccess' => 'sameDomain')); */?>
		<?php else:?>
			<?php echo $this->img('/admin/media/images/offline.gif', array('alt' => 'Offline Mode'));?>
		<?php endif;?> 
		</div>
		<div id="login">
			<table border="0" width="100%" cellpadding="1" style="height:100%;">
				<tr>
					<td colspan="3" valign="top">
					<div class="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>
					</td>
				</tr>
				<tr>
					<td colspan="3" height="40">
						<div id="messages_login">
							<?php if ($msg): ?>
                            <div id="messageError_login">
                            <div id="error_login">
                                <div class="img_login"><?php echo $this->img('/admin/media/images/msg_erro.png', array('alt' => '', 'title' => '', 'width' => 24, 'height' => 24, 'border' => 0,));?></div>
                                <div class="msg_login"><?php echo $msg; ?></div>
                            	<script type="text/javascript">new Effect.Pulsate("messageError_login");</script>
                            </div>
                            </div>
							<?php endif?>
						</div>
                        
					</td>
				</tr>
				<tr>
					<td width="40" height="35" align="center"><?php echo $this->img('/admin/media/images/user.png', array('width' => 35, 'height' => 35, 'alt' => 'user'));?></td>
					<td><label> <input name="username" type="text" class="formbox" id="username" onfocus="if(this.value=='<?php echo translateAdmin('Utilizador');?>') { this.value=''; }" onblur="if(this.value=='') { this.value='<?php echo translateAdmin('Utilizador');?>'; }" value="<?php echo translateAdmin('Utilizador');?>" /></label></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td width="40" height="30" align="center"><?php echo $this->img('/admin/media/images/password.png', array('alt' => 'icopass', 'width' => 30, 'height' => 30));?></td>
					<td><label><input name="password" type="password" class="formbox" id="password" onfocus="if(this.value=='<?php echo translateAdmin('Password');?>') { this.value=''; } " onblur="if(this.value=='') { this.value='<?php echo translateAdmin('Password');?>'; }" value="<?php echo translateAdmin('Password');?>" /></label></td>
					<td class="bt"><input type="image" src="<?php echo $baseUrl?>/admin/media/images/entrar.gif" alt="entrar" /></td>
				</tr>
			</table>
		</div>
	</div>
	</form>
	<div style="clear:both"></div>
</div>
<script type="text/javascript">
/* <![CDATA[ */
if (document.getElementById('frame_goweb')) document.getElementById('frame_goweb').allowTransparency="true";
if ($('titulosite_bg')) $('titulosite_bg').setOpacity(0.7);
if ($('noticias_bg')) $('noticias_bg').setOpacity(0.7);
if ($('noticias_bgbranco')) $('noticias_bgbranco').setOpacity(0.9);
/* ]]> */
</script>
</body>
</html>
