/asp/freeapps/postcardmentor/inccard.asp
<!--#include file="adovbs.inc"-->
<%
'''TODO for you! Configuration:
Function Postcard_GetmailServer()
Postcard_GetmailServer = "mail.yourdomain.com"
End Function
Function Postcard_GetmailFrom()
Postcard_GetmailFrom = "postcardservice@yourdomain.com"
End Function
Function Postcard_GetDatabaseType()
Postcard_GetDatabaseType = "Access"
' Postcard_GetDatabaseType = "SQLServer"
End Function
Function Postcard_GetDatabaseConn()
Dim oRet
Set oRet = Server.CreateObject ("ADODB.Connection")
oRet.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("postcardmentor.mdb")
Set Postcard_GetDatabaseConn = oRet
End Function
Function GetPathToPickupScript()
GetPathToPickupScript = "http://localhost/pm/viewcard.asp"
End Function
Function Postcard_GetTablePrefix()
Postcard_GetTablePrefix = ""
End Function
Function Inccard_GetAd(nNumber)
Select Case nNumber
Case 1
Inccard_GetAd = ""
Case 2
Inccard_GetAd = ""
Case 3
Inccard_GetAd = ""
End Select
End Function
Function PostCard_WriteListCatsForm( nPreSelectedId )
%>
<form method="POST" action="../cardlist.asp?newcat=true">
<p>Category:<select size="1" name="cat_fldAuto">
<%ListAllCategoriesInList nPreSelectedId%>
</select><input type="submit" value="Go!" name="B1"></p>
</form>
<%
End Function
Function PostCard_GetCardCount(oConn)
Dim oRS
Set oRS = oConn.Execute("select count(*) as no from " & Postcard_GetTablePrefix() & "card" )
PostCard_GetCardCount = oRS("no").Value
oRS.Close
End Function
Function PostCard_GetCatCount( oConn)
Dim oRS
Set oRS = oConn.Execute("select count(*) as no from " & Postcard_GetTablePrefix() & "cat" )
PostCard_GetCatCount = oRS("no").Value
oRS.Close
End Function
Function ListAllCategoriesInList( oConn, nPreSelected )
Dim oRS
Set oRS = oConn.Execute("select fldAuto, name from " & Postcard_GetTablePrefix() & "cat" )
While Not oRS.EOF
Response.Write "<option"
If CInt(nPreSelected) = Cint(oRS("fldAuto").Value) Then
Response.Write " selected "
End If
Response.Write " value=""" & oRS("fldAuto").Value & """>" & oRS("name") & "</option>"
oRS.MoveNext
Wend
oRS.Close
End Function
Function GetFormattedDate( dDate )
Dim sMonth, sDay
sMonth = DatePart( "m", dDate)
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDay = DatePart( "d", dDate)
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
GetFormattedDate = DatePart( "yyyy", dDate ) & sMonth & sDay
End Function
%>