<style type="text/css">
    .page-body {
        overflow: hidden;
    }
</style>
<script type="text/javascript">
    $(document).ready(function(){
        var catlinesused = $('#catlinecount');
        $('#categories').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            catlinesused.text(newLines);
        });
        var barcodelinesused = $('#barcodelinecount');
        $('#barcode').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            barcodelinesused.text(newLines);
        });
        var productlinesused = $('#productlinecount');
        $('#product').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            productlinesused.text(newLines);
        });
        var buypricelinesused = $('#buypricelinecount');
        $('#buyprice').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            buypricelinesused.text(newLines);
        });
        var sellpricelinesused = $('#sellpricelinecount');
        $('#sellprice').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            sellpricelinesused.text(newLines);
        });
        var pcatlinesused = $('#pcatlinecount');
        $('#category').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            pcatlinesused.text(newLines);
        });

        var stockproductlinesused = $('#stockproductlinecount');
        $('#stockproduct').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            stockproductlinesused.text(newLines);
        });
        var stocklinecount = $('#stocklinecount');
        $('#stockquantity').keydown(function(e) {
            newLines = $(this).val().split("\n").length;
            stocklinecount.text(newLines);
        });
    });
</script>


<!-- Page Content -->
<div class="page-content">

    <!-- Page Header -->
    <div class="page-header position-relative">
        <div class="header-title">
            <h1>
              <?php echo $this->lang->line("BULKLOADDATA"); ?>
          </h1>
      </div>
      <!--Header Buttons-->
      <div class="header-buttons">
        <a class="sidebar-toggler" href="#">
            <i class="fa fa-arrows-h"></i>
        </a>
        <a class="refresh" id="refresh-toggler" href="">
            <i class="glyphicon glyphicon-refresh"></i>
        </a>
        <a class="fullscreen" id="fullscreen-toggler" href="#">
            <i class="glyphicon glyphicon-fullscreen"></i>
        </a>
    </div>
    <!--Header Buttons End-->
</div>
<!-- /Page Header -->
<!-- Page Body -->
<div class="page-body" id="resources">

    
    <?php if ($this->session->flashdata('msgt') == 'E') { ?>
    <div class="alert alert-success">

        <a href="#" class="close" data-dismiss="alert">&times;</a>

       <?php echo $this->session->flashdata('msg'); $this->session->unset_userdata('msg');?>
    </div>
      <?php } 

      if($this->session->flashdata('msgt') == 'S') { ?>
    <div class="alert alert-success">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
       <?php echo $this->session->flashdata('msg'); $this->session->unset_userdata('msg');?>
       <?php  if($this->session->flashdata('duplicatemsg')) { ?>
            <?php echo $this->session->flashdata('duplicatelabel'); $this->session->unset_userdata('duplicatelabel');?>
            <div id="confirmmodal" class="modal fade" role="dialog">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                        </div>
                        <div class="modal-body" style="max-height: 400px;overflow: auto;">
                            <p>
                                <?php echo $this->session->flashdata('duplicatemsg'); $this->session->unset_userdata('duplicatemsg');?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        <?php } ?>
    </div>
      <?php } ?>
            <div class="myform-outer3">
                <div class="myform">
                    <form action="<?php echo base_url();?>settings/bulkload/loadcategory" method="post">
                    <div class="row">
                        <div class="col-md-12">
                            <h2><?php echo $this->lang->line("CATEGORIES"); ?></h2>
                            <div style="color:green"><?php echo $this->lang->line("LINES"); ?>: <span id="catlinecount">0</span></div>
                            <textarea name="categories" id="categories" rows="10" cols="50"
                                      placeholder="<?php echo $this->lang->line("ENTERCATEGORYNAMELINEBYLINE"); ?>" 
                                      class="form-textarea form-control form-group"></textarea>
                            <input type="submit"  align="center" value="<?php echo $this->lang->line("SAVE"); ?>" class="btn btn-info" name="submit">
                        </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- end id-form  -->
    
      
            <!-- start id-form -->
            <div class="myform-outer3">
                <div class="myform">
                    <form action="<?php echo base_url();?>settings/bulkload/loadproduct" method="post">
                        <div >
                          
                                        <h2><?php echo $this->lang->line("PRODUCTS"); ?></h2>
                                          <div class="row">
                                        <div class="col-md-2 col-sm-6">
                                            <?php echo $this->lang->line("BARCODE"); ?>
                                            <div style="color:green"><?php echo $this->lang->line("LINES"); ?>: <span id="barcodelinecount">0</span>
                                        </div>
                                        <textarea name="barcode" id="barcode" rows="10" cols="20"
                                                  placeholder="<?php echo $this->lang->line("ENTERBARCODELINEBYLINE"); ?>" class="form-control"></textarea>
                                         </div>
                                          <div class="col-md-3 col-sm-6">
                                            <?php echo $this->lang->line("NAME"); ?><div style="color:green">
                                            <?php echo $this->lang->line("LINES"); ?>: <span id="productlinecount">0</span></div>
                                            <textarea name="product" id="product" rows="10" cols="50"
                                                placeholder="<?php echo $this->lang->line("ENTERPRODUCTNAMELINEBYLINE"); ?>"
                                                class="form-control form-group"></textarea>  
                                          </div>
                                         <div class="col-md-2 col-sm-6">
                                             <?php echo $this->lang->line("BUYPRICE"); ?><div style="color:green">
                                             <?php echo $this->lang->line("LINES"); ?>: <span id="buypricelinecount">0</span></div>
                                         <textarea name="buyprice" id="buyprice" rows="10" cols="20"
                                                   placeholder="<?php echo $this->lang->line("ENTERBUYPRICELINEBYLINE"); ?>" class="form-control form-group"></textarea>
                                         </div>
                                        <div class="col-md-2 col-sm-6"><?php echo $this->lang->line("SELLPRICE"); ?><div style="color:green">
                                            <?php echo $this->lang->line("LINES"); ?>: <span id="sellpricelinecount">0</span></div>
                                        <textarea name="sellprice" id="sellprice" rows="10" cols="20" 
                                                  placeholder="<?php echo $this->lang->line("ENTERSELLPRICELINEBYLINE"); ?>" class="form-control form-group"></textarea>
                                        </div>
                                        <div class="col-md-3 col-sm-6"><?php echo $this->lang->line("CATEGORY"); ?><div style="color:green">
                                            <?php echo $this->lang->line("LINES"); ?>: <span id="pcatlinecount">0</span></div>
<textarea name="category" id="category" rows="10" cols="50" placeholder="<?php echo $this->lang->line("ENTERCATEGORYNAMELINEBYLINE"); ?>" class="form-control form-group"></textarea>
                                        </div>
                                        </div>
                            <input type="submit"  align="center" value="<?php echo $this->lang->line("SAVE"); ?>" class="btn btn-info" name="submit">
                        </div>
                    </form>

                </div>
            </div>
            <!-- end id-form  -->


            <!-- start id-form -->
            <div class="myform-outer3">
                <div class="myform">
                    <form action="<?php echo base_url();?>settings/bulkload/loadstock" method="post">
                        <h2><?php echo $this->lang->line("STOCK"); ?></h2>
                        <div class="row">   
                            <div class="col-md-6 col-sm-6">
                                <?php echo $this->lang->line("BARCODE"); ?><div style="color:green"><?php echo $this->lang->line("LINES"); ?>:
                                <span id="stockproductlinecount">0</span></div>
                                <textarea class="form-control form-group" name="stockproduct" id="stockproduct"
                                    rows="10" cols="50" placeholder="<?php echo $this->lang->line("ENTERBARCODELINEBYLINE"); ?>"></textarea>
                            </div>
                            <div class="col-md-6 col-sm-6">
                                <?php echo $this->lang->line("QTY"); ?><div style="color:green"><?php echo $this->lang->line("LINES"); ?>: <span id="stocklinecount">0</span></div>
                                <textarea class="form-control form-group" name="stockquantity" id="stockquantity"
                                    rows="10" cols="20" placeholder="<?php echo $this->lang->line("ENTERQUANTITYLINEBYLINE"); ?>"></textarea>
                            </div>
                            </div>
                            <input type="submit"  align="center" value="<?php echo $this->lang->line("SAVE"); ?>" class="btn btn-info" name="submit">
                        </div>
                    </form>

                </div>
            </div>
            <!-- end id-form  -->
    </div>
    <!-- /Page Body -->
</div>
<!-- /Page Content -->
</div>
<!-- /Page Container -->
<!-- Main Container -->
</div>