Indsætning/indlæsning af text fil på hjemmeside.
Hej...Jeg har en hjemme side hvor jeg godt kunne tænke mig at kunne indlæs en text fil på en hjemmeside, så det vil være muligt at have en "master side" men kan ændre texten på den pågældende side ved at indlæse en text fil. jeg skal bruge den sammen med et foto album..
Jeg ville gerne have at text stod øverst oppe.
Her er master filen: (filen hedder ShowPicture.asp)
<%
' ASP Picture Album made by Jan Borup Coyle, mailto:jb@xess.dk for Comments
Dim CurFile, ShowSub, ShowPic, PictureNo
Dim strPathInfo, strPhysicalPath
CurFile = "ShowPicture.asp"
%>
<html><head>
<title>FOTO Album</title>
<meta name="Generator" content="Stone's WebWriter 4">
<script language="JavaScript">
<!--
function jumppage(sel)
{
var i = sel.selectedIndex
self.location.href = sel.options[i].value
}
// -->
</script>
</head><body bgcolor="#000000" text="#FFFF00">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="26">
<tr>
<td align="center" width="563" height="26">
<h3 align="center"><b><font color="#66CCFF" face="Times New Roman"> </font><font color="#FFFF00" face="Times New Roman">
Foto Album</font></b></h3>
</td>
<td align="center" width="275" height="26">
<form action=<%=CurFile%> method="POST">
<h3>Vælg Album :
<select name="go" onChange="jumppage(this);" size=1>
<%
ShowSub = request("ShowSub")
ShowPic = request("ShowPic")
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
For each Folder in objFolder.SubFolders
If Left(Folder.Name,1)<>"_" Then
Response.write "<option "
If ShowSub=Folder.Name Then
Response.Write "selected "
End if
Response.Write"value='" & CurFile & "?ShowSub="
Response.Write(Replace(Folder.Name, " ", "%20"))
response.write "'>"
Response.Write(Folder.Name & "</option>")
If ShowSub <= " " Then
ShowSub = Folder.Name
End if
End if
Next
Set objFSO = Nothing
%>
</select></h3>
</form>
</td>
</tr>
</table>
<%
If ShowPic > " " then
ShowPic = Replace(ShowPic, " ", "%20")
Response.Write "<a href='java script:history.go(-1)'><img src='" & ShowPic & "'><BR><BR><B>Go Back</B></a>"
Else
%>
<table border="0" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="800" id="AutoNumber1">
<tr>
<%
strPhysicalPath = Server.MapPath(".\" & ShowSub)
If ShowSub > " " then
ShowSub = Replace(ShowSub, " ", "%20")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPhysicalPath)
Set objFolderContents = objFolder.Files
For Each objFileItem in objFolderContents
If Ucase(Right(objFileItem.Name,4))=".GIF" OR Ucase(Right(objFileItem.Name,4))=".JPG" THEN
ShowPic = Replace(objFileItem.Name, " ", "%20")
'Response.write "<td align='center' width='25%'><a href=" & ShowSub & "\"
Response.write "<td align='center' width='25%'><a href=" & CurFile & "?ShowPic=" & ShowSub & "\" & ShowPic
'Response.Write(Replace(objFileItem.Name, " ", "%20"))
Response.write ">"
Response.Write("<img src='" & ShowSub & "\" & objFileItem.Name & "' width=200> ")
Response.Write("<p align='center'><b>" & Mid(objFileItem.Name,1,Len(objFileItem.Name)-4) & "</b>")
Response.write "</a></td>"
PictureNo = PictureNo + 1
If PictureNo=4 Then
Response.write "</tr><tr>"
PictureNo = 0
End if
End if
Next
Set objFSO = Nothing
End if
%>
</tr>
</table>
<%
End if
%>
</center>
<hr size="1" color="#FFFF00">
</html>