Your IP : 216.73.216.65


Current Path : /home/a/t/a/ataenra/www/ATA/INTRANET/Admin/
Upload File :
Current File : /home/a/t/a/ataenra/www/ATA/INTRANET/Admin/Pointage.php

<?php
require_once '../Outils/co.php';

//recuperer le numero de la pompe a chaleur et le numero du dossier
$ID = $_GET['ID'];
$Tp = $_GET['Tp'];
$Tm = $_GET['Tm'];

//CONDITIONS ACTION UPDATE LA LISTE ACCESSOIRES
if (isset($_POST['Com'])&&($_POST['Com'] == "Pointer")) {

//Variables pour le UP de la base
    $DatePrep = date("Y-m-d");

//Update de la base
    $UP2 = $dbco->prepare("UPDATE dossier set id = :id, Etatprep =:Etatprep, DatePreparation =:Dateprepa where ID = :id");
    $UP2->bindvalue('id',$ID);
    $UP2->bindvalue('Etatprep','A planifier');
    $UP2->bindvalue('Dateprepa',$DatePrep);
    $UP2->execute();

    header("location:../../../index.php/agc");

}
else {

$info = $dbco->prepare("select * FROM dossier D JOIN client C ON C.IDc=D.IDclient JOIN ".$Tp." P ON P.IDp=D.IDprojet JOIN ".$Tm." M ON D.IDmateriel=M.IDm WHERE D.ID=31"); 
$info->execute();
$R = $info->fetch(PDO::FETCH_OBJ);

//Recuperer information sur la pompe a chaleur choisie
$sth1 = $dbco->prepare("SELECT * FROM dossier D JOIN ".$Tp." P ON P.IDp=D.IDprojet WHERE D.ID = '$ID'"); 
$sth1->execute();
$R1 = $sth1->fetch(PDO::FETCH_OBJ);

$sth2 = $dbco->prepare("SELECT * FROM ".$Tm." WHERE IDm = '$R1->IDmateriel'"); 
$sth2->execute();
$R2 = $sth2->fetch(PDO::FETCH_OBJ);

$PACK= "($R1->articles'34')";

$sth3 = $dbco->prepare("SELECT * FROM accessoires WHERE ID IN $PACK"); 
$sth3->execute();

?>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <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="css/bootstrap-4.4.1.css" rel="stylesheet">-->
  <link href="css/styleCMD.css" rel="stylesheet" type="text/css">
  <title>FORMULAIRE POINTAGE</title>
</head>

<body>

	<div class="containerPage"> 
        <form method="post" validate>
	<!--FORMULAIRE PAGE 1-->
        
		<div class="containerSection">
			<span class="align-middle"><strong>MATERIEL COMMANDE LE <?php echo $R1->DateCommande;?> POUR LE CHANTIER N° <?php echo $ID; ?></strong></span>
		</div>
		        <div class="container1">
			
			        <div class="table-responsive">
                    
                        <h5 class="btn-lg btn-info"><center> VERIFIER ET POINTER LE MATERIEL LIVRE</center> </h5>
                       
                        <table class="table table-condensed" border="1">
                        <thead>
                        <tr>
                            <th>REF</th>
                            <th>DESIGNATION</th>
                            <th>CHECK</th>
                        </tr>
                        </thead>
                        
                        
                        
                        <tbody>

                        <tr>
                        <?php echo '<tr><td>'.$R2->Ref.'</td><td>'.$R2->modele.'</td><td><input type="checkbox" class="form-control" name="'.$R2->Ref.'" value="'.$R2->Ref.'" required></td></tr>'; ?>
                        <?php while ($R3 = $sth3->fetch(PDO::FETCH_OBJ)) {?>
                        <td><?php echo $R3->REF; ?></td>
                        <td><?php echo $R3->DESIGNATION; ?></td>
                        <td><?php echo '<input type="checkbox" class="form-control" name="'.$R3->ID.'" value="'.$R3->ID.'" required> '?></td>
                        </tr>
                        </tbody>  
                        
                        <?php } ?>
                       
                        
                            
                           
                            
                     
                       

                        </table>
                        

            
                    </div>
      
        
        <div class="row" >
                <div class="col-md-3" >
	    		    <img src="../Outils/Required/ATA_logo_horiz.jpg" alt="ISO" width=100% class="img-responsive" />
                </div>   
                <div class="col-md-6" >
                <p class="text-center">Formulaire Propulsé par</p>
                    <p class="text-center">ATA-ENRgies 2023</p>
                </div> 
                <div class="col-md-3" >
                    <input class="btn btn-success" type="submit" name="Com" value="Pointer">
                </div>
            </div> 
    </form>
    </div>	

</div>
</body>
</html>

<?php } ?>