| Current Path : /home/a/t/a/ataenra/www/ATA/INTRANET/Admin/ |
| Current File : /home/a/t/a/ataenra/www/ATA/INTRANET/Admin/Soustraitants.php |
<?php
$dateA = date('Y');
$com = $_SESSION['AF'];
//RECUP DES INFORMATIONS SUR TABLE chantier
//Tableau des chantiers planifies par equipe
$list2 = $dbco->prepare("SELECT * FROM dossier WHERE YEAR(DateCreation) = '$dateA' AND Etat IN ( 'Termine', 'Archive')");
$list2->execute();
if(isset($_POST['paiement'])){
//Update de la base chantier
$UP3 = $dbco->prepare("UPDATE chantier set ID = :id, ECOM = :ECOM where ID = :id");
$UP3->bindvalue('id',$_POST['IDD']);
$UP3->bindvalue('ECOM','Regle');
$UP3->execute();
header("location: ../../../index.php/ast");
header("refresh: 0.1");
}
?>
<!DOCTYPE html>
<html lang="fr">
<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="./ATA/INTRANET/Outils/css/agcom.css" rel="stylesheet" type="text/css">
<title>FORMULAIRE POINTAGE</title>
</head>
<body>
<div class="containerPage">
<div class="containerTitre">
<div class="row">
<div class="col-md-2">
<img src="./ATA/INTRANET/Outils/required/ATA-Logo.jpg" alt="ISO" width=50% class= />
</div>
<div class="col-md-8">
<span class="align-middle">COMMISSIONS DES COMMERCIAUX</span>
</div>
<div class="col-md-2">
<a href="index.php/aexploit" title="">
<img alt="HOME" src="./ATA/INTRANET/Outils/required/home1.png" alt="ISO" width=45% class="img-responsive" class="align-right"/> </a>
</div>
</div>
</div>
<div class="container1">
<form method="post" autocomplete="off">
<h5 class="btn-lg btn-warning">LISTES DES CHANTIERS TERMINES</h5>
<div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 250px;">
<table class='table table-hover table-bordered table-condensed'>
<thead>
<tr>
<th>Date</th>
<th>ID</th>
<th>Nom</th>
<th>Code Postal</th>
<th>Etat</th>
<th>Date Planing</th>
<th>Date Cloture</th>
<th>Montant COM</th>
<th>Etat COM</th>
<th>Action</th>
</tr>
</thead>
<?php while ($R2 = $list2->fetch(PDO::FETCH_OBJ)) {?>
<tr>
<?php $datec = $R2->date; $DT = new DateTime($datec); ?>
<td><?php echo $DT->Format('d-m-Y'); ?></td>
<td><?php echo $R2->ID; ?></td>
<td><?php echo $R2->nom; ?></td>
<td><?php echo $R2->CodePC; ?></td>
<td><?php echo $R2->Etat; ?></td>
<?php $datep = $R2->DatePlani; $DP = new DateTime($datep); ?>
<td><?php echo $DP->Format('d-m-Y'); ?></td>
<td><?php if(is_null($R2->DateF)){echo 'Non demarre';}else{$datef = $R2->DateF; $DF = new DateTime($datef);
echo $DF->Format('d-m-Y'); }?></td>
<td><?php echo $R2->MCOM; ?></td>
<td><?php echo $R2->ECOM; ?></td>
<td>
<?php if($R2->ECOM =="A Facturer"){echo '<a class="btn btn-danger">ATTENTE FACTURE</a>';}
if($R2->ECOM =="Facture"){echo '<a class="btn btn-info" href="./ATA/FICHIERS/'.$R2->ID.'/Facturecom/Facturecom.'.$R2->ID.'.pdf" download="" >A PAYER</a>';
echo '<input class="btn btn-primary" type="Submit" name="paiement" value="PAIEMENT OK" />';
echo '<input type="hidden" name="IDD" value="'.$R2->ID.'" />';}
if($R2->ECOM =="Regle"){echo '<a class="btn btn-success">REGLE</a>';}?></td>
</tr>
<?php } ?>
</table>
</div>
</form>
</div>
</body>
</html>