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
| <?php
require_once('php/connect-inc.php');
if(isset($_POST["idsociete"])){
$requete = "select libelle,s_libelle from rubrique, sous_rubrique, societe where societe.numero= ".$_POST["idsociete"]." and societe.ref_srubrique=sous_rubrique.ref_srubrique and sous_rubrique.ref_rubrique = rubrique.ref_rubrique";
$rub = mysql_query($requete,$conn_rep);
$ss = mysql_fetch_array($rub);
$requete = "select * from societe where numero = ".$_POST["idsociete"];
$query = mysql_query($requete, $conn_rep);
if(($nbr = mysql_num_rows($query))>0){
$ln = mysql_fetch_array($query);
$lat=$ln['latitude'];
$lon=$ln['longitude'];
$message = utf8_encode($ln['nom']).':Adresse: '.utf8_encode($ln['adresse']).'; Tel:'.utf8_encode($ln['tel']).'; Fax:'.utf8_encode($ln['fax']).'; BP:'.utf8_encode($ln['bp']);
echo '
<p align="left">Rubrique: '.$ss['libelle'].' ==> Sous-Rubrique: '.$ss['s_libelle'].'</p>';
echo ' <table width="450" align="left" >
<tr>
<td valign="top" align="right" width="135"><strong><u>Adresse</u> :</strong> </td>
<td align="left" colspan="3"><div class="societe" align="left">'.utf8_encode($ln['adresse']).'</div></td>
</tr>
<tr>
<td align="right" width="135"><strong><u>Telephone</u> :</strong></td>
<td colspan="3"><div class="societe" align="left">'.utf8_encode($ln['tel']).'</div></td>
</tr>
<tr>
<td align="right" width="135"><strong><u>Fax</u> :</strong></td>
<td colspan="3"><div class="societe" align="left">'.utf8_encode($ln['fax']).'</div></td>
</tr>
<tr>
<td align="right" width="135"><strong><u>BP</u> :</strong></td>
<td colspan="3"><div class="societe" align="left">';
if($ln['bp'] != 0) echo utf8_encode($ln['bp']);
echo '</div></td>
</tr>
<tr>
<td align="right" width="135"><strong><u>Commentaire</u> :</strong></td>
<td colspan="3"><div class="societe" align="left">'.utf8_encode($ln['commentaire']).'</div></td>
</tr>
<tr>
<td align="right" width="135"> </td>
<td colspan="3"><div align="left"> </div></td>
</tr>
<tr>
<td colspan="4" width="135"><div align="center"><strong><u>Envoyer l\'adresse par SMS </u></strong></div></td></td>
</tr>
<tr>
<td align="right" width="135"><strong><u>Numero mobile</u> :</strong></td>
<td colspan="3"><div align="left"><input name="num_dest" type="text" maxlength="7" size="12" /></div></td>
</tr>
<tr>
<td align="right" width="135"><input name="message" id="message" type="hidden" value="'.$message.'" /> </td>
<td colspan="3"><div align="left"><input name="envoyer" class="b_img" type="button" value="Envoyer SMS" onClick="envoyer_sms()" /></div></td>
</tr>
</table>';
?>
<script type="text/javascript">
function initialize() {
var lat='<?php echo $lat; ?>'
var lon=<?php echo $lon; ?>"
var maposition= new google.maps.LatLng(lat,lon);
map = new google.maps.Map(document.getElementById("map"), {
zoom: 15,
center: maposition,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var marker = new google.maps.Marker({
position: maposition,
map: map,
title: "Click to zoom"
});
}
</script>
<table id="map" width="500" height="400" align="right onload="intialize()" >
</table>
<?php
}
}
?> |
Partager