21. oktober 2008 - 22:37
#7
Jeg håber, at I kan finde svaret i nedenstående kode:
<html>
<head>
<% ' FP_ASP -- ASP, der er genereret automatisk af en FrontPage-komponent. Undlad at redigere.
FP_LCID = 1030 %>
<meta http-equiv="Content-Language" content="da">
<% ' FP_ASP -- ASP, der er genereret automatisk af en FrontPage-komponent. Undlad at redigere.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>lme3</title>
<base target="_self">
<script type="text/javascript" src="applications\helpbox.js"></script>
</head>
<!-- PEL_START: Sæt værdi af refpage, skal sættes på ALLE sider, hvor refpage skal kunne læses -->
<%
refpage = 0
refpage = Request("refpage") + 1
%>
<!-- PEL_SLUT: Sæt værdi af refpage -->
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" background="graphics/background/background_centre.jpg">
<form BOTID="0" METHOD="POST" action="titledb2.asp">
<input type="hidden" name="fpdbr_0_PagingMove" value=" |< ">
</form>
<p><!--webbot bot="HTMLMarkup" startspan --><SCRIPT language=JavaScript1.2>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
</SCRIPT><!--webbot bot="HTMLMarkup" endspan --></p>
<table border="0" width="100" cellspacing="0" cellpadding="0" height="30" id="bottom_help" style="position: absolute; left: 924px; top: 610px; z-index:0">
<tr>
<td>
<a onClick="return show_hide_box(this,190,190,'2px dotted')" href="help/help_titledb.htm">
<img border="0" src="graphics/menubuttons/bottom/menubutton_help.gif" width="100" height="30"></a></td>
</tr>
</table>
<table border="0" width="1024" cellspacing="0" cellpadding="0" height="30" id="bottom_all" style="position: absolute; top: 610px; left: 0px; width: 1024px; height: 30px; z-index: -1" align="left">
<tr>
<td>
<!--webbot bot="Include" U-Include="applications/bottom_backbutton_laub.htm" TAG="BODY" --></td>
</tr>
</table>
<table border="0" width="512" cellpadding="0" style="font-size: 1pt; border-collapse: collapse" height="15" id="table1">
<tr>
<td> </td>
</tr>
</table>
<table cellpadding="0" style="font-family: Barmeno Regular; font-size: 12pt; font-variant: small-caps; color: #858585; font-weight: bold; border-collapse: collapse">
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-columntypes="200,200,200,5,200,200,200,200,200,200,200,200,200,200,200,200,200" s-dataconnection="lme3db2" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="titles_lme" s-displaycolumns="artist,title,value,new,time,tempo,year,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-criteria="[intelli_title] CNT {intelli_title} +" s-order="[title] + [artist] +" s-sql="SELECT * FROM "titles_lme" WHERE (intelli_title LIKE '%::intelli_title::%') ORDER BY title ASC,artist ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="intelli_title=" s-norecordsfound i-maxrecords="0" i-groupsize="5" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">Dette er begyndelsen af området med databaseresultater. Denne side kan kun vises korrekt, hvis den hentes fra en webserver med en webbrowser. Det aktuelle websted er gemt på din harddisk eller på det lokale netværk.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>Komponenten Databaseresultater på denne side kan ikke vise databaseindhold. Siden skal have et filnavn, der slutter med '.asp', og webstedet skal findes på en server, der understøtter Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM ""titles_lme"" WHERE (intelli_title LIKE '%::intelli_title::%') ORDER BY title ASC,artist ASC"
fp_sDefault="intelli_title="
fp_sNoRecords="<tr><td colspan=14 align=""LEFT"" width=""100%""></td></tr>"
fp_sDataConn="lme3db2"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&artist=200&title=200&intelli_title=200&value=5&new=200&group=200&time=200&tempo=200&year=200&decade=200&extra1=200&extra2=200&extra3=200&featuring1=200&featuring2=200&featuring3=200&composer=200&"
fp_iDisplayCols=14
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="31177" --><tr>
<td height="35" width="20"> </td>
<td height="35" width="50" align="center">
<a target="centralframe" href="artistinfodb2.asp?artist=<%=FP_FieldURL(fp_rs,"artist")%>&featuring1=<%=FP_FieldURL(fp_rs,"featuring1")%>&featuring2=<%=FP_FieldURL(fp_rs,"featuring2")%>&featuring3=<%=FP_FieldURL(fp_rs,"featuring3")%>">
<img border="0" src="graphics/title/title_button_a.gif"></a></td>
<td height="35" width="67" background="graphics/title/title_artist.gif"> </td>
<td height="35" width="725" background="graphics/title/title_background_1.gif">
<font face="Barmeno Bold" style="font-size: 15pt; font-weight: 400" color="#000000">
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="artist" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>artist<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"artist")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="17815" --></font>
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="featuring1" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>featuring1<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"featuring1")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="23130" -->
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="featuring2" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>featuring2<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"featuring2")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="23258" -->
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="featuring3" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>featuring3<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"featuring3")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="23386" --></td>
<td height="35" width="50" background="graphics/title/title_tempo.gif"> </td>
<td height="35" width="92" align="center" background="graphics/title/title_background_4.gif">
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="tempo" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>tempo<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"tempo")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="10350" --></td>
<td height="35" width="20"> </td>
</tr>
<tr>
<td height="35" width="20"> </td>
<td height="35" width="50" align="center">
<a target="centralframe" href="titledb2_confirm.asp?artist=<%=FP_FieldURL(fp_rs,"artist")%>&title=<%=FP_FieldURL(fp_rs,"title")%>"><img border="0" src="graphics/title/title_button_t.gif" width="50" height="35"></a></td>
<td height="35" width="67" background="graphics/title/title_title.gif"> </td>
<td height="35" width="725" background="graphics/title/title_background_2.gif">
<font face="Barmeno Bold" style="font-size: 15pt; font-weight: 400" color="#000000">
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="title" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>title<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"title")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="10821" --></font>
<img border="0" src="graphics/buttons/<%=FP_FieldLink(fp_rs,"new")%>.gif" align="absmiddle"></td>
<td height="35" width="50" background="graphics/title/title_year.gif"> </td>
<td height="35" width="92" align="center" background="graphics/title/title_background_5.gif">
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="year" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>year<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"year")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="7178" --></td>
<td height="35" width="20"> </td>
</tr>
<tr>
<td height="34" width="20"> </td>
<td height="34" width="50" align="center" valign="bottom" background="graphics/title/title_button_v_background.gif">
<a target="centralframe" href="versiondb2.asp?extra1=<%=FP_FieldURL(fp_rs,"extra1")%>"><img border="0" src="graphics/title/<%=FP_FieldLink(fp_rs,"extra3")%>.gif" align="middle"></a></td>
<td height="34" width="67" background="graphics/title/title_composer.gif"> </td>
<td height="34" width="725" background="graphics/title/title_background_3.gif">
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="composer" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>composer<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"composer")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18231" --></td>
<td height="34" width="50" background="graphics/title/title_time.gif"> </td>
<td height="34" width="92" align="center" background="graphics/title/title_background_6.gif">
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="time" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>time<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"time")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="7356" --></td>
<td height="34" width="20"> </td>
</tr>
<tr>
<td height="15" width="1024" colspan="7" style="font-size: 1pt; color: #FAFAFA">
<p>
<!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="extra1" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>extra1<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"extra1")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18249" --><!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="extra2" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>extra2<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"extra2")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18257" --><!--webbot bot="DatabaseResultColumn" s-columnnames="artist,title,intelli_title,value,new,group,time,tempo,year,decade,extra1,extra2,extra3,featuring1,featuring2,featuring3,composer" s-column="extra3" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>extra3<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"extra3")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18265" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">Dette er slutningen af området med databaseresultater.</font></td></tr><TR><TD VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR><BR></td></tr>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></tbody>
</table>
</body>
</html>
22. oktober 2008 - 07:42
#9
Sådan her ser min fpdblib.inc-fil ud:
<%
Sub FP_SetLocaleForPage
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Err.Clear
if FP_CodePage <> 0 then
Session.CodePage = FP_CodePage
if Err.Number <> 0 then Session.CodePage = Session("FP_OldCodePage")
end if
Err.Clear
if FP_LCID <> 0 then
Session.LCID = FP_LCID
if Err.Number <> 0 then Session.LCID = Session("FP_OldLCID")
end if
End Sub
Sub FP_RestoreLocaleForPage
On Error Resume Next
if Session("FP_OldCodePage") <> 0 then
Session.CodePage = Session("FP_OldCodePage")
end if
if Session("FP_OldLCID") <> 0 then
Session.LCID = Session("FP_OldLCID")
end if
Err.Clear
End Sub
Function FP_HTMLEncode(str)
FP_HTMLEncode = str
FP_HTMLEncode = Replace(FP_HTMLEncode,"&","^^@^^")
FP_HTMLEncode = Server.HTMLEncode(FP_HTMLEncode)
FP_HTMLEncode = Replace(FP_HTMLEncode,"^^@^^","&")
End Function
Function FP_FieldVal(rs, fldname)
FP_FieldVal = FP_HTMLEncode(FP_Field(rs, fldname))
if FP_FieldVal = "" then FP_FieldVal = " "
End Function
Function FP_Field(rs, fldname)
If Not IsEmpty(rs) And Not (rs Is Nothing) and Not IsNull(rs(fldname)) Then
Select Case rs(fldname).Type
Case 128, 204, 205 ' adBinary, adVarBinary, adLongVarBinary
FP_Field = "[#BINARY#]"
Case 201, 203 ' adLongVarChar, adLongVarWChar
if rs(fldname).DefinedSize > 255 then
' check for Access hyperlink fields (only absolute http links)
fp_strVal = rs(fldname)
fp_idxHash1 = InStr(LCase(fp_strVal),"#
http://")
if fp_idxHash1 > 0 then
fp_idxHash2 = InStr(fp_idxHash1+1,fp_strVal,"#")
if fp_idxHash2 > 0 then
' this is an Access hyperlink; extract the URL part
fp_strVal = Mid(fp_strVal,fp_idxHash1+1)
if Right(fp_strVal,1) = "#" then
fp_strVal = Left(fp_strVal,Len(fp_strVal)-1)
end if
end if
end if
FP_Field = fp_strVal
else
FP_Field = rs(fldname)
end if
Case Else
FP_Field = rs(fldname)
End Select
Else
FP_Field = ""
End If
End Function
Function FP_FieldHTML(rs, fldname)
FP_FieldHTML = FP_HTMLEncode(FP_Field(rs, fldname))
End Function
Function FP_FieldURL(rs, fldname)
FP_FieldURL = Server.URLEncode(FP_Field(rs, fldname))
End Function
Function FP_FieldLink(rs, fldname)
FP_FieldLink = Replace(FP_Field(rs, fldname), " ", "%20")
End Function
Sub FP_OpenConnection(oConn, sAttrs, sUID, sPWD, fMSAccessReadOnly)
Dim sTmp
Dim sConnStr
Dim fIsAccessDriver
fIsAccessDriver = (InStr(LCase(sAttrs), "microsoft access driver") > 0)
sConnStr = FP_RemoveDriverWithDSN(sAttrs)
sTmp = sConnStr
On Error Resume Next
If fMSAccessReadOnly And fIsAccessDriver Then
sTmp = sTmp & ";Exclusive=1;ReadOnly=1"
Err.Clear
oConn.Open sTmp, sUID, sPWD
If Err.Description = "" Then Exit Sub
End If
Err.Clear
oConn.Open sConnStr, sUID, sPWD
End Sub
Function FP_RemoveDriverWithDSN(sAttrs)
FP_RemoveDriverWithDSN = sAttrs
sDrv = "driver="
sDSN = "dsn="
sLC = LCase(sAttrs)
if InStr(sLC, sDSN) < 1 then exit function
idxFirst = InStr(sLC, sDrv)
if idxFirst < 1 then exit function
idxBeg = idxFirst + Len(sDrv)
if Mid(sLC,idxBeg,1) = "{" then
idxEnd = InStr(idxBeg, sLC, "}")
if idxEnd > 0 and Mid(sLC,idxEnd+1,1) = ";" then
idxEnd = idxEnd + 1
end if
else
idxEnd = InStr(idxBeg, sLC, ";")
end if
if idxEnd < 1 then idxEnd = Len(sLC)
FP_RemoveDriverWithDSN = Left(sAttrs,idxFirst-1) & Mid(sAttrs,idxEnd+1)
End Function
Sub FP_OpenRecordset(rs)
On Error Resume Next
rs.Open
End Sub
Function FP_ReplaceQuoteChars(sQry)
Dim sIn
Dim sOut
Dim idx
sIn = sQry
sOut = ""
idx = InStr(sIn, "%%")
Do While (idx > 0)
sOut = sOut & Left(sIn, idx - 1)
sIn = Mid(sIn, idx + 2)
if (Left(sIn,1) = "%") And (Left(sIn,2) <> "%%") then
sIn = Mid(sIn, 2)
sOut = sOut & "%"
end if
sOut = sOut & "::"
idx = InStr(sIn, "%%")
if idx > 0 then
sOut = sOut & Left(sIn, idx - 1)
sIn = Mid(sIn, idx + 2)
sOut = sOut & "::"
if (Left(sIn,1) = "%") And (Left(sIn,2) <> "%%") then
sIn = Mid(sIn, 2)
sOut = sOut & "%"
end if
end if
idx = InStr(sIn, "%%")
Loop
sOut = sOut & sIn
FP_ReplaceQuoteChars = sOut
End Function
Sub FP_Close(obj)
On Error Resume Next
obj.Close
End Sub
Sub FP_SetCursorProperties(rs)
On Error Resume Next
rs.CursorLocation = 3 ' adUseClient
rs.CursorType = 3 ' adOpenStatic
End Sub
%>