<div class="container">
    <div class="row">
        <div class="col-md-2">
            <div class="panel panel-default">
                
                  <!--Left panel heading-->
                <div class="panel-heading">
                    <h3 class="panel-title">My Events</h3>
                </div>
                  
                <!-- Left panel heading -->
                <div class="panel-body">


                    <div class="panel-group" id="accordion">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
                                        Export to PDF
                                    </a>
                                </h4>
                            </div>
                           <div id="collapseOne" class="panel-collapse collapse">
                                <div class="panel-body">

                         <?php echo form_open('event_exporter/create_mypdf_events'); ?>



                                    <div class="form-group">
                                        <div  id="btnMrgn" class="col-sm-8">
                                            <button type="submit" class="btn btn-primary btn-xs">Export
                                                <i class="glyphicon glyphicon-download"></i></button>
                                        </div>
                                    </div>

                                    <?php // echo form_close(); ?>

                                </div>
                            </div>
                        </div>
                    </div>
            </div>
        </div>
    </div> <!--  end of left column -->

        <!--Mid panel heading-->
        <div class="col-md-9 table-responsive">
            <div class="panel panel-default">
                <div class="panel-heading">List of Events
                    <div class="pull-right">
                        <a href="<?php echo base_url(); ?>event/add_listing"><button type="button" class="btn btn-primary btn-xs">Add New Event
                                <i class="glyphicon glyphicon-log-in"></i></button></a>
                    </div>
                </div>

                <!--Mid panel body-->
                <div class="panel-body">
                    <?php if ($this->session->flashdata('Event_updated')) : ?>
                        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('Event_updated'); ?></p>
                    <?php endif; ?>

                    <?php if ($this->session->flashdata('Event_deleted')) : ?>
                        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('Event_deleted'); ?></p>
                    <?php endif; ?>

                    <table class="table table-bordered table-hover table-condensed">
                        <thead>
                            <tr>


                                <th >Start Date</th>
                                <th>End Date </th>
                                <th>Title</th>
                                <th>Edit</th>
                                <th>Delete</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php if (!empty($query)) { ?>
                                <?php foreach ($query as $list) : ?>
                                    <tr>


                                        <td><?php echo $list->startDate; ?></a></td>
                                        <td><?php echo $list->endDate; ?></td>
                                        <td><a href="<?php echo base_url(); ?>event/display_listing/<?php echo $list->eventID; ?>"><?php echo $list->title; ?></a></td>


                                        <td><a href="<?php echo base_url(); ?>event/update_listing/<?php echo $list->eventID; ?>"><i class="glyphicon glyphicon-edit"></i></a></td>
                                       
                                       
                                        
                                        <td><a onClick="return confirm('Are you sure?')" href="<?php echo base_url(); ?>event/delete_listing/<?php echo $list->eventID; ?>"><i style="left: 10px" class="glyphicon glyphicon-trash"></i></a></td>
                                    </tr>
                                <?php endforeach; ?>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
                <!--Mid panel footer-->
                <div class="panel-footer">
                    <div class="row">
                        <div class="col-md-4">

                            <?php if (!empty($start) && !empty($end)) { ?>

                                Showing: <span id="label" class="label"><?php echo $start; ?> to <?php echo $end; ?> of <?php echo $total; ?> entries</span>

                            <?php } ?>
                        </div>
                        <div class="col-md-7 pull-right">
                            <div id ="pgcol" class="pgPaginate" id="paginateInfo">

                            </div>
                        </div>
                    </div>
                </div> <!--end of footer-->

                </div>
        </div>
            </div>
        </div>
    
