<% '######################################################################################### '#---------------------------------------------------------------------------------------- '######################################################################################### '# '# CÓDIGO: VirtuaStore Versão 1.1 - Copyright 2001-2003 VirtuaWorks '# URL: www.virtuastore.com.br / www.virtuaworks.com.br '# E-MAIL: webmaster@virtuaworks.com.br '# AUTORES: Otávio Dias(Desenvolvedor) / Jone Bandinelli(Desenvolvedor) / Daniel Kern(Revisão) '# '# Este programa é um software livre; você pode redistribuí-lo e/ou '# modificá-lo sob os termos do GNU General Public License como '# publicado pela Free Software Foundation. '# É importante lembrar que qualquer alteração feita no programa '# deve ser informada e enviada para os criadores, através de e-mail '# ou da página de onde foi baixado o código. '# '# //------------------------------------------------------------------------------------- '# // LEIA COM ATENÇÃO: O software VirtuaStore 1.1 deve conter as frases '# // "Powered by VirtuaStore 1.1" ou "Software derivado de VirtuaStore 1.1" e '# // o link para o site http://www.bondhost.com.br no créditos da '# // sua loja virtual para ser utilizado gratuitamente. Se o link e/ou uma das '# // frases não estiver presentes ou visiveis este software deixará de ser '# // considerado Open-source(gratuito) e o uso sem autorização terá '# // penalidades judiciais de acordo com as leis de pirataria de software. '# //-------------------------------------------------------------------------------------- '# '# Este programa é distribuído com a esperança de que lhe seja útil, '# porém SEM NENHUMA GARANTIA. Veja a GNU General Public License '# abaixo (GNU Licença Pública Geral) para mais detalhes. '# '# Você deve receber a cópia da Licença GNU com este programa, '# caso contrário escreva para '# Free Software Foundation, Inc., 59 Temple Place, Suite 330, '# Boston, MA 02111-1307 USA '# '# Para enviar suas dúvidas, sugestões e/ou contratar a VirtuaWorks '# Internet Design entre em contato através do e-mail '# contato@virtuaworks.com.br ou pelo endereço abaixo: '# Rua Venâncio Aires, 1001 - Niterói - Canoas - RS - Brasil. Cep 92110-000. '# '# Para ajuda e suporte acesse: http://www.bondhost.com.br '# '# BOM PROVEITO! '# Equipe VirtuaStore '# []'s '# '######################################################################################### '#---------------------------------------------------------------------------------------- '######################################################################################### 'INÍCIO DO CÓDIGO 'Este código está otimizado e roda tanto em Windows 2000/NT/XP/ME/98 quanto em servidores UNIX-LINUX com chilli!ASP %> <% 'Requisita o id da compra variavel = request.querystring("pedido") if variavel = "" then response.redirect "minhascompras.asp" %>
<%=strLg4%> » <%=strLg10%> » <%=strLg186%> # <%=variavel%>

>
<% on error resume next Set dados = abredb.Execute("SELECT * FROM clientes WHERE email='"&Cripto(session("usuario"),true)&"';") if dados.EOF then nomez = "" else nomez = Cripto(dados("nome"),false) end if if dados.EOF then enderecoz = "" else enderecoz = Cripto(dados("endereco"),false) end if if dados.EOF then bairroz = "" else bairroz = Cripto(dados("bairro"),false) end if if dados.EOF then cidadez = "" else cidadez = Cripto(dados("cidade"),false) end if if dados.EOF then CEPz = "" else CEPz = Cripto(dados("CEP"),false) end if if dados.EOF then estadoz = "" else estadoz = Cripto(dados("estado"),false) end if dados.Close set dados = Nothing 'Chama os dados da compra set valor = abredb.Execute("SELECT clienteid, idcompra, pedido FROM compras WHERE pedido="& variavel & " AND status <> 'Compra em Aberto'") if valor.EOF then user = "xxxxxxxxxxxxxxxxxxxxxx" else user = Cripto(valor("clienteid"),false) compra = valor("idcompra") end if valor.close set valor = nothing usua = session("usuario") 'Verifica se o usuario logado é o autor da compra if user<>usua then%>


<%=strLg187%>,
<%=strLg188%>!



>
:: <%=strLg41%> ::
<% response.end else%>
<%=strLg189%> <%=nomez%>

<% 'Chama as quantidades compradas set rs2 = abredb.Execute("SELECT idprod,quantidade FROM pedidos where idcompra='"&compra&"';") while not rs2.eof quantidade = rs2("quantidade") codigo=rs2("idprod") set rs = abredb.Execute("SELECT nome,preco,precovelho FROM produtos where idprod="&codigo&";") 'Calcula os valores do produto valor = rs("preco") * quantidade preconormal = formatnumber(rs("preco"),2) precototal = formatnumber(valor,2)%> <% rs2.movenext wend rs.close set rs = nothing rs2.close set rs2 = nothing 'Chama os dados do produto set valor = abredb.Execute("SELECT status,datacompra,frete,totalcompra,pagamentovia FROM compras where pedido="&variavel&";") 'Formata o valor da compra totalcompra = Cripto(valor("totalcompra"),false) totalfrete = Cripto(valor("frete"),false) status = valor("status") pagamento = valor("pagamentovia") intcomprasz = totalcompra + 1 + totalfrete - 1 comprasz = intcomprasz comprasz = replace(comprasz,"-","") data = valor("datacompra") valor.close set valor = nothing 'Mostra o tipo de pagamento Select Case pagamento Case 0 ver = strLg96&": Visa" Case 1 ver = strLg96&": Mastercard" Case 2 ver= strLg96&": Dinners" Case 3 ver = strLg96&": American Express" Case 4 ver = strLg190 Case 5 ver = strLg191 Case 6 ver = strLg192 Case 7 ver = strLg256 End Select 'Mostra o status da compra if status = "0" then estatus = strLg193 end if if status = "1" then estatus = strLg194 end if if status = "2" then estatus = strLg195 end if if status = "3" then estatus = strLg196 end if if status = "4" then estatus = strLg197 end if if status = "5" then estatus = strLg198 end if if status = "6" then estatus = strLg199 end if 'Formata os valores da compra comprazw = formatnumber(comprasz,2) totalfretezw = formatnumber(totalfrete,2) totalcomprazw = formatnumber(totalcompra,2) 'Formata a data if len(day(data)) = 1 then diadata = "0"&day(data) else diadata = day(data) end if if len(month(data)) = 1 then mesdata = "0"&month(data) else mesdata = month(data) end if entdiax = cdate(data) + diasentrega if len(day(entdiax)) = 1 then diadatax = "0"&day(entdiax) else diadatax = day(entdiax) end if if len(month(entdiax)) = 1 then mesdatax = "0"&month(entdiax) else mesdatax = month(entdiax) end if %>
> style=font-size:11px;color:ffffff> <%=strLg%>> style=font-size:11px;color:ffffff> <%=strLg59%>> style=font-size:11px;color:ffffff> <%=mid(strLg58,1,5)%>.> style=font-size:11px;color:ffffff> <%=mid(strLg60,1,9)%>.> style=font-size:11px;color:ffffff> <%=strLg61%>
style=font-size:11px;color:000000>#<%=codigo%> style=font-size:11px;color:000000><%=rs("nome")%> style=font-size:11px;color:000000><%=quantidade%> style=font-size:11px;color:000000><%= strLgMoeda & " " & preconormal%> style=font-size:11px;color:000000><%= strLgMoeda & " " & precototal%>
>
style=font-size:11px;color:000000><%=strLg3%> style=font-size:11px;color:000000><%= strLgMoeda & " " & totalcomprazw%>
style=font-size:11px;color:000000><%=strLg200%> style=font-size:11px;color:000000><%= strLgMoeda & " " & totalfretezw%>
style=font-size:11px;color:000000><%=strLg63%> style=font-size:11px;color:000000><%= strLgMoeda & " " & comprazw%>
>
style=font-size:11px;color:000000><%=strLg201%> style=font-size:11px;color:#a51905><%=estatus%>

style=font-size:11px;color:000000><%=strLg91%> style=font-size:11px;color:000000><%=ver%> <% If pagamento=7 then %>      <%end if%>

>
style=font-size:11px;color:000000><%=strLg202%> style=font-size:11px;color:000000><%=diadata&"/"&mesdata&"/"&year(data)%>
style=font-size:11px;color:000000><%=strLg203%> style=font-size:11px;color:000000> <% If entrega_download="Nao" then response.write diasentrega & strLg292 End If %> <%= strLg293 %>

>
:: <%=strLg41%> :: <%end if%>