Path : /home/vishqocm/pcib.in/
File Upload :
Current File : /home/vishqocm//pcib.in/instructors.php

<?php
// Start session
session_start();

// Include database configuration
require_once 'admin/database/db_config.php';

// Include header
include 'includes/header.php';

// Get all active instructors who are team members
$instructors_query = "SELECT u.id, u.first_name, u.last_name, u.profile_image, 
                     u.expertise, u.bio, u.phone, u.role
                     FROM users u
                     WHERE (u.role = 'instructor' OR u.role = 'director' OR u.role = 'developer')
                     AND u.status = 'active'";

// Check if is_team_member column exists before using it
$is_team_member_exists = $conn->query("SHOW COLUMNS FROM users LIKE 'is_team_member'")->num_rows > 0;
if ($is_team_member_exists) {
    $instructors_query .= " AND u.is_team_member = 1";
}

$instructors_query .= " ORDER BY 
                        CASE 
                           WHEN u.role = 'director' THEN 1
                           WHEN u.role = 'developer' THEN 2
                           ELSE 3
                        END, 
                        u.first_name";
                     
$instructors_result = $conn->query($instructors_query);
$instructors = [];

if ($instructors_result && $instructors_result->num_rows > 0) {
    while ($row = $instructors_result->fetch_assoc()) {
        $instructors[] = $row;
    }
}

// If no instructors found, use sample data
if (empty($instructors)) {
    $instructors = [
        [
            'id' => 1,
            'first_name' => 'John',
            'last_name' => 'Smith',
            'role' => 'director',
            'designation' => 'Web Development Expert',
            'profile_image' => 'assets/images/instructors/instructor-1.jpg',
            'expertise' => 'HTML, CSS, JavaScript, React',
            'bio' => 'Over 10 years of experience in web development and teaching programming concepts to students of all levels.',
            'phone' => '+91 9876543210'
        ],
        [
            'id' => 2,
            'first_name' => 'Sarah',
            'last_name' => 'Johnson',
            'role' => 'instructor',
            'designation' => 'UI/UX Design Specialist',
            'profile_image' => 'assets/images/instructors/instructor-2.jpg',
            'expertise' => 'UI Design, UX Research, Figma, Adobe XD',
            'bio' => 'Award-winning designer with a passion for creating beautiful and functional user interfaces.',
            'phone' => '+91 9876543211'
        ],
        [
            'id' => 3,
            'first_name' => 'Michael',
            'last_name' => 'Brown',
            'role' => 'developer',
            'designation' => 'Data Science Instructor',
            'profile_image' => 'assets/images/instructors/instructor-3.jpg',
            'expertise' => 'Python, Machine Learning, Data Analysis',
            'bio' => 'Former data scientist at a Fortune 500 company with a PhD in Computer Science.',
            'phone' => '+91 9876543212'
        ],
        [
            'id' => 4,
            'first_name' => 'Emily',
            'last_name' => 'Davis',
            'role' => 'instructor',
            'designation' => 'Digital Marketing Expert',
            'profile_image' => 'assets/images/instructors/instructor-4.jpg',
            'expertise' => 'SEO, Social Media, Content Marketing',
            'bio' => 'Experienced digital marketer who has helped dozens of businesses improve their online presence.',
            'phone' => '+91 9876543213'
        ]
    ];
}
?>

<!-- Page Header -->
<div class="page-header">
    <div class="container">
        <div class="row align-items-center">
            <div class="col-lg-6">
                <h1 class="page-title">Our Expert Team</h1>
                <p class="page-description">Meet our dedicated instructors and team members</p>
            </div>
            <div class="col-lg-6">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb justify-content-lg-end">
                        <li class="breadcrumb-item"><a href="index.php">Home</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Team</li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>
    
    <!-- 3D Objects Animation -->
    <div class="floating-shapes">
        <div class="shape shape-1" data-parallax='{"y": 150, "x": 50}'></div>
        <div class="shape shape-2" data-parallax='{"y": -100, "x": -70}'></div>
        <div class="shape shape-3" data-parallax='{"y": 80, "x": -120}'></div>
        <div class="shape shape-4" data-parallax='{"y": -50, "x": 100}'></div>
    </div>
</div>

<!-- Instructors Section -->
<section id="instructors" class="instructors-section py-5">
    <div class="container">
        <!-- Section Header -->
        <div class="row mb-5">
            <div class="col-lg-7 mx-auto text-center">
                <div class="section-header">
                    <span class="section-badge wow fadeInUp" data-wow-delay="0.1s">Expert Faculty</span>
                    <h2 class="section-title wow fadeInUp" data-wow-delay="0.2s">Meet Our <span class="highlight">Instructors</span></h2>
                    <p class="section-subtitle wow fadeInUp" data-wow-delay="0.3s">Learn from industry professionals who bring real-world experience and expertise to the classroom</p>
                </div>
            </div>
        </div>
        
        <!-- Team Filters -->
        <div class="team-filters wow fadeInUp mb-4" data-wow-delay="0.3s">
            <div class="filters-buttons">
                <button class="filter-btn active" data-filter="all">All</button>
                <button class="filter-btn" data-filter="director">Directors</button>
                <button class="filter-btn" data-filter="developer">Developers</button>
                <button class="filter-btn" data-filter="instructor">Instructors</button>
            </div>
        </div>
        
        <!-- Instructors Grid -->
        <div class="row">
            <?php foreach ($instructors as $index => $instructor): 
                // Get instructor profile image
                $profile_image = !empty($instructor['profile_image']) ? $instructor['profile_image'] : 'assets/img/default-avatar.png';
                
                // Animation delay
                $animation_delay = 0.1 * ($index + 2);
                
                // Role class
                $role_class = isset($instructor['role']) ? $instructor['role'] : 'instructor';
            ?>
            <div class="col-lg-3 col-md-6 mb-4 team-item <?php echo $role_class; ?> wow fadeInUp" data-wow-delay="<?php echo $animation_delay; ?>s">
                <div class="instructor-card">
                    <div class="instructor-image">
                        <img src="<?php echo $profile_image; ?>" alt="<?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?>" class="img-fluid">
                    </div>
                    <div class="instructor-content">
                        <h3 class="instructor-name"><?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?></h3>
                        <p class="instructor-designation">
                            <?php
                            $role_display = 'Instructor';
                            if ($role_class == 'director') {
                                $role_display = 'Director';
                            } elseif ($role_class == 'developer') {
                                $role_display = 'Developer';
                            }
                            echo htmlspecialchars($instructor['designation'] ?? $role_display);
                            ?>
                        </p>
                        
                        <?php if (!empty($instructor['phone'])): ?>
                        <p class="instructor-phone"><i class="fas fa-phone-alt"></i> <?php echo htmlspecialchars($instructor['phone']); ?></p>
                        <?php endif; ?>
                        
                        <p class="instructor-bio"><?php echo htmlspecialchars(substr($instructor['bio'] ?? '', 0, 100) . (strlen($instructor['bio'] ?? '') > 100 ? '...' : '')); ?></p>
                        
                        <div class="instructor-view-more">
                            <a href="#instructorModal<?php echo $instructor['id']; ?>" data-bs-toggle="modal" class="view-more-btn">
                                <span>View Details</span>
                                <i class="fas fa-arrow-right"></i>
                            </a>
                        </div>
                    </div>
                </div>
                
                <!-- Instructor Modal -->
                <div class="modal fade" id="instructorModal<?php echo $instructor['id']; ?>" tabindex="-1" aria-labelledby="instructorModalLabel<?php echo $instructor['id']; ?>" aria-hidden="true">
                    <div class="modal-dialog modal-dialog-centered modal-lg">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title" id="instructorModalLabel<?php echo $instructor['id']; ?>"><?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?></h5>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <div class="row">
                                    <div class="col-md-4">
                                        <img src="<?php echo $profile_image; ?>" alt="<?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?>" class="img-fluid rounded">
                                        <div class="instructor-modal-role mt-3">
                                            <span class="badge bg-primary"><?php echo $role_display; ?></span>
                                        </div>
                                        <?php if (!empty($instructor['phone'])): ?>
                                        <div class="instructor-modal-phone mt-2">
                                            <i class="fas fa-phone-alt"></i> <?php echo htmlspecialchars($instructor['phone']); ?>
                                        </div>
                                        <?php endif; ?>
                                    </div>
                                    <div class="col-md-8">
                                        <h4><?php echo htmlspecialchars($instructor['designation'] ?? $role_display); ?></h4>
                                        
                                        <?php if (!empty($instructor['expertise'])): ?>
                                        <div class="instructor-modal-expertise mb-3">
                                            <h5>Expertise:</h5>
                                            <div class="expertise-tags">
                                                <?php 
                                                $expertise = explode(',', $instructor['expertise'] ?? '');
                                                $expertise = array_filter(array_map('trim', $expertise));
                                                foreach ($expertise as $skill): 
                                                ?>
                                                <span class="badge bg-light text-dark"><?php echo htmlspecialchars($skill); ?></span>
                                                <?php endforeach; ?>
                                            </div>
                                        </div>
                                        <?php endif; ?>
                                        
                                        <div class="instructor-modal-bio">
                                            <h5>Bio:</h5>
                                            <p><?php echo htmlspecialchars($instructor['bio'] ?? 'No bio available.'); ?></p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
</section>

<!-- Join Our Team Section -->
<section class="join-team-section py-5 bg-light">
    <div class="container">
        <div class="row align-items-center">
            <div class="col-lg-6 mb-4 mb-lg-0">
                <div class="join-team-content wow fadeInLeft" data-wow-delay="0.2s">
                    <h6 class="section-badge">Career Opportunities</h6>
                    <h2 class="section-title">Join Our Team of Educators</h2>
                    <p class="section-text">We're always looking for talented instructors to join our team. If you're passionate about teaching and have expertise in any of the following areas, we'd love to hear from you:</p>
                    
                    <div class="join-team-areas">
                        <div class="row">
                            <div class="col-md-6">
                                <ul class="check-list">
                                    <li>Web Development</li>
                                    <li>Graphic Design</li>
                                    <li>Digital Marketing</li>
                                    <li>Data Science</li>
                                </ul>
                            </div>
                            <div class="col-md-6">
                                <ul class="check-list">
                                    <li>Mobile App Development</li>
                                    <li>UI/UX Design</li>
                                    <li>Cloud Computing</li>
                                    <li>Cybersecurity</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-4">
                        <a href="contact.php" class="btn btn-primary">Contact Us</a>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="join-team-image wow fadeInRight" data-wow-delay="0.2s">
                    <img src="assets/img/join-team.jpg" alt="Join Our Team" class="img-fluid rounded-4">
                </div>
            </div>
        </div>
    </div>
</section>

<style>
/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 100px 0 100px;
    color: white;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease;
}

.page-description {
    font-size: 1.2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    animation: fadeInRight 1s ease 0.3s;
    animation-fill-mode: both;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: white;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* 3D Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: float 8s infinite ease-in-out;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    transform: rotateZ(25deg);
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    left: 75%;
    animation-delay: 2s;
    transform: rotateZ(-15deg);
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 30%;
    left: 85%;
    animation-delay: 4s;
    transform: rotateZ(45deg);
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 25%;
    animation-delay: 6s;
    transform: rotateZ(-30deg);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    50% {
        transform: translateY(-20px) rotateZ(10deg);
    }
}

.container {
    position: relative;
    z-index: 2;
}

/* Instructors Section */
.instructors-section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 50px;
}

.section-badge {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 20px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a202c;
    line-height: 1.3;
}

.section-title .highlight {
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
    max-width: 800px;
    margin: 0 auto;
}

/* Team Filters */
.team-filters {
    margin-bottom: 40px;
    text-align: center;
}

.filters-buttons {
    display: inline-flex;
    background-color: rgba(var(--primary-rgb), 0.05);
    padding: 5px;
    border-radius: 10px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Instructor Card */
.instructor-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.instructor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.instructor-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.instructor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.instructor-card:hover .instructor-image img {
    transform: scale(1.05);
}

.instructor-content {
    padding: 20px;
    text-align: center;
}

.instructor-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1a202c;
}

.instructor-designation {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.instructor-phone {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
}

.instructor-bio {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 15px;
}

.instructor-view-more {
    margin-top: 15px;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-more-btn i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-more-btn:hover {
    color: var(--secondary-color);
}

.view-more-btn:hover i {
    transform: translateX(5px);
}

/* Join Team Section */
.join-team-section {
    padding: 80px 0;
    background-color: #f8f9fc;
}

.join-team-content {
    padding-right: 30px;
}

.join-team-areas {
    margin-top: 30px;
}

.check-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: #4a5568;
}

.check-list li:before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
}

.join-team-image img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 20px 25px;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: none;
    padding: 20px 25px;
}

.instructor-modal-role {
    text-align: center;
}

.instructor-modal-phone {
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
}

.instructor-modal-expertise h5,
.instructor-modal-bio h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a202c;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.expertise-tags .badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .page-header {
        padding: 60px 0 80px;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .join-team-content {
        padding-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 50px 0 70px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .filter-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .page-header {
        padding: 40px 0 60px;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .filters-buttons {
        flex-wrap: wrap;
    }
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
    // Initialize WOW.js for animations
    new WOW().init();
    
    // Initialize parallax effect for 3D shapes
    const shapes = document.querySelectorAll('.shape');
    shapes.forEach(shape => {
        const data = shape.getAttribute('data-parallax');
        if (data) {
            const options = JSON.parse(data);
            window.addEventListener('mousemove', function(e) {
                const x = (window.innerWidth - e.pageX * options.x) / 90;
                const y = (window.innerHeight - e.pageY * options.y) / 90;
                
                shape.style.transform = `translateX(${x}px) translateY(${y}px)`;
            });
        }
    });
    
    // Team filters functionality
    const filterButtons = document.querySelectorAll('.filter-btn');
    const teamItems = document.querySelectorAll('.team-item');
    
    filterButtons.forEach(button => {
        button.addEventListener('click', function() {
            const filterValue = this.getAttribute('data-filter');
            
            // Remove active class from all buttons
            filterButtons.forEach(btn => btn.classList.remove('active'));
            
            // Add active class to clicked button
            this.classList.add('active');
            
            // Filter team items
            teamItems.forEach(item => {
                if (filterValue === 'all' || item.classList.contains(filterValue)) {
                    item.style.display = 'block';
                } else {
                    item.style.display = 'none';
                }
            });
        });
    });
});
</script>

<?php
// Include footer
include 'includes/footer.php';
?>