1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
<?php
$bd=""; // identifiant DSN
$user=""; // login
$password=""; // password
$cnx = odbc_connect($bd , $user, $password)or die("Echec de la connexion à la base");
$affaires = odbc_exec( $cnx, "requete" );
$etataffaire = odbc_exec( $cnx, "requete");
$nbdocprev = odbc_exec( $cnx, 'requete');
$idcap = odbc_exec( $cnx, 'requete');
$recept = odbc_exec( $cnx, 'requete');
$recue = odbc_exec( $cnx, "requete");
$analysee = odbc_exec( $cnx, "requete");
$chiffree = odbc_exec( $cnx, "requete");
$production = odbc_exec( $cnx, "requete");
$traitee = odbc_exec( $cnx, "requete");
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="container">
<hr>
<div class="row" align="right">
<button type="button" class="btn btn-info"><span class='glyphicon glyphicon-plus'></span> ajouter</button>
<button type="button" class="btn btn-secondary"><span class='glyphicon glyphicon-filter'></span> Filtrer</button>
</div>
<br>
<table class="table table-bordered">
<thead>
<tr align="center">
<th>t</th>
<th>tt</th>
<th>ttt</th>
<th>tttt</th>
<th>ttttt</th>
</tr>
</thead>
<tbody>
<?php
echo "</tr>";
while ($recuin = odbc_fetch_array($recue)) {
$val=odbc_fetch_array($affaires);
$agence = odbc_result($affaires, 'Affaire');
$odrecue = odbc_result($recue, 'Affaire');
$etat = odbc_fetch_array($etataffaire);
$agences = odbc_result($etataffaire, 'Statut');
$tnbdocp = odbc_fetch_array($nbdocprev);
$rnbdocp = odbc_result($nbdocprev, 'MoyenneDePourcAvancement');
$cap = odbc_fetch_array($idcap);
$odcap = odbc_result($idcap, 'nom');
$recuux = odbc_result($recue, 'Affaire');
$analyseein = odbc_fetch_array($analysee);
$analyseeux = odbc_result($analysee, 'Affaire');
$chiffreein = odbc_fetch_array($chiffree);
$chiffreeux = odbc_result($chiffree, 'Affaire');
$productionin = odbc_fetch_array($production);
$productionux = odbc_result($production, 'Affaire');
$traiteein = odbc_fetch_array($traitee);
$traiteeux = odbc_result($traitee, 'Affaire');
$peravancement = (($tnbdocp["MoyenneDePourcAvancement"])*"100");
$points = 100;
if ($peravancement >= 0 && $peravancement <= 33) {
$etatt = "panel-danger";
} else if ($peravancement > 33 && $peravancement <= 66) {
$etatt = "panel-warning";
} else {
$etatt = "panel-success";
}
$cars = array($etatt);
$warning = $cars['0'];
echo "<td><div class='".$warning."'><div class='panel-body'>".$recuin["Affaire"]. "<br>".round($peravancement)."%<br>".mb_convert_encoding($cap["nom"], "UTF-8", "Windows-1252")."</div></div></td>";
echo "<td><div class='".$warning."'><div class='panel-body'>".$analyseein["Affaire"]. "<br>".round($peravancement)."%<br>".mb_convert_encoding($cap["nom"], "UTF-8", "Windows-1252")."</div></div></td>";
echo "<td><div class='".$warning."'><div class='panel-body'>".$chiffreein["Affaire"]. "<br>".round($peravancement)."%<br>".mb_convert_encoding($cap["nom"], "UTF-8", "Windows-1252")."</div></div></td>";
echo "<td><div class='".$warning."'><div class='panel-body'>".$productionin["Affaire"]. "<br>".round($peravancement)."%<br>".mb_convert_encoding($cap["nom"], "UTF-8", "Windows-1252")."</div></div></td>";
echo "<td><div class='".$warning."'><div class='panel-body'>".$traiteein["Affaire"]. "<br>".round($peravancement)."%<br>".mb_convert_encoding($cap["nom"], "UTF-8", "Windows-1252")."</div></div></td>";
echo "</tr>";
}
?>
</tbody>
</table> |
Partager