EVOLUTION-NINJA
Edit File: article_details_new.php
<?php //include("menu.php"); ?><script> function displayarticledetails(str) { //$('#sss').val()=str; //document.getElementById("sss").innerHTML=str; $.ajax({ type:"post", url:"<?php echo base_url(); ?>" + "display_data/testingarticle", data:"id="+str, success:function(data) { document.getElementById("dynamicdatamster").innerHTML=data; } }); } function displayarticledetails1(str) { $.ajax({ type:"post", url:"<?php echo base_url(); ?>display_data/testingarticle1", data:"id="+str, success:function(data) { document.getElementById("tablesdatadisplay").innerHTML=data; } }); } </script> <script> function testclick(sd) { $.ajax({ type:"post", url:"<?php echo base_url(); ?>" + "display_data/chartdetails", data:"sd="+sd, success:function(data) { alert(data); document.getElementById("myvalue").innerHTML=data; } }); } </script> <!--chart start--> <script type="text/javascript"> $(document).ready(function() { $('a.dispdynchartclick').click(function() { var getID=this.id; var options = { chart: { renderTo: 'container', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: '' }, tooltip: { formatter: function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed(0) +' %'; } }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', connectorColor: '#000000', formatter: function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed(0); +' %'; } } } }, series: [{ type: 'pie', name: 'Browser share', data: [] }] } $.getJSON("<?php echo base_url(); ?>planning/articleGraphData",{ "getID": getID }, function(json) { options.series[0].data = json; chart = new Highcharts.Chart(options); }); }); }); </script> <script src="<?php echo base_url(); ?>assets/js/highcharts.min.js"></script> <script src="<?php echo base_url(); ?>assets/js/exporting.min.js"></script> <!--chart end--> <!-- BEGIN CONTENT --> <div id="articledetailspopup" class="reveal-articledetails"> <a class="close-reveal-modal">×</a> </div> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Article Details </h3> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="<?php echo base_url();?>dashboard">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Article Master </a></li> </ul> </div> <div id="articledatadisplay" class="reveal-mastermoduledata" style="height: auto;overflow: scroll;top:20px;// width: 94%;"> <!--<div class="" id="dynamicdatamster" style="width:50%; height:103%; overflow-x: hidden; overflow-y: scroll; float:left">--> <div class="" id="dynamicdatamster" style="width:100%; height:auto; //float:left"> </div> <div id="container" style="height: 200px; margin: 0 auto; float:left"></div> <br><div id="tablesdatadisplay" style=""></div> <a class="close-reveal-modal">×</a> </div> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>planning/add_article" 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>Article details </div> <div class="tools"> </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 id="blue"> Article No.</th> <th> Quality</th> <th> Weave</th> <th> Finish Width</th> <th> Reed Width</th> <th> Reed</th> <th> Total Price</th> <?php if($user_list_designation->designation == 'Admin' || $user_list_designation->designation == 'Super Admin') { ?> <th> Yarn</th> <th> Warping</th> <th> Weaving</th> <?php } ?> <th> Created At</th> <th> Created By</th> <th>PDF</th> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <th style="width: 35px !important;">Edit</th> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->delete_id == '1' ) { ?> <th style="width: 70px !important;">Delete</th> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->preview_id== '1' ) { ?> <th style="width: 70px !important;">Preview</th> <?php } } ?> </tr> </thead> <tbody> <?php $count=1; $db_conn = mysqli_connect("localhost", "injayblues_injayblues", "x+r3.6apBW+Y", "injayblues_decotextil_new"); $r="SELECT * FROM warping_wearing"; $getwarpingwearing=mysqli_query($db_conn,$r); $wwresult=mysqli_fetch_array($getwarpingwearing); $warpingfinal=$wwresult[1]; $wearingfinal=$wwresult[2]; $i = 0; $j = 0; foreach($getalldata as $getresult) { ?> <tr> <td><?php echo $count++; ?></td> <!--<td><a href="<?php echo base_url(); ?>" data-reveal-id="articledetailspopup" data-animation="fade"><?php echo strtoupper($getresult->articleNo); ?></a></td>--> <td><a class="dispdynchartclick" id="<?php echo $getresult->articleID; ?>" onclick="displayarticledetails(this.id),displayarticledetails1(this.id)" href="#" data-reveal-id="articledatadisplay" data-animation="fade"><?php echo $getresult->articleNo; ?></a></td> <td><?php echo $getresult->quality; ?></td> <td><?php echo $getresult->design; ?></td> <td><?php echo $getresult->finishWidth; ?></td> <td><?php echo $getresult->reedWidth; ?></td> <td><?php echo $getresult->reed; ?></td> <?php $finalWarping = $getresult->warp; $finalWearing = $getresult->weft; $warprates=0; if(array_key_exists($i,$wp)){ if($getresult->articleID == $wp[$i]->article){ $warprates = $wp[$i]->warprates; $i++; } } $weftrates=0; if(array_key_exists($j,$wf)){ if($getresult->articleID == $wf[$j]->article){ $weftrates = $wf[$j]->weftrates; $j++; } } //echo $weftrates; $totalwarpweftrates=$warprates+$weftrates;?> <td data-toggle="tooltip" data-placement="right" title="<?php echo "Yarn:".round($totalwarpweftrates,2)."\n"; echo "\n Warping:".round($finalWarping,2); echo "\n Weaving:".round($finalWearing,2); ?>"> <?php echo round($totalwarpweftrates+$finalWarping+$finalWearing,2); ?> </td> <?php if($user_list_designation->designation == 'Admin' || $user_list_designation->designation == 'Super Admin') { ?> <td> <?php echo round($totalwarpweftrates,2); ?> </td> <td> <?php echo round($finalWarping,2); ?> </td> <td> <?php echo round($finalWearing,2); ?> </td> <?php } ?> <td><?php echo $getresult->created_date; ?></td> <td><?php echo $getresult->created_by; ?></td> <td><a target="_blank" href="<?php echo base_url(); ?>pdfuploads/<?php echo $getresult->pdffileupload; ?>"><img width="25px" src="<?php echo base_url(); ?>assets/img/pdfimage.jpg"></a></td> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <td><a href="<?php echo base_url(); ?>planning/add_article/<?php echo $getresult->articleID; ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> EDIT</a></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 onclick="removedata(<?php echo $getresult->articleID; ?>)" 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><a href="<?php echo base_url(); ?>planning/preview_article/<?php echo $getresult->articleID; ?>"><i class="fa fa-eye" aria-hidden="true"></i> PREVIEW</a></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("planning/delete_article"); ?>', data:{'as':b}, async:false, success:function() { window.location.reload(); } }); } </script> <script> $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); }); </script> <style> @media only screen and (min-width:320px) and (max-width:640px) { .reveal-mastermoduledata { left: 86%; height: auto !important; margin-bottom:20px; } <!--.reveal-mastermoduledata { top: 0; left: 6% ; margin-left:0px; width: 94%; margin-bottom:20px; } .reveal-modalArticle { top: 0px !important; left: 0 !important; margin-left: 0px !important; width: 100% !important; height: 500px !important; }--> } </style>