Subversion Repositories wimsdev

Rev

Rev 5181 | Blame | Compare with Previous | Last modification | View Log | RSS feed

# Variable calculations should be done in this file.
# It is read and interpreted by wims for all valid calls to the module.
!read adm/language lang/names.phtml

!set wims_ariane_self=no
!set wims_ariane=!append line ref,8 to $wims_ariane

!default type=uniq
!default reflim=100
!default search=yes
key=!trim $key

!if $style notwordof day week month year beginning
  style=
!endif
!default style=month

!if $reflim>300
  reflim=300
!endif
!if $reflim<10
  reflim=10
!endif

!if $cmd=new or $cmd=renew
  sitestart=!mexec getstart.sh
!endif

start_year=!char 1,2,3,4 of $sitestart
start_month=!char 5,6 of $sitestart
start_day=!char 7,8 of $sitestart
insplot_set=timefmt "%Y%m%d"; xdata time; nomxtics; nox2tics; size 0.7
insplot_transparent=white

!if $cmd=reply
  show=yes
  !read date
  !if $date1<$start_year$start_month$start_day
    date1=$start_year$start_month$start_day
  !endif
  ref=!mexec refcnt.sh $type $date1 $date2
  auto=!word 1 of $ref
  ref=!line 2 to -1 of $ref
  wims_module_log=$cnt $style $type
!endif

!for i in 1,2
  year$i=!char 1 to 4 of $(date$i)
  month$i=!char 5,6 of $(date$i)
  day$i=!char 7,8 of $(date$i)
  date_$i=!date -d $(date$i) '+%j'
!next i

laps=!eval ($year2-$year1)*365+$date_2-$date_1+1
!ifval floor($year1/4)<floor($year2/4) and floor($year1/100)=floor($year2/100)
  laps=!eval $laps+1
!endif