Commit 279ae2c7 authored by Anatole Rakotoson's avatar Anatole Rakotoson
Browse files

sommom

parent ad50699e
......@@ -33,9 +33,11 @@
$l = PHDB::findOne(Lists::COLLECTION, array('name' => 'cetaces'));
$i=0;
$cetacesArray = [];
foreach ($l['list'] as $i => $inp) {
$cetacesArray[$i] = $inp["nomScientifique"];
$i++;
// $cetacesArray[$i] = $inp["nomScientifique"];
// $i++;
$cetacesArray += array($inp["nomScientifique"] => $inp["nomScientifique"]);
}
$paramsData = [
......@@ -90,6 +92,7 @@
"label" => "Espèce recensée sur le territoire",
"placeholder" => "Espèce recensée sur le territoire",
"inputType" => "select",
"noOrder" => false,
"options" => $cetacesArray,
"rules" => [ "required" => true ]
],
......@@ -217,23 +220,23 @@
foreach ($answers as $q => $a) {
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
$contr = 0;
foreach ($properties as $i => $inp) {
if($i == "location"){
} else {
echo "<td>";
if(isset($a[$i])) {
if(is_array($a[$i])) {
if($i == "especeRec"){
echo implode(",", $a[$i]);
} else if($contr == 0){
foreach ($l['list'] as $k => $inp) {
if($k == $a[$i]){
echo $inp["nomScientifique"];
}
}
}else{
echo implode(",", $a[$i]);
}
}
}
else {
if($a[$i] == "true"){
echo "oui";
......@@ -255,6 +258,7 @@
}
}
$contr++;
echo "</td>";
}
}
......
......@@ -13,11 +13,11 @@
$cetacesArray = [];
$i=0;
foreach ($l['list'] as $in => $inp) {
if(isset($inp["nomScientifique"])){
$cetacesArray += [$inp["nomScientifique"] => $inp["nomScientifique"]];
}
$i++;
$cetacesArray = [];
foreach ($l['list'] as $i => $inp) {
// $cetacesArray[$i] = $inp["nomScientifique"];
// $i++;
$cetacesArray += array($inp["nomScientifique"] => $inp["nomScientifique"]);
}
$a=[];
......
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