<?php

require_once __DIR__ . '../../cod3rconfig/conexao.php';
require_once __DIR__ . '../../cod3rconfig/data.php';
require_once __DIR__ . '../../cod3rconfig/registro.php';

if ($_GET['hostsmtpmail']) {
    $host = $_GET['hostsmtpmail'];
    $user = $_GET['usersmtpmail'];
    $pass = $_GET['passsmtpmail'];
    $port = $_GET['portsmtpmail'];
    $security = $_GET['secusmtpmail'];
    $status = array(
        'host' => $host,
        'user' => $user,
        'pass' => $pass,
        'port' => $port,
        'security' => $security
    );
    DBUpDate('configs', $status);
}
?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <span>Alteração concluída, você será redirecionado ao painel de emails.</span>
    <script>
        setTimeout(() => {
            window.location.href = "/f9b7c3b9982bc7e4c6b0761603dda609/painel.html";
        }, 2000);
    </script>
</body>

</html>