user_active_task.php<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Admin : View Task</title>
    <?php include("headerlink.php") ?>
    <link rel="stylesheet" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.min.css">
</head>

<body class="hold-transition sidebar-mini layout-fixed">
    <div class="wrapper">

        <div class="preloader flex-column justify-content-center align-items-center">
            <img class="animation__shake" src="dist/img/AdminLTELogo.png" alt="AdminLTELogo" height="60" width="60">
        </div>

        <?php include("navbar.php") ?>

        <?php include("sidebar.php") ?>

        <div class="content-wrapper">

            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1 class="m-0 fw-bold text-uppercase">Task</h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item"><a href="#">Home</a></li>
                                <li class="breadcrumb-item active">Task</li>
                                <li class="breadcrumb-item active">View All</li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>

            <section class="content">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-12">
                            <div class="card shadow">
                                <div class="card-header" style="background: #343a40; ">
                                    <h3 class="card-title text-white text-bold text-uppercase">Group Wise Task</h3>
                                </div>

                                <div class="card-body">
                                    <div id="example2_wrapper" class="dataTables_wrapper dt-bootstrap4">
                                        <div class="row">
                                            <div class="col-sm-12 col-md-6"></div>
                                            <div class="col-sm-12 col-md-6"></div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-12">

                                                <table class="table-responsive">
                                                    <table id="table1" class="table table-bordered table-hover dataTable dtr-inline display text-center" aria-describedby="example2_info">
                                                        <thead>
                                                            <tr>
                                                                <th>Sr No</th>
                                                                <th>Task Title</th>
                                                                <th>Group</th>
                                                                <th>Platfrom</th>
                                                                <th>Description</th>
                                                                <th>Update</th>
                                                                <th>Url</th>
                                                                <th>Status</th>
                                                                <th>Action</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <?php
                                                            include('connection.php');

                                                            // Check for database connection errors
                                                            if ($conn->connect_error) {
                                                                die("Connection failed: " . $conn->connect_error);
                                                            }

                                                            $empid = $_SESSION["emp_id"];

                                                            // Use prepared statements to avoid SQL injection
                                                            $member_query = "SELECT group_name FROM groups WHERE FIND_IN_SET(?, member)";
                                                            $stmt = $conn->prepare($member_query);
                                                            $stmt->bind_param("s", $empid);
                                                            $stmt->execute();
                                                            $result_member = $stmt->get_result();

                                                            // Check if any matching group_name is found
                                                            if ($result_member->num_rows > 0) {
                                                                // Initialize an array to store group_names
                                                                $group_names = array();

                                                                while ($row_member = $result_member->fetch_assoc()) {
                                                                    $group_names[] = $row_member['group_name'];
                                                                }

                                                                // Convert the array to a comma-separated string
                                                                $group_names = array_map(function ($name) {
                                                                    return "'" . $name . "'";
                                                                }, $group_names);

                                                                $group_name_string = implode(", ", $group_names);

                                                                // Now, you have the group names in $group_name_string
                                                                // Next, use this variable to fetch matching tasks from 'group_add_task' table
                                                                $task_query = "SELECT * FROM group_add_task WHERE group_id IN ($group_name_string)";
                                                                $result_task = mysqli_query($conn, $task_query);

                                                                if ($result_task) {
                                                                    // Display the task details as needed
                                                                    while ($row_task = mysqli_fetch_assoc($result_task)) {
                                                                        if ($row_task['status'] == '0') {


                                                            ?>
                                                                            <tr>
                                                                                <td><?php echo $row_task['id']; ?></td>
                                                                                <!-- <td><?php echo $row_task['title']; ?></td> -->

                                                                                <td class="view-details-button fw-bold text-danger text-uppercase" style="text-decoration: none; " data-toggle="modal" data-target="#detailsModal<?php echo $row_task['id']; ?>">
                                                                                    <?php echo $row_task['title'] ?>
                                                                                </td>

                                                                                <td><?php echo $row_task['group_id']; ?></td>
                                                                                <td><?php echo $row_task['platform']; ?></td>
                                                                                <td><?php echo $row_task['task_discription']; ?></td>


                                                                                <td class="view-details-button fw-bold text-danger text-uppercase" style="text-decoration: none; " data-toggle="modal" data-target="#updateModal<?php echo $row_task['id']; ?>">
                                                                                    <p class="badge badge-primary">Update</p>

                                                                                </td>

                                                                                <td><?php echo $row_task['url']; ?></td>
                                                                                <?php
                                                                                $sel = "SELECT * FROM update_all_task WHERE employee_id='$empid'";
                                                                                $result = mysqli_query($conn, $sel);
                                                                                if ($row = mysqli_fetch_assoc($result)) {

                                                                                    $status = $row['status'];
                                                                                    echo "<td><button class='btn btn-primary'  style='font-weight: 600;font-size: 12px;height: 30px;'>$status</button></td>";
                                                                                } else {
                                                                                    echo "<td>No Status Found</td>";
                                                                                }
                                                                                ?>
                                                                                <?php
                                                                                $sel = "SELECT * FROM update_all_task WHERE employee_id";
                                                                                $result = mysqli_query($conn, $sel);
                                                                                while ($row = mysqli_fetch_assoc($result)) {

                                                                                ?>
                                                                                    <td><?php echo $row['status'] ?></td>
                                                                                <?php } ?>

                                                                                <td>
                                                                                    <form method="POST" action="update_taskstatus_code.php">
                                                                                        <input type="hidden" name="item_id" value="<?php echo $row_task['id']; ?>">
                                                                                        <?php if ($row_task['status'] == 1) { ?>
                                                                                            <input type="submit" name="block" value="Block" class="btn btn-danger" style="font-weight: 600;font-size: 12px;height: 30px;">
                                                                                        <?php } else { ?>
                                                                                            <input type="submit" name="activate" value="Achive" class="btn btn-danger" style="font-weight: 600;font-size: 12px;height: 30px;">
                                                                                        <?php } ?>
                                                                                        <!-- <?php echo ($row_task['status'] == 1) ? "<div class='test rounded-circle'></div>" : "<div class='test2 rounded-circle'></div>"; ?> -->
                                                                                    </form>
                                                                                </td>
                                                                            </tr>


                                                                            <div class="modal fade" id="updateModal<?php echo $row_task['id']; ?>">
                                                                                <div class="modal-dialog modal-lg">
                                                                                    <div class="modal-content">
                                                                                        <div class="modal-header" style="background: #343a40; ">
                                                                                            <h4 class="modal-title fw-bold text-uppercase text-white">
                                                                                                <?php echo $row_task['group_id'] ?></h4>
                                                                                            <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                                                                                                <span aria-hidden="true">&times;</span>
                                                                                            </button>
                                                                                        </div>
                                                                                        <div class="modal-body">
                                                                                            <form action="update_all_task_cod--- C:\xampp\htdocs\multi_admin\user\user_active_task.php  Tue Oct 17 16:00:29 2023
+++ C:\xampp\htdocs\multi_admin\user\user_active_task.php   Tue Oct 17 16:01:11 2023
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+user_active_task.php<!DOCTYPE html>
 <html lang="en">
 
 <head>
e.php" method="POST">
                                                                                                <div class="card-body">
                                                                                                    <div class="row">

                                                                                                        <div class="col-6">
                                                                                                            <div class="form-group">
                                                                                                                <label for="exampleInputEmail">Task
                                                                                                                    Title</label>
                                                                                                                <input type="text" name="title" class="form-control" readonly value="<?php echo $row_task['title']; ?>">
                                                                                                            </div>
                                                                                                        </div>

                                                                                                        <div class="col-6">
                                                                                                            <div class="form-group">
                                                                                                                <label for="exampleInputEmail">Group
                                                                                                                    Name</label>
                                                                                                                <input type="text" name="group" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['group_id']; ?>">
                                                                                                            </div>
                                                                                                        </div>

                                                                                                    </div>

                                                                                                    <div class="row">
                                                                                                        <div class="col-6">
                                                                                                            <div class="form-group">
                                                                                                                <label for="exampleInputEmail">Platfrom</label>
                                                                                                                <input type="text" name="platefrom" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['platform']; ?>">
                                                                                                            </div>
                                                                                                        </div>
                                                                                                        <div class="col-6">
                                                                                                            <div class="form-group">
                                                                                                                <label for="exampleInputEmail">Task
                                                                                                                    Description</label>
                                                                                                                <input type="text" name="description" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['task_discription']; ?>">
                                                                                                            </div>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="row">
                                                                                                        <div class="col-6">
                                                                                                            <div class="form-group">
                                                                                                                <label for="exampleInputEmail">URL</label>
                                                                                                                <input type="text" name="url" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['url']; ?>">
                                                                                                            </div>
                                                                                                        </div>
                                                                                                        <div class="col-6">
                                                                                                            <div class="form-group">
                                                                                                                <label for="exampleInputEmail">PDF
                                                                                                                    Name</label><br>
                                                                                                                <input type="text" name="pdf" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['pdf']; ?>">
                                                                                                            </div>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="row">
                                                                                                        <div class="col-6">
                                                                                                            <label for="exampleInputEmail">Audio
                                                                                                                Name</label><br>
                                                                                                            <input type="text" name="audio" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['audio']; ?>">
                                                                                                        </div>
                                                                                                        <div class="col-6">
                                                                                                            <label for="exampleInputEmail">Video
                                                                                                                Name</label><br>
                                                                                                            <input type="text" name="video" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row_task['video']; ?>">
                                                                                                        </div>
                                                                                                    </div>
                                                                                                    <div class="row">
                                                                                                        <div class="col-6">
                                                                                                            <label for="exampleInputEmail">Image
                                                                                                                Name</label><br>
                                                                                                            <input type="text" name="image" readonly class="form-control" id="exampleInputEmail" value="<?php echo $row_task['image']; ?>">
                                                                                                        </div>
                                                                                                        <div class="col-6">
                                                                                                            <label for="exampleInputEmail">Update
                                                                                                                Msg
                                                                                                            </label><br>
                                                                                                            <div> <input type="text" name="msg" class="form-control" id="exampleInputEmail" placeholder="Update Msg Enter Here..." </div>
                                                                                                            </div>
                                                                                                        </div>

                                                                                                        <button class="btn btn-danger mt-5" type="submit">Submit</button>

                                                                                            </form>


                                                                                        </div>

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


                                                            <?php
                                                                        }
                                                                    }
                                                                } else {
                                                                    echo "Error in task query: " . mysqli_error($conn);
                                                                }
                                                            } else {
                                                                // No matching group names found for the UID
                                                                echo "No matching groups found.";
                                                            }

                                                            // Close the database connection
                                                            $conn->close();
                                                            ?>

                                                        </tbody>

                                                    </table>
                                                </table>

                                            </div>
                                        </div>

                                    </div>
                                </div>

                            </div>

                        </div>

                    </div>

                </div>

            </section>

     <!-- group title model open here  -->
     <?php
      include('connection.php');
      $sql = "SELECT * FROM group_add_task";
      $query = mysqli_query($conn, $sql);
      while ($row = mysqli_fetch_assoc($query)) {
     ?>
    <div class="modal fade" id="detailsModal<?php echo $row['id'];?>">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header" style="background: #343a40; ">
                    <h4 class="modal-title fw-bold text-uppercase text-white"><?php echo $row['group_id']?></h4>
                    <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <form action="update_leads_code.php" method="POST">
                        <div class="card-body">
                            <div class="row">
                                <div class="col-8">
                                    <video width="300" height="200" controls>
                                        <source src="../AdminLt/<?php echo $row['video']; ?>" type="video/mp4">
                                    </video>
                                </div>

                                <div class="col-4">
                                    <img src="../AdminLt/<?php echo $row['image']; ?>" alt=""
                                        style="height:200px;width:150px">
                                </div>

                            </div>

                            <div class="row">
                                <div class="col-6">
                                    <audio controls>
                                        <source src="../AdminLt/<?php echo $row['audio']; ?>" type="audio/mp3">
                                        Your browser does not support the audio element.
                                    </audio>
                                </div>
                                <div class="col-6">

                                    <div>
                                        <label>
                                            <a href="../AdminLt/<?php echo $row['pdf']; ?>" download>
                                                <?php echo $row['pdf']; ?>
                                            </a>
                                        </label>
                                    </div>



                                </div>
                            </div>



                        </div>

                    </form>


                </div>

            </div>

        </div>

    </div>
    <?php }?>
   <!-- group title model close here  -->




            <!-- start member wise task here -->
            <section class="content py-5">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-12">
                            <div class="card shadow">
                                <div class="card-header" style="background: #343a40; ">
                                    <h3 class="card-title text-white text-bold text-uppercase">Member Wise Task</h3>
                                </div>

                                <div class="card-body">
                                    <div id="example2_wrapper" class="dataTables_wrapper dt-bootstrap4">
                                        <div class="row">
                                            <div class="col-sm-12 col-md-6"></div>
                                            <div class="col-sm-12 col-md-6"></div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-12">
                                                <table class="table-responsive">
                                                    <table id="table1" class="table table-bordered table-hover dataTable dtr-inline display" aria-describedby="example2_info">
                                                        <thead>
                                                            <tr>
                                                                <th>Sr No</th>
                                                                <th>Task Title</th>
                                                                <th>Member</th>
                                                                <th>Platfrom</th>
                                                                <th>Description</th>
                                                                <th>Url</th>
                                                                <th>Update</th>
                                                                <th>Status</th>
                                                                <th>Action</th>
                                                            </tr>
                                                        </thead>

                                                        <tbody>
                                                            <?php
                                                            include('connection.php');
                                                            $empid = $_SESSION["emp_id"];
                                                            $query = "SELECT * FROM member_add_task WHERE member='$empid'";
                                                            $result = mysqli_query($conn, $query);
                                                            while ($row = mysqli_fetch_assoc($result)) {
                                                                if ($row['status'] == '0') {

                                                            ?>

                                                                <tr>
                                                                    <td><?php echo $row['id']; ?></td>


                                                                    <td class="view-details-button fw-bold text-danger text-uppercase" style="text-decoration: none; " data-toggle="modal" data-target="#detailsModal<?php echo $row['id'];?>">
                                                                        <?php echo $row['title'] ?>
                                                                    </td>
                                                                    <td><?php echo $row['member']; ?></td>
                                                                    <td><?php echo $row['platform']; ?></td>
                                                                    <td><?php echo $row['task_discription']; ?></td>
                                                                    <td><?php echo $row['url']; ?></td>

                                                                    <td class="view-details-button fw-bold text-danger text-uppercase" style="text-decoration: none; " data-toggle="modal" data-target="#myModal<?php echo $row['id']; ?>">
                                                                        <p class="badge badge-primary">Update</p>
                                                                    </td>

                                                                    <?php
                                                                    include('connection.php');

                                                                    $sel = "SELECT * FROM member_update_task";
                                                                    $query = mysqli_query($conn, $sel);

                                                                    if ($query) {
                                                                        if ($fetch = mysqli_fetch_assoc($query)) {
                                                                            $status = $fetch['status'];
                                                                            echo "<td><button class='btn btn-primary' style='font-weight: 600; font-size: 12px; height: 30px;'>$status</button></td>";
                                                                        } else {
                                                                            echo "<td>No Status Found</td>";
                                                                        }
                                                                    } else {
                                                                        echo "Database query error: " . mysqli_error($conn);
                                                                    }

                                                                    mysqli_close($conn);
                                                                    ?>



                                                                    <td>
                                                                        <form method="POST" action="update_member_taskstatus_code.php">

                                                                            <input type="hidden" name="item_id" value="<?php echo $row['id']; ?>">
                                                                            <?php if ($row['status'] == 1) { ?>
                                                                                <input type="submit" name="block" value="Block" class="btn btn-danger" style="font-weight: 600;font-size: 12px;height: 30px;">
                                                                            <?php } else { ?>
                                                                                <input type="submit" name="activate" value="Achive" class="btn btn-success" style="font-weight: 600;font-size: 12px;height: 30px;">
                                                                            <?php } ?>
                                                                            <!-- <?php echo ($row['status'] == 1) ? "<div class='test rounded-circle'></div>" : "<div class='test2 rounded-circle'></div>"; ?> -->
                                                                        </form>
                                                                    </td>

                                                                    <div class="modal fade" id="myModal<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                                                                        <div class="modal-dialog" role="document">
                                                                            <div class="modal-content">
                                                                                <div class="modal-header bg-dark">
                                                                                    <h5 class="modal-title fw-bold" id="exampleModalLabel">
                                                                                        Task Title :
                                                                                        <?php echo $row['title'] ?></h5>
                                                                                    <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                                                                                        <span aria-hidden="true">&times;</span>
                                                                                    </button>
                                                                                </div>
                                                                                <!-- modal  -->
                                                                                <div class="modal-body">
                                                                                    <form action="update_member_task_code.php" method="POST">
                                                                                        <div class="card-body">
                                                                                            <div class="row">

                                                                                                <div class="col-6">
                                                                                                    <div class="form-group">
                                                                                                        <label for="exampleInputEmail">Task
                                                                                                            Title</label>
                                                                                                        <input type="text" name="title" class="form-control" readonly value="<?php echo $row['title']; ?>">
                                                                                                    </div>
                                                                                                </div>

                                                                                                <div class="col-6">
                                                                                                    <div class="form-group">
                                                                                                        <label for="exampleInputEmail">Member
                                                                                                            Name</label>
                                                                                                        <input type="text" name="group" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['member']; ?>">
                                                                                                    </div>
                                                                                                </div>

                                                                                            </div>

                                                                                            <div class="row">
                                                                                                <div class="col-6">
                                                                                                    <div class="form-group">
                                                                                                        <label for="exampleInputEmail">Platfrom</label>
                                                                                                        <input type="text" name="platefrom" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['platform']; ?>">
                                                                                                    </div>
                                                                                                </div>
                                                                                                <div class="col-6">
                                                                                                    <div class="form-group">
                                                                                                        <label for="exampleInputEmail">Task
                                                                                                            Description</label>
                                                                                                        <input type="text" name="description" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['task_discription']; ?>">
                                                                                                    </div>
                                                                                                </div>
                                                                                            </div>

                                                                                            <div class="row">
                                                                                                <div class="col-6">
                                                                                                    <div class="form-group">
                                                                                                        <label for="exampleInputEmail">URL</label>
                                                                                                        <input type="text" name="url" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['url']; ?>">
                                                                                                    </div>
                                                                                                </div>
                                                                                                <div class="col-6">
                                                                                                    <div class="form-group">
                                                                                                        <label for="exampleInputEmail">PDF
                                                                                                            Name</label><br>
                                                                                                        <input type="text" name="pdf" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['pdf']; ?>">
                                                                                                    </div>
                                                                                                </div>
                                                                                            </div>

                                                                                            <div class="row">
                                                                                                <div class="col-6">
                                                                                                    <label for="exampleInputEmail">Audio
                                                                                                        Name</label><br>
                                                                                                    <input type="text" name="audio" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['audio']; ?>">
                                                                                                </div>
                                                                                                <div class="col-6">
                                                                                                    <label for="exampleInputEmail">Video
                                                                                                        Name</label><br>
                                                                                                    <input type="text" name="video" readonly class="form-control" id="exampleInputEmail" placeholder="Contact Email" value="<?php echo $row['video']; ?>">
                                                                                                </div>
                                                                                            </div>
                                                                                            <div class="row">
                                                                                                <div class="col-6">
                                                                                                    <label for="exampleInputEmail">Image
                                                                                                        Name</label><br>
                                                                                                    <input type="text" name="image" readonly class="form-control" id="exampleInputEmail" value="<?php echo $row['image']; ?>">
                                                                                                </div>
                                                                                                <div class="col-6">
                                                                                                    <label for="exampleInputEmail">Update
                                                                                                        Msg
                                                                                                    </label><br>
                                                                                                    <div> <input type="text" name="msg" class="form-control" id="exampleInputEmail" placeholder="Update Msg Enter Here..." </div>
                                                                                                    </div>
                                                                                                </div>

                                                                                                <button class="btn btn-danger mt-5" type="submit">Submit</button>

                                                                                    </form>
                                                                                </div>

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

                                                                </tr>
                                                            <?php } } ?>
                                                        </tbody>
                                                    </table>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

        </div>
    </div>

    <!-- member title model start here -->
    <?php
      include('connection.php');
      $sql = "SELECT * FROM member_add_task";
      $query = mysqli_query($conn, $sql);
      while ($row = mysqli_fetch_assoc($query)) {
     ?>
    <div class="modal fade" id="detailsModal<?php echo $row['id'];?>">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header" style="background: #343a40; ">
                    <h4 class="modal-title fw-bold text-uppercase text-white">Member Id : <?php echo $row['member']?></h4>
                    <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <form action="update_leads_code.php" method="POST">
                        <div class="card-body">
                            <div class="row">
                                <div class="col-8">
                                    <video width="300" height="200" controls>
                                        <source src="../AdminLt/<?php echo $row['video']; ?>" type="video/mp4">
                                    </video>
                                </div>

                                <div class="col-4">
                                    <img src="../AdminLt/<?php echo $row['image']; ?>" alt=""
                                        style="height:200px;width:150px">
                                </div>

                            </div>

                            <div class="row">
                                <div class="col-6">
                                    <audio controls>
                                        <source src="../AdminLt/<?php echo $row['audio']; ?>" type="audio/mp3">
                                        Your browser does not support the audio element.
                                    </audio>
                                </div>
                                <div class="col-6">

                                    <div>
                                        <label>
                                            <a href="../AdminLt/<?php echo $row['pdf']; ?>" download>
                                                <?php echo $row['pdf']; ?>
                                            </a>
                                        </label>
                                    </div>



                                </div>
                            </div>



                        </div>

                    </form>


                </div>

            </div>

        </div>

    </div>
    <?php }?>
  <!-- member title model close here -->



    <?php include("footerlink.php") ?>



    <script src="../../plugins/datatables/jquery.dataTables.min.js">
    </script>
    <script src="../../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js">
    </script>
    <script src="../../plugins/datatables-responsive/js/dataTables.responsive.min.js">
    </script>
    <script src="../../plugins/datatables-responsive/js/responsive.bootstrap4.min.js">
    </script>
    <script src="../../plugins/datatables-buttons/js/dataTables.buttons.min.js">
    </script>
    <script src="../../plugins/datatables-buttons/js/buttons.bootstrap4.min.js">
    </script>
    <script src="../../plugins/jszip/jszip.min.js"></script>
    <script src="../../plugins/pdfmake/pdfmake.min.js"></script>
    <script src="../../plugins/pdfmake/vfs_fonts.js"></script>
    <script src="../../plugins/datatables-buttons/js/buttons.html5.min.js">
    </script>
    <script src="../../plugins/datatables-buttons/js/buttons.print.min.js">
    </script>
    <script src="../../plugins/datatables-buttons/js/buttons.colVis.min.js">
    </script>


    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script>
    <script>
        $(document).ready(function() {
            <?php if (isset($_GET['error'])) { ?>
                Swal.fire({
                    title: 'Error',
                    text: '<?php echo $_GET['error']; ?>',
                    icon: 'error',
                    confirmButtonText: 'OK',
                    confirmButtonClass: 'btn btn-success btn-lg',
                });
            <?php } ?>
            <?php if (isset($_GET['success'])) { ?>
                Swal.fire({
                    title: 'Success',
                    text: '<?php echo $_GET['success']; ?>',
                    icon: 'success',
                    confirmButtonText: 'OK',
                    confirmButtonClass: 'btn btn-success btn-lg',
                });
            <?php } ?>
        });
    </script>

    <script>
        function downloadAudio() {
            var audioFileName = document.getElementById('audio_filename').value;

            // Construct the URL for the file download
            var downloadUrl = 'path_to_your_download_script.php?file=' + audioFileName;

            // Create an invisible anchor element for triggering the download
            var downloadLink = document.createElement('a');
            downloadLink.href = downloadUrl;
            downloadLink.target = '_blank';
            downloadLink.download = audioFileName; // Optional, specifies the suggested file name

            // Trigger the download
            downloadLink.click();
        }
    </script>

    <script>
        // Use noConflict to avoid conflicts with other scripts
        var $j = jQuery.noConflict();
        $j(document).ready(function() {
            $j('#example2').DataTable();
        });
    </script>
</body>

</html>