Your IP : 216.73.216.65


Current Path : /home/ataenra/www/ATA/INTRANET/Admin/
Upload File :
Current File : /home/ataenra/www/ATA/INTRANET/Admin/agpchoix.php

<?php

//RECUP DES INFORMATIONS SUR TABLE pacaevar

    //Tableau de tous les projets en cours

    $list1 = $dbco->prepare("SELECT * FROM dossier D JOIN client C ON D.IDclient = C.IDc WHERE  D.Etat = 'Soumis'"); 

    $list1->execute();



    //Tableau des projets en attente sonergia

    $list2 = $dbco->prepare("SELECT * FROM dossier D JOIN client C ON D.IDclient = C.IDc WHERE  D.Etat = 'En traitement'"); 

    $list2->execute();



    //Tableau des projets a signer

    $list3 = $dbco->prepare("SELECT * FROM dossier D JOIN client C ON D.IDclient = C.IDc WHERE  D.Etat IN ('A signer', 'Valide', 'Devis Valide')"); 

    $list3->execute();

?>



<!-- DOCUMENT HTML A AFFICHER-->



<!DOCTYPE html>

    <html lang="en">

    <head>

        <title>GESTION PROJETS</title>

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

        <link href="./ATA/INTRANET/Admin/css/agcom.css" rel="stylesheet" type="text/css">

    </head>



    <body>

    

    <div class="containerPage"> 

        <div class="containerTitre">

            <div class="row" >

                <div class="col-md-2">

	    		<img src="./ATA/INTRANET/Outils/required/ATA_logo_horiz.jpg" alt="ISO" width=100% class="img-responsive" />

                </div>   

                <div class="col-md-8">

				<span class="align-middle">ADMIN GESTION PROJET</span>

                </div> 

                <div class="col-md-2">

                <a href="index.php/hadm" title="">

	            <img alt="HOME" src="./ATA/INTRANET/Outils/required/home1.png" alt="ISO" width=30% class="img-responsive" class="align-right"/> </a>  

                </div>

                

	         </div>	

	    </div>





            <form method="post" autocomplete="off">

        <div class="container1"> 



                

                    

                        <h5 class="btn-lg btn-info" toggle="tooltip" data-placement="top" title="Genere le fichier de synthese pour realiser le devis et le dossier sonergia"> PROJETS A TRAITER </h5>

                        <div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 176px;">

                        <table class='table table-hover table-bordered table-condensed'>

                        <thead>

                        <tr>

                            <th>DATE</th> 

                            <th>ID</th>

                            <th>COMMERCIAL</th>

                            <th>Type</th>

                            <th>SYNTHESE DU PROJET</th>

                            <th>DEVIS</th>

                            <th>ETAT AIDES</th>

                            <th>ACTIONS</th>

                        </tr>

                        </thead>



                        <tbody>

                        <?php while ($R1 = $list1->fetch(PDO::FETCH_OBJ)) {?>



                        <tr>

                           <?php $soumis = $R1->DateCreation; $dateTime = new DateTime($soumis); ?>

                            <td><?php echo $dateTime->Format('d-m-Y'); ?></td>

                            <td><?php echo $R1->ID; ?></td>

                            <td><?php echo $R1->user; ?></td>

                            <td><?php echo $R1->typeprojet; ?></td>

                            <td><?php 

                                $files = './ATA/FICHIERS/'.$R1->ID.'/Synthese/synthese'.$R1->ID.'.pdf';

                                $check = @fopen($files, 'r');

                                if($R1->PrimeATA == "Oui"){$A="Oui";}else{$A="Non";}

                                if(!$check){ echo '<a class="btn btn-primary" toggle="tooltip" data-placement="top" title="Genere le fichier de synthese pour realiser le devis et le dossier sonergia" href="./ATA/INTRANET/GenPDF/2Synthese/genpdfsynthese.php?ID='.$R1->ID.'&T='.$R1->tableprojet.'&A='.$A.'">GENERER</a>';

                                }if($check){echo '<a class="btn btn-primary" href="./ATA/FICHIERS/'.$R1->ID.'/Synthese/synthese'.$R1->ID.'.pdf" download="">TELECHARGER</a>';} ?></td>

                           

                            <td><?php echo $R1->Devis; ?></td>    

                            <td><?php echo $R1->EtatAides; ?></td>   

                            <td><?php $files2 = './ATA/FICHIERS/'.$R1->ID.'/Devis/Devis'.$R1->ID.'.pdf'; $check2 = @fopen($files2, 'r');

                                      if(($R1->Devis=="A faire")&&(!$check2)) { echo '<a class="btn btn-danger" href="./ATA/INTRANET/GenPDF/12Devis/genpdfDevis.php?ID='.$R1->ID.'&T='.$R1->tableprojet.'&A='.$A.' ">DEVIS AUTO</a>';} ?>                           

                                <?php if(($R1->Devis=="A faire")&&($R1->PrimeATA=="Non")) { echo '<a class="btn btn-primary" href="./ATA/INTRANET/Admin/updevisF.php?ID='.$R1->ID.'">UPLOAD DEVIS</a>';} ?>

                                <?php if(($R1->Devis=="A faire")&&($R1->PrimeATA=="Oui")) { echo '<a class="btn btn-primary" href="./ATA/INTRANET/Admin/updevis.php?ID='.$R1->ID.'">UPLOAD DEVIS SONERGIA</a>';} ?>

                                <?php $files3 = './ATA/FICHIERS/'.$R1->ID.'/Sonergia/sonergia'.$R1->ID.'.pdf'; $check3 = @fopen($files3, 'r'); ?>

                                <?php if(($R1->Devis=="Devis Sonergia")&&($R1->PrimeATA=="Oui")&&($R1->EtatAides=="A faire")&&(!$check3)) { echo '<a class="btn btn-primary" href="./ATA/INTRANET/GenPDF/3Sonergia/genpdfsonergia.php?ID='.$R1->ID.'&Tp='.$R1->tableprojet.'">2 GENERER DOSSIER SONERGIA</a>';} ?>

                                

                                

                                

                                

                                <?php if(($R1->Devis=="Devis Sonergia")&&($R1->PrimeATA=="Oui")&&($R1->EtatAides=="Dossier disponible")&&($check3)) {echo '<a class="btn btn-danger" href="./ATA/FICHIERS/'.$R1->ID.'/Sonergia/sonergia'.$R1->ID.'.pdf" download="">3 CONTROLE DOSSIER</a>';} ?>

                                <?php if(($R1->Devis=="Devis Sonergia")&&($R1->PrimeATA=="Oui")&&($R1->EtatAides=="Dossier disponible")&&($check3)) { echo '<a class="btn btn-primary" href="./ATA/INTRANET/GenPDF/3Sonergia/SendSonergia.php?ID='.$R1->ID.'">4 ENVOYER A SONERGIA</a>';} ?>

                                <?php if(($R1->Devis=="Devis Final")&&($R1->PrimeATA=="Non")) { echo '<a class="btn btn-primary" href="./ATA/INTRANET/Admin/updevisF.php?ID='.$R1->ID.'">UPLOAD DEVIS FINAL</a>';} ?>

                            </tr>

                        </tbody>              

                        <?php } ?>



                    </table>

                </div>

                </div>   



        <div class="container1">

                

                        

                        <h4 class="btn-lg btn-warning" toggle="tooltip" data-placement="top" title="Genere le fichier de synthese pour realiser le devis et le dossier sonergia"> PROJETS EN ATTENTE / SONERGIA ou DEVIS A VALIDER </h4>

                        <div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 176px;">

                        <table class='table table-hover table-bordered table-condensed'>

        

                        <tr>

                            <th>Date</th>

                            <th>ID</th>

                            <th>Commercial</th>

                            <th>Nom</th>

                            <th>Code Postal</th>

                            <th>Type</th>

                            <th>Sonergia</th>

                            <th>Devis</th>

                            <th>Etat</th>

                            <th>Action</th>

                        </tr>



                        <?php while ($R2 = $list2->fetch(PDO::FETCH_OBJ)) {?>



                        <tr>

                        <?php $soumis2 = $R2->DateCreation; $dateTime2 = new DateTime($soumis2); ?>

                            <td><?php echo $dateTime2->Format('d-m-Y'); ?></td>

                            <td><?php echo $R2->ID; ?></td>

                            <td><?php echo $R2->user; ?></td>

                            <td><?php echo $R2->nom; ?></td>

                            <td><?php echo $R2->CodePC; ?></td>

                            <td><?php echo $R2->typeprojet; ?></td>

                            <td><?php if($R2->EtatAides=="Dossier disponible"){echo '<a class="btn btn-default" href="./ATA/FICHIERS/'.$R2->ID.'/Sonergia/sonergia'.$R2->ID.'.pdf" download="">ETUDE SONERGIA</a>';}

                            elseif ($R2->EtatAides=="Valide"){echo '<a class="btn btn-info" href="./ATA/FICHIERS/'.$R2->ID.'/Sonergia/validationsonergia.'.$R2->ID.'.pdf" download="">VALIDE PAR SONERGIA</a>';}else{echo $R2->EtatAides;} ?>

                            

                        </td>

                            <td><?php echo $R2->Devis; ?></td>

                            <td><?php echo $R2->Etat; ?></td>

                            <td><?php if($R2->EtatAides=="Dossier disponible"){echo '<a class="btn btn-danger" href="./ATA/INTRANET/Admin/upsonergia.php?ID='.$R2->ID.'">SONERGIA OK</a>';} ?>

                                <?php if($R2->EtatAides=="Valide"){echo '<a class="btn btn-danger" href="./ATA/INTRANET/Admin/updevisF.php?ID='.$R2->ID.'">DEVIS FINAL</a>';} ?></td>

                        

                                                               

                        </tr>

                        <?php } ?>

                        </table>

                        </div>

                

                </div>



             <div class="container1">  

                

        

                        <h4 class="btn-lg btn-success" toggle="tooltip" data-placement="top" title="Genere le fichier de synthese pour realiser le devis et le dossier sonergia"> PROJETS EN ATTENTE SIGNATURE </h4>

                        <div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 176px;">

                        <table class='table table-hover table-bordered table-condensed'>

        

                        <tr>

                            <th>Date</th>

                            <th>ID</th>

                            <th>Commercial</th>

                            <th>Nom</th>

                            <th>Code Postal</th>

                            <th>Type</th>

                            <th>Sonergia</th>

                            <th>Devis</th>

                            <th>Etat</th>

                            <th>Action</th>

                        </tr>



                        <?php while ($R3 = $list3->fetch(PDO::FETCH_OBJ)) {?>



                        <tr>

                            <?php $soumis3 = $R3->DateCreation; $dateTime3 = new DateTime($soumis3); ?>

                            <td><?php echo $dateTime3->Format('d-m-Y'); ?></td>

                            <td><?php echo $R3->ID; ?></td>

                            <td><?php echo $R3->user; ?></td>

                            <td><?php echo $R3->nom; ?></td>

                            <td><?php echo $R3->CodePC; ?></td>

                            <td><?php echo $R3->typeprojet; ?></td>

                            <td><?php echo $R3->EtatAides; ?></td>

                            <td><?php echo $R3->Devis; ?></td>

                            <td><?php if($R3->Etat =="A signer"){echo '<a class="btn btn-danger">ATTENTE SIGNATURE</a>';}else{echo '<a class="btn btn-info" href="./ATA/FICHIERS/'.$R3->ID.'/Devis/DevisValide'.$R3->ID.'.pdf" download="">Devis signé</a>';} ?></td>

                            <td><?php if($R3->Devis =="Devis Valide"){echo '<a class="btn btn-danger" href="./ATA/INTRANET/Admin/chantier.php?ID='.$R3->ID.'&T='.$R3->tableprojet.'">Check Accompte puis Valider</a>';} ?>

                                <?php if($R3->Etat=="A signer") {echo '<a class="btn btn-danger" href="./ATA/INTRANET/Admin/updevisS.php?ID='.$R3->ID.'">UP DEVIS SIGNE</a>';} ?></td>                         

                        </tr>

                        <?php } ?>



                    </table>

                </div>

            </div>

            </form>

        </div>

    </body>

</html>