<div class="container">
    <div class="row">
        <div class="col-md-2">
            <div class="panel panel-default">
                
                <div class="panel-heading">
                    <h3 class="panel-title">Marketplace - Events</h3>
                </div>

                <!--Left panel heading-->
                <div class="panel-body">
                    <ul class="nav nav-pills nav-stacked">

                    </ul>


                    <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_pdf_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>

        <!--Mid panel heading-->
        
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">

                    <p>Publishing companies, academic institutions including International Aircraft Engine Institution, corporations within the value chain can utilize this medium to publicize trade and academic events and new release. These organizations can load the brochure of their events or full text of their news release. The event listing will be shared through a regular newsletter to the member companies and individuals.</p>

                </div>
            </div>
        </div>
        
        <div class="col-md-9 table-responsive">
            <div class="panel panel-default">
                <div class="panel-heading">List of Events
                    <div class="pull-right">


                    </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; ?>
                        
                        <?php
                $attributes1 = array(
                    'class' => 'form-horizontal',
                    'id' => 'submit1'
                );
                ?>
                        
                        <?php echo form_open('event/search', $attributes1); ?>
                        
                         <span class="msgF pull-right">* required field.</span>
                        
                        <div class="form-group">           
                        <label for="column" class="col-sm-1 control-label">Search By:</label>
                        <div class="col-sm-3">

                            <select name="column_dropdown" id="column_dropdown" class="form-control">
                                <option value="--Select Column--" <?php if (!empty($_REQUEST['column_dropdown']) && $_REQUEST['column_dropdown'] == '--Select Column--') echo 'selected'; ?>>--Select Column--</option>
                                <option value="city" <?php if (!empty($_REQUEST['column_dropdown']) && $_REQUEST['column_dropdown'] == 'city') echo 'selected'; ?>>City</option>
                                <option value="state" <?php if (!empty($_REQUEST['column_dropdown']) && $_REQUEST['column_dropdown'] == 'state') echo 'selected'; ?>>State</option>
                                <option value="country" <?php if (!empty($_REQUEST['column_dropdown']) && $_REQUEST['column_dropdown'] == 'country') echo 'selected'; ?>>Country</option>
                                <option value="title" <?php if (!empty($_REQUEST['column_dropdown']) && $_REQUEST['column_dropdown'] == 'title') echo 'selected'; ?>>Title</option>
                            
                            </select>
                        </div>
                        <div class="col-sm-1">
                            <span class="error2">*</span>
                        </div>

                    </div>
                        
                    <div class="form-group">           
                        <label for="searchfield" class="col-sm-1 control-label">Criteria:</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="search_field" name="search_field" autocomplete="off" value="<?php echo set_value('search_field'); ?>" placeholder="Criteria">
                        
                        
                        </div>
                        <div class="col-sm-1">
                            <span class="error2">*</span>
                        </div>

                    </div>
                       

                          <div class="form-group"> 
                        <div class="col-sm-offset-1 col-sm-10">
                            <a href="<?php echo base_url(); ?>event/search"><button type="submit" class="btn btn-primary btn-xs">Search
                            
                                <i class="glyphicon glyphicon-search"></i></button></a>
                                
                        </div>
                          </div>
                       
                   
               <?php echo form_close(); ?>

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


                                <th >Title</th>
                                <th >Event Dates</th>
                                <th>City</th>
                                <th>State</th>
                                <th>Country</th>

                            </tr>
                        </thead>
                        <tbody>
                            <?php if (!empty($query)) { ?>
                                <?php foreach ($query as $list) : ?>
                                    <tr>


                                        <td><a href="<?php echo base_url(); ?>event/display_listingM/<?php echo $list->eventID; ?>"><?php echo $list->title; ?></a></td>
                                        <td><?php echo $list->startDate ?> to <?php echo $list->endDate ?></a></td>
                                        <td><?php echo $list->city; ?></a></td>
                                        <td><?php echo $list->state; ?></td>
                                        <td><?php echo $list->country; ?></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>


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