<?php

namespace PHPMaker2021\rdigital21;

use PHPMaker2021\rdigital21\{UserProfile, Language, AdvancedSecurity, Timer, HttpErrorHandler};
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Container\ContainerInterface;
use DI\Container as Container;
use DI\ContainerBuilder;
use Selective\SameSiteCookie\SameSiteCookieConfiguration;
use Selective\SameSiteCookie\SameSiteCookieMiddleware;
use Selective\SameSiteCookie\SameSiteSessionMiddleware;
use Slim\Factory\AppFactory;
use Slim\Factory\ServerRequestCreatorFactory;
use Slim\Exception\HttpInternalServerErrorException;
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7Server\ServerRequestCreator;

// Relative path
$RELATIVE_PATH = "../";

// Require files
require_once "../vendor/autoload.php";
require_once "../src/constants.php";
require_once "../src/config.php";
require_once "../src/phpfn.php";
require_once "../src/userfn.php";
?>

<head>
    <link rel="stylesheet" href="../adminlte3/css/adminlte.css">
    <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="../css/OverlayScrollbars.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/animate.css">
    <link rel="stylesheet" href="../css/rdigital21.css">
</head>

<body class="bg-dark">
    <div class="container p-5 bg-dark">
        <center>
            <div class="card" style="width: 40rem; zoom:150%;">
                <div class="card-body">
                    <?php
                    $logo = ExecuteScalar("SELECT datetime FROM sekolah");
                    if (isset($_GET['ktp'])) {
                        $ktp = $_GET['ktp'];
                        $nis = $_GET['nis'];
                    ?>
                        <form action="pdf.php">
                            <input type="hidden" name="ktp" id="ktp" value="<?= $ktp ?>">
                            <input type="hidden" name="nis" id="nis" value="<?= $nis ?>">
                            <select class="form-control w-100" name="p" id="p" required>
                                <option value="">Pilih Format Rapor...</option>
                                <option value="rapor1">RAPOR MAPEL UMUM</option>
                                <option value="rapor2">RAPOR MAPEL KHUSUS</option>
                            </select>
                            <div class="pt-2">
                                <input class="btn btn-primary btn-lg w-100" type="submit" value="Cetak">
                            </div>
                        </form>
                    <?php } ?>
                </div>
            </div>
        </center>
    </div>
</body>