<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Girafa CMS</title>

<link href="<?= $cms->GetAdminStyleSheetUrl(); ?>reset.css" rel="stylesheet" type="text/css" />
<link href="<?= $cms->GetAdminStyleSheetUrl(); ?>login.css" rel="stylesheet" type="text/css" />
<link href="<?= $cms->GetAdminJavaScriptUrl(); ?>jquery.ui//nbrazil-cms/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" />

<!-- Plugins Jquery -->
<script src="<?= $cms->GetAdminJavaScriptUrl(); ?>jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="<?= $cms->GetAdminJavaScriptUrl(); ?>login.js" type="text/javascript"></script>

</head>
<body>

<div id="box">

    <?php
    //verifica se tem logo customizada no tema...
    $customlogo_path = get_config('ROOT_PATH') . 'custom/logo-login.png';
    $customlogo_url = get_config('ROOT_URL') . 'custom/logo-login.png';
    if(file_exists($customlogo_path)){
        ?>
        <div id="logo" style="background-image: url('<?= $customlogo_url; ?>');"></div>
        <?php
    } else {
        ?>
        <div id="logo"></div>
        <?php
    }
    ?>

  <div id="painel">
  <?php
  $hub->SetParam('_script', $ADMIN_PAGES_PATH . 'login.script.login.php');
  ?>
    <form id="login" action="<?= $hub->GetUrl() ?>" enctype="multipart/form-data" method="post">


      <?php

      $mail = $hub->GetParam('mail');

      if(empty($mail))
        $mail = (isset($_COOKIE['login_mail'])?$_COOKIE['login_mail']:null);


      ?>
        <input name="mail" type="text" value="<?= $mail; ?>" required />
        <input name="password" maxlength="20" type="password" required />
      <input name="" id="btn" type="image" src="<?= $ADMIN_IMAGES_URL; ?>login.svg" />
    </form>
    <?php

    if($hub->ExistParam('msg')){
    ?>
    <span id="msg"><?= $hub->GetParam('msg'); ?></span>
    <?php
    }
    ?>
  </div>
</div>

<div id="rodape">Este site é administrado pelo CMS <a href="http://www.zbraestudio.com.br" target="_blank">Girafa</a>, na <b>versão <?= $cms->GetVersion(); ?></b></div>
</body>
</html>