<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color">Payment Type List</h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <!-- /.box -->
                <div class="box box-primary">
                    <div class="box-body table-responsive">
                    <?php if(!empty($success)) {?>
                        <div class="alert alert-success alert-dismissable">
                            <i class="fa fa-thumbs-o-up"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                            <h4><?php echo $success;?></h4>
                        </div>
                    <?php }
                    else if(!empty($error)) {?>
                        <div class="alert alert-danger alert-dismissable">
                            <i class="fa fa-thumbs-o-down"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                            <h4><?php echo $error;?></h4>
                        </div>
                    <?php }?>
                        <div class="row">
                            <div class="left-col action-left-col">
                                <?php if (in_array(2, $permission)) {?>
                                    <a href="<?php echo $add_link?>">
                                        <input type="button" class="btn btn-success btn-sm" value="<?php echo $add_btn?>" />
                                    </a>
                                <?php }?>
                            </div>
                        </div>      
                    </div>
                    <div class="box-body table-responsive">
                        <table class="table table-bordered table-striped data_table">
                            <thead>
                                <tr>
                                    <th width="5%">S.No</th>
                                    <th width="20%">Name</th>
                                    <th width="25%">Image</th>
                                    <!--<th width="15%">Status</th>-->
                                    <th width="15%">Archanai Only</th>
                                    <th width="15%">Action</th>
                                </tr>
                            </thead>
                            <tbody>    
                                <?php foreach ($results as $key => $row) :?>
                                    <tr>
                                        <td><?php echo ++ $key;?></td>
                                        <td><?php echo text($row->name);?></td>
                                        <td align="center"><?php echo ($row->img_url != '' && file_exists( DIR_PAY_TYPE . $row->img_url )) ? get_file_preview( DIR_PAY_TYPE . $row->img_url, '', FALSE ) : text('');?></td>
                                        <!--<td><?php echo $row->status_str;?></td>-->
                                        <td><?php echo ($row->menu_id == 2) ? 'Yes' : 'No';?></td>
                                        <td class="td_action">
                                            <?php if (in_array(1, $permission)) {?>
                                                <a class="label btn btn-warning view" href="<?php echo $view_link . $row->id?>">
                                                    <span>View</span>
                                                </a>
                                            <?php }?>
                                            <input type="hidden" name="auto_id" class="auto_id" value="<?php echo $row->id;?>" />
                                            <?php if (in_array(3, $permission)) {?>
                                                <a class="label btn btn-primary edit edit_otp" href="<?php echo $edit_link . $row->id?>" data-otp-ids="<?php echo form_prep(serialize($service_menu_id));?>">
                                                    <span>Edit</span>
                                                </a>
                                            <?php }?>
                                            
                                            <?php #if (in_array(4, $permission)) {?>
                                                <!--<a class="label btn btn-danger pop_up_confirm delete delete_otp" data-confirm="Do you want to delete the God <b><?php echo $row->name;?></b>?" data-href="<?php echo $delete_link . $row->id?>" data-otp-ids="<?php echo form_prep(serialize($service_menu_id));?>">
                                                    <span>Delete</span>
                                                </a>-->
                                            <?php #}?>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div>
        </div>
        
        <!-- Start Modal -->
        <div class="modal fade" id="otp-dialog" role="dialog">
            <div class="modal-dialog">
                <!-- Modal content-->
                <div class="modal-content">

                    <div class="modal-header" style="background-color: #337AB7;">
                        <button type="button" class="close cancel_popup" data-dismiss="modal" style="color: #FFF;">x</button>
                        <h4 class="modal-title" style="color: #FFF;">OTP</h4>
                    </div>
                    <div class="modal-body col-xs-12" style="margin-bottom: 30px; border-bottom: 1px dotted #1ba;">
                        <form name="m">
                            <input type="hidden" class="hidden_id" />
                            <input type="hidden" class="edit_link" data-edit-link="<?php echo $edit_link;?>" />
                            <ul class="error_container" style="display:block;padding-left: 50%;"></ul>
                            <div class="col-xs-12">
                                <div class="col-xs-3">&nbsp;</div>                        
                                <div class="col-xs-1">
                                    <label style="padding-top: 31%;">OTP</label>
                                </div>
                                <div class="col-xs-6">
                                    <input type="text" class="form-control otp_no" name="otp_no" value="" />
                                </div>
                                <div class="col-xs-3">&nbsp;</div>
                            </div>
                        </form>
                    </div>

                    <div class="modal-footer" style="padding-right: 30px;">
                        <button type="button" class="btn btn-primary otp_btn_cancel" data-dismiss="modal"><i class="fa fa-play-circle-o"></i> Later</button>
                        <button type="submit" id="sbmt-btn" class="btn btn-danger"><i class="fa fa-send"></i> Send</button>
                    </div>
                </div>   <!-- Modal Content -->     
            </div> 
        </div> <!-- OTP Dialog -->
        
        <!-- Start Modal -->
        <div class="modal fade" id="warning-dialog" role="dialog">
            <div class="modal-dialog">
                <!-- Modal content-->
                <div class="modal-content">

                    <div class="modal-header" style="background-color: #337AB7;">
                        <button type="button" class="close cancel_popup" data-dismiss="modal" style="color: #FFF;">x</button>
                        <h4 class="modal-title" style="color: #FFF;">Warning: Mis-match module is found</h4>
                    </div>
                    <div class="modal-body col-xs-12" style="margin-bottom: 30px; border-bottom: 1px dotted #1ba;">
                        <form name="m">
                            <input type="hidden" class="correct_url" name="correct_url" /> 
                            <div class="col-xs-12 warning_content"></div>
                        </form>
                    </div>

                    <div class="modal-footer" style="padding-right: 30px;">
                        <button type="submit" id="sbmt-btn" class="btn btn-danger"><i class="fa fa-history"></i> Redirect Now</button>
                        <button type="button" class="btn btn-primary redirect_btn_cancel" data-dismiss="modal"><i class="fa fa-play-circle-o"></i> Later</button>                        
                    </div>
                </div>   <!-- Modal Content -->     
            </div> 
        </div> <!-- Dialog -->
        
    </section><!-- /.content -->
</aside><!-- /.right-side -->
<!-- ./wrapper -->
<script>
$(document).ready(function() {
    $('.file-preview').css('height','25px');
});
</script>