% 'Incio do codigo ASP---------------------------------------------------------------- Response.Expires = 0 '------------- Declaracao de Variaveis ---------------------- Dim Conn, RS, SQL '------------- Fim Declaracao de Variaveis ---------------------- 'Efetuando a conexão com a base de dados criada ----------------------- ' Set Conn = Server.CreateObject("ADODB.Connection") ' strConnection = "DSN=winmdb;Database=practitioners;" ' strConnection = strConnection & "User ID=sa; Password=healthcenter;" ' Conn.Open strConnection 'Brinkster connection 'Set Conn = Server.CreateObject("ADODB.Connection") 'Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _ '& "Data Source=c:\sites\Single50\washingtoninst\database\practitioners.mdb;" _ '& "Jet OLEDB:Database Password=healthcenter;" 'Fim Efetuando a conexão com a base de dados criada ----------------------- 'Criacao dos objetos Record Set -------------------------- Set RS = Server.CreateObject("adodb.recordset") 'Fim Criacao dos objetos Record Set -------------------------- 'SQL Statements ----------------------------- SQL = "SELECT idpra, titles, fname, lname, anchor, pic, email, subtitles, pemail, services FROM info WHERE ((active=Yes) AND (group<>'staff') AND (email<>'') AND (pemail<>'')) ORDER BY priorityorder, fname, lname" 'Fim SQL Statements ----------------------------- 'Abrindo Record Set --------------------------- RS.Open SQL,Conn,3,3 'Fim Abrindo Record Set --------------------------- %>
Questions or Appointment SchedulingAlso see: Schedule by Method
<%
If (Not RS.EOF) Then
RS.MoveFirst
max = RS.RecordCount
counter = 1
Response.Write("
<%
'------------- Practitioners from info ---------------
IF (Not RS.EOF) THEN
Dim objFSO, objGF, objLP, imgWdt, imgHgt, imgName, img
Set objFSO = CreateObject("Scripting.FileSystemObject")
RS.MoveFirst
While(Not RS.EOF)
id = server.HTMLEncode(RS("idpra")&"")
titles = server.HTMLEncode(RS("titles")&"")
fname = server.HTMLEncode(RS("fname")&"")
lname = server.HTMLEncode(RS("lname")&"")
subtitles = server.HTMLEncode(RS("subtitles")&"")
anchor = server.HTMLEncode(RS("anchor")&"")
pic = server.HTMLEncode(RS("pic")&"")
services = server.HTMLEncode(RS("services")&"")
services = Split(services,",")
fullname = titles &" "& fname & " " & lname
if (not subtitles = "") then
fullname = fullname & ", " &subtitles
end if
practitionerLink = ""&fullname&""
'picIF
if (pic <> "") then
imgName = pic
img = Server.MapPath("../pic/"& imgName) 'path to picture
If objFSO.fileExists(img) Then
'Set objGF = objFSO.GetFile(img)
' imgSiz = objGF.Size
'Set objGF = Nothing
Set objLP = loadpicture(img)
imgWdt = round(objLP.width / 26.4583)
imgHgt = round(objLP.height / 26.4583)
Set objLP = Nothing
Set fs = Nothing
'ImgDim = imgWdt &"x"& imgHgt &" - "& imgSiz/1024 &"KBytes"
Else
Response.Write("It doesnt exist")
End If
newHgt = round(imgHgt * (150/imgWdt))
picture = ""
End If 'picIf
%>
") While (Not RS.EOF) id = server.HTMLEncode(RS("idpra")&"") titles = server.HTMLEncode(RS("titles")&"") fname = server.HTMLEncode(RS("fname")&"") lname = server.HTMLEncode(RS("lname")&"") subtitles = server.HTMLEncode(RS("subtitles")&"") fullname = titles &" "& fname & " " & lname if(counter = max) then Response.Write(""&fullname&"") else Response.Write(""&fullname&" | ") end if counter = counter + 1 RS.MoveNext Wend %> <% RS.MoveFirst End If %>
<%=picture%>
<%
RS.MoveNext
Wend
set objFSO = nothing
Response.Write("<%=practitionerLink%> Therapies/Services: Ask a Question or Request an AppointmentFor practitioners or services not shown here, call for an appointment 202-686-8202. ") ELSE Response.Redirect("http://www.washingtoninstituteofnaturalmedicine.com") END IF RS.close Conn.close Set RS = Nothing Set Conn = Nothing '------------- Fim Practitioners from info --------------- %> |
|||
©Washington Institute of Natural Medicine |