// recuperation des tarifs disponibles
 $tarifs = getTarifsbyCat(1);
 //1= impressions
 //le prix indicatif
 //	debug($_POST);
 //recalcul ?
 if (isset($_POST["recalculer"])) {
     $debit_p = $_POST["debitprint"];
     $tarif_p = $_POST["tarifprint"];
     $tarif = mysqli_fetch_array(getPrixFromTarif($tarif_p));
     $credit_p = round($_POST["debitprint"] * $tarif['donnee_tarif'], 2);
     $prix = $credit_p;
 } else {
     $tarif_p = $print["print_tarif"];
     $credit_p = $print["print_credit"];
     $tarif = mysqli_fetch_array(getPrixFromTarif($tarif_p));
     $prix = round($debit_p * $tarif['donnee_tarif'], 2);
     $debit_p = $print["print_debit"];
 }
 /*
 if($credit_p==0){
 $credit_p=$prix;
 }
 */
 //griser les rubrique si c'est du credit unique
 if ($statut_p == 2) {
     $disable = "disabled /";
 } else {
     $disable = "";
 }
 ?>
Пример #2
0
			</ul>
		<div class="tab-content">
		<div class="tab-pane active" id="tab_1-1">
			<table class="table">
					<thead><th>Date</th><th>Nbre de pages</th><th>Tarif</th><th>Prix</th>
					<?php 
        if ($externe == 1) {
            echo "<th>Nom Prénom</th>";
        }
        ?>
					<th>statut</th><th></th></thead>
		
	<?php 
        while ($row = mysqli_fetch_array($result)) {
            // retrouver le tarif
            $tarif = mysqli_fetch_array(getPrixFromTarif($row['print_tarif']));
            $prix = round($row['print_debit'] * $tarif['donnee_tarif'], 2);
            $statut = $statutPrint[$row['print_statut']];
            ///ajout utilisateur externe
            if ($externe == 1) {
                $nomexterne = $row['print_userexterne'];
            }
            echo "<tr><td>" . $row['print_date'] . "</td>\n\t\t\t\t  <td>" . $row['print_debit'] . "</td>\n\t\t\t\t  <td>" . $tarif['donnee_tarif'] . "</td>\n\t\t\t\t  <td>" . $prix . " &nbsp;&euro;</td>";
            if ($externe == 1) {
                echo '<td>' . $nomexterne . '</td>';
            }
            if ($row['print_statut'] == 0) {
                //modification autorisée tant que la transaction n'est pas encaissée
                echo "<td><p class=\"text-red\">" . $statut . "</p></td> \n\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<a href=\"index.php?a=21&b=3&typetransac=p&idtransac=" . $row['id_print'] . "&iduser="******"\"><button type=\"button\" class=\"btn btn-info btn-sm\"><i class=\"fa fa-edit\"></i></button></a>\n                <a href=\"index.php?a=21&b=1&act=3&idprint=" . $row['id_print'] . "&iduser="******"\"><button type=\"button\" class=\"btn btn-warning btn-sm\"><i class=\"fa fa-trash-o\"></i></button></a></td>\n\t\t\t\t \t\t\t\t\t\n\t\t\t\t\t";
            } else {
                // transaction enregistrée