Subversion Repositories wimsdev

Rev

Rev 2415 | Rev 13135 | 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
max_modules=50
5
 
6
!if $cmd=new or $cmd=renew
7
 sitestart=!mexec getstart.sh
8
!endif
9
 
10
!bound style within day,week,month,year,beginning default week
11
!bound plot_type within 2,3,4 default 2
12
 
13
start_year=!char 1,2,3,4 of $sitestart
14
start_month=!char 5,6 of $sitestart
15
start_day=!char 7,8 of $sitestart
1059 bpr 16
insplot_set=timefmt "%Y%m%d"; xdata time; tmargin 1; nomxtics; nox2tics; size 0.7,0.7
23 reyssat 17
insplot_transparent=white
18
module_type=!item $plot_type of 1,1,2,3
19
!read tabletheme
20
!read adm/class/stat
21
 
22
!if $cmd=reply
23
 show=yes
24
 !read date
25
 !if $date1<$start_year$start_month$start_day
26
  date1=$start_year$start_month$start_day
27
 !endif
28
 stat_out=!mexec stat.sh
29
 !read stat
30
 wims_module_log=$cnt $style modules=$modules
31
!endif
32
 
33
!for i in 1,2
34
 year$i=!char 1 to 4 of $(date$i)
35
 month$i=!char 5,6 of $(date$i)
36
 day$i=!char 7,8 of $(date$i)
37
 date_$i=!date -d $(date$i) '+%j'
38
!next i
39
 
40
laps=!eval ($year2-$year1)*365+$date_2-$date_1+1
41
!ifval floor($year1/4)<floor($year2/4) and floor($year1/100)=floor($year2/100)
42
 laps=!eval $laps+1
43
!endif
44
 
45
# plotting data
46
!if $cmd=reply
47
 !if $laps<20
48
  step=1
49
  dateformat=$format1
50
 !else
51
  !if $laps<36
52
   step=2
53
   dateformat=$format1
54
  !else
55
   !if $laps<70
56
    step=4
57
    dateformat=$format2
58
   !else
59
    step=!eval 7*ceil($laps/(7*50))
60
    dateformat=$format3
61
   !endif
62
  !endif
63
 !endif
64
 insplot_set=$insplot_set;format x "$dateformat"
65
 insplot_data=!mexec plotdata.sh
66
!endif
67