Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
392 | obado | 1 | # wims_class is the current class |
2 | # wims_sheet is the current sheet |
||
3 | # update_field is number of field to update |
||
4 | # If update_field=0, the sheet $qsheet is deleted. |
||
5 | # update_content is the new content. |
||
6 | |||
7 | scnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
||
8 | |||
9 | #on commence par remplir les valeurs sheet_x par l'enregistrement correspondant dans l'index |
||
10 | !for s=1 to $scnt |
||
11 | sheet_$s=!record $s of $sheetsfile |
||
12 | sheet_$s=!line 1 to 7 of $(sheet_$s)\ |
||
13 | \ |
||
14 | \ |
||
15 | \ |
||
16 | \ |
||
17 | \ |
||
18 | \ |
||
19 | |||
20 | !next s |
||
21 | |||
22 | !if $update_field!=0 |
||
23 | sheet_$wims_sheet=!replace line number $update_field by $update_content in $(sheet_$wims_sheet) |
||
24 | !endif |
||
25 | |||
26 | #on peut alors reconstruire le fichier d'index des feuilles |
||
27 | !writefile wimshome/log/classes/$wims_class/sheets/.sheets |
||
28 | !for s=1 to $scnt |
||
29 | !if $update_field!=0 or $s!=$wims_sheet |
||
30 | sf=!line 1 to 5 of $(sheet_$s) |
||
31 | !appendfile wimshome/log/classes/$wims_class/sheets/.sheets :$sf\ |
||
32 | |||
33 | !endif |
||
34 | !next s |
||
35 |