1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/sh
# HTML calendar shell script
#
# This file is part of REMIND.
# Copyright (C) 1992-2018 by Dianne Skoll
echo "Content-Type: text/html"
echo ""
if [ "$1 $2" = " " ] ; then
$REMIND - <<'EOR'
set thismon monnum(today())
set thisyear year(today())
set nextmon iif(thismon+1 > 12, 1, thismon+1)
set nextyear iif(nextmon==1, thisyear+1, thisyear)
set lastmon iif(thismon-1 < 1, 12, thismon-1)
set lastyear iif(lastmon==12, thisyear-1, thisyear)
set nextmon mon(nextmon)
set lastmon mon(lastmon)
BANNER %
REM RUN $REMIND -iHTML=1 -p $DIR/hebdate.rem %m %y | $DIR/rem2html --forwurl "cal_dispatch?hebhtml+[nextmon]+[nextyear]" --backurl "cal_dispatch?hebhtml+[lastmon]+[lastyear]"
EOR
else
$REMIND - "$1" "$2" <<'EOR'
set thismon monnum(today())
set thisyear year(today())
set nextmon iif(thismon+1 > 12, 1, thismon+1)
set nextyear iif(nextmon==1, thisyear+1, thisyear)
set lastmon iif(thismon-1 < 1, 12, thismon-1)
set lastyear iif(lastmon==12, thisyear-1, thisyear)
set nextmon mon(nextmon)
set lastmon mon(lastmon)
BANNER %
REM RUN $REMIND -iHTML=1 -p $DIR/hebdate.rem %m %y | $DIR/rem2html --forwurl "cal_dispatch?hebhtml+[nextmon]+[nextyear]" --backurl "cal_dispatch?hebhtml+[lastmon]+[lastyear]"
EOR
fi
exit 0
|