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
| <?php
session_start();
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin']== 'YES'){
include('header.php');
echo "
<div id='content'>
<div ><h1>بحث جمعية</h1></div>
<form id='form2' action='search_association.php' method='post'>
<fieldset>
<p>
<label for='nom'> اسم الجمعية</label>
<input id='nom' name='nom' class='element text large' type='text' maxlength='255' value=''/>
</p>
<p>
<label for='id'>رقم الجمعية</label>
<input id='id' name='id' type='text' maxlength='255' value=''/>
</p>
<table>
<TR>
<TD style='padding-left:20px'>
<INPUT type='image' src='img/search.png' value='Submit' title='chercher' >
</TD>
</TR>
</table>
</fieldset>
</form>";
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['nom']) && isset($_POST['id'])
)
{
$nom = $_POST['nom'];
$id = $_POST['id'];
if ( $id != NULL){
$req= mysql_query("SELECT nom, id from association where id like '$id' ");
}
else{
$req= mysql_query("SELECT nom, id from association where nom like '%$nom%' ");
}
echo "
<form id='form2' action='search_association_recup.php' method='post'>
<fieldset>
<p>
<label for='nom'>اسم الجمعية</label>";
echo "<select name='id'>";
while($res = mysql_fetch_array($req)){
echo"
<option value=".$res['id'].">".$res['nom']."</option>";
}
echo "</select>
<table align='right'>
<TR>
<TD style='padding-right:30px'>
<INPUT type='image' src='img/print.png' value='Submit' name='print' title='imprimer'>
</TD>
<TD style='padding-right:30px'>
<INPUT type='image' src='img/view.png' value='Submit' name='afficher' title='afficher'>
</TD>
<TD style='padding-right:30px'>
<INPUT type='image' src='img/modifier.png' value='Submit' name='modifier_association' title='modifier une association'>
</TD>
<TD style='padding-right:30px'>
<INPUT type='image' src='img/lister_membre.png' value='Submit' name='lister_membre' title='lister les membres'>
</TD>
<TD style='padding-right:30px'>
<INPUT type='image' src='img/add_membre.png' value='Submit' name='ajouter_membre' title='ajouter un membres'>
</TD>
</TR>
</table>
</p>
</fieldset>
</form>
";
echo "
</div>
<div id='footer'></div>
</div>
</body>
</html>
";
}
mysql_close();
echo "
</div>
</div>
</body>
</html>";
} else {
header("location: login.php");
}
?> |
Partager