Bill
Many thanks for that.
I have embedded the following:
IF p_web.GetSessionLoggedIn() = 0 ! NOT logged in
!Test for upload folders and don't serve
IF INSTRING('\photos',p_FileName,1,1) OR INSTRING('\uploads',p_FileName,1,1) OR INSTRING('\discussion_uploads',p_FileName,1,1)
RETURN
.
.
This works fine and gives an "error" in th browser if accessing anything in one of the specified folders if not logged in. What would be more elegant would be if it displayed an alert or a web page saying that you are not logged in but not sure of code to do either?
If I use:
p_web.Script('alert("You must be logged in to open view this file.");')
Rather than an alert message I get a page open showing:
<script defer="defer">
alert("You must be logged in to open view this file.");
</script>