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
| <?php
include ("fonctions.php");
include("phpToPDF.php");
require('fpdf.php');
require_once('soapWSDL.class.php');
$javaSupann = new soapWSDL('adresse http');
$base = "nom_base";
$stid=connexion_base($base);
$PDF=new phpToPDF('L','mm','A4');
$PDF->AddPage();
$PDF->SetFont('Arial','B',10);
if(!empty($_POST["numero"])) {
$i=0;
while ($i < count($_POST["numero"]))
{
$nbcolonnes = 8;
$sizeX=35;
$sizeY=50;
if ($i/$nbcolonnes==0){
$x1=10;
$y1=10;
}
else {
if (round($i/$nbcolonnes) == $i/$nbcolonnes ) {
$x1=10;
$y1=$y1+$sizeY;
}
else
{
$x1=$x1+$sizeX;
}}
$num= $_POST["numero"][$i];
$query ="SELECT IND.COD_ETU, ind.LIB_NOM_PAT_IND,ind.LIB_PR1_IND ";
$query.="FROM INDIVIDU ind,INS_ADM_ETP IAE ";
$query.="WHERE IND.COD_ETU = '$num' and ";
$query.="IND.COD_IND=IAE.COD_IND ";
$query.="order by IND.LIB_NOM_PAT_IND,IND.LIB_PR1_IND";
$resultat=requete($base,$query);
if ($row_etud=oci_fetch_array($resultat,OCI_ASSOC+OCI_RETURN_NULLS))
{
$num_etu=$row_etud["COD_ETU"];
$nom= $row_etud["LIB_NOM_PAT_IND"];
$prenom=$row_etud["LIB_PR1_IND"];
$m = $javaSupann->soapCall('apoGetBase64Photo', array($num_etu));
$PDF->SetXY($x1, $y1);
if (!empty($m[0])) {
$PDF->Multicell(35,5,$x1."\n".$y1."\n".$nom."\n".$prenom."\n",1,B);
// print "<td align='center'><IMG SRC=\"data:image/gif;base64,".$m[0]."\" height=120 ALT=\"Photo\"/><br>$num_etu<br>$nom<br>$prenom </td>"";
} else {
// print "<td><IMG SRC=\"css/images/photo_abs.JPG\" height=120 ALT=\"Photo\"/><br>$num_etu<br>$nom<br>$prenom </td>";
}
}
$i++;
}
}
$PDF->Output();
?> |
Partager