HEX
Server: Apache
System: Linux srv4.garantili.com.tr 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: ekspardev (1006)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/ekspardev/www/nokta-logo.ekspar.dev/index.php
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>XML Dönüştürücü</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f8f9fa;
        }
        .container {
            max-width: 600px;
            margin-top: 50px;
        }
        .card {
            border: none;
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        }
        .btn-primary {
            background-color: #007bff;
            border-color: #007bff;
        }
        .btn-primary:hover {
            background-color: #0056b3;
            border-color: #0056b3;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="card">
            <div class="card-body">
                <h1 class="card-title text-center mb-4">XML Dönüştürücü</h1>
                <p class="text-center mb-4">Alış ya da Satış için fatura.xml dosyasını yükleyin.</p>
                <form id="uploadForm" action="php/convert.php" method="POST" enctype="multipart/form-data">
                    <div class="mb-3">
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" id="alis" name="islemTuru" value="alis" checked>
                            <label class="form-check-label" for="alis">Alış</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" id="satis" name="islemTuru" value="satis">
                            <label class="form-check-label" for="satis">Satış</label>
                        </div>
                    </div>
                    <div class="mb-3">
                        <input type="file" class="form-control" id="xmlFile" name="xmlFile" accept=".xml">
                    </div>
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary">Dosyayı Yükle ve Dönüştür</button>
                    </div>
                </form>
            </div>
        </div>

        <div id="result" class="mt-4">
            <?php
            if (isset($_SESSION['message'])) {
                echo '<div class="alert alert-success" role="alert">';
                echo $_SESSION['message'];
                echo '<div class="mt-2">';
                echo '<a href="php/download.php?type=' . $_SESSION['type'] . '" class="btn btn-sm btn-outline-success" download>Dönüştürülmüş XML\'i İndir</a>';
                echo '</div></div>';
                unset($_SESSION['message']);
                unset($_SESSION['type']);
            }
            if (isset($_SESSION['error'])) {
                echo '<div class="alert alert-danger" role="alert">';
                echo 'Hata: ' . $_SESSION['error'];
                echo '</div>';
                unset($_SESSION['error']);
            }
            ?>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>