| @@ 487-499 (lines=13) @@ | ||
| 484 | * @return Champ |
|
| 485 | * Pile complétée par le code à générer |
|
| 486 | **/ |
|
| 487 | function balise_COMPTEUR_BOUCLE_dist($p) { |
|
| 488 | $b = index_boucle_mere($p); |
|
| 489 | if ($b === '') { |
|
| 490 | $msg = array('zbug_champ_hors_boucle', array('champ' => zbug_presenter_champ($p))); |
|
| 491 | erreur_squelette($msg, $p); |
|
| 492 | } else { |
|
| 493 | $p->code = "\$Numrows['$b']['compteur_boucle']"; |
|
| 494 | $p->boucles[$b]->cptrows = true; |
|
| 495 | $p->interdire_scripts = false; |
|
| 496 | ||
| 497 | return $p; |
|
| 498 | } |
|
| 499 | } |
|
| 500 | ||
| 501 | /** |
|
| 502 | * Compile la balise `#TOTAL_BOUCLE` qui retourne le nombre de résultats |
|
| @@ 515-527 (lines=13) @@ | ||
| 512 | * @return Champ |
|
| 513 | * Pile complétée par le code à générer |
|
| 514 | **/ |
|
| 515 | function balise_TOTAL_BOUCLE_dist($p) { |
|
| 516 | $b = index_boucle_mere($p); |
|
| 517 | if ($b === '') { |
|
| 518 | $msg = array('zbug_champ_hors_boucle', array('champ' => zbug_presenter_champ($p))); |
|
| 519 | erreur_squelette($msg, $p); |
|
| 520 | } else { |
|
| 521 | $p->code = "\$Numrows['$b']['total']"; |
|
| 522 | $p->boucles[$b]->numrows = true; |
|
| 523 | $p->interdire_scripts = false; |
|
| 524 | } |
|
| 525 | ||
| 526 | return $p; |
|
| 527 | } |
|
| 528 | ||
| 529 | ||
| 530 | /** |
|
| @@ 1181-1194 (lines=14) @@ | ||
| 1178 | * @return Champ |
|
| 1179 | * Pile complétée par le code à générer |
|
| 1180 | **/ |
|
| 1181 | function balise_GRAND_TOTAL_dist($p) { |
|
| 1182 | $b = index_boucle_mere($p); |
|
| 1183 | if ($b === '') { |
|
| 1184 | $msg = array('zbug_champ_hors_boucle', array('champ' => zbug_presenter_champ($p))); |
|
| 1185 | erreur_squelette($msg, $p); |
|
| 1186 | } else { |
|
| 1187 | $p->code = "(isset(\$Numrows['$b']['grand_total']) |
|
| 1188 | ? \$Numrows['$b']['grand_total'] : \$Numrows['$b']['total'])"; |
|
| 1189 | $p->boucles[$b]->numrows = true; |
|
| 1190 | $p->interdire_scripts = false; |
|
| 1191 | } |
|
| 1192 | ||
| 1193 | return $p; |
|
| 1194 | } |
|
| 1195 | ||
| 1196 | ||
| 1197 | /** |
|