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
|
<?php
mysql_connect('localhost','root','');
mysql_select_db('mp2');
?>
<?php
if(!isset($_POST['submit']))
{
extract($_POST);
$query="SELECT *
FROM users u ,cr r,cours c
WHERE u.cin=r.cin
AND c.ref=r.ref
AND u.cin=$_GET[cin]";
$mes_resultats=mysql_query($query);
if(mysql_num_rows($mes_resultats)==0){
echo"<script type=\"text/javascript\">alert('Pas de donn�es!');history.back();</script>";
exit();
}
else if (mysql_num_rows($mes_resultats)!=0)
{while($row=mysql_fetch_array($mes_resultats))
{$fich=$row['fich'];
$pdfDirectory = "pdf/";
$pdfWithPath = $pdfDirectory.$fich;
echo"<table>";
echo "<label>";echo" -CIN : ";
echo "<td>".$row["cin"]."</td>";
echo"</label>"; echo "<br/>";
echo "<label>";echo " -Type : ";
echo "<td>".$row["type"]."</td>";
echo"</label>"; echo "<br/>";
echo "<label>";
echo"-Sujet : ";
echo "<td>".$row["sujet"]."</td>";
echo"</label>"; echo "<br/>";
echo "<label>";
echo"-Objet : ";
echo "<td>".$row["objet"]."</td>";
echo "<p><a href=\"$pdfWithPath\"><img src=\"pdfimage/$fich\" alt=\"\" /></a></p>";
echo "</table>";?> |
Partager