<?php
session_start();
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
    header("Location: login.php");
    exit();
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>chatgpt Tool</title>
    <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="dist/css/adminlte.min.css">
    <style>
        .dashboard-container {
            text-align: center;
            margin: 20px 0;
        }
        .dashboard-link {
            display: inline-block;
            padding: 10px 20px;
            background: #4285F4;
            color: white;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 500;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            transition: all 0.3s;
        }
        .dashboard-link:hover {
            background: #3367D6;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            transform: translateY(-2px);
        }
        .dashboard-link i {
            margin-right: 8px;
        }
    </style>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- Google-style Dashboard Link -->
    <div class="dashboard-container">
        <a href="dashboard.php" class="dashboard-link">
            <i class="fas fa-home"></i> Back to Dashboard
        </a>
    </div>

    <div class="content-wrapper">
        <section class="content">
            <div class="container-fluid">
                <!-- SECTION_START --><!-- SECTION_START -->
                <div class="card card-primary">
                    <div class="card-header">
                        <h3 class="card-title">chatgpt 1 Cookies</h3>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="chatgptUrl">URL</label>
                            <input type="text" class="form-control" id="chatgpt1Url" data-service="chatgpt1" placeholder="URL">
                        </div>
                        <div class="form-group">
                            <label for="chatgptCookies">Cookies</label>
                            <input type="text" class="form-control" id="chatgpt1Cookies" data-service="chatgpt1" placeholder="json">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="button" onclick="saveCookiesData('chatgpt1')" class="btn btn-primary">Save chatgpt Cookies</button>
                        <div id="chatgpt1SuccessMessage" style="display:none;color:green;">chatgpt 1 Cookies saved successfully!</div>
                    </div>
                </div>
                <!-- SECTION_START -->
                <div class="card card-primary">
                    <div class="card-header">
                        <h3 class="card-title">chatgpt 2 Cookies</h3>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="chatgptUrl">URL</label>
                            <input type="text" class="form-control" id="chatgpt2Url" data-service="chatgpt2" placeholder="URL">
                        </div>
                        <div class="form-group">
                            <label for="chatgptCookies">Cookies</label>
                            <input type="text" class="form-control" id="chatgpt2Cookies" data-service="chatgpt2" placeholder="json">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="button" onclick="saveCookiesData('chatgpt2')" class="btn btn-primary">Save chatgpt Cookies</button>
                        <div id="chatgpt2SuccessMessage" style="display:none;color:green;">chatgpt 2 Cookies saved successfully!</div>
                    </div>
                </div>
                <!-- SECTION_START -->
                <div class="card card-primary">
                    <div class="card-header">
                        <h3 class="card-title">chatgpt 3 Cookies</h3>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="chatgptUrl">URL</label>
                            <input type="text" class="form-control" id="chatgpt3Url" data-service="chatgpt3" placeholder="URL">
                        </div>
                        <div class="form-group">
                            <label for="chatgptCookies">Cookies</label>
                            <input type="text" class="form-control" id="chatgpt3Cookies" data-service="chatgpt3" placeholder="json">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="button" onclick="saveCookiesData('chatgpt3')" class="btn btn-primary">Save chatgpt Cookies</button>
                        <div id="chatgpt3SuccessMessage" style="display:none;color:green;">chatgpt 3 Cookies saved successfully!</div>
                    </div>
                </div>
                <!-- SECTION_START -->
                <div class="card card-primary">
                    <div class="card-header">
                        <h3 class="card-title">chatgpt 4 Cookies</h3>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="chatgptUrl">URL</label>
                            <input type="text" class="form-control" id="chatgpt4Url" data-service="chatgpt4" placeholder="URL">
                        </div>
                        <div class="form-group">
                            <label for="chatgptCookies">Cookies</label>
                            <input type="text" class="form-control" id="chatgpt4Cookies" data-service="chatgpt4" placeholder="json">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="button" onclick="saveCookiesData('chatgpt4')" class="btn btn-primary">Save chatgpt Cookies</button>
                        <div id="chatgpt4SuccessMessage" style="display:none;color:green;">chatgpt 4 Cookies saved successfully!</div>
                    </div>
                </div>
                <!-- SECTION_START -->
                <div class="card card-primary">
                    <div class="card-header">
                        <h3 class="card-title">chatgpt 5 Cookies</h3>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="chatgptUrl">URL</label>
                            <input type="text" class="form-control" id="chatgpt5Url" data-service="chatgpt5" placeholder="URL">
                        </div>
                        <div class="form-group">
                            <label for="chatgptCookies">Cookies</label>
                            <input type="text" class="form-control" id="chatgpt5Cookies" data-service="chatgpt5" placeholder="json">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="button" onclick="saveCookiesData('chatgpt5')" class="btn btn-primary">Save chatgpt Cookies</button>
                        <div id="chatgpt5SuccessMessage" style="display:none;color:green;">chatgpt 5 Cookies saved successfully!</div>
                    </div>
                </div>
                <!-- SECTION_END -->
                
                <script src="plugins/jquery/jquery.min.js"></script>
                <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
                <script src="dist/js/adminlte.min.js"></script>
                <script src="dist/js/pages/custom.js"></script>
            </div>
        </section>
    </div>
</div>
</body>
</html>