%
SET RS = Server.CreateObject("ADODB.RecordSet")
strSql = "SELECT * FROM servicos WHERE id_servico='"&Request("cod")&"'"
RS.Open strSql, strCon
IF Not RS.EOF THEN
nome = RS("nome")
titulo = RS("titulo")
previa = RS("previa")
SET RSf = Server.CreateObject("ADODB.RecordSet")
strSqlf = "SELECT imagem FROM servicos_fotos WHERE id_servico='"&RS("id_servico")&"'"
RSf.Open strSqlf, strCon
IF Not RSf.EOF THEN
WHILE NOT RSf.EOF
imagem = imagem & "
"
RSf.MoveNext
WEND
ELSE
imagem = ""
END IF
RSf.Close
Set RSf = Nothing
SET RSi = Server.CreateObject("ADODB.RecordSet")
strSqlf = "SELECT * FROM servicos_itens WHERE id_servico='"&RS("id_servico")&"'"
RSi.Open strSqlf, strCon
IF Not RSi.EOF THEN
WHILE NOT RSi.EOF
itens = itens & ""&RSi("titulo")&"
"&RSi("descricao")&""
RSi.MoveNext
WEND
END IF
RSi.Close
Set RSi = Nothing
ELSE
Response.Redirect("default.asp")
END IF
RS.Close
Set RS = Nothing
%>