DBPix Sample Source Code: default.asp Back to sample
<%@ LANGUAGE = VBScript %>
<%
Dim cn
Dim picsset
Dim sqlselect
Response.Expires = 0
%>
<html>
<head>
<title>DBPix Photo Catalogue Sample</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<!-- *** Defines various constants for VBScipt database operations *** -->
<!--#include file="adovbs.inc" -->
<!-- *** App specifig configuration, connect strings, database locations/DSN's etc *** -->
<!--#include file="config.inc" -->
</head>
<body background="images/backgrnd.gif" topmargin="0" leftmargin="0">
<div align="center"><center>
<table CELLPADDING="0" CELLSPACING="0" BORDER="0">
<tr>
<td ALIGN="CENTER" VALIGN="TOP"><p><a href="http://www.ammara.com/" target="_blank"><img src="images/ammara.gif" width="311" height="34" alt="Ammara.gif (8056 bytes)" border="0" target="_blank"></a></p></td>
</tr>
</table>
</center></div>
<div align="center">
<div align="center"><center>
<%
Set cn = Server.CreateObject("ADODB.Connection")
Set picsset = Server.CreateObject("ADODB.Recordset")
cn.Open GetConnectString
sqlselect = "SELECT tcatalogs.* " &_
"FROM tcatalogs " &_
"WHERE publish=true " &_
"ORDER BY Date"
picsset.Open sqlselect, cn, adOpenStatic, adLockReadOnly, adCmdText
%>
<table border="0" width="95%" cellpadding="10" background="images/backgrnddk.gif">
<tr>
<td>
<p align="center"><font face="Arial" size="4" color="#003366"><strong><em>Select a catalogue to View from the list below.</em></strong></font>
</p>
<hr>
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<%
while not picsset.EOF
%>
<tr>
<td><a href="catalogue_.asp?CatId=<%=picsset("Id")%>"><font face="Arial" size="2"><strong><%=picsset("summary")%></strong></font></a></td>
</tr>
<%
picsset.MoveNext
wend
picsset.Close
%>
</table>
<hr>
<p align="left"><font face="Arial" size="2" color="#003366"><strong>Database Integration with <a href="http://www.ammara.com" target="_blank">DBPix</a></font></strong></p>
</td>
</tr>
</table>
</center></div></div>
</body>
</html>
Back to sample
|