EVOLUTION-NINJA
Edit File: yarnnames.php
<?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <script> function back_function() { window.location.href="<?php echo base_url('planning/yarn_details'); ?>"; } function saveyarnrate(str) { var rate=document.getElementById("rate"+str).value; $.ajax({ type:"post", data:"id="+str+"&rate="+rate, url:"<?php echo base_url(); ?>planning/updateyarnrate", success:function(data) { if(data=="1") { alert("Successfully saved.."); } else { alert("Not saved.."); } } }); } </script> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> yarn Rates </h3> <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="<?php echo base_url('planning/yarn_details'); ?>" > Yarn Master </a></li> </ul> </div> <div class="row"> <form action="<?php echo base_url(); ?>planning/yarnrates" method="post" class="form-horizontal"> <div class="col-xs-3"><b>Warping:</b></div> <div class="col-xs-9" style="margin-bottom:20px;"> <input type="text" name="warping" value="<?php echo $getwarpingwearing->warping; ?>" /></div> <div class="col-xs-3"> <b>Wearing:</b></div> <div class="col-xs-8"> <input type="text" name="wearing" value="<?php echo $getwarpingwearing->wearing; ?>" /> <input type="submit" name="submitwarpingwearing" value="Save" /><input type="button" style="margin-left:5px;" onclick="back_function();" value="Cancel" /><br><br></div> </form> </div> <!-- 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 Rates </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> Rate </th> </tr> </thead> <tbody> <?php $count=1; foreach($getalldata as $getresult) { ?> <tr> <td><?php echo $count++; ?></td> <td><?php echo $getresult->yarnType; ?></td> <td><?php echo $getresult->yarnQuality; ?></td> <td><?php echo $getresult->yarnName; ?></td> <td><?php echo $getresult->yarnDenier; ?></td> <td><?php echo $getresult->yarnSpecification; ?></td> <td><input type="text" id="rate<?php echo $getresult->id; ?>" value="<?php if($getresult->rate!="0") { echo $getresult->rate; } ?>"> <a onclick="saveyarnrate('<?php echo $getresult->id; ?>')">Save</a></td> </tr> <?php }?> </tbody> </table> </div> </div> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <style> @media only screen and (min-width:320px) and (max-width:640px) { .dataTables_wrapper .dataTables_filter .form-control { width: 120px !important; } </style>