<div class="container">

        <!-- Marketing Icons Section -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">
                    Welcome to NIQS Conference 2015 Online Registration
                </h1>
            </div>
            <div class="col-md-8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4><i class="fa fa-fw fa-check"></i>Confirm Details</h4>
                    </div>
                    <div class="panel-body">
                        <?php echo form_open_multipart('welcome/insertDetails'); ?>
                        <div class="row" style="margin-bottom:10px !important;">
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <span class="input-group-addon">Select Category</span>
                                    <select class="form-control" required="required" name="category" readonly>
                                        <option value="">Select Category</option>
                                        <?php
                                        foreach($categories as $c){ ?>
                                        <option value="<?php echo $c['cat_id']; ?>" <?php if($category==$c['cat_id']){echo "selected"; } ?>><?php echo $c['cat_name']; ?></option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <span class="input-group-addon">NIQS Membership Number</span>
                                    <input type="text" class="form-control" name="niqsNo" id="niqsNo" 
                                    value="<?php echo $niqsNo; ?>" readonly  />
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <span class="input-group-addon">Full Name</span>
                                    <input type="text" class="form-control" required="required" name="names" readonly value="<?php echo $names; ?>" />
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <span class="input-group-addon">Phone</span>
                                    <input type="number" name="phone" required="required" class="form-control" readonly value="<?php echo $phone; ?>" />
                                </div>
                            </div>
                            <div class="col-sm-8">
                                <div class="input-group">
                                    <span class="input-group-addon">Email Address</span>
                                    <input type="email" class="form-control" name="email" required="required" readonly value="<?php echo $email; ?>" />
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <span class="input-group-addon">Company</span>
                                    <input type="text" class="form-control" name="company" required="required" readonly value="<?php echo $company; ?>" />
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                           <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon">Location</span>
                                <select name="location" class="form-control">
                                <option value="">Select...<?= $location; ?></option>
                                <option value="abeokuta"<?php if($location=='abeokuta'){echo "selected"; } ?>>Abeokuta</option>
                                <option value="abuja"<?php if($location=='abuja'){echo "selected"; } ?>>Abuja</option>
                                <option value="bauchi" <?php if($location=='bauchi'){echo "selected"; } ?>>Bauchi</option>
                                <option value="edo" <?php if($location=='edo'){echo "selected"; } ?>>Edo</option>
                                <option value="enugu" <?php if($location=='enugu'){echo "selected"; } ?>>Enugu</option>
                                <option value="kano" <?php if($location=='kano'){echo "selected"; } ?>>Kano</option>
                                </select>
                            </div>
                        </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            <div class="col-sm-4">
                                <input type="submit" class="btn btn-danger" value="Back" onclick="window.history.back();" />   <input type="submit" class="btn btn-primary" value="Make Payment" />
                            </div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4><i class="fa fa-fw fa-compass"></i>Print Badge</h4>
                    </div>
                    <div class="panel-body">
                        <ul class="list-group">
                        <li class="list-group-item"><strong>Instructions</strong></li>
                        <li class="list-group-item">Enter your transaction id or application number below</li>
                        <li class="list-group-item">Recommended Browser for printing is Google Chrome and Firefox</li>
                        <li class="list-group-item">You must enable background image in your browser before printing. If using Firefox Browser, enable background image in the option settings of the browser</li>
                        
                        
                    </ul>
                        <?php
                        $form=array('target'=>'_new');
                        echo form_open('welcome/printBadge',$form); ?>
                        <div class="input-group" style="margin-bottom:10px !important;">
                            <span class="input-group-addon">Transaction ID</span>
                            <input type="number" required="required" name="transactionID" class="form-control" />
                                   
                        </div>
                        <div class="input-group">
                            
                            <input type="submit" name="submit" class="btn btn-success" />
                                   
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>
            </div>
            <script>
            $(document).ready(function(){
                $("#niqsNo").change(function(){
                    var niqsNo=$("#niqsNo").val();
                    dis_url = <?php echo "'" . site_url('welcome/getMemberDetails') . "'"; ?> + '/' + niqsNo;
                    $.ajax({
                        url: dis_url,
                        type: 'GET',
                        dataType:'json',
                        success: function(data){
                            alert("Success:"+data.memberName);
                            
                        },
                        error: function(data){
                            alert("Error:"+data);
                            console.log("Error:"+data);
                        }
                    })
                })
            })
            </script>    