Commit 98d1f805 authored by Anatole Rakotoson's avatar Anatole Rakotoson
Browse files

sommom

parent be16962b
......@@ -12,7 +12,7 @@
$properties = [
"pointGPS" => [
"coord" => [
"label" => "Point GPS",
"placeholder" => "Point GPS",
"inputType" => "formLocality",
......@@ -81,12 +81,12 @@
} else {
echo "<td>";
if(isset($a[$i])) {
if($i == "pointGPS"){
if($i == "coord"){
//$nameM = $a["localisation"];
$lat = $a["pointGPS"]["latitude"];
$lon = $a["pointGPS"]["longitude"];
echo $a["pointGPS"]["latitude"]." / ".$a["pointGPS"]["longitude"];
//echo implode(",", $a["pointGPS"]);
$lat = $a["coord"]["latitude"];
$lon = $a["coord"]["longitude"];
echo $a["coord"]["latitude"]." / ".$a["coord"]["longitude"];
//echo implode(",", $a["coord"]);
echo '<span class="pull-right" style= "margin-right : 5px;"><a id="showActeurLocation" href="javascript:;" onclick=""><i class="fa fa-map-o" aria-hidden="true"></i></a></span>';
}
else if(is_array($a[$i])){
......@@ -154,6 +154,16 @@
tplCtx.value[k] = $("#"+k).val();
});
if(typeof formData != "undefined" && typeof formData.geo != "undefined"){
tplCtx.value["coord"] = formData.geo;
tplCtx.value["address"] = formData.address;
tplCtx.value["geo"] = formData.geo;
tplCtx.value["geoPosition"] = formData.geoPosition;
if(typeof formData.addresses != "undefined")
tplCtx.value["addresses"] = formData.addresses;
}
mylog.log("save tplCtx",tplCtx);
......@@ -205,7 +215,7 @@
});
if(typeof formData != "undefined" && typeof formData.geo != "undefined"){
tplCtx.value["pointGPS"] = formData.geo;
tplCtx.value["coord"] = formData.geo;
tplCtx.value["address"] = formData.address;
tplCtx.value["geo"] = formData.geo;
tplCtx.value["geoPosition"] = formData.geoPosition;
......
......@@ -155,10 +155,9 @@
<?php
foreach ($properties as $i => $inp) {
if($actualNbr1 < 6){
echo "<th>".$inp["label"]."</th>";
}
$actualNbr1++;
}
?>
<th></th>
......@@ -169,13 +168,12 @@
<tbody class="directoryLines">
<?php
$ct = 0;
$actualNbr2 = 0;
if(isset($answers)){
foreach ($answers as $q => $a) {
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
foreach ($properties as $i => $inp) {
if($actualNbr2 < 6){
echo "<td>";
if(isset($a[$i])) {
if(is_array($a[$i])){
......@@ -194,6 +192,12 @@
}
}
else if($i == "site") {
echo "<a href='".$a[$i]."'>".$a[$i]."</a>";
}
else {
if($a[$i] == "true"){
echo "oui";
......@@ -207,8 +211,8 @@
}
echo "</td>";
}
$actualNbr2++;
}
?>
<td style="white-space: normal;">
<?php
......@@ -231,72 +235,6 @@
?>
<?php if(isset($answers)){ ?>
<tr>
</th>
<?php
$actualNbr3 = 0;
foreach ($properties as $i => $inp) {
if($actualNbr3 > 5){
echo "<th>".$inp["placeholder"]."</th>";
}
$actualNbr3++;
}
?>
<th></th><th></th>
</tr>
<?php } ?>
<?php
$ct = 0;
$actualNbr4 = 0;
if(isset($answers)){
foreach ($answers as $q => $a) {
//var_dump($actualNbr4);
//if($actualNbr4 > 4){
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
foreach ($properties as $i => $inp) {
if($actualNbr4 > 5){
echo "<td>";
if(isset($a[$i])) {
if(is_array($a[$i])){
echo implode(",", $a[$i]);
}
else {
if($i == "site")
{
echo "<a href='".$a[$i]."'>".$a[$i]."</a>";
}
else
{
if ($i == "siteP")
{
echo "<a href='".$a[$i]."'>".$a[$i]."</a>";
}
else
{
echo $a[$i];
}
}
}
}
echo "</td>";
}
$actualNbr4++;
}
?>
<td></td><td></td>
<?php
$ct++;
echo "</tr>";
//}
}
}
?>
</tbody>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment