89 |
$idx_multi = $this->get_idx_collectivite_multi(); |
$idx_multi = $this->get_idx_collectivite_multi(); |
90 |
|
|
91 |
if (isset($conf[$sig_externe][$collectivite_parameters['om_collectivite_idx']]) and |
if (isset($conf[$sig_externe][$collectivite_parameters['om_collectivite_idx']]) and |
92 |
|
isset($conf[$sig_externe]["sig_treatment_mod"]) and |
93 |
isset($collectivite_parameters["option_sig"]) and |
isset($collectivite_parameters["option_sig"]) and |
94 |
$collectivite_parameters["option_sig"] == "sig_externe" |
$collectivite_parameters["option_sig"] == "sig_externe" |
95 |
) { |
) { |
96 |
|
|
97 |
// Cas numéro 1 : conf sig définie sur la collectivité et option sig active |
// Cas numéro 1 : conf sig définie sur la collectivité et option sig active |
98 |
$collectivite_parameters["sig"] = $conf[$sig_externe][$collectivite_parameters['om_collectivite_idx']]; |
$collectivite_parameters["sig"] = $conf[$sig_externe][$collectivite_parameters['om_collectivite_idx']]; |
99 |
|
$collectivite_parameters["sig"]["sig_treatment_mod"] = $conf[$sig_externe]["sig_treatment_mod"]; |
100 |
|
|
101 |
} elseif($idx_multi != '' and |
} elseif($idx_multi != '' and |
102 |
isset($conf[$sig_externe][$idx_multi]) and |
isset($conf[$sig_externe][$idx_multi]) and |
103 |
|
isset($conf[$sig_externe]["sig_treatment_mod"]) and |
104 |
isset($collectivite_parameters["option_sig"]) and |
isset($collectivite_parameters["option_sig"]) and |
105 |
$collectivite_parameters["option_sig"] == "sig_externe") { |
$collectivite_parameters["option_sig"] == "sig_externe") { |
106 |
// Cas numéro : conf sig définie sur la collectivité multi et |
// Cas numéro : conf sig définie sur la collectivité multi et |
107 |
// option_sig activé pour la collectivité mono |
// option_sig activé pour la collectivité mono |
108 |
$collectivite_parameters["sig"] = $conf[$sig_externe][$idx_multi]; |
$collectivite_parameters["sig"] = $conf[$sig_externe][$idx_multi]; |
109 |
|
$collectivite_parameters["sig"]["sig_treatment_mod"] = $conf[$sig_externe]["sig_treatment_mod"]; |
110 |
} |
} |
111 |
|
|
112 |
//// END - SURCHARGE OPENADS |
//// END - SURCHARGE OPENADS |
1510 |
return $match[1]; |
return $match[1]; |
1511 |
} |
} |
1512 |
|
|
1513 |
|
/** |
1514 |
|
* Compose un tableau et retourne son code HTML |
1515 |
|
* |
1516 |
|
* @param string $id ID CSS du conteneur |
1517 |
|
* @param array $headers entêtes de colonnes |
1518 |
|
* @param array $rows lignes |
1519 |
|
* @return string code HTML |
1520 |
|
*/ |
1521 |
|
public function compose_generate_table($id, $headers, $rows) { |
1522 |
|
// |
1523 |
|
$html = ''; |
1524 |
|
// Début conteneur |
1525 |
|
$html .= '<div id="'.$id.'">'; |
1526 |
|
// Début tableau |
1527 |
|
$html .= '<table class="tab-tab">'; |
1528 |
|
// Début entête |
1529 |
|
$html .= '<thead>'; |
1530 |
|
$html .= '<tr class="ui-tabs-nav ui-accordion ui-state-default tab-title">'; |
1531 |
|
// Colonnes |
1532 |
|
$nb_colonnes = count($headers); |
1533 |
|
$index_last_col = $nb_colonnes - 1; |
1534 |
|
foreach ($headers as $i => $header) { |
1535 |
|
if ($i === 0) { |
1536 |
|
$col = ' firstcol'; |
1537 |
|
} |
1538 |
|
if ($i === $index_last_col) { |
1539 |
|
$col = ' lastcol'; |
1540 |
|
} |
1541 |
|
$html .= '<th class="title col-'.$i.$col.'">'; |
1542 |
|
$html .= '<span class="name">'; |
1543 |
|
$html .= $header; |
1544 |
|
$html .= '</span>'; |
1545 |
|
$html .= '</th>'; |
1546 |
|
} |
1547 |
|
// Fin entête |
1548 |
|
$html .= '</tr>'; |
1549 |
|
$html .= '</thead>'; |
1550 |
|
// Début corps |
1551 |
|
$html .= '<tbody>'; |
1552 |
|
// Lignes |
1553 |
|
foreach ($rows as $cells) { |
1554 |
|
// Début ligne |
1555 |
|
$html .= '<tr class="tab-data">'; |
1556 |
|
// Cellules |
1557 |
|
foreach ($cells as $j => $cell) { |
1558 |
|
if ($j === 0) { |
1559 |
|
$col = ' firstcol'; |
1560 |
|
} |
1561 |
|
if ($j === $index_last_col) { |
1562 |
|
$col = ' lastcol'; |
1563 |
|
} |
1564 |
|
$html .= '<td class="title col-'.$j.$col.'">'; |
1565 |
|
$html .= '<span class="name">'; |
1566 |
|
$html .= $cell; |
1567 |
|
$html .= '</span>'; |
1568 |
|
$html .= '</td>'; |
1569 |
|
} |
1570 |
|
// Fin ligne |
1571 |
|
$html .= "</tr>"; |
1572 |
|
} |
1573 |
|
// Fin corps |
1574 |
|
$html .= '</tbody>'; |
1575 |
|
// Fin tableau |
1576 |
|
$html .= '</table>'; |
1577 |
|
// Fin conteneur |
1578 |
|
$html .= '</div>'; |
1579 |
|
// |
1580 |
|
return $html; |
1581 |
|
} |
1582 |
} |
} |
1583 |
|
|
1584 |
?> |
?> |