%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <% // set the incoming page number var newpage = String(Request.QueryString("newpage")); if(newpage=="" || newpage=="undefined" || newpage>9 || newpage<0) { var thispage=0; } else { var thispage=parseInt(newpage); } // set the arrays thisthumb = new Array(); thisalt = new Array(); // fill the filename array and check if exist // filename is page+position.jpg or nothumb.jpg fso = new ActiveXObject("Scripting.FileSystemObject"); for(var position=0;position<18;position++) { // loop the positions var thepicture = "photostore\\fot" + thispage + position + ".jpg"; var thispath = String(Request.ServerVariables("PATH_TRANSLATED")); // get the absolute path var fullfilename = thispath.replace(/\\\w*\.asp/,"\\") + thepicture; if(fso.FileExists(fullfilename)) { // yes it does thisthumb[position] = thepicture; } else { thisthumb[position] = "photostore\\nothumb.jpg"; } } // end the loop fso = ""; // fill the alt array // get the absolute path to the text files var abs_path = String(Request.ServerVariables("PATH_TRANSLATED")); // create the filename var thisAltFn = "altstore/txt" + thispage + ".txt"; // create the full path to the text file var thisAltText = abs_path.replace(/\\\w*\.asp/,"\\") + thisAltFn; // create the file object fso = new ActiveXObject("Scripting.FileSystemObject"); // open the text file stream if(fso.FileExists(thisAltText)) { // file does exist so read it altStream = fso.OpenTextFile(thisAltText); // read in the alt lines for(i=0;i<18;i++) { thisalt[i] = altStream.ReadLine(); } // close the stream altStream.close(); } // close the if file exists else { // no file for some reason so fill array with fillers for(var w=0;w<18;w++) { thisalt[w] = "Photo gallery"; } } %>
You are currently viewing page <%=thispage+1%> of the Sinaloa Photo gallery |
|||||
|
|
|||||