EVOLUTION-NINJA
Edit File: masters_import_details.php
<script> function displaymstrdata(str) { $.ajax({ type:"post", url:"<?php echo base_url(); ?>display_data/testing", data:"fileno="+str, success:function(data) { document.getElementById("dynamicdatamster").innerHTML=data; } }); } </script> <div id="myModal" class="reveal-modalMID"> <div style="background:#485b7f;width:17%;height:9%;float:right;"> <img src="<?php echo base_url(); ?>assets/img/logo-big.png" alt="logo" width="230" style="margin-top:5px;"> </div><br><br><br> <div id="alldatadisplay" style="width: 101%;height: 94%;overflow: scroll;"> </div> <a class="close-reveal-modal">×</a> </div> <?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Import Transactions </h3> <?php $this->load->view('templates/nav_menu'); ?> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <div style="text-align: left; padding:0px; margin-bottom: 15px;"> <a href="<?php echo base_url(); ?>import/masters_import " class="btn btn-sm green"><i class="fa fa-plus"></i> To Insert Data Click Here </a> </div> <?php } else { ?> <?php } }?> <!--<form action="<?php echo base_url(); ?>index.php/import/masters_import" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /><br><br> </form>--> <?php echo $this->load->view('import_module/masters_data_display'); ?> <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <!-- BEGIN EXAMPLE TABLE PORTLET--> <div class="portlet box blue-madison"> <div class="portlet-title"> <div class="caption"> <i class="fa fa-globe"></i>Responsive Table With Expandable details </div> <div class="tools"> <!--<a href="javascript:;" class="reload"> </a> <a href="javascript:;" class="remove"> </a>--> <a href="#" style="color: #fff;"> <i class="fa fa-file-pdf-o tooltips" data-container="body" data-placement="top" data-original-title="Export PDF" style="font-size: 20px;"></i> </a> <a href="#" style="color: #fff;"> <i class="fa fa-file-excel-o tooltips" data-container="body" data-placement="top" data-original-title="Export Excel" style="font-size: 20px;"></i> </a> <a href="#" style="color: #fff;"> <i class="fa fa-print tooltips" data-container="body" data-placement="top" data-original-title="Take Print" style="font-size: 20px;"></i> </a> </div> </div> <div class="portlet-body"> <table class="table table-striped table-bordered table-hover" id="sample_3"> <thead> <tr> <th> S.No </th> <th> Import File No </th> <th> Supplier Id </th> <th> Consignments </th> <th> Name </th> <th> Address </th> <th> Import type </th> <?php if(empty($access_row)){ } else { if($access_row->preview_id == '1' ) { ?> <th style="width: 56px !important;">Preview</th> <?php } } ?> </tr> </thead> <tbody> <?php $count=1; foreach(array_keys($getalldata) as $getresult) { $countcons = $this->db->get_where('masters_import', array('import_file_no' => $getalldata[$getresult]->import_file_no)); ?> <tr id="row_<?php echo $getalldata[$getresult]->import_file_no; ?>"> <td><?php echo $count++; ?></td> <td><?php echo $getalldata[$getresult]->import_file_no; ?></td> <td><a href="#"><?php echo $getalldata[$getresult]->file_no; ?></a></td> <td><?php echo $countcons->num_rows(); ?></td> <td><?php echo $getalldata[$getresult]->name; ?></td> <td><?php echo $getalldata[$getresult]->address; ?></td> <td><?php echo $getalldata[$getresult]->import_type; ?></td> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <td><a onclick="displayimportAll('<?php echo $getalldata[$getresult]->import_file_no; ?>')" href="#" data-reveal-id="myModal" class="manag" data-animation="fade"><i class="fa fa-eye" aria-hidden="true"></i> PREVIEW</a></td> <?php }} ?> </tr> <?php }?> </tbody> </table> </div> </div> <!-- END EXAMPLE TABLE PORTLET--> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <script> var cnt='<?php echo $count;?>'; $(function () { <?php for($a=1;$a<$count;$a++){?> $(".table<?php echo $a;?>").on("click", function () { var $rows = $('.content<?php echo $a;?>'); if ($(".content<?php echo $a;?>:first").is(":hidden")) { $("#header<?php echo $a;?>").text("▲ Consignments"); $(".content<?php echo $a;?>:first").slideDown(); } else { $("#header<?php echo $a;?>").text("▼ Consignments"); $(".content<?php echo $a;?>:first").slideUp(); } }); <?php } ?> }); </script> <script> function displayimportAll(str) { $.ajax({ type:"post", data:"impfileno="+str, url:"<?php echo base_url(); ?>import/getIMPfileDATA", success:function(data) { document.getElementById("alldatadisplay").innerHTML=data; } }); } </script> <!-- BEGIN FOOTER --> <style> @media only screen and (min-width:320px) and (max-width:640px) { .dataTables_wrapper .dataTables_filter .form-control { width: 120px !important; } </style>