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
| if(isset($_POST['etape1'])) {
echo " <table width='700px'>
<tr>
<td colspan='3' align='center'>Saisie des codes de profilage</td>
</tr>
<tr>
<td width='200px'>Activités des Entreprises</td>
<td td width='250px' colspan='2'><form name='profilage' method='GET' action='profilage.php'>
<select name='idact' id='idactivite'>";
/**************************************************************************************************************************************************************************************Traitement pour Activité************************************************************ ************************************************************************************************************************************/
// Si on ne recoit rien :
if(!isset($_GET['idchapact']) && !isset($_GET['idact']) &&!isset($_GET['idnaf'])) {
$sql = mysql_query("SELECT * FROM tab_societe GROUP BY activite") or die(mysql_error());
echo " <option value=''></option>";
while($res=mysql_fetch_row($sql)) {
$act=$res[43];
$idsociete=$res[0];
echo "<option value='$act'>$act</option>";
}
}
//Si on reçoit domaine activité :
if(isset($_GET['idchapact'])) {
$act2=$_GET['idact'];
echo "<option value='$act2'>$act2</option>";
$sql = mysql_query("SELECT * FROM tab_societe GROUP BY activite") or die(mysql_error());
echo " <option value=''></option>";
while($res=mysql_fetch_row($sql)) {
$act=$res[43];
$idsociete=$res[0];
echo "<option value='$act'>$act</option>";
}
}
echo "
</select>
</td>
</tr>
<tr>
<td width='200px'>Domaine d'activité des Entreprises</td>
<td><select name='idchapact' class='selectProfilage' id='idchapact' onchange='javascript:window.location='profilage.php?idchapact='+this.value+'&idact='+document.getElementById('idactivite').value+'&idnaf='+document.getElementById('idnaf').value+'&idlibnaf='+document.getElementById('idlibnaf').value+'&idnaf='+document.getElementById('idnaf').value+'&idlibfct='+document.getElementById('idlibfct').value+'&idpscli='+document.getElementById('idpscli').value+'&idlibpscli='+document.getElementById('idlibpscli').value+'&idsociete='+document.getElementById('idsociete').value+'&idagence='+document.getElementById('idagence').value+'&contact='+document.getElementById('contact').value'>"; |