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