<%@ LANGUAGE="VBSCRIPT" %> <% ' -------------------------------------------------- ' ASP include which sets up the Picpost global stuff ' include at the top of each Picpost ASP file ' Note that we may load thousands of pic's in our content ' file. We display only 'n' at a time to the surfer though ' ' Copyrighted 2001 AKA Systes ' All rights Reserved. ' -------------------------------------------------- ' -------------------------------------------------- ' directory to upload to, must have write access! ' this is where the pic's are stored after being uploaded ' but before being saved. ' -------------------------------------------------- gs_Upload_dir = "d:\wwwsites\64.27.99.27\html\gallery\temp" ' -------------------------------------------------- ' mime type which it must be. we only compare what's ' here so "image" allows "image/jpeg, image/gif", whatever ' -------------------------------------------------- gs_mimetype = "image/" ' -------------------------------------------------- ' max filesize in bytes. 0 means any size, > 0 is a max ' -------------------------------------------------- gd_maxsize = "350000" ' -------------------------------------------------- ' max width and height in pixels. if it exceeds ' one or the other, we resize it ' -------------------------------------------------- gd_maxwidth = 600 gd_maxheigth = 400 ' -------------------------------------------------- ' validation controls ' -------------------------------------------------- gs_handle_required = false gs_email_required = false gs_desc_required = false ' -------------------------------------------------- ' directory where content file is ' -------------------------------------------------- gs_info_dir = "info" ' -------------------------------------------------- ' directory where pics are ' -------------------------------------------------- gs_pic_dir = "pics" ' -------------------------------------------------- ' gallery file name preface (we append the calculated file# ' and ".txt" to the end of this string to get the ' actual file name ' -------------------------------------------------- gs_prefix = "gallery" ' -------------------------------------------------- ' number of columns wide to show in gallery and the ' max pic's to show on one page of the gallery. To ' look best, make gs_per_page a multiple of gs_cols ' so you'll end up with even rows when the page is ' full ' -------------------------------------------------- gs_cols = 3 gs_per_page = 15 ' -------------------------------------------------- ' max pic's per content file. ' **** THIS NEEDS TO BE HUGE SINCE WE DO NOT ' SUPPORT MULTIPLE CONTENT FILES YET. You never want ' the actual # of pics to get above this at present ' This can be large ' and multiple content files are untested yet. ' -------------------------------------------------- gs_per_CI_file = 100000 %> <% ' -------------------------------------------------- ' stuff to set position within gallery ' ' Copyrighted 2001 AKA Systes ' All rights Reserved. ' -------------------------------------------------- ' -------------------------------------------------- ' set on error resume so we know we'll complete out ' -------------------------------------------------- on error resume next err.clear ' -------------------------------------------------- ' See if your're an admin (did you include the correct ' U= argument on the URL) Change the test below to ' whatever you want to use. ' -------------------------------------------------- qU = request.querystring("u") if qU = "z2fsaDD2x2" then isAdmin = true sQu = "&u=z2fsaDD2x2" ' string to pass on else isAdmin = False sQu = "" end if ' -------------------------------------------------- ' see which gallery index (page) we are. ' Default to 1 ' -------------------------------------------------- gi = request.querystring("gi") if gi > "" then if isnumeric(gi) then ' otay else gi = "1" end if else gi ="1" end if dGi = cdbl(gi) if dgi < 0 then dgi = 1 gi = "1" end if ' -------------------------------------------------- ' see which index within our picpost gallery we are. ' If passed, but invalid treat same as unpassed ' If inpassed, calc as first on this page ' -------------------------------------------------- if request.Servervariables("REQUEST_METHOD") = "POST" then gx = request.form("gx") if gx = "" then gx = request.querystring("gx") end if else gx = request.querystring("gx") end if if gx > "" then if isnumeric(gx) then dGx = cdbl(gx) if dgx < 0 then gx = "" end if else gx = "" end if else gx ="" end if if gx = "" then ' not passed or was invalid gx = (gi - 1) * gs_per_page + 1 dGx = cdbl(gx) end if ' -------------------------------------------------- ' Calculate the file suffix based on index ' -------------------------------------------------- gs_suffix = int(dGx / gs_per_CI_file) if dGx MOD gs_per_CI_file > 0 then gs_suffix = gs_suffix + 1 ' -------------------------------------------------- ' Select the content file and get a content object reference to it ' -------------------------------------------------- gs_content_index = gs_info_dir & "/" & gs_prefix & gs_suffix & ".txt" gs_count = 0 err.clear ' -------------------------------------------------- ' try to open the content file and get the # of entries ' -------------------------------------------------- Set NextLink = Server.CreateObject ("MSWC.NextLink") if err <> 0 then response.write ("Create err on Nextlink object
[" & err.description & "]
" & vbcrlf) else gs_count = NextLink.GetListCount (gs_content_index) if err <> 0 then response.write ("Error getting count [" & gs_content_index & "], err [" & err.description & "]
" & vbcrlf) gs_count = 0 end if end if ' -------------------------------------------------- ' make sure the index of our target is within the gallery ' -------------------------------------------------- if gs_count = 0 then ' report_err ("Gallery is empty") else if dgx > gs_count then if request.Servervariables("REQUEST_METHOD") <> "POST" then report_err ("Index within gallery greater than number of entries in gallery") end if dgx = gs_count end if end if ' -------------------------------------------------- ' set the page # fields based on where we are ' -------------------------------------------------- If gs_count = 0 then ilastpage = 0 iCurpage = 0 else ilastpage = int(gs_count / gs_per_page) if gs_count MOD gs_per_page > 0 then ilastpage = iLastpage + 1 iCurpage = int(gx / gs_per_page) if gx MOD gs_per_page > 0 then icurPage = iCurPage + 1 end if iprevpage = iCurpage - 1 inextpage = iCurPage + 1 ' end of code which is always executed is here ' -------------------------------------------------- ' Error reporting subroutine for convenience ' -------------------------------------------------- sub Report_err (sMsg) if smsg > "" then sErr = sMsg & "
" & vbcrlf else sErr = "" end if sErr = sErr & "Gs Content file [" & gs_content_index & "]
" & _ "Gallery index [" & gi & "]
" & _ "Gallery Suffix [" & gs_suffix & "]
" & _ "Entry index within gallery [" & gx & "]
" & _ "Nbr entries in gallery [" & cstr(gs_count) & "]
" & _ "is admin [" & cstr(isadmin) & "]
" & _ "qu admin URL parm [" & qu & "]
" & _ "squ admin URL string [" & squ & "]
" & _ "Gs info Dir [" & gs_info_dir & "]
" & _ "Gs prefix [" & gs_prefix & "]
" & _ "Gs cols [" & cstr(gs_cols) & "]
" & _ "Gs per page [" & cstr(gs_per_page) & "]
" & _ "Gs per CI file [" & cstr(gs_per_ci_file) & "]
" & _ "last page [" & cstr(iLastpage) & "]
" & _ "cur page [" & cstr(icurpage) & "]
" & _ "prev page [" & cstr(iPrevpage) & "]
" & _ "next page [" & cstr(iNextpage) & "]
" & _ " " response.write (sErr & vbcrlf) end sub %> Tidwater Basketry Guild- Phot Gallery














 
Guild Pictures!    


Upload a new picture

This form allows you to upload your picture along with a poster handle, description, and optional email address. If you don't see a "BROWSE" button below, you need to use a more recent browser.

Poster handle
<% if gs_handle_required = true then %> (required) <% else %> (optional) <% end if %>
(max of 16 characters)
Poster email address
<% if gs_email_required = true then %> (required) <% else %> (optional) <% end if %>
A short description
of this pic
<% if gs_desc_required = true then %> (required) <% else %> (optional) <% end if %>
(max of 300 characters)
Your Picture's Filename:

Note: if a button labeled "Browse..." does not appear, you're using too old an browser (Netscape 2.0 or MS IE 3.02 or later)


When you press the UPLOAD! button, there will be a delay as your browser uploads the file to the server. Please wait for the process to complete.










©Copyright 2002
Tidewater Basketry Guild
Site Index
All Rights Reserved
webmaster@tidewaterbasketryguild.org