<!DOCTYPE html>
<html dir="rtl">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="style.css">
  <title>ساخت md5</title>
</head>

<body>
  <?php include 'layouts/navbar.php'; ?>
  
  <div class="container form-div">
    <br><br><br>
    <h1>سازنده md5</h1>
    <p style="padding-top:8px; color:#ff0000;">به راحتی با ابزار ما md5 بسازید</p>
    <form>
      <div class="form-group form-div">
        <label style="padding: 8px;">وارد کردن متن خود</label>
        <textarea class="form-control border border-primary border-1" name="encode" rows="3"></textarea>
      </div>
      <div class="form-div">
        <button type="submit" class="btn btn-primary">ساخت</button>
      </div>
    </form>
    <br>
    <?php
    // get decode details
    $md5_code = $_GET['encode'];
    
    $en_show = md5($md5_code). "\n";
    echo "<div dir='ltr' class='card text-white bg-dark mb-3' style='width: 100%; text-align: left;'>";
    echo "<div class='card-header'>خروجی</div>";
    echo "<div class='card-body'>";
    echo "<p class='card-text'>$en_show</p>";
    echo "</div>";
    echo "</div>";
    ?>
    <br><br>
    <?php include 'layouts/hero.php'; ?>
    </div>
    <br><br>
    
    <?php include 'layouts/footer.php'; ?>
    <script src="libs/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>

</html>
