Jump to content


ellen

Member Since 16/01/2007
Offline Last Active 29/08/2007, 10:32
-----

Posts I've Made

In Topic: Bananer Rotativo

16/05/2007, 17:13

Consegui fazer .... Fiz com sessão...

Meu código ficou assim...

No incío da página..

<%
if session("banner")="" then
session("banner")="banner1.swf"
end if
%>




Para vizualização do swf

<div id="banner" style="position: absolute; left: 400px; top: 271px">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macr...rsion=7,0,19,0" width="400" height="267">
<%
response.write ("A sessão está com o valor: "&session("banner")&"<br>")
%>
<param name="movie" value="../swf/<%=session("banner")%>" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="../swf/<%=session("banner")%>" quality="high" pluginspage="http://www.macromedi...getflashplayer" type="application/x-shockwave-flash" width="400" height="267" wmode="transparent"></embed>
</object>
</div>


E no final da página..

<%
if session("banner")="banner1.swf" then
session("banner")="banner2.swf"
else
session("banner")="banner1.swf"
end if
%>


Obrigada à todos!!

In Topic: Bananer Rotativo

15/05/2007, 18:00

Olá Humberto - S.O.S.....

Primeiramente, obrigada pela atenção..

Você teria o código para me ajudar??

Obrigada

In Topic: Anexo No E-mail

04/05/2007, 17:09

Olha meu código...

<%

flag = request("flag")
if flag = "" then
flag = 0
end if

function trata_string(str)
str = replace(str,vbCrLf,"<br />")
trata_string = str
end function

if flag then
On Error Resume Next
nome = Request.Form("nome")
telefone = Request.Form("telefone")
email = Request.Form("email")
cidade = Request.Form("cidade")
estado = Request.Form("estado")
mensagem = Request.Form("mensagem")


if email = "" then
email = "seu email"
end if

'Coloque aqui o titulo
titulo = "Contato "
enviou = 0 'nada
e_mail = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR...nal.dtd""><html xmlns=""http://www.w3.org/19...l""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"" /></head><body>"
e_mail = e_mail &"<font face=""Arial"" size=""2""><h5>" & titulo & " - " & now & "</h5>"
e_mail = e_mail & "<b>Nome: </b> " & nome & " <br>"
e_mail = e_mail & "<b>Telefone:</b> " & telefone & " <br>"
e_mail = e_mail & "<b>E-mail:</b> " & email &" <br>"
e_mail = e_mail & "<b>Cidade/Estado:</b> " & cidade &"/"& estado &" <br>"
e_mail = e_mail & "<b>Mensagem: </b> " & "<br>"
e_mail = e_mail & mensagem & " <br>"
e_mail = e_mail & "____________________________________________________________________________" & "</font><br>"
e_mail = e_mail & "</body></html>"
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
With objCDOSYSCon
.Fields("http://schemas.micro...ion/smtpserver") = "localhost"
.Fields("http://schemas.micro...smtpserverport") = 25
.Fields("http://schemas.micro...tion/sendusing") = 2
.Fields("http://schemas.micro...nectiontimeout") = 30
.Fields.update
End With
Set objCDOSYSMail.Configuration = objCDOSYSCon
With objCDOSYSMail
.From = email
.To = "seu email"
if session("arquivo") <> "" then
.AddAttachment(Session("Arquivo"))
end if
.Subject = titulo
.HtmlBody = trata_string(e_mail)
.Send
if acao = "upload" then
Session("Arquivo") = ""
end if
End With
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
Set obj_Upload = Nothing
msg = "Contato enviado com sucesso" ' certo
Session("Arquivo") = ""


If Err.number<>0 then
msg = "Ocorreu um erro ao enviar o contato." 'errado
End If
end if




acao = request("acao")
if acao = "" then
acao = "none"
end if

if acao = "upload" then 'caso a acao seja upload, executa script do SaFileUp
Set obj_Upload = Server.CreateObject("SoftArtisans.FileUp")
obj_Upload.Path = Server.MapPath("./upload") 'local onde será gravado o arquivo
if obj_Upload.TotalBytes > 1000000 then
Response.Write "<script>alert('Seu arquivo ultrapassou o limite de 1MB.')</script>"
v_foco = " onLoad=""document.contato.nome.focus();"""
session("arquivo") = ""
else
on error resume next
obj_Upload.Form("File").Save
Session("arquivo") = obj_Upload.Form("File").ServerName 'recupera o nome do arquivo no servidor
if err.number<>0 then
Response.Write "<script>alert('Você deve selecionar um arquivo antes de anexar.')</script>"
session("arquivo") = ""
else
Response.Write "<script>alert('Seu arquivo foi anexado. Por favor, agora preencha o formulário com seus dados!')</script>"
v_foco = " onLoad=""document.contato.nome.focus();""" 'coloca o cursor no campo do form de nome
end if
' Session("Arquivo") = ""
end if
End if

%>


Qualquer dúvida... me avise...

In Topic: Anexo No E-mail

04/05/2007, 15:07

Eu tenho um código q funciona perfeitamente, mas tá em CDOsys e SaFileUp.. te ajuda?



Dê uma olhada aki tbem...
http://site.locaweb....q...733&faq=935

In Topic: Verifcar Tamanho Do Arquivo

04/05/2007, 14:44

Pessoal.. deu certo...

vou postar a solução...


if obj_Upload.TotalBytes > 1000000 then

Response.Write "<script>alert('Seu arquivo ultrapassou o limite de 1MB.')</script>"

end if



Agradeço a atenção de todos......

IPB Skin By Virteq