If:
Then:
declare extern ErrMsg,ErrReturn,OutFile
If:
Then:
declare extern UName,Pass,Remember,UpOrig,UpSize,SessID,UpDesc,UpPass
If:
Then:
declare OHandle(4,.0),Msg,IHandle(4,.0),SelfURL,Style,Pre
If:
Then:
IHandle=open("flfss.styleurl","r")
If:
Then:
ln=readline(IHandle,Style,"999")
If:
Then:
ln=close(Ihandle)
If:
Then:
IHandle=open("flfss.baseurl","r")
If:
IHandle lt "0"
Then:
SelfURL="/~fairlite/cgi-bin/cgiwrap/filepro/onegate";goto
skiprd2
If:
Then:
ln=readline(IHandle,SelfURL,"999")
If:
Then:
ln=close(IHandle)
If:
Then:
OHandle=open(OutFile,"wc0t")
If:
Then:
Msg="<html><head><title>File Upload</title>"
If:
Style ne ""
Then:
Msg="<link rel=\"stylesheet\" href=\""{Style{"\" type=\"text/css\">"
If:
Then:
Msg="</head><body>"
If:
Then:
Msg="<div class=\"whole\"><div class=\"header\"><div class=\"title\"><h2>File Upload - "&UName{"</h2></div><br><hr>"
If:
Then:
Msg="<div class=\"main\">"
If:
ErrMsg ne ""
Then:
Msg="<div class=\"error\">"{ErrMsg{"</div>";gosub
sendln
If:
Then:
Msg="<div><br><b>Click on <i>Browse</i> to select a file to upload from your system:</b><br><br></div>";gosub
sendln
If:
Then:
Msg="<form method=\"post\" action=\""{SelfURL{"\" enctype=\"multipart/form-data\">"
If:
Then:
Msg="<input type=\"hidden\" name=\"onegate_set\" value=\"flfss_upload_file\">"
If:
Then:
Pre="<div><div class=\"flabel\">Select File:</div>"
If:
Then:
Msg="<div class=\"fval\"><input type=\"file\" name=\"upfile\">"
If:
Then:
Msg=Msg{"</div><br><br></div>";gosub
sendln
If:
Then:
Pre="<div><div class=\"flabel\">(Optional) Description:</div>"
If:
Then:
Msg="<div class=\"fval\"><input type=\"text\" name=\"desc\" size=\"60\" maxlength=\"60\">"
If:
Then:
Msg=Msg{"</div><br><br></div>";gosub
sendln
If:
Then:
Pre="<div><div class=\"flabel\">(Optional) Password:</div>"
If:
Then:
Msg="<div class=\"fval\"><input type=\"password\" name=\"pass\" size=\"20\" maxlength=\"20\">"
If:
Then:
Msg=Msg{"</div><br><br></div>";gosub
sendln
If:
Then:
Pre="<div><div class=\"flabel\"> </div>"
If:
Then:
Msg="<div class=\"fval\"><input type=\"submit\" name=\"submit\" action=\""{SelfURL{"\" value=\"Upload!\">"
If:
Then:
Msg=Msg{"<input type=\"hidden\" name=\"session\" value=\""{SessID{"\"></form>"
If:
Then:
Msg=Msg{"</div><br><br></div>"
If:
Then:
Msg="</ul><div><a href=\""{SelfURL{"?onegate_set=flfss_menu&session="{SessID{"\">Return to Menu</a><br></div>"
If:
Then:
Msg="</div><div class=\"footer\"><hr><span class=\"genby\">Fairlight File Sharing System</span></div></div>"
If:
Then:
Msg="</body></html>"
If:
Then:
ln=close(OHandle)
If:
Then:
ErrReturn="DONE";end
If:
Pre ne ""
Then:
ln=writeline(OHandle,Pre,len(Pre))
If:
Msg ne ""
Then:
ln=writeline(OHandle,Msg,len(Msg))