Subversion Repositories wimsdev

Rev

Rev 5181 | 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
12811 obado 4
 
5
!set wims_ariane_self=no
6
!set wims_ariane=!append line ref,8 to $wims_ariane
7
 
23 reyssat 8
!default type=uniq
9
!default reflim=100
10
!default search=yes
11
key=!trim $key
12
 
13
!if $style notwordof day week month year beginning
12811 obado 14
  style=
23 reyssat 15
!endif
16
!default style=month
17
 
18
!if $reflim>300
12811 obado 19
  reflim=300
23 reyssat 20
!endif
21
!if $reflim<10
12811 obado 22
  reflim=10
23 reyssat 23
!endif
24
 
25
!if $cmd=new or $cmd=renew
12811 obado 26
  sitestart=!mexec getstart.sh
23 reyssat 27
!endif
28
 
29
start_year=!char 1,2,3,4 of $sitestart
30
start_month=!char 5,6 of $sitestart
31
start_day=!char 7,8 of $sitestart
32
insplot_set=timefmt "%Y%m%d"; xdata time; nomxtics; nox2tics; size 0.7
33
insplot_transparent=white
34
 
35
!if $cmd=reply
12811 obado 36
  show=yes
37
  !read date
38
  !if $date1<$start_year$start_month$start_day
39
    date1=$start_year$start_month$start_day
40
  !endif
41
  ref=!mexec refcnt.sh $type $date1 $date2
42
  auto=!word 1 of $ref
43
  ref=!line 2 to -1 of $ref
44
  wims_module_log=$cnt $style $type
23 reyssat 45
!endif
46
 
47
!for i in 1,2
12811 obado 48
  year$i=!char 1 to 4 of $(date$i)
49
  month$i=!char 5,6 of $(date$i)
50
  day$i=!char 7,8 of $(date$i)
51
  date_$i=!date -d $(date$i) '+%j'
23 reyssat 52
!next i
53
 
54
laps=!eval ($year2-$year1)*365+$date_2-$date_1+1
55
!ifval floor($year1/4)<floor($year2/4) and floor($year1/100)=floor($year2/100)
12811 obado 56
  laps=!eval $laps+1
23 reyssat 57
!endif