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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
| <?php include('header.php'); ?>
<div id="content">
<?php
header("Content-Type: text/html; charset=utf-8");
$connexion= mysql_connect("localhost", "root", "") OR die (mysql_error());
mysql_select_db("gestion_association", $connexion) OR die (mysql_error());
mysql_query("SET NAMES 'utf8'"); mysql_query('SET CHARACTER SET utf8');
if
(
isset($_POST['id'])
)
{
$id = $_POST['id'];
$req= mysql_query("SELECT * from association where id='$id' ");
echo "
<TABLE BORDER='1' id='tab_affich'>
<CAPTION></CAPTION>
";
while($res = mysql_fetch_array($req)){
echo " <TR><TD> ".$res['id']."</TD><TH>رقم الجمعية</TH></TR> ";
$a=$res['etat'];
$req2= mysql_query("SELECT nom from etat where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "<TR><TD> ".$res2['nom']." </TD><TH>حالة الجمعية</TH></TR>";}
echo "
<TR><TD> ".$res['nom']."</TD><TH>اسم</TH></TR>
<TR><TD> ".$res['date']."</TD><TH>تاريخ تأسيس الجمعية</TH></TR>
<TR><TD> ".$res['objectif']."</TD><TH>أهداف الجمعية</TH></TR>
<TR><TD> ".$res['adresse']."</TD><TH>عنوان الجمعية</TH></TR>
";
$a=$res['departement'];
$req2= mysql_query("SELECT nom from departement where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>دائرة/باشوية</TH></TR>";}
$a=$res['communaute'];
$req2= mysql_query("SELECT nom from communaute where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>الجماعة/المقاطعة</TH></TR>";}
echo "
<TR><TD> ".$res['religion']." </TD><TH>انتماء ديني</TH></TR>";
$a=$res['politique'];
$req2= mysql_query("SELECT nom from politique where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>انتماء سياسي</TH></TR>";}
$a=$res['syndicat'];
$req2= mysql_query("SELECT nom from syndicat where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>انتماء نقابي</TH></TR>";}
echo "
<TR><TD> ".$res['autre']." </TD><TH>انتماءآت دينية اخرى</TH></TR>";
$a=$res['type'];
$req2= mysql_query("SELECT nom from type where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>نوع الجمعية</TH></TR>";}
$a=$res['genre'];
$req2= mysql_query("SELECT nom from genre where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>نوعية الجمعية</TH></TR>";}
$a=$res['domaine'];
$v= "";
$char= str_split($a, 1);
echo "<TR><TD>";
foreach( $char as $val){
if($val == "."){
$req2= mysql_query("SELECT nom from domaine where id='$v'");
while($res2 = mysql_fetch_array($req2)){
echo $res2['nom']." ," ;}
$v= "";
}else{
$v.= $val;
}
}
echo "</TD><TH>مجال عمل الجمعية</TH></TR>";
$a=$res['taille'];
$req2= mysql_query("SELECT nom from taille where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>حجم الجمعية</TH></TR> ";}
$a=$res['nationalite'];
$req2= mysql_query("SELECT nom from nationalite where id='$a'");
while($res2 = mysql_fetch_array($req2)){
echo "
<TR><TD> ".$res2['nom']." </TD><TH>جنسية الجمعية</TH></TR>";}
}
echo "
</TABLE>
<a href='print.php'>print</a>;
</div>
<div id='footer'></div>
</div>
</body>
</html>
";
}
mysql_close();
?> |
Partager