<?php
session_start();
if (!isset($_SESSION['username'])) {
    header("Location: login.php");
    exit;
}
?>

<!DOCTYPE html>
<html lang="fa">
<head>
    <meta charset="UTF-8">
    <title>دریافت کد ارجاع</title>
    <link rel="stylesheet" href="add.css">
    <style>
        body {
            font-family: Arial, sans-serif;
            direction: rtl;
            text-align: right;
            margin: 20px;
        }
        h2 {
            color: #333;
        }
        form {
            width: 400px;
            margin: 0 auto;
            background: #f0f0f0;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        label {
            display: block;
            margin-bottom: 10px;
            color: #555;
        }
        input[type="text"], textarea {
            width: calc(100% - 20px);
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 3px;
            font-size: 16px;
            line-height: 1.5;
            resize: vertical;
        }
        input[type="submit"], .back-button {
            background-color: #4CAF50;
            color: white;
            padding: 12px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            float: left;
            margin-left: 10px;
        }
        input[type="submit"]:hover, .back-button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <h2>لطفاً کد ارجاع پرونده را وارد کنید</h2>
    <form action="process_file.php" method="post">
        <label for="reference_code">کد ارجاع:</label>
        <input type="text" id="reference_code" name="reference_code" required>
        <br><br>
        <input type="submit" value="ارسال">
        <button type="button" class="back-button" onclick="window.history.back();">بازگشت</button>
    </form>
</body>
</html>
