shell bypass 403

GrazzMean Shell

Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : showProject.html
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Projet | Dashboard</title>

    <!-- Google Font: Source Sans Pro -->
    <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Tempusdominus Bootstrap 4 -->
    <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css">
    <!-- JQVMap -->
    <link rel="stylesheet" href="plugins/jqvmap/jqvmap.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="dist/css/adminlte.min.css">
    <!-- overlayScrollbars -->
    <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
    <!-- summernote -->
    <link rel="stylesheet" href="plugins/summernote/summernote-bs4.min.css">
    <script>
        if (!localStorage.getItem("nomPrenomCoordinatrice")) {
            location.replace("authentification.html");
        }
    </script>
</head>

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

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

        <!-- Navbar -->
        <nav class="main-header navbar navbar-expand navbar-white navbar-light">
            <!-- Left navbar links -->
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
                </li>


            </ul>

            <!-- Right navbar links -->
            <ul class="navbar-nav ml-auto">
                <!-- Navbar Search -->



                <!-- Notifications Dropdown Menu -->

                <li class="nav-item">
                    <a class="nav-link" data-widget="fullscreen" href="#" role="button">
                        <i class="fas fa-expand-arrows-alt"></i>
                    </a>
                </li>
                <li class="nav-item">

                </li>
            </ul>
        </nav>
        <!-- /.navbar -->

        <!-- Main Sidebar Container -->
        <aside class="main-sidebar sidebar-dark-primary elevation-4">
            <!-- Brand Logo -->
            <a href="index.html" class="brand-link">
                <img src="dist/img/logo-hammami-1.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
                    style="opacity: .8">
                <span class="brand-text font-weight-light">Groupe Hammami</span>
            </a>

            <!-- Sidebar -->
            <div class="sidebar">
                <!-- Sidebar user panel (optional) -->
                <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                    <!-- <div class="image">
                            <img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
                        </div> -->
                    <div>
                        <i class="fas fa-user-circle"
                            style="font-size: 21px;margin-top: 7px;margin-left: 10px; color: rgb(189, 185, 185);"></i>
                    </div>
                    <div class="info">
                        <a onclick="showCooredinatrice()" class="d-block"> <span id="coordinatrice"
                                style="cursor:pointer;"></span></a>
                    </div>
                </div>



                <!-- Sidebar Menu -->
                <nav class="mt-2">
                    <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                        data-accordion="false">
                        <!-- Add icons to the links using the .nav-icon class
                   with font-awesome or any other icon font library -->
                        <li class="nav-item">
                            <a href="index.html" class="nav-link">
                                <i class="nav-icon fas fa-home"></i>
                                <p>

                                    Acceuil

                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="pages/widgets.html" class="nav-link">
                                <i class="nav-icon fas fa-user-tie"></i>
                                <p>
                                    Commercial
                                    <i class="fas fa-angle-left right"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showCommercial.html" class="nav-link ">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addCommercial.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>

                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="nav-icon fas fa-city"></i>
                                <p>
                                    Produit
                                    <i class="right fas fa-angle-left"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showProduit.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addProduit.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>

                        <li class="nav-header">
                            <hr>
                        </li>
                        <li class="nav-item menu-open">
                            <a href="#" class="nav-link active">
                                <i class="nav-icon fas fa-business-time"></i>
                                <p>
                                    Projet
                                    <i class="right fas fa-angle-left"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showProject.html" class="nav-link active">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addProject.html?id=" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="nav-item">
                            <a href="showProspection.html" class="nav-link">
                                <i class="nav-icon fas fa-route"></i>
                                <p>
                                    Prospection
                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="nav-icon 	fas fa-brush"></i>
                                <p>
                                    Applicateur
                                    <i class="right fas fa-angle-left"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showApplicateur.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addApplicateur.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="nav-icon far fa-building"></i>
                                <p>
                                    PI
                                    <i class="right fas fa-angle-left"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showPI.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addPI.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="nav-icon fas fa-user-alt"></i>
                                <p>
                                    Architect
                                    <i class="right fas fa-angle-left"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showArchitect.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addArchitect.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="nav-icon far fa-building"></i>
                                <p>
                                    EGC
                                    <i class="right fas fa-angle-left"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview">
                                <li class="nav-item">
                                    <a href="showEGC.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>consulter</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="addEGC.html" class="nav-link">
                                        <i class="far fa-circle nav-icon"></i>
                                        <p>ajouter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>



                        </li>
                        <li class="nav-header">
                            <hr>
                        </li>
                        <li class="nav-item">
                            <a onclick="deconnection()" class="nav-link">
                                <i class="nav-icon far fa-circle text-danger"></i>
                                <p class="text">Deconnexion</p>
                            </a>
                        </li>

                    </ul>
                </nav>
                <!-- /.sidebar-menu -->
            </div>
            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1>Projet</h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">


                            </ol>
                        </div>
                    </div>
                </div><!-- /.container-fluid -->
            </section>

            <!-- Main content -->
            <section class="content">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-12">
                            <div class="card">
                                <div class="card-header">
                                    <h3 class="card-title">liste Des Projet En négociation</h3>

                                    <div class="card-tools">
                                        <div class="input-group input-group-sm" style="width: 165px;">
                                            <input type="text" name="table_search" class="form-control float-right"
                                                placeholder="Chercher par Nom" id="chercher" onkeyup="myFunction();">

                                            <div class="input-group-append">
                                                <button type="submit" class="btn btn-default">
                                                    <i class="fas fa-search"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-header -->
                                <div class="card-body table-responsive p-0" style="height: 300px;">
                                    <table class="table table-head-fixed table-striped text-nowrap">
                                        <thead>
                                            <tr>

                                                <th>Nom Projet</th>
                                                <th>Type Projet</th>
                                                <th>R+</th>
                                                <th>Zone</th>
                                                <th>Etape Avancement</th>

                                                <th>Etat Projet</th>

                                                <th style="text-align: center;">Visites</th>
                                                <th style="text-align: center;">Produits</th>
                                                <th style="text-align: center;">
                                                    Action
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody id="listProjet">


                                        </tbody>
                                    </table>
                                </div>
                                <!-- /.card-body -->
                            </div>
                            <div class="card">
                                <div class="card-header">
                                    <h3 class="card-title">liste Des Projet En cours</h3>

                                    <div class="card-tools">
                                        <div class="input-group input-group-sm" style="width: 165px;">
                                            <input type="text" name="table_search" class="form-control float-right"
                                                placeholder="Chercher par Nom" id="chercher1" onkeyup="myFunction1();">

                                            <div class="input-group-append">
                                                <button type="submit" class="btn btn-default">
                                                    <i class="fas fa-search"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-header -->
                                <div class="card-body table-responsive p-0" style="height: 300px;">
                                    <table class="table table-head-fixed table-striped text-nowrap">
                                        <thead>
                                            <tr>

                                                <th>Nom Projet</th>
                                                <th>Type Projet</th>
                                                <th>R+</th>
                                                <th>Zone</th>
                                                <th>Etape Avancement</th>

                                                <th>Etat Projet</th>

                                                <th style="text-align: center;">Visites</th>
                                                <th style="text-align: center;">Produits</th>
                                                <th style="text-align: center;">
                                                    Action
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody id="listProjet1">


                                        </tbody>
                                    </table>
                                </div>
                                <!-- /.card-body -->
                            </div>
                            <div class="card">
                                <div class="card-header">
                                    <h3 class="card-title">liste Des Projet Annulé </h3>

                                    <div class="card-tools">
                                        <div class="input-group input-group-sm" style="width: 165px;">
                                            <input type="text" name="table_search" class="form-control float-right"
                                                placeholder="Chercher par Nom" id="chercher2" onkeyup="myFunction2();">

                                            <div class="input-group-append">
                                                <button type="submit" class="btn btn-default">
                                                    <i class="fas fa-search"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-header -->
                                <div class="card-body table-responsive p-0" style="height: 300px;">
                                    <table class="table table-head-fixed table-striped text-nowrap">
                                        <thead>
                                            <tr>

                                                <th>Nom Projet</th>
                                                <th>Type Projet</th>
                                                <th>R+</th>
                                                <th>Zone</th>
                                                <th>Etape Avancement</th>

                                                <th>Etat Projet</th>

                                                <th style="text-align: center;">Visites</th>
                                                <th style="text-align: center;">Produits</th>
                                                <th style="text-align: center;">
                                                    Action
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody id="listProjet2">


                                        </tbody>
                                    </table>
                                </div>
                                <!-- /.card-body -->
                            </div>
                            <div class="card">
                                <div class="card-header">
                                    <h3 class="card-title">liste Des Projet Cloturé </h3>

                                    <div class="card-tools">
                                        <div class="input-group input-group-sm" style="width: 165px;">
                                            <input type="text" name="table_search" class="form-control float-right"
                                                placeholder="Chercher par Nom" id="chercher3" onkeyup="myFunction3();">

                                            <div class="input-group-append">
                                                <button type="submit" class="btn btn-default">
                                                    <i class="fas fa-search"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-header -->
                                <div class="card-body table-responsive p-0" style="height: 300px;">
                                    <table class="table table-head-fixed table-striped text-nowrap">
                                        <thead>
                                            <tr>

                                                <th>Nom Projet</th>
                                                <th>Type Projet</th>
                                                <th>R+</th>
                                                <th>Zone</th>
                                                <th>Etape Avancement</th>
                                                <th>Etat Projet</th>

                                                <th style="text-align: center;">Visites</th>
                                                <th style="text-align: center;">Produits</th>
                                                <th style="text-align: center;">
                                                    Action
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody id="listProjet3">


                                        </tbody>
                                    </table>
                                </div>
                                <!-- /.card-body -->
                            </div>
                            <div class="card">
                                <div class="card-header">
                                    <h3 class="card-title">liste Des Projet Arrêté </h3>

                                    <div class="card-tools">
                                        <div class="input-group input-group-sm" style="width: 165px;">
                                            <input type="text" name="table_search" class="form-control float-right"
                                                placeholder="Chercher par Nom" id="chercher4" onkeyup="myFunction4();">

                                            <div class="input-group-append">
                                                <button type="submit" class="btn btn-default">
                                                    <i class="fas fa-search"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-header -->
                                <div class="card-body table-responsive p-0" style="height: 300px;">
                                    <table class="table table-head-fixed table-striped text-nowrap">
                                        <thead>
                                            <tr>

                                                <th>Nom Projet</th>
                                                <th>Type Projet</th>
                                                <th>R+</th>
                                                <th>Zone</th>
                                                <th>Etape Avancement</th>

                                                <th>Etat Projet</th>

                                                <th style="text-align: center;">Visites</th>
                                                <th style="text-align: center;">Produits</th>
                                                <th style="text-align: center;">
                                                    Action
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody id="listProjet4">


                                        </tbody>
                                    </table>
                                </div>
                                <!-- /.card-body -->
                            </div>
                            <!-- /.card -->
                        </div>
                    </div>
                    <!-- /.row -->


                </div><!-- /.container-fluid -->
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->

        <!-- jQuery -->
        <script src="plugins/jquery/jquery.min.js"></script>
        <!-- jQuery UI 1.11.4 -->
        <script src="plugins/jquery-ui/jquery-ui.min.js"></script>
        <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
        <script>
            $.widget.bridge('uibutton', $.ui.button)
        </script>
        <!-- Bootstrap 4 -->
        <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
        <!-- ChartJS -->
        <script src="plugins/chart.js/Chart.min.js"></script>
        <!-- Sparkline -->
        <script src="plugins/sparklines/sparkline.js"></script>
        <!-- JQVMap -->
        <script src="plugins/jqvmap/jquery.vmap.min.js"></script>
        <script src="plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
        <!-- jQuery Knob Chart -->
        <script src="plugins/jquery-knob/jquery.knob.min.js"></script>
        <!-- daterangepicker -->
        <script src="plugins/moment/moment.min.js"></script>
        <script src="plugins/daterangepicker/daterangepicker.js"></script>
        <!-- Tempusdominus Bootstrap 4 -->
        <script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
        <!-- Summernote -->
        <script src="plugins/summernote/summernote-bs4.min.js"></script>
        <!-- overlayScrollbars -->
        <script src="plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
        <!-- AdminLTE App -->
        <script src="dist/js/adminlte.js"></script>
        <!-- AdminLTE for demo purposes -->
        <script src="dist/js/demo.js"></script>
        <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
        <script src="dist/js/pages/dashboard.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

        <script>
            let idDept = localStorage.getItem("idDepartement");
            // Create a request variable and assign a new XMLHttpRequest object to it.
            var request = new XMLHttpRequest()
            // Open a new connection, using the GET request on the URL endpoint
            request.open('GET', 'http://127.0.0.1:3000/projets', true)
            request.onload = function () {
                // Begin accessing JSON data here
                var data = JSON.parse(this.response)
                var table = document.getElementById("listProjet");
                var table1 = document.getElementById("listProjet1");
                var table2 = document.getElementById("listProjet2");
                var table3 = document.getElementById("listProjet3");
                var table4 = document.getElementById("listProjet4");
                console.log(data);
                data.sort(function (a, b) {
                    a = new Date(a.createdAt);
                    b = new Date(b.createdAt);
                    return a > b ? -1 : a < b ? 1 : 0;
                })
                data.forEach(i => {
                    if (i.idDepartement == idDept) {
                        if (i.etatProjet == "En negociation") {
                            // console.log(i.idDepartement);
                            var row = table.insertRow(-1);//<tr>
                            var cell1 = row.insertCell(0);//<th> ou <td>
                            var cell2 = row.insertCell(1);
                            var cell3 = row.insertCell(2);
                            var cell4 = row.insertCell(3);
                            var cell5 = row.insertCell(4);
                            var cell6 = row.insertCell(5);
                            var cell7 = row.insertCell(6);
                            var cell8 = row.insertCell(7);
                            var cell9 = row.insertCell(8);
                            var cell10 = row.insertCell(9);


                            cell1.innerHTML = i.nomProjet;
                            cell2.innerHTML = i.typeProjet;
                            cell3.innerHTML = i.RPlus;
                            cell4.innerHTML = i.zone;
                            cell5.innerHTML = i.etapeAvancement;
                            cell6.style = "text-align: center;";
                            cell6.innerHTML = i.etatProjet;

                            cell7.innerHTML = "<a class='btn btn-success btn-sm' style='margin-right: 5px;' href='showVisit.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell8.innerHTML = "<a class='btn btn-secondary btn-sm' style='margin-right: 5px;' href='detailProduitProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell9.innerHTML = "<a class='btn btn-dark btn-sm' style='margin-right: 5px;' href='detailProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > " + "<a class='btn btn-info btn-sm' style='margin-right: 5px;' href='updateProjet.html?id=" + i._id + "'><i class='fas fa-pencil-alt'></i></a>" + `<a class='btn btn-danger btn-sm' href='#' onclick="verifAvantdelete1('` + i._id + `');"><i class='fas fa-trash'></i></a>`;
                            //cell11.innerHTML = "<a class='btn btn-info btn-sm' href='#'><i class='fas fa-pencil-alt'></i></a>";
                            //cell12.innerHTML = "<a class='btn btn-danger btn-sm' href='#''><i class='fas fa-trash'></i></a>";
                        }

                        if (i.etatProjet == "En cours") {
                            // console.log(i.idDepartement);
                            var row = table1.insertRow(-1);//<tr>
                            var cell1 = row.insertCell(0);//<th> ou <td>
                            var cell2 = row.insertCell(1);
                            var cell3 = row.insertCell(2);
                            var cell4 = row.insertCell(3);
                            var cell5 = row.insertCell(4);
                            var cell6 = row.insertCell(5);
                            var cell7 = row.insertCell(6);
                            var cell8 = row.insertCell(7);
                            var cell9 = row.insertCell(8);
                            var cell10 = row.insertCell(9);


                            cell1.innerHTML = i.nomProjet;
                            cell2.innerHTML = i.typeProjet;
                            cell3.innerHTML = i.RPlus;
                            cell4.innerHTML = i.zone;
                            cell5.innerHTML = i.etapeAvancement;
                            cell6.style = "text-align: center;";
                            cell6.innerHTML = i.etatProjet;

                            cell7.innerHTML = "<a class='btn btn-success btn-sm' style='margin-right: 5px;' href='showVisit.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell8.innerHTML = "<a class='btn btn-secondary btn-sm' style='margin-right: 5px;' href='detailProduitProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell9.innerHTML = "<a class='btn btn-dark btn-sm' style='margin-right: 5px;' href='detailProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > " + "<a class='btn btn-info btn-sm' style='margin-right: 5px;' href='updateProjet.html?id=" + i._id + "'><i class='fas fa-pencil-alt'></i></a>" + `<a class='btn btn-danger btn-sm' href='#' onclick="verifAvantdelete1('` + i._id + `');"><i class='fas fa-trash'></i></a>`;
                            //cell11.innerHTML = "<a class='btn btn-info btn-sm' href='#'><i class='fas fa-pencil-alt'></i></a>";
                            //cell12.innerHTML = "<a class='btn btn-danger btn-sm' href='#''><i class='fas fa-trash'></i></a>";
                        }
                        if (i.etatProjet == "Annulé") {
                            // console.log(i.idDepartement);
                            var row = table2.insertRow(-1);//<tr>
                            var cell1 = row.insertCell(0);//<th> ou <td>
                            var cell2 = row.insertCell(1);
                            var cell3 = row.insertCell(2);
                            var cell4 = row.insertCell(3);
                            var cell5 = row.insertCell(4);
                            var cell6 = row.insertCell(5);
                            var cell7 = row.insertCell(6);
                            var cell8 = row.insertCell(7);
                            var cell9 = row.insertCell(8);
                            var cell10 = row.insertCell(9);


                            cell1.innerHTML = i.nomProjet;
                            cell2.innerHTML = i.typeProjet;
                            cell3.innerHTML = i.RPlus;
                            cell4.innerHTML = i.zone;
                            cell5.innerHTML = i.etapeAvancement;
                            cell6.style = "text-align: center;";
                            cell6.innerHTML = i.etatProjet;

                            cell7.innerHTML = "<a class='btn btn-success btn-sm' style='margin-right: 5px;' href='showVisit.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell8.innerHTML = "<a class='btn btn-secondary btn-sm' style='margin-right: 5px;' href='detailProduitProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell9.innerHTML = "<a class='btn btn-dark btn-sm' style='margin-right: 5px;' href='detailProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > " + "<a class='btn btn-info btn-sm' style='margin-right: 5px;' href='updateProjet.html?id=" + i._id + "'><i class='fas fa-pencil-alt'></i></a>" + `<a class='btn btn-danger btn-sm' href='#' onclick="verifAvantdelete1('` + i._id + `');"><i class='fas fa-trash'></i></a>`;
                            //cell11.innerHTML = "<a class='btn btn-info btn-sm' href='#'><i class='fas fa-pencil-alt'></i></a>";
                            //cell12.innerHTML = "<a class='btn btn-danger btn-sm' href='#''><i class='fas fa-trash'></i></a>";
                        }

                        if (i.etatProjet == "Cloturer") {
                            // console.log(i.idDepartement);
                            var row = table3.insertRow(-1);//<tr>
                            var cell1 = row.insertCell(0);//<th> ou <td>
                            var cell2 = row.insertCell(1);
                            var cell3 = row.insertCell(2);
                            var cell4 = row.insertCell(3);
                            var cell5 = row.insertCell(4);
                            var cell6 = row.insertCell(5);
                            var cell7 = row.insertCell(6);
                            var cell8 = row.insertCell(7);
                            var cell9 = row.insertCell(8);
                            var cell10 = row.insertCell(9);


                            cell1.innerHTML = i.nomProjet;
                            cell2.innerHTML = i.typeProjet;
                            cell3.innerHTML = i.RPlus;
                            cell4.innerHTML = i.zone;
                            cell5.innerHTML = i.etapeAvancement;
                            cell6.style = "text-align: center;";
                            cell6.innerHTML = i.etatProjet;

                            cell7.innerHTML = "<a class='btn btn-success btn-sm' style='margin-right: 5px;' href='showVisit.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell8.innerHTML = "<a class='btn btn-secondary btn-sm' style='margin-right: 5px;' href='detailProduitProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell9.innerHTML = "<a class='btn btn-dark btn-sm' style='margin-right: 5px;' href='detailProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > " + "<a class='btn btn-info btn-sm' style='margin-right: 5px;' href='updateProjet.html?id=" + i._id + "'><i class='fas fa-pencil-alt'></i></a>" + `<a class='btn btn-danger btn-sm' href='#' onclick="verifAvantdelete1('` + i._id + `');"><i class='fas fa-trash'></i></a>`;
                        }
                        if (i.etatProjet == "Arreter") {
                            // console.log(i.idDepartement);
                            var row = table4.insertRow(-1);//<tr>
                            var cell1 = row.insertCell(0);//<th> ou <td>
                            var cell2 = row.insertCell(1);
                            var cell3 = row.insertCell(2);
                            var cell4 = row.insertCell(3);
                            var cell5 = row.insertCell(4);
                            var cell6 = row.insertCell(5);
                            var cell7 = row.insertCell(6);
                            var cell8 = row.insertCell(7);
                            var cell9 = row.insertCell(8);
                            var cell10 = row.insertCell(9);


                            cell1.innerHTML = i.nomProjet;
                            cell2.innerHTML = i.typeProjet;
                            cell3.innerHTML = i.RPlus;
                            cell4.innerHTML = i.zone;
                            cell5.innerHTML = i.etapeAvancement;
                            cell6.style = "text-align: center;";
                            cell6.innerHTML = i.etatProjet;

                            cell7.innerHTML = "<a class='btn btn-success btn-sm' style='margin-right: 5px;' href='showVisit.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell8.innerHTML = "<a class='btn btn-secondary btn-sm' style='margin-right: 5px;' href='detailProduitProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > ";
                            cell9.innerHTML = "<a class='btn btn-dark btn-sm' style='margin-right: 5px;' href='detailProjet.html?id=" + i._id + "'><i class='fas fa-eye'></i ></a > " + "<a class='btn btn-info btn-sm' style='margin-right: 5px;' href='updateProjet.html?id=" + i._id + "'><i class='fas fa-pencil-alt'></i></a>" + `<a class='btn btn-danger btn-sm' href='#' onclick="verifAvantdelete1('` + i._id + `');"><i class='fas fa-trash'></i></a>`;
                        }
                    }

                })
            }
            // Send request
            request.send()




        </script>


        <script>
            function verifAvantdelete1(c) {
                var j = 0;
                // Create a request variable and assign a new XMLHttpRequest object to it.
                var request = new XMLHttpRequest()
                // Open a new connection, using the GET request on the URL endpoint
                request.open('GET', 'http://127.0.0.1:3000/visites', true)
                request.onload = function () {
                    // Begin accessing JSON data here
                    var data = JSON.parse(this.response)
                    console.log(data);
                    //alert(c);
                    data.forEach(i => {
                        if (i.idProjet == c) {
                            j++;
                        }


                    })
                    //alert(j);
                    verifAvantdelete2(j, c);
                }

                // Send request
                request.send()

            }
            function verifAvantdelete2(proj, c) {
                var j = 0;
                // Create a request variable and assign a new XMLHttpRequest object to it.
                var request = new XMLHttpRequest()
                // Open a new connection, using the GET request on the URL endpoint
                request.open('GET', 'http://127.0.0.1:3000/detailsProduit', true)
                request.onload = function () {
                    // Begin accessing JSON data here
                    var data = JSON.parse(this.response)
                    console.log(data);
                    data.forEach(i => {
                        if (i.idProjet == c) {
                            j++;
                        }


                    })
                    //alert(j);
                    verifAvantdelete3(proj, j, c);
                }

                // Send request
                request.send()



            }
            function verifAvantdelete3(proj, j, c) {
                var v = 0;
                // Create a request variable and assign a new XMLHttpRequest object to it.
                var request = new XMLHttpRequest()
                // Open a new connection, using the GET request on the URL endpoint
                request.open('GET', 'http://127.0.0.1:3000/missions', true)
                request.onload = function () {
                    // Begin accessing JSON data here
                    var data = JSON.parse(this.response)
                    console.log(data);
                    data.forEach(i => {
                        if (i.idProjet == c) {
                            v++;
                        }


                    })
                    // alert(j);
                    deleteProjet(proj, j, v, c);
                }

                // Send request
                request.send()



            }
        </script>


        <script>
            function deleteProjet(proj, j, v, c) {
                if (proj == 0 && j == 0 && v == 0) {
                    Swal.fire({
                        title: 'Etes vous Sure?',
                        text: "Vous ne pouvez plus trouvez cet element!",
                        icon: 'warning',
                        showCancelButton: true,
                        confirmButtonColor: '#228B22',
                        cancelButtonColor: '#d33',
                        confirmButtonText: 'Oui, Supprimer!'
                    }).then((result) => {
                        if (result.isConfirmed) {
                            var url3 = "http://127.0.0.1:3000/projets/" + c;
                            var xhr3 = new XMLHttpRequest();
                            xhr3.open("GET", url3, true);

                            xhr3.onload = function () {
                                var projets = JSON.parse(xhr3.responseText);
                                console.log(projets);
                                if (xhr3.readyState == 4 && xhr3.status == "200") {
                                    //alert("ouiiSS");
                                    var url = "http://127.0.0.1:3000/archiveProjets";
                                    var data = {};
                                    data.nomProjet = projets.nomProjet;
                                    data.typeProjet = projets.typeProjet;
                                    data.dureeProjet = projets.dureeProjet;
                                    data.RPlus = projets.RPlus;
                                    data.zone = projets.zone;
                                    data.idPI = projets.idPI;
                                    data.idEGC = projets.idEGC;
                                    data.idArchitect = projets.idArchitect;
                                    data.idApplicateur = projets.idApplicateur;
                                    data.etapeAvancement = projets.etapeAvancement;
                                    data.observation = projets.observation;
                                    data.idcommerciale = projets.idcommerciale;
                                    data.budget = projets.budget;
                                    data.reclamation = projets.reclamation;
                                    data.etatProjet = projets.etatProjet;
                                    data.idProspection = "";
                                    data.budgetConcratiser = projets.budgetConcratiser;
                                    data.idDepartement = projets.idDepartement;

                                    var json = JSON.stringify(data);
                                    var xhr = new XMLHttpRequest();
                                    xhr.open("POST", url, true);
                                    xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');
                                    xhr.onload = function () {
                                        var projets = JSON.parse(xhr.responseText);
                                        if (xhr.readyState == 4 && xhr.status == "200") {
                                            //alert("hello111");
                                            var url3 = "http://127.0.0.1:3000/projets/" + c;
                                            var xhr3 = new XMLHttpRequest();
                                            xhr3.open("DELETE", url3, true);
                                            xhr3.onload = function () {
                                                if (xhr3.readyState == 4 && xhr3.status == "200") {
                                                    Swal.fire({
                                                        title: 'Supprimer!',
                                                        text: 'Ce fichier est Supprimer avec Succès',
                                                        icon: 'success',


                                                    }).then((result) => {
                                                        if (result.isConfirmed) {
                                                            location.replace("showProject.html");
                                                            event.preventDefault();
                                                        }

                                                    })

                                                } else {
                                                    console.log("error");
                                                }
                                            }
                                            xhr3.send(null);

                                        } else {
                                            console.log(projets.message);

                                            console.log(projets.message);


                                            console.table(projets);
                                        }
                                    }
                                    xhr.send(json);

                                } else {

                                    console.log("error");
                                }
                            }

                            xhr3.send(null);

                        }
                    })
                } else {
                    Swal.fire({
                        title: "Impossible d'effectuer la Suppression!",
                        text: "Ce fichier est relier à d'autre entites ,la Suppression de ce fichier peut entrainer des incoherances de données",
                        icon: 'error',
                    })
                }
            }
        </script>

        <script>
            function myFunction() {
                var input, filter, table, tr, td, i, txtValue;
                input = document.getElementById("chercher");
                filter = input.value.toUpperCase();
                table = document.getElementById("listProjet");
                tr = table.getElementsByTagName("tr");
                for (i = 0; i < tr.length; i++) {
                    td = tr[i].getElementsByTagName("td")[0];
                    if (td) {
                        txtValue = td.textContent || td.innerText;
                        if (txtValue.toUpperCase().indexOf(filter) > -1) {
                            tr[i].style.display = "";
                        } else {
                            tr[i].style.display = "none";
                        }
                    }
                }
            }
        </script>

        <script>
            function myFunction1() {
                var input, filter, table, tr, td, i, txtValue;
                input = document.getElementById("chercher1");
                filter = input.value.toUpperCase();
                table = document.getElementById("listProjet1");
                tr = table.getElementsByTagName("tr");
                for (i = 0; i < tr.length; i++) {
                    td = tr[i].getElementsByTagName("td")[0];
                    if (td) {
                        txtValue = td.textContent || td.innerText;
                        if (txtValue.toUpperCase().indexOf(filter) > -1) {
                            tr[i].style.display = "";
                        } else {
                            tr[i].style.display = "none";
                        }
                    }
                }
            }
        </script>

        <script>
            function myFunction2() {
                var input, filter, table, tr, td, i, txtValue;
                input = document.getElementById("chercher2");
                filter = input.value.toUpperCase();
                table = document.getElementById("listProjet2");
                tr = table.getElementsByTagName("tr");
                for (i = 0; i < tr.length; i++) {
                    td = tr[i].getElementsByTagName("td")[0];
                    if (td) {
                        txtValue = td.textContent || td.innerText;
                        if (txtValue.toUpperCase().indexOf(filter) > -1) {
                            tr[i].style.display = "";
                        } else {
                            tr[i].style.display = "none";
                        }
                    }
                }
            }
        </script>

        <script>
            function myFunction3() {
                var input, filter, table, tr, td, i, txtValue;
                input = document.getElementById("chercher3");
                filter = input.value.toUpperCase();
                table = document.getElementById("listProjet3");
                tr = table.getElementsByTagName("tr");
                for (i = 0; i < tr.length; i++) {
                    td = tr[i].getElementsByTagName("td")[0];
                    if (td) {
                        txtValue = td.textContent || td.innerText;
                        if (txtValue.toUpperCase().indexOf(filter) > -1) {
                            tr[i].style.display = "";
                        } else {
                            tr[i].style.display = "none";
                        }
                    }
                }
            }
        </script>

        <script>
            function myFunction4() {
                var input, filter, table, tr, td, i, txtValue;
                input = document.getElementById("chercher4");
                filter = input.value.toUpperCase();
                table = document.getElementById("listProjet4");
                tr = table.getElementsByTagName("tr");
                for (i = 0; i < tr.length; i++) {
                    td = tr[i].getElementsByTagName("td")[0];
                    if (td) {
                        txtValue = td.textContent || td.innerText;
                        if (txtValue.toUpperCase().indexOf(filter) > -1) {
                            tr[i].style.display = "";
                        } else {
                            tr[i].style.display = "none";
                        }
                    }
                }
            }
        </script>

        <script>
            let nomPrenom = localStorage.getItem("nomPrenomCoordinatrice");
            if (nomPrenom != "") {
                var Coordinatrice = document.getElementById("coordinatrice");
                Coordinatrice.innerHTML = nomPrenom;
            } else {
                location.replace("authentification.html")
            }
        </script>

        <script>
            function deconnection() {
                localStorage.clear();
                location.replace("authentification.html");
            }
        </script>

        <script>
            function showCooredinatrice() {

                let id = localStorage.getItem("idCoordinatrice");
                if (id != null) {
                    location.replace("detailCoordinatrice.html?id=" + id);

                }

            }
        </script>

</body>

</html>
© 2026 GrazzMean