<div class="body-content">
                        <div class="row">
                            <div class="col-md-12 col-lg-6">
                                <div class="card mb-4">
                                    <div class="card-header">
                                        <div class="d-flex justify-content-between align-items-center">
                                            <div>
                                                <h6 class="fs-17 font-weight-600 mb-0">Technologies</h6>
                                            </div>
                                            
                                        </div>
                                    </div>
                                    <div class="card-body">
                                     <?php if($this->session->flashdata("msgc")){echo $this->session->flashdata("msgc");}?>
                                      <?php if(isset($_GET['tid'])){
						$edit=$this->db->get_where("techs",array("tid"=>$_GET['tid']))->row();?>
                        <form class="form-inline" action="<?php echo base_url();?>admin/update_tech" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="tid" value="<?php echo $edit->tid;?>" />
                              <div class="form-group"> 
                                <input type="text" required class="form-control" value="<?php echo $edit->tech_name;?>"  name="tech_name">
                              </div>
                              <button type="submit" class="btn btn-success">Update</button>
                            </form>
                        <?php }else{?>
                        <form class="form-inline" action="<?php echo base_url();?>admin/add_tech" method="post" enctype="multipart/form-data">
                             
                              <div class="form-group "> 
                                <input type="text" placeholder="Technology Name" required class="form-control" name="tech_name">
                              </div>
                              <button type="submit" class="btn btn-success">Add</button>
                            </form>
                        <?php }?><hr/>
                        <table class="table">
                            <thead><tr><th>S.No.</th><th>Technology</th><th>Action</th></tr></thead>
                            <tbody>
                                <?php $i=1;foreach($techs as $t){?>
                                <tr><td><?php echo $i;?></td>
                                    <td><?php echo $t->tech_name;?><br/>
                                    </td>
                                    <td><a href="<?php echo base_url().'admin/techs?tid='.$t->tid;?>" class="btn btn-sm btn-warning"><i class="fa fa-edit"></i></a>
        <a href="#" id="<?php echo $t->tid;?>" class="btn btn-sm btn-danger dept_delete"><i class="fa fa-trash"></i></a></td></tr><?php $i++;}?>
                            </tbody>
                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div><!--/.body content-->
                </div><!--/.main content-->
                
            </div><!--/.wrapper-->
        </div>
        <!--Global script(used by all pages)-->
        <script>
$(document).ready(function(){
	
	$(".dept_delete").click(function(e){e.preventDefault();
	if(!confirm("Sure you want to delete?")){
		  return false;
		}
		var id=$(this).attr("id");$(this).closest("tr").remove();
		$.ajax({
			 type: "POST",
			 url: '<?php echo base_url();?>admin/ajax_tech_delete',
			 data: {id:id},
			 success: function(response){
				 //alert(response);
			 }
		});
	});
});
</script>
        <script src="<?php echo base_url();?>admin_assets/dist/js/popper.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/bootstrap/js/bootstrap.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/metisMenu/metisMenu.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/perfect-scrollbar/dist/perfect-scrollbar.min.js"></script>
        <!-- Third Party Scripts(used by this page)-->

        <!--Page Active Scripts(used by this page)-->
        <script src="<?php echo base_url();?>admin_assets/dist/js/pages/forms-basic.active.js"></script>
        <!--Page Scripts(used by all page)-->
        <script src="<?php echo base_url();?>admin_assets/dist/js/sidebar.js"></script>
    </body>
</html>