EVOLUTION-NINJA
Edit File: expiry_client.php
<?php $this->load->view('includes/sa_header');?> <section class="mid_work_one"> <div class="container-fluid"> <div class="row middle_container"> <div class="row list_h4_search" style="border-bottom:1px solid #000; margin-bottom:15px;"> <h4>List of Expired Licences</h4> <button type="button" style="float:right;" onclick="doit('xlsx')"; class="btn btn-primary btn-sm">Export</button> </div> <div class="clearfix"></div> <div class="table-responsive"> <table class="table prio_table dataTable no-footer" id="headerTable"> <thead> <tr> <th>Sl No.</th> <th>Company Name</th> <th>Contact Person</th> <th>Email Id</th> <th>Phone No.</th> <th>Industrial Segment</th> <th>Registration date</th> <th>Expiry date</th> <th>Admin</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach ($client as $key => $value) { ?> <tr> <td><?php echo $key+1; ?></td> <td><?php echo $value['cname']; ?></td> <td><?php echo $value['first_name']; ?></td> <td><?php echo $value['email']; ?></td> <td><?php echo $value['mobile_no']; ?></td> <td> <select name=""> <?php if(!empty($value['segment'])){ if(in_array("1",$value['segment'])) { ?> <option value="Aerospace & Defense">Aerospace & Defense</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("2",$value['segment'])) { ?> <option value="Agriculture & Mining">Agriculture & Mining</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("3",$value['segment'])) { ?> <option value="Automotive">Automotive</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("4",$value['segment'])) { ?> <option value="Building Materials, Clay & Glass">Building Materials, Clay & Glass</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("5",$value['segment'])) { ?> <option value="Insurance">Insurance</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("6",$value['segment'])) { ?> <option value="Chemicals">Chemicals</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("7",$value['segment'])) { ?> <option value="Consumer Products">Consumer Products</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("8",$value['segment'])) { ?> <option value="Engineering & Construction">Engineering & Construction</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("9",$value['segment'])) { ?> <option value="Financial Services & Banking">Financial Services & Banking</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("10",$value['segment'])) { ?> <option value="Forest Products & Paper">Forest Products & Paper</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("11",$value['segment'])) { ?> <option value="Furniture">Furniture</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("12",$value['segment'])) { ?> <option value="Healthcare">Healthcare</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("13",$value['segment'])) { ?> <option value="High Tech & Electronics">High Tech & Electronics</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("14",$value['segment'])) { ?> <option value="Higher Education & Research">Higher Education & Research</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("15",$value['segment'])) { ?> <option value="Hospitality">Hospitality</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("16",$value['segment'])) { ?> <option value="Industrial Machinery & Components">Industrial Machinery & Components</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("17",$value['segment'])) { ?> <option value="Media">Media</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("18",$value['segment'])) { ?> <option value="Industrial Machinery & Components">Metal Products</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("19",$value['segment'])) { ?> <option value="Oil & Gas">Oil & Gas</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("20",$value['segment'])) { ?> <option value="Pharmaceuticals">Pharmaceuticals</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("21",$value['segment'])) { ?> <option value="Primary Metal & Steel">Primary Metal & Steel</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("22",$value['segment'])) { ?> <option value="Public Sector">Public Sector</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("23",$value['segment'])) { ?> <option value="Retail">Retail</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("24",$value['segment'])) { ?> <option value="Service Provider">Service Provider</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("25",$value['segment'])) { ?> <option value="Telecommunication">Telecommunication</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("26",$value['segment'])) { ?> <option value="Textile Production">Textile Production</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("27",$value['segment'])) { ?> <option value="Transportation & Storage">Transportation & Storage</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("28",$value['segment'])) { ?> <option value="Utilities">Utilities</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("29",$value['segment'])) { ?> <option value="Wholesale Distribution">Wholesale Distribution</option> <?php } } ?> <?php if(!empty($value['segment'])){ if(in_array("30",$value['segment'])) { ?> <option value="Other">Other</option> <?php } } ?> </select> </td> <td><?php echo date('d-m-Y',strtotime($value['date_of_creation'])); ?></td> <td><?php echo date('d-m-Y',strtotime($value['date_of_expiry'])); ?></td> <!-- <td><?php echo $value['user_name']; ?></td>--> <td><?php if($value['admin']){ $ad=$value['admin']; echo $ad->first_name; }?></td> <td><a class="btn btn-info btn-xs" href="<?php echo base_url('update-client'); ?>/<?php echo $value['user_id']; ?>"><span class="fa fa-pencil-square-o" aria-hidden="true"></span></a></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </section> </body> </html> <script type="text/javascript"> // var datatable; // var tbody = $('#table_body'); // datatable = $('.table').DataTable({ // }); jQuery(document).ready(function($) { $('.ul_menu li.dropdown').hover(function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); }, function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); }); }); </script> <style type="text/css"> .ul_menu li { list-style: none; } .table-responsive { overflow-x: auto !important; } .prio_table > thead > tr > th { background: #abf3ad !important; border-bottom: 1px solid #61b79c !important; border-top: 1px solid #61b79c !important; color:#000; } .prio_table > tbody > tr > td { background: #f0fffc; color:#000; } .row { margin-right: 0px !important; margin-left: 0px !important; } </style> <script type="text/javascript" src="<?php echo base_url('assets/js/shim.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/xlsx.full.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/Blob.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/FileSaver.js');?>"></script> <script> function doit(type, fn, dl) { var elt = document.getElementById('headerTable'); var wb = XLSX.utils.table_to_book(elt, {sheet:"Sheet JS"}); return dl ? XLSX.write(wb, {bookType:type, bookSST:true, type: 'base64'}) : XLSX.writeFile(wb, fn || ('expiry_client.' + (type || 'xlsx'))); } </script> <script type="text/javascript"> function tableau(pid, iid, fmt, ofile) { if(typeof Downloadify !== 'undefined') Downloadify.create(pid,{ swf: 'downloadify.swf', downloadImage: 'download.png', width: 100, height: 30, filename: ofile, data: function() { return doit(fmt, ofile, true); }, transparent: false, append: false, dataType: 'base64', onComplete: function(){ alert('Your File Has Been Saved!'); }, onCancel: function(){ alert('You have cancelled the saving of this file.'); }, onError: function(){ alert('You must put something in the File Contents or there will be nothing to save!'); } }); else document.getElementById(pid).innerHTML = ""; } tableau('biff8btn', 'xportbiff8', 'biff8', 'test.xls'); tableau('odsbtn', 'xportods', 'ods', 'test.ods'); tableau('fodsbtn', 'xportfods', 'fods', 'test.fods'); tableau('xlsbbtn', 'xportxlsb', 'xlsb', 'test.xlsb'); tableau('xlsxbtn', 'xportxlsx', 'xlsx', 'test.xlsx'); </script>