<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from akademi.dexignlab.com/codeigniter/demo/student by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 06 Mar 2024 10:51:33 GMT -->
<!-- Added by HTTrack -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->

<head>
    <!-- Title -->
    <title>Faculty</title>
    <!-- Meta -->



</head>

<body>

    <div class="content-body">
        <!-- row -->
        <div class="container-fluid">
            <!-- Row -->
            <div class="row">
                <div class="col-xl-12">
                    <div class="row">
                        <div class="col-xl-12">
                            <div class="page-title flex-wrap">
                                <div class="input-group search-area mb-md-0 mb-3">
                                    <input type="text" class="form-control" placeholder="Search here...">
                                    <span class="input-group-text"><a href="javascript:void(0)">
                                            <svg width="15" height="15" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                <path d="M17.5605 15.4395L13.7527 11.6317C14.5395 10.446 15 9.02625 15 7.5C15 3.3645 11.6355 0 7.5 0C3.3645 0 0 3.3645 0 7.5C0 11.6355 3.3645 15 7.5 15C9.02625 15 10.446 14.5395 11.6317 13.7527L15.4395 17.5605C16.0245 18.1462 16.9755 18.1462 17.5605 17.5605C18.1462 16.9747 18.1462 16.0252 17.5605 15.4395V15.4395ZM2.25 7.5C2.25 4.605 4.605 2.25 7.5 2.25C10.395 2.25 12.75 4.605 12.75 7.5C12.75 10.395 10.395 12.75 7.5 12.75C4.605 12.75 2.25 10.395 2.25 7.5V7.5Z" fill="#01A3FF" />
                                            </svg>
                                        </a></span>
                                </div>
                             
                                <div>

                                <a  class="btn btn-primary" id="open-modal" href="<?php echo base_url(); ?>ApplicationController/facultyadd">
                                        + New Faculty
                                    </a>

                                </div>
                            </div>
                        </div>
                        <!--column-->
                        <div class="col-xl-12 wow fadeInUp" data-wow-delay="1.5s">
                            <div class="table-responsive full-data">
                                <table class="table-responsive-lg table display dataTablesCard student-tab dataTable no-footer" id="example-student">
                                    <thead>

                                        <tr>
                                            <th class="wd-20p">S.No</th>
                                            <th class="wd-25p">Faculty Name</th>
                                            <th class="wd-15p">Email</th>
                                            <th class="wd-15p">Mobile</th>
                                            <th class="wd-15p">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php


                                        foreach ($records as $row) { ?>
                                            <tr>

                                                <td><?= $row->id; ?></td>
                                                <td><?= $row->f_name; ?></td>
                                                <td><?= $row->f_email; ?></td>
                                                <td><?= $row->f_mobile; ?></td>
                                                <td>
                                                  <a href="<?= base_url('ApplicationController/edit/' . $row->id) ?>" data-toggle="tooltip" id="edit" data-placement="top" title="Edit" data-original-title="Edit"  class="btn btn-sm btn-info"><i class="ti ti-pencil"></i></a>
                                                  <a href="<?= base_url('ApplicationController/delete/' . $row->id) ?>" data-toggle="tooltip" id="delete" data-placement="top" title="Delete" data-original-title="Delete"  class="btn btn-sm btn-danger"><i class="ti ti-trash"></i></a>
                                                </td>
                                            </tr>

                                        <?php  }

                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- Modal -->
    <div class="modal fade" id="tutionModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-center modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h1 class="modal-title fs-5" id="exampleModalLabel">Add Faculty </h1>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                <form action="<?php echo base_url(); ?>ApplicationController/store" method="post" enctype="multipart/form-data" id="registration_form">
                    
                    <div class="row">
                        <div class="form-group col-md-6">
                            <label>Name</label>
                            <input type="text" class="form-control" name="facultyname" placeholder="name" required>
                        </div>
                        <div class="form-group col-md-6">
                            <label>Mobile</label>
                            <input name="mobile" id="mobile" type="number" class="form-control" placeholder="Mobile_number" value="<?php echo (isset($_POST[''])) ? $_POST[''] : ''; ?>" required>
                            <?php if ($this->session->flashdata('mobile')) : ?>
                                <span style="color: red;"><?= $this->session->flashdata('mobile') ?></span>
                                <?php unset($_SESSION['mobile']); ?>
                            <?php endif;  ?>
                        </div>
                        <div class="form-group col-md-6">
                            <label>Email</label>
                            <input name="email" id="email" type="email" class="form-control" placeholder="Email" value="<?php echo (isset($_POST[''])) ? $_POST[''] : ''; ?>" required>
                            <?php if (form_error('email')) { ?>
                                <div id="summernote" class="alert alert-danger alert-dismissible fade show" role="alert">
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                        <span aria-hidden="true">×</span>
                                    </button>
                                    <?php echo form_error('email'); ?>
                                </div>
                            <?php } ?>
                        </div>

                        <div class="form-group col-md-6">
                                        <label for="login_pass" class="form_label">Password</label>
                                        <div class="control">
                                            <input type="password" name="password" id="login_pass" class="form-control password" autocomplete="off" placeholder="Password" />

                                            <span class="input-group-text">
                                                <i class="eye showPwd1"></i>
                                            </span>

                                            <?php if (form_error('password')) {?>
                                            <div class="alert alert-danger alert-dismissible fade show pb-0 mt-1" role="alert">
                                                <?php echo form_error('password'); ?>
                                            </div>
                                        <?php }?>
                                            

                                        </div>
                                    </div>


                                    <div class="form-group col-md-6">
                                        <label for="login_pass" class="form_label">confirm Password</label>
                                        <div class="control">
                                            <!-- <input type="password" name="Password" id="login_pass" class="form-control password" autocomplete="off" placeholder="Enter password" /> -->
                                            <input type="password" name="c_password" id="login_pass2" class="form-control password2" autocomplete="off" placeholder="Confirm password" />
                                            
                                            <span class="input-group-text">
                                                <i class="eye showPwd2"></i>
                                            </span> 

                                            <?php if (form_error('c_password')) {?>
                                            <div class="alert alert-danger alert-dismissible fade show pb-0 mt-1" role="alert">
                                                <?php echo form_error('c_password'); ?>
                                            </div>
                                        <?php }?>

                                        </div>
                                    </div>


                        <div class="form-group mt-3 col-md-4">
                            <div class="">
                                <button name="submit" type="submit" class="btn btn-primary waves-effect waves-light mr-1">
                                    Submit
                                </button>
                                <a href="<?php echo base_url('ApplicationController/faculty'); ?>" class="btn btn-secondary waves-effect">Cancel </a>
                            </div>
                        </div>
                    </div>
                    
                </form>
                </div>
            </div>
        </div>
    </div>

    <div class="modal show" id="statusModal" style="display: none;" aria-modal="true" role="dialog">
        <div class="modal-dialog " role="document">
            <div class="modal-content modal-content-demo">
                <div class="modal-header">
                    <h6 class="modal-title" id="formTitle">Change Status</h6>

                </div>
                <div class="modal-body">
                    <form method="POST" action="<?php echo base_url('ApplicationController/commonStatusChange/') ?>" id="courseForm">
                        <input type="hidden" id='rowId' name='id'>
                        <input type="hidden" id='table' name='table' value="tution_fees">
                        <input type="hidden" id='rowStatus' name='status'>
                        <div class="form-group">
                            <h4>Are You Sure you want to change the status?</h4>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn ripple btn-primary">Yes</button>
                            <button type="button" class="btn ripple btn-secondary closemodel" id="closemodel" data-bs-dismiss="modal">Close</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>



</body>

</html>

<script>
    function edit(id, tutionId, feesVal, courses) {
        $('#tution_name_err').text(' ')
        $('#fees_err').text(' ')

        $('#id').val(id)
        $('#fees').val(feesVal)
        $('#tutionId').val(tutionId)
        $('#courseId').val(courses)
        $('#formTitle').text('Edit Course')

        $("#tutionModal").modal('show');
        $("#courseId").select2({
            width: '100%',
        });
        $("#tutionId").select2({
            width: '100%',
        });
    }

    function deletetution(id, status) {

        $('#rowId').val(id)
        $('#rowStatus').val(status)
        $("#statusModal").show();
    }

    $('#open-modal').on('click', function() {

        $("#tutionModal").modal('show');
    });

    $('.closemodel').on('click', function() {

        $("#statusModal").hide();
    });

    let pwd1 = document.getElementById('login_pass'),
            eye1 = document.querySelector('.showPwd1');

            eye1.addEventListener('click', function() {
            toggleType1();
        })

    function toggleType1() {
            
            if (eye1.classList.contains('closed')) {
                pwd1.type = 'password';
            } else {
                pwd1.type = 'text';
            }
            eye1.classList.toggle('closed');
            }
            //end of password toggle


            //start of confirm password toggle
            let pwd2 = document.getElementById('login_pass2');
            eye2 = document.querySelector('.showPwd2');

            eye2.addEventListener('click', function() {
            toggleType2();
            })


            function toggleType2() {

            if (eye2.classList.contains('closed')) {
                pwd2.type = 'password';
            } else {
                pwd2.type = 'text';
            }
            eye2.classList.toggle('closed');
            }
</script>