<%=rs("Name")%>
" if rs("address2") <> "" and not isnull(rs("address2")) then strAddress = strAddress & rs("address2") & "
" if rs("address3") <> "" and not isnull(rs("address3")) then strAddress = strAddress & rs("address3") & "
" if rs("posttown") <> "" and not isnull(rs("posttown")) then strAddress = strAddress & rs("posttown") & "
" if rs("postcode") <> "" and not isnull(rs("postcode")) then strAddress = strAddress & rs("postcode") & "
" end if if strAddress = "" then strAddress = "Cysylltwch â CALL" Response.Write "
" & strAddress & "
" 'General Telephone Response.Write "" if rs("Helpline") <> "" and not isnull(rs("Helpline")) then Response.write "" & rs("Helpline") & "" else Response.Write "Cysylltwch â CALL" end if Response.Write "
" 'Helpline Number Response.Write ""
if rs("gtel") <> "" and not isnull(rs("gtel")) and rs("hide_phone") = 0 then
'Response.write rs("gtel")
'We've got a number so see which format we're using
strTel = trim(rs("gtel"))
if instr(1,strTel,";") = 0 then
Response.Write strTel
else
strTel = split(strTel,";")
if strTel(0) > "" then Response.Write "" & strTel(0) & ""
if strTel(1) > "" then Response.Write " ext. " & strTel(1)
if strTel(0) > "" and strTel(2) > "" then Response.Write "
"
if strTel(2) > "" then Response.Write "" & strTel(2) & ""
if strTel(3) > "" then Response.Write " ext. " & strTel(3)
end if
else
Response.Write "Cysylltwch â CALL"
end if
Response.Write "
" & rs("fax") & "
" end if 'Email? if rs("email") <> "" and not isnull(rs("email")) then Response.write ""
'Now we need to detect if the service has old or new format times.
if instr(1,tmpOpenings,";") then
'if there is a semi-colon in the string then it's the new format
'Split the string at the semi-colons to retrive the days * 7
tmpDayTimes = split(tmpOpenings,";")
'7 days
for n=0 to 6
'Split the hours for the day
tmpTimes = split(tmpDayTimes(n),",")
'Write the day name
Response.Write "" & daynameW(n) & ": "
if tmpTimes(4) = "-1" then
'A -1 indicates that the agency is closed on this day.
Response.Write "Ar gau"
else
'Is the service open 24 hours on this day?
if tmpTimes(0) = "00:00" and tmpTimes(1) = "00:00" then
Response.Write "24 Awr"
else
Response.Write tmpTimes(0) & " - " & tmpTimes(1)
end if
'Now we need to check to see if the service has 4 times or two.
if tmpTimes(2) <> "--:--" and tmpTimes(3) <> "--:--" then
Response.Write " & "
Response.Write tmpTimes(2) & " - " & tmpTimes(3)
end if
end if
'Next line unless we're showing the last day.
if n<6 then Response.Write "
"
next
else
'No semi-colon so old format.
Response.write Retrieve_Times_W(tmpOpenings)
end if
Response.Write "
" & rs("description") & "
" %>