Commit 77d790b0 authored by Anatole Rakotoson's avatar Anatole Rakotoson
Browse files

sommom

parent 3b59e44f
......@@ -37,7 +37,7 @@ $editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."'
<select class="form-control select2Input <?php echo $inpClass ?>" id="<?php echo $key ?>" data-form='<?php echo $form["id"] ?>' required>
<option value="">Selectionner</option>
<?php foreach ($options as $k => $v) {
echo '<option value="'.$k.'" '.((!empty($answers) && (string)$k == $answers ) ? "selected" : "").' >'.$v.'</option>';
echo '<option value="'.$v.'" '.((!empty($answers) && (string)$k == $answers ) ? "selected" : "").' >'.$v.'</option>';
} ?>
</select>
......
......@@ -10,13 +10,13 @@
$paramsData = [
"nature" => [
"accord" => "accord",
"convention" => "convention",
"reseau" => "réseau"
"accord" => "Accord",
"convention" => "Convention",
"reseau" => "Réseau"
],
"type" => [
"regionale" => "régionale",
"intergouv" => "intérgouvernemental"
"regionale" => "Régional",
"intergouv" => "Intér-gouvernemental"
]
];
......
......@@ -19,7 +19,9 @@
if(is_array($vv)){
foreach ($vv as $kkk => $vvv) {
if(isset($vvv["localisation"])){
$a += array($vvv["localisation"] => $vvv["localisation"]);
if(isset($vvv["pointGPS"])){
$a += array($vvv["localisation"] => $vvv["localisation"]);
}
}
}
}
......@@ -32,7 +34,7 @@
$l = PHDB::findOne(Lists::COLLECTION, array('name' => 'cetaces'));
$i=0;
foreach ($l['list'] as $i => $inp) {
$cetacesArray[$i] = $inp["nomVernaculaire"];
$cetacesArray[$i] = $inp["nomScientifique"];
$i++;
}
......@@ -121,22 +123,22 @@
"options" => $paramsData["month"],
"rules" => [ "required" => false ]
],
"dpObservation" => [
"label" => " début du Période d’observation",
"placeholder" => "début du Période d’observation",
"inputType" => "select",
"noOrder" => true,
"options" => $paramsData["month"],
"rules" => [ "required" => false ]
],
"pObservation" => [
"label" => "fin du Période d’observation",
"placeholder" => "fin du Période d’observation",
"inputType" => "select",
"noOrder" => true,
"options" => $paramsData["month"],
"rules" => [ "required" => false ]
],
// "dpObservation" => [
// "label" => " début du Période d’observation",
// "placeholder" => "début du Période d’observation",
// "inputType" => "select",
// "noOrder" => true,
// "options" => $paramsData["month"],
// "rules" => [ "required" => false ]
// ],
// "pObservation" => [
// "label" => "fin du Période d’observation",
// "placeholder" => "fin du Période d’observation",
// "inputType" => "select",
// "noOrder" => true,
// "options" => $paramsData["month"],
// "rules" => [ "required" => false ]
// ],
"frequenceOb" => [
"label" => "Fréquence d’observation lorsqu’elle est présente",
"placeholder" => "Fréquence d’observation lorsqu’elle est présente",
......@@ -183,171 +185,56 @@
?>
<thead>
<tr>
<thead>
<tr>
<td colspan='<?php echo count( $properties)+2?>' ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
<?php echo $info ?>
</td>
</tr>
<?php
<?php if(isset($answers)){ ?>
<tr>
<?php
$ccnt = 1;
foreach ($properties as $i => $inp) {
if($ccnt < 4 ){
echo "<th rowspan='2'>".$inp["placeholder"]."</th>";
}
$ccnt ++;
} ?>
if( count($answers)>0 ){ ?>
<tr>
</th>
<?php
<th colspan="2">Observation Saisonnière</th>
<?php
$ccnt1 = 1;
foreach ($properties as $i => $inp) {
if($ccnt1 > 7 ){
echo "<th rowspan='2'>".$inp["placeholder"]."</th>";
if(isset($inp["placeholder"])){
echo "<th>".$inp["placeholder"]."</th>";
}
$ccnt1 ++;
} ?>
<th rowspan="2"></th>
</tr>
<tr>
<?php
$ccnt2 = 1;
foreach ($properties as $i => $inp) {
// if($ccnt2 > 3 and $ccnt2 < 8){
// echo "<th >".$inp["placeholder"]."</th>";
// }
if($ccnt2 == 4){
echo " <th> Période de présence </th>";
} else if($ccnt2 == 5){
}else if($ccnt2 == 6){
echo "<th> Période d'observation </th>";
}else if($ccnt2 == 7){
}
$ccnt2 ++;
} }?>
</tr>
<th></th>
</tr>
<tr></tr>
<?php } ?>
</thead>
<tbody class="directoryLines">
<?php
$ct = 0;
if(isset($answers)){
foreach ($answers as $q => $a) {
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
$mycounter = 0;
foreach ($properties as $i => $inp) {
if($mycounter == 3){
foreach ($properties as $i => $inp) {
if($i == "location"){
} else {
echo "<td>";
if(isset($a[$i])) {
if(is_array($a[$i])) {
echo implode(",", $a[$i]);
}
else {
if($a[$i] == "Annuelle"){
echo "Annuelle";
} else {
echo "De ".$a[$i];
}
}
}
} else if($mycounter == 4){
if(isset($a[$i])) {
if(is_array($a[$i])) {
}
else {
if($a[$i] == "Annuelle "){
echo "Annuelle";
} else {
echo " à ".$a[$i];
}
}
}
echo "</td>";
} else if ($mycounter == 5){
echo "<td>";
if(isset($a[$i])) {
if(is_array($a[$i])) {
}
else {
if($a[$i] === "Annuelle "){
echo "Annuelle";
} else {
echo "De ".$a[$i];
}
}
}
} else if ($mycounter == 6){
if(isset($a[$i])) {
if(is_array($a[$i])) {
}
else {
if($a[$i] == "Annuelle "){
echo "Annuelle";
} else {
echo " à ".$a[$i];
}
}
}
echo "</td>";
}
else{
echo "<td>";
if(isset($a[$i])) {
if(is_array($a[$i])) {
echo implode(",", $a[$i]);
}
else {
if($a[$i] == "true"){
echo "oui";
}else if($a[$i] == "false"){
echo "non";
}else if($i == "especeRec"){
if($i == "especeRec"){
foreach ($l['list'] as $k => $inp) {
if($k == $a[$i]){
echo $inp["nomVernaculaire"];
echo $inp["nomScientifique"];
}
}
}
else {
}else{
echo implode(",", $a[$i]);
}
}
else {
if($a[$i] == "true"){
echo "oui";
}else if($a[$i] == "false"){
......@@ -356,13 +243,12 @@
else {
echo $a[$i];
}
}
}
}
}
echo "</td>";
}
$mycounter++;
}
}
?>
<td style="white-space: normal;">
<?php
......@@ -519,4 +405,5 @@
</script>
<?php } else {
//echo "<h4 class='text-red'>CALENDAR works with existing answers</h4>";
} ?>
\ No newline at end of file
} ?>
......@@ -14,11 +14,9 @@
$i=0;
foreach ($l['list'] as $in => $inp) {
if(isset($inp["nomVernaculaire"])){
$cetacesArray += [$inp["nomVernaculaire"] => $inp["nomVernaculaire"]];
} else {
$cetacesArray += [$inp["nomValide"] => $inp["nomValide"]];
}
if(isset($inp["nomScientifique"])){
$cetacesArray += [$inp["nomScientifique"] => $inp["nomScientifique"]];
}
$i++;
}
......
......@@ -150,10 +150,9 @@
<?php
foreach ($properties as $i => $inp) {
if($actualNbr1 < 6){
echo "<th>".$inp["label"]."</th>";
}
$actualNbr1++;
}
?>
<th></th>
......
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