<!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">
    <!------------ Global css  ----------->
    <link rel="stylesheet" href="<?=base_url('assets/css/global.css')?>">
    <!-- Add use css  -->
    <link rel="stylesheet" href="<?=base_url('assets/css/report.css')?>">
    <!----------- Font Awesome icons  ------>
    <link rel="stylesheet" href="<?=base_url('assets/css/all.min.css')?>">
    <!---------- Google Font Roboto  ---------->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
    <title>Event Management System - Report</title>
</head>
<body>
    <div class="landing-page">
        <!------------------------Start  sidebar ------------------->
        <?php echo $this->include('parts/side_menu.php'); ?>
        <!------------------------End sidebar ------------------->
            <div class="content">
                <!-- -----------------Logo ---------------------->
                <header>
                    <img src="<?=base_url('logo.png')?>" style="width:200px;" alt="">
                </header>
                <div class="title">
                    <h2>Report</h2>
                </div>
                <div class="report">
                    <div class="input-panel">
                        <div class="title-panel">
                            <h3>Report</h3>
                        </div>
                        <!------------------------------Start  Form  ------------------------>
                        <form method="post" action="<?=base_url('generate-report')?>">
                            <div class="input-fields">
                    <!--------------------- The First column ---------------->
                                <div class="section-one">
                                    
                                    <label for="Date">Date(From)</label>
                                    <input type="date" id="Date" name="date_from">
                                    <!-- Countries  -->
                                    <label for="country">Country</label>
                                    <select id="country" name ="country">
                                            <option value=""> --- Select Country --- </option>
                                        <?php foreach($countries as $key => $value): ?>
                                            <option <?=((isset($data) && $data['country'] == $value)?(' selected '):(''))?> value="<?=$value?>"><?=$value?></option>
                                      
                                        <?php endforeach; ?>

                                    </select>

                                    <label for="select">Category</label>
                                    <select name="category" id="category">
                                        <option value=""> --- Select Category --- </option>
                                        <?php foreach($category as $cat): ?>
                                        <option <?=(isset($data['category']) && $data['category'] == $cat)?(' selected '):('')?>  value="<?=$cat?>"><?=strtoupper($cat)?></option>
                                        <?php endforeach; ?>
                                    </select>

                                    <label for="select">Event Category</label>
                                    <select name="event_category" id="">
                                        <option value=""> --- Select Event Category --- </option>
                                        <?php foreach($event_category as $category): ?>
                                        <option  <?=(isset($data['event_category']) && $data['event_category'] == $category)?(' selected '):('')?> value="<?=$category?>"><?=ucfirst($category)?></option>
                                    <?php endforeach; ?>
                                    </select>
                                </div>
                    <!--------------------- The second column ---------------->
                                <div class="section-two">
                                    
                                    

                                    <label for="Date">Date(To)</label>
                                    <input type="date" id="Date" name="date_to">
                                    
                                    <label for="designation">Designation</label>
                                        <input type="test" id="designation" name="designation">

                                    <label for="select">Event</label>
                                    <select required name="session_id" id="">
                                        <option value=""> --- Select Event --- </option>
                                        <?php foreach($sessions as $session): ?>
                                        <option value="<?=$session['id']?>"><?=ucfirst($session['title'])?></option>
                                    <?php endforeach; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="submit"><input type="submit" name="submit" value="Generate Report"></div>
                        </form>
                        <!------------------------------End  Form  ------------------------>
                    </div>
                </div>
            </div>
    </div>


    <script src="<?=base_url("assets/Js/main.js")?>"></script>
</body>
</html>