Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Torgath hat gesagt.:Hab ich schon gemacht... *g* Deshabl sieht es nun so aus, wie es aussieht...
<%@ Language=VBScript %>
<%
dim vname ' ---
dim vfirstname ' ---
dim vplz ' ---
dim counter ' ---
counter = 1
dim intpagecounter
intpagecounter = 1
'dim counter1 ' ---
'dim c ' ---
dim pagesize ' --- Definieren der Seitengröße (Anzahl Datensätze pro Seite)
pagesize = 5
dim actpage
actpage = Request("PN")
vname = Request("fname")
if vname <> "" Then
strCond = "and name = " & chr(34) & vname & chr(34)
End if
vfirstname = Request("ffirstname")
if vfirstname <> "" Then
strCond = strCond & " and firstname = " & chr(34) & vfirstname & chr(34)
End if
vplz = Request("fplz")
if vplz <> "" Then
strCond = strCond & " and plz = " & chr(34) & vplz & chr(34)
End if
set ors = CreateObject("ADODB.RECORDSET") 'ors = objetrecordset
set Ocn = CreateObject("ADODB.Connection") 'ocn = objectconnect
ors.PageSize = pagesize
ors.CacheSize = pagesize
ocn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\adb.mdb;"'Verbindung zur Datenbank wird erstellt
ors.Open "Select * from adressbook where 1=1 " & strCond & " order by ID ",ocn,3,3
if actpage = "" or not isnumeric(actpage) or cint(actpage) > cint(ors.PageCount) then
actpage = 1
end if
dim datarec
datarec = ors.RecordCount
dim maxpage
maxpage = fix(datarec/pagesize)
if (maxpage*pagesize) < datarec then maxpage = maxpage + 1
if counter > maxpage then counter = maxpage
%>
<%
sub arrowleft
if cint(actpage) <= 1 then
response.Write Server.HTMLEncode("<<")
else
Response.Write "<a href=""list.asp?PN=" & actpage - 1 & """>" & Server.HTMLEncode("<<") & "</a>"
end if
end sub
sub arrowright
if cint(actpage) < cint(maxpage) then
Response.Write "<a href=""list.asp?PN=" & actpage + 1 & """>" & Server.HTMLEncode(">>") & "</a>"
else
response.Write Server.HTMLEncode(">>")
end if
end sub
sub sitenumber
for intpagecounter = 1 to ors.PageCount
if cint(intpagecounter) = cint(actpage) then
Response.Write intpagecounter & ""
else
Response.Write "<a href=""list.asp?PN=" & intpagecounter & """> " & intpagecounter & " </a>"
end if
next
end sub
%>
<%
if not ors.EOF then
ors.AbsolutePage = actpage
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<table border=1 align=center>
<tr>
<th bgcolor="#b9b9b9" colspan="12">Adressliste; Seite <%=actpage%>; Anzahl Datensätze: <%=datarec%>; <%=maxpage%></th>
</tr>
<tr>
<td>ID</td>
<td>Vorname</td>
<td>Name</td>
<td>Strasse</td>
<td>Nummer</td>
<td>PLZ</td>
<td>Ort</td>
<td>Telefon</td>
<td>Fax</td>
<td>E-Mail</td>
<td>Editieren</td>
<td>Löschen</td>
</tr>
<%
if ors.RecordCount > 0 then
do while not ors.EOF and counter <= pagesize%>
<tr>
<td>
<%=ors("id")%>
</td>
<td>
<%=ors("firstname")%>
</td>
<td>
<%=ors("name")%>
</td>
<td>
<%=ors("street")%>
</td>
<td>
<%=ors("number")%>
</td>
<td>
<%=ors("plz")%>
</td>
<td>
<%=ors("location")%>
</td>
<td>
<%=ors("phone")%>
</td>
<td>
<%=ors("fax")%>
</td>
<td>
<%=ors("e-mail")%>
</td>
<td>
<%response.Write "<a href=""edit.asp"">"%>Editieren<%response.Write "</a>"%>
</td>
<td>
<%response.Write "<a href=""delete.asp"">"%>Löschen<%response.Write "</a>"%>
</td>
</tr>
<%counter = counter + 1
ors.MoveNext
loop
else
response.Redirect "default.asp"
end if
%>
</table>
<table align=center>
<tr>
<td>
<%
'response.Write "<a href=""list.asp"">" & Server.HTMLEncode("<<") & "</a>"
arrowleft
%>
</td>
<td>
<%
sitenumber
%>
</td>
<td>
<%
'response.Write "<a href=""list.asp"">" & Server.HTMLEncode(">>") & "</a>"
arrowright
%>
</td>
</tr>
</table>
<br>
<br>
<center><a href="default.asp">Start</a></center>
<%ors.Close
set ors = nothing
ocn.Close
set ocn = nothing
%>
</BODY>
</HTML>