<!DOCTYPE html>
<html lang="es" id="pagina">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Monitor de pedidos</title>
  <link rel="stylesheet" href="css/bootstrap.css">
  <link rel="stylesheet" href="css/estilo.css">
  <link rel="stylesheet" href="css/bootstrap-theme.css">

  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript" src="js/bootstrap.js"></script>
  <script type="text/javascript" src="js/script.js"></script>
</head>
<body style="margin: 0px 10px 0px 10px;">

 
    <div class="container">    
      <div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">  

        <div class="panel panel-info" >
          <div class="panel-heading">
            <div class="panel-title">Genera contraseña base 64</div>
          </div>     
          <div style="padding-top:30px" class="panel-body" >
              <form id="loginform" class="form-horizontal" role="form" method="POST">
                <div style="margin-bottom: 25px" class="input-group">
                  <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                  <input id="login-password" type="password" class="form-control" name="password" placeholder="password" 
                         value="<?php if (isset($_POST['password'])) { echo $_POST['password'];}?>">
                </div>
                <div style="margin-top:10px" class="form-group">
                    <div class="col-sm-12 controls">
                      <button class="btn btn-success" type="submit">Genera contraseña</button>
                    </div>
                </div>
              </form>
          </div>
          <?php 
           if (isset($_POST['password'])) {
            $pass = $_POST['password'];
            $pass = base64_encode($pass);
            $pass = str_replace('=', 'igual', $pass);
            echo "<div class='alert alert-info col-sm-12'>su contraseña es: ".$pass."</div>";
           }
          ?>
        </div>

      </div> 
    </div>

    

</body>
</html>






