|
Server IP : 10.128.40.6 / Your IP : 216.73.216.233 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/logmcpe/www/TMCPRO/pages/extranet/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
// echo "==> tt <br/>";
$salarie_id=$_SESSION['MCPRO_sal']['user_id'] ;
// $salarie_id= 2543 ;
// $_SESSION['client_id'] = $_GET['client_id'] ;
$_SESSION['client_id'] = $_GET['client_id'] ;
if(!empty($_POST))
{
// echo "<pre>" ;
// print_r($_POST) ;
// echo "</pre>" ;
// exit() ;
$client_id = $_SESSION['client_id'] ;
if($_POST['id_type_aspirateur']==1){
$Produit_ID =116;
$quantite =1 ;
dbi_query("INSERT INTO `Produits_livree_salar` (`id`, `Produit_ID`, `client_id`,quantite) VALUES (NULL, '$Produit_ID', '$client_id', '$quantite')") ;
$Produit_ID =91;
$quantite =2 ;
dbi_query("INSERT INTO `Produits_livree_salar` (`id`, `Produit_ID`, `client_id`,quantite) VALUES (NULL, '$Produit_ID', '$client_id', '$quantite')") ;
}
if($_POST['id_type_aspirateur']==2){
$Produit_ID =159;
$quantite =1 ;
dbi_query("INSERT INTO `Produits_livree_salar` (`id`, `Produit_ID`, `client_id`,quantite) VALUES (NULL, '$Produit_ID', '$client_id', '$quantite')") ;
$Produit_ID =160;
$quantite =2 ;
dbi_query("INSERT INTO `Produits_livree_salar` (`id`, `Produit_ID`, `client_id`,quantite) VALUES (NULL, '$Produit_ID', '$client_id', '$quantite')") ;
}
if($_POST['id_type_aspirateur']==3){
$Produit_ID =157;
$quantite =1 ;
dbi_query("INSERT INTO `Produits_livree_salar` (`id`, `Produit_ID`, `client_id`,quantite) VALUES (NULL, '$Produit_ID', '$client_id', '$quantite')") ;
$Produit_ID =158;
$quantite =2 ;
dbi_query("INSERT INTO `Produits_livree_salar` (`id`, `Produit_ID`, `client_id`,quantite) VALUES (NULL, '$Produit_ID', '$client_id', '$quantite')") ;
}
dbi_query("UPDATE `client` SET `id_type_aspirateur` = '".$_POST['id_type_aspirateur']."' WHERE `client`.`client_id` = ".$_SESSION['client_id']) ;
header('Location:seau_choix.php?msg=Type aspirateur bien ajouté&color=success');
// $taille =count($_POST['id']) ;
}
$qua = dbi_query ("SELECT client_id FROM `client` WHERE `client_statut` = '1' ORDER BY `client`.`client_nom` ASC ");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Aspirateur</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">
<!-- Theme style -->
<link rel="stylesheet" href="../../dist/css/adminlte.min.css">
<link rel="stylesheet" href="../plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
</head>
<body class="hold-transition layout-top-nav">
<div class="wrapper">
<!-- Navbar -->
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#"></a>
</li>
<li>
<a href="index_sal.php"><button type="button" class="btn btn-info"><i class="fas fa-reply"></i> MENU PRINCIPAL</button>
</li>
</ul>
</nav>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<?php
include('aside.php');
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<?php
if(isset($_GET["msg"])){
?>
<div class="alert alert-<?php echo $_GET["color"]; ?> alert-dismissible col-12" role="alert">
<strong><?php echo $_GET["color"].': '; ?></strong><?php echo $_GET["msg"]; ?>.
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<?php
}
?>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!-- Profile Image -->
<!-- /.card -->
<!-- About Me Box -->
<div class="card card-primary">
<!-- /.card-header -->
<div class="card-body">
<?php
// echo "<pre>" ;
// print_r($_GET) ;
// echo "</pre>" ;
echo "<h2>Quelle est la marque de l'aspirateur présent sur site ? </h2>"
?>
<div class="modal-footer justify-content-between"> </div>
<?php if(!empty($_GET['client_id'])){
?>
<div class="table-responsive">
<form action="" method="POST">
<table id="tables" class="table table-bordered table-striped" >
<thead>
<tr>
<th>Type d'aspirateur </th>
<th>Photo</th>
<th> Selectionner </th>
</tr>
</thead>
<tbody>
<?php
$res = dbi_query(" SELECT * FROM `aspirateur` ") ;
while($row = dbi_fetch_row($res)) {
$diff =$row['quantite'] - $row['temp_qunt_surplace'] ;
// list($demliv_id)= dbi_fetch_row(dbi_query("SELECT demliv_id FROM `demliv` WHERE demliv_statut = '0' and `client_id` = ".$_GET['client_id']." and Produit_ID = ".$row['Produit_ID'])) ;
// echo "SELECT demliv_id FROM `demliv` WHERE demliv_statut = '0' and `client_id` = ".$_GET['client_id']." and Produit_ID = ".$row['Produit_ID']."<br/>" ;
?>
<input type="hidden" name="id[]" value="<?=$row['id']?>">
<tr>
<td><?=$row['nom_aspirateur'] ; ?></td>
<td>
<!--<img src="photo_produit/CSUR1-ASP614.jpg" class="staff-profile-image-small"> -->
<img src="<?=$row['photo_aspirateur'] ?>" style="width:80px;height:90px;">
</td>
<td>
<input type="checkbox" class="form-control" name="id_type_aspirateur" value="<?=$row['id_type_aspirateur']?>">
</td>
<?php
// ";
// }else{
// echo "
// <td>
// <button class='btn btn-success'
// onfocus='change(this)'>
// contrôlé </button></td> ?>
</tr>
<?php } ?>
</tfoot>
</table><!-- /.table -->
<input type="submit" class="btn btn-primary" value="Enregistrer">
</form>
</div>
<?php }
// dbi_query("UPDATE `Produits_livree_salar` SET `temp_qunt_surplace` = '0'") ;
?>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
<!-- /.col -->
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="float-right d-none d-sm-block">
<b>Version</b> 3.2.0
</div>
<strong>MC PRO 2022 </strong>
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<script src="../plugins/select2/js/select2.full.min.js"></script>
<!-- header -->
<script>
$(function () {
$('.select2').select2()
//Initialize Select2 Elements
$('.select2bs4').select2({
theme: 'bootstrap4'
})
// Summernote
$('.textarea').summernote()
})
</script>
<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
</body>
</html>
