/*
------------------------------------------------------------------------
                 Oves SommarHus BBS +46-(0)16-146837 
  $VER: OldCalLog.script 1.1 (29-09-96) Snille Of LoserKlubben.inc
------------------------------------------------------------------------

Description:  Displays separate CalLogs for every
              day up to 14 days.

Requirements: CNet 3.05 

Install:      Copy all fles in the archive to PFiles.
              Config this file after your needs...
              Remember to use the SAME path as the script!

              Add this to your BBSMenu at menu 3; Main prompt:
              OLC            `30- |#0PFiles:OldCalLog/OldCalLog.rexx}
             
Mail me at:   E-Mail:
              erik.pettersson@mailbox.swipnet.se

------------------------------------------------------------------------

*/

options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar ; gu=getuser ; gs=getscratch
a='rexxsupport.library' ; if ~show('l',a) then if ~addlib(a,0,-30) then exit


/* ------------------------------ Config Here ----------------------------- */
LogPath="SysData:Log/CalLogs/"              /* Path to LogFiles             */
SysOp="30"                                  /* Lowest Accsess group to Logs */
/* ---------------------------- Config ends Here -------------------------- */

getuser 15 ; ag=result

If ag<SysOp then do 
	Transmit "You don`t have enough accsess!!"
	Exit
end

Start:
prompt 2 normal "n1c3Display how old callog? 1-14 days c2[Return=Quit] c7[>2]<3" 
Val=result

If Val="" then exit
If Val>14 then call start
If Val<1 then call start
if Val="1" then Sendfile LogPath"CalLog1" 
if Val="2" then sendfile LogPath"CalLog2" 
if Val="3" then sendfile LogPath"CalLog3" 
if Val="4" then sendfile LogPath"CalLog4"
if Val="5" then sendfile LogPath"CalLog5"
if Val="6" then sendfile LogPath"CalLog6"
if Val="7" then sendfile LogPath"CalLog7"
if Val="8" then sendfile LogPath"CalLog8"
if Val="9" then sendfile LogPath"CalLog9"
if Val="10" then sendfile LogPath"CalLog10"
if Val="11" then sendfile LogPath"CalLog11"
if Val="12" then sendfile LogPath"CalLog12"
if Val="13" then sendfile LogPath"CalLog13"
if Val="14" then sendfile LogPath"CalLog14"
transmit "n1End of list."
exit

SYNTAX: ; ERROR: ; IOERR: ; er=rc' ('errortext(rc)') in line 'sigl
	getuser 1311992 ; a=result ; getuser 1311960 ; b=result ; c='"'a||b'"'
	er='Error Code 'er' of 'c ; transmit er ; logentry er ; bufferflush
Exit
