<% '-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# ' Loja Exemplo Locaweb ' Versão: 6.2 ' Data: 12/09/06 ' Arquivo: default.asp ' Versão do arquivo: 0.0 ' Data da ultima atualização: 12/09/06 ' '----------------------------------------------------------------------------- ' Licença Código Livre: http://comercio.Locaweb.com.br/gpl/gpl.txt '-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#- rodape = "no" page = "fotos" %>
<% Set myRequest = CreateObject("Scripting.Dictionary") Set myRequestFiles = CreateObject("Scripting.Dictionary") if ParseMultiPartForm()=true then parse=1 autorizo_newsletter = Pega_DadoBanco("Newsletter","autorizo_newsletter","email","'"&session("user_id")&"'") pode_enviar_fotos = False If autorizo_newsletter = "1" then pode_enviar_fotos = True End If %> ;">
<% If getRequestForm("value_comentario") <> "" And getRequestForm("file_arquivo_foto") <> "" And pode_enviar_fotos = True Then If VerificaExistenciaDado("arquivo_foto","_fotos_user","arquivo_foto","'"&getRequestForm("value_arquivo_foto")&"'") Then message = "Essa foto já foi enviada." Else Set Insertfoto = Server.CreateObject("adodb.recordset") Insertfoto.Open "_fotos_user",conexao,3,3 Insertfoto.AddNew Insertfoto("user_id") = session("user_id") Insertfoto("comentario") = getRequestForm("value_comentario") Insertfoto("arquivo_foto") = getRequestForm("value_arquivo_foto") Insertfoto("status") = "I" Insertfoto("data_envio") = date Insertfoto.Update Set Insertfoto = Nothing value = postvalue("file_arquivo_foto") ttype="upload0" toadd=true if vartype(value)=11 then if value=false then toadd=false end if if toadd then 'thumb = CreateThumbnail(GetRequestForm("arquivo"),150,"") 'if lenb(thumb)>0 then _ 'WriteToFile "C:\\Inetpub\\wwwroot\\teste\\" & getRequestForm("nome_arquivo"), thumb WriteToFile "e:\\home\\electronskateboards\\Web\\loja\\sources\\fotos\\" & getRequestForm("value_arquivo_foto"), value end If ' response.write "" message = "1" End If end if 'Cria o objeto RS_fotos de recordset Set RS_fotos = CreateObject("ADODB.Recordset") Set RS_fotos.ActiveConnection = Conexao RS_fotos.CursorLocation = 3 RS_fotos.CursorType = 0 RS_fotos.LockType = 1 Dim lista_fotos Dim contador_f contador_f = 0 'Executa da Query de consulta RS_fotos.Open "select cod_foto, user_id, tit_foto, comentario, img_th, arquivo_foto From _fotos_user where status = 'A' ORDER BY data_envio DESC" If Not RS_fotos.EOF then Do Until RS_fotos.EOF If contador_f = 0 Then c_foto = RS_fotos("cod_foto") End if lista_fotos = lista_fotos & "" contador_f = contador_f + 1 RS_fotos.MoveNext Loop End If If getRequestForm("foto") <> "" Then c_foto = getRequestForm("foto") End If If c_foto <> "" then 'Cria o objeto RS_Ver de recordset Set RS_Ver = CreateObject("ADODB.Recordset") Set RS_Ver.ActiveConnection = Conexao RS_Ver.CursorLocation = 3 RS_Ver.CursorType = 0 RS_Ver.LockType = 1 'Executa da Query de consulta RS_Ver.Open "select cod_foto, user_id, tit_foto, comentario, img_th, arquivo_foto From _fotos_user where cod_foto = " & c_foto & " AND status = 'A'" If Not RS_Ver.EOF Then %>
" width="290" height="345" border="0" alt="<%=RS_Ver("comentario")%>">
<% response.write "
"&RS_Ver("comentario")&"
" End If Else %>
<% If message <> "" Then If message = "1" Then response.write "

Obrigado por mandar sua foto.
Em breve estará no ar.

" Else response.write "

" & message & "

" End If End if %>
<% End If %>
<% If Session("logado") <> "" Then %> ;">
<% If pode_enviar_fotos = True Then %>

cometário

formato da foto
290px por 345px JPEG, GIF

<% Else %>

Por favor, antes de enviar os vídeos você precisa confirmar seu cadastro através da mensagem enviada ao seu e-mail

<% End If %>
<% End If %>

<% If lista_fotos <> "" then response.write lista_fotos End If %>