Subversion Repositories wimsdev

Rev

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