| @@ 510-522 (lines=13) @@ | ||
| 507 | * @return Champ |
|
| 508 | * Pile complétée par le code à générer |
|
| 509 | **/ |
|
| 510 | function balise_COMPTEUR_BOUCLE_dist($p) { |
|
| 511 | $b = index_boucle_mere($p); |
|
| 512 | if ($b === '') { |
|
| 513 | $msg = array('zbug_champ_hors_boucle', array('champ' => zbug_presenter_champ($p))); |
|
| 514 | erreur_squelette($msg, $p); |
|
| 515 | } else { |
|
| 516 | $p->code = "\$Numrows['$b']['compteur_boucle']"; |
|
| 517 | $p->boucles[$b]->cptrows = true; |
|
| 518 | $p->interdire_scripts = false; |
|
| 519 | ||
| 520 | return $p; |
|
| 521 | } |
|
| 522 | } |
|
| 523 | ||
| 524 | /** |
|
| 525 | * Compile la balise `#TOTAL_BOUCLE` qui retourne le nombre de résultats |
|
| @@ 538-550 (lines=13) @@ | ||
| 535 | * @return Champ |
|
| 536 | * Pile complétée par le code à générer |
|
| 537 | **/ |
|
| 538 | function balise_TOTAL_BOUCLE_dist($p) { |
|
| 539 | $b = index_boucle_mere($p); |
|
| 540 | if ($b === '') { |
|
| 541 | $msg = array('zbug_champ_hors_boucle', array('champ' => zbug_presenter_champ($p))); |
|
| 542 | erreur_squelette($msg, $p); |
|
| 543 | } else { |
|
| 544 | $p->code = "\$Numrows['$b']['total']"; |
|
| 545 | $p->boucles[$b]->numrows = true; |
|
| 546 | $p->interdire_scripts = false; |
|
| 547 | } |
|
| 548 | ||
| 549 | return $p; |
|
| 550 | } |
|
| 551 | ||
| 552 | ||
| 553 | /** |
|
| @@ 1204-1217 (lines=14) @@ | ||
| 1201 | * @return Champ |
|
| 1202 | * Pile complétée par le code à générer |
|
| 1203 | **/ |
|
| 1204 | function balise_GRAND_TOTAL_dist($p) { |
|
| 1205 | $b = index_boucle_mere($p); |
|
| 1206 | if ($b === '') { |
|
| 1207 | $msg = array('zbug_champ_hors_boucle', array('champ' => zbug_presenter_champ($p))); |
|
| 1208 | erreur_squelette($msg, $p); |
|
| 1209 | } else { |
|
| 1210 | $p->code = "(isset(\$Numrows['$b']['grand_total']) |
|
| 1211 | ? \$Numrows['$b']['grand_total'] : \$Numrows['$b']['total'])"; |
|
| 1212 | $p->boucles[$b]->numrows = true; |
|
| 1213 | $p->interdire_scripts = false; |
|
| 1214 | } |
|
| 1215 | ||
| 1216 | return $p; |
|
| 1217 | } |
|
| 1218 | ||
| 1219 | ||
| 1220 | /** |
|