EVOLUTION-NINJA
Edit File: yarn_details.php
<?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Yarn Details </h3> <?php // echo $this->load->view('templates/nav_menu'); ?> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="<?php echo base_url();?>dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Yarn Master </a></li> </ul> </div> <a style="float: right;padding-right: 26px;font-size: 16px;" href="<?php echo base_url(); ?>planning/yarnrates">ADD RATES</a> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>dashboard/add_quality" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /><br><br> </form> <?php } else { ?> <?php } }?> <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <div class="portlet box blue-madison"> <div class="portlet-title"> <div class="caption"> <i class="fa fa-globe"></i>Yarn details </div> <div class="tools"> <?php //echo $this->load->view('templates/download_types'); ?> <!--<a href="javascript:;" class="reload"> </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_1"> <thead> <tr> <th> Sr.No. </th> <th> Yarn Type </th> <th> Yarn Quality </th> <th> Yarn Name </th> <th> Yarn Denier </th> <th> Yarn Specification </th> <th> Hank Length </th> <th> Hank Wt. </th> <th> Supplier </th> <th> Created By </th> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <th> Edit </th> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->delete_id == '1' ) { ?> <th> Delete </th> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->preview_id== '1' ) { ?> <th> Preview </th> <?php } } ?> </tr> </thead> <tbody> <?php $count=1; foreach($getalldata as $getresult) { ?> <tr> <td><?php echo $count++; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->yarnType; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->yarnQuality; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->yarnName; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->yarnDenier; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->yarnSpecification; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->hankLength; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->hankWt; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->supplier; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->created_by; ?></td> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <td><form action="<?php echo base_url(); ?>dashboard/edit_quality" method="post" class="form-horizontal"><input type="hidden" value="<?php echo $getresult->id; ?>" name="edit_id"><a><i class="fa fa-pencil-square-o" aria-hidden="true"></i><input type="submit" style="border: 0px !important; background: none !important; color:rgb(81,149,205);" value="EDIT"></a></form></td> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->delete_id == '1' ) { ?> <td><a><i class="fa fa-trash-o" aria-hidden="true"></i> <input type="hidden" value="<?php echo $getresult->id; ?>" name="edit_id"><input onclick="removedata(<?php echo $getresult->id; ?>)" type="button" style="border: 0px !important; background: none !important; color:rgb(81,149,205);" value="DELETE" ></a></td> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->preview_id== '1' ) { ?> <td><form action="<?php echo base_url(); ?>dashboard/preview_quality" method="post" class="form-horizontal"><input type="hidden" value="<?php echo $getresult->id; ?>" name="edit_id"><a><i class="fa fa-eye" aria-hidden="true"></i><input type="submit" style="border: 0px !important; background: none !important; color:rgb(81,149,205);" value="PREVIEW"></a></form></td> <?php } } ?> </tr> <?php }?> </tbody> </table> </div> </div> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <script> function removedata(b) { //alert(b); $.ajax({ type:'post', url:'<?php echo base_url("dashboard/delete_quality"); ?>', data:{'as':b}, async:false, success:function() { window.location.reload(); } }); } </script> <style> @media only screen and (min-width:320px) and (max-width:640px) { .dataTables_wrapper .dataTables_filter .form-control { width: 120px !important; } </style>