<?php
$current_url = current_url();
$meta_tags = $this->common_model->getMetaTitle($current_url);
$header_image = $this->config->item('uploads') . 'header_images/' . $meta_tags['header_image'];
$background_image = $this->config->item('uploads') . 'background_images/' . $meta_tags['background_image'];
?>
<section class="page-heading" <?php if ($meta_tags['header_image'] != '') { ?> style='background-image: url("<?= $header_image ?>");' <?php } ?> >
    <div class="container">
        <h1><?php echo $breadcrumb ?></h1>
        <ol class="breadcrumb">
            <li><a href="<?php site_url() ?>"><i class="fa fa-home"></i></a></li>
            <li class="active"><?php echo $breadcrumb ?></li>
        </ol>
    </div>
</section>  
<section class="MainContent" <?php if ($meta_tags['background_image'] != '') { ?> style='background-image: url("<?= $background_image ?>");' <?php } ?>>
    <div class="container">
        <div class="packagesection">
            <?php
            $i = 1;
            foreach ($package_data as $package) {
                ?>
                <div class="package_block">   
                    <?php echo $package['description'] ?>

                    <p><big>$<?= $package['price'] ?></big> + Taxes</p>
                    <form  method="post" action="<?= site_url('configure-package/' . $package['package_id']) ?>">
                        <div class="form-inline">
                            <label>No of People</label>
                            <input type="number" name="no_of_people" id="no_of_people" placeholder="<?php echo $package['min_order_amount'] ?>" min="<?php echo $package['min_order_amount'] ?>" class="form-control" required><br><br>
                            <input type="submit" name="submit"  value="Configure Package" class="btn btn-primary">
                        </div>   
                    </form>
                </div>
                <?php if ($i % 1 == 0) { ?>
                <?php } ?> 
                <?php
                $i++;
            }
            ?>
            <?php if ($this->session->userdata('packageErrorMessage')) { ?>
                <div class="alert alert-danger">
                    <?= $this->session->userdata('packageErrorMessage') ?>   
                </div>
                <?php
                $this->session->unset_userdata('packageErrorMessage');
            }
            ?> 
        </div>           
    </div>
</section>