<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['confcatID']; ?>" <?php if($category==$c['confcatID']){echo "selected"; } ?>><?php echo $c['confcatName']; ?></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; ?>"  />
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            
                        </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-6">
                                <div class="input-group">
                                    <span class="input-group-addon">Grade</span>
                                    <select class="form-control" required="required" name="grade" readonly>
                                        <option value="">Select Grade</option>
                                        <?php
                                        foreach($grade2 as $g){ ?>
                                        <option value="<?php echo $g['gradeID']; ?>" <?php if($grade==$g['gradeID']){echo "selected"; } ?>><?php echo $g['gradeName']; ?></option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <span class="input-group-addon">Chapter</span>
                                    <select class="form-control" required="required" name="chapter" readonly>
                                        <option value="">Select Chapter</option>
                                        <?php
                                        foreach($state2 as $s){ ?>
                                        <option value="<?php echo $s['stateid']; ?>" <?php if($chapter==$s['stateid']){echo "selected"; } ?>><?php echo $s['state_name']; ?></option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            
                        </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>
                        <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-12">
                                <div class="input-group">
                                    <span class="input-group-addon">Address</span>
                                    <textarea class="form-control" name="address" required="required" rows="5" readonly><?php echo $address; ?></textarea>
                                </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">Postal Code</span>
                                    <input type="number" class="form-control" name="postal" required="required" readonly value="<?php echo $postal; ?>" />
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <span class="input-group-addon">Country</span>
                                    <select class="form-control" required="required" name="country" readonly>
                                        <option value="">Select Country</option>
                                        <?php
                                        foreach($country2 as $co){ ?>
                                        <option value="<?php echo $co['id']; ?>"<?php if($country==$co['id']){echo "selected";} ?>><?php echo $co['value']; ?></option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:10px !important;">
                            <div class="input-group">
                                <span class="input-group-addon">Passport</span>
                                <input type="file" name="passport" required="required" class="form-control" />
                            </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">
                        <?php
                        echo form_open('welcome/printBadge'); ?>
                        <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>    