pro soon_comment_www, env_file=env_file
;
;+
;   Name: soon_comment_www
;
;-

break_file,env_file,ll,pp,ff,vv,ee

envfile=concat_dir('path_http','text_client/' + ff+ vv)

envstruct=strpair2struct(envfile)

; -------- domain authorization ---------
domain_list=['space.lockheed.com','colorado.edu','hao.ucar.edu']
host=strsplit(envstruct.remote_host,'.',tail=domain)
ok2edit=is_member(domain,domain_list)
; ------------------------------

if not ok2edit then begin
   message,/info,"Sorry - your domain not authorized to edit file"
endif else begin
   message,/info,"Domain: <" + domain(0) + "> authorized to update comments"
   refer=envstruct.http_referer
   refer=str_replace(refer,'http://www/sxt',get_logenv('top_http'))
   html=http_names(refer)
   comment=str_replace(html,'html','comments')
   help,refer,html,comment
;
;  ----------- build a FORM ----------------
IDL> ofile='/pore1local/etc/httpd/htdocs/SXT/soon/str960130F.html'
IDL> sxt_html,ofile,/header
IDL> file_append,ofile,'<FORM METHOD="POST" ACTION="/cgi-bin/sooncom.sh">
IDL> file_append,ofile,'<textarea rows=20 cols=80 name="comments">
IDL> file_append,ofile,rd_tfile(comments(0))
IDL> file_append,ofile,</textarea>
IDL> sxt_html,ofile,/trailer
;---------------------------------------------
endelse

return
end
