Subversion Repositories wimsdev

Rev

Rev 2420 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
# Variable calculations should be done in this file.
2
# It is read and interpreted by wims for all valid calls to the module.
5181 guerimand 3
!read adm/language lang/names.phtml
23 reyssat 4
!default type=uniq
5
!default reflim=100
6
!default search=yes
7
key=!trim $key
8
 
9
!if $style notwordof day week month year beginning
10
 style=
11
!endif
12
!default style=month
13
 
14
!if $reflim>300
15
 reflim=300
16
!endif
17
!if $reflim<10
18
 reflim=10
19
!endif
20
 
21
!if $cmd=new or $cmd=renew
22
 sitestart=!mexec getstart.sh
23
!endif
24
 
25
start_year=!char 1,2,3,4 of $sitestart
26
start_month=!char 5,6 of $sitestart
27
start_day=!char 7,8 of $sitestart
28
insplot_set=timefmt "%Y%m%d"; xdata time; nomxtics; nox2tics; size 0.7
29
insplot_transparent=white
30
 
31
!if $cmd=reply
32
 show=yes
33
 !read date
34
 !if $date1<$start_year$start_month$start_day
35
  date1=$start_year$start_month$start_day
36
 !endif
37
 ref=!mexec refcnt.sh $type $date1 $date2
38
 auto=!word 1 of $ref
39
 ref=!line 2 to -1 of $ref
40
 wims_module_log=$cnt $style $type
41
!endif
42
 
43
!for i in 1,2
44
 year$i=!char 1 to 4 of $(date$i)
45
 month$i=!char 5,6 of $(date$i)
46
 day$i=!char 7,8 of $(date$i)
47
 date_$i=!date -d $(date$i) '+%j'
48
!next i
49
 
50
laps=!eval ($year2-$year1)*365+$date_2-$date_1+1
51
!ifval floor($year1/4)<floor($year2/4) and floor($year1/100)=floor($year2/100)
52
 laps=!eval $laps+1
53
!endif
54