Jump to content
Fórum Script Brasil
  • 0

Estou Precisando De Ajuda...


Super_Zica_Man

Question

Editado:

Desculpe gente ter dado trabalho pra vocês mas aconteceu uma coisa estranha se abro no localhost pra testar da erro...

Dai coloquei no ftp da minha pagina (www.cauirs.com.br) e deu certo...

Se o usuario não ta logado e clica em comprar algo..E dai faz o login o produto aparece no carrinho mas se compro outra coisa não aparece...

Ou seja...Se o usuario ta logado...O produto fala que foi adquirido.Mas não aparece no carrinho...

Carrinho.asp

<%

Response.CacheControl="no-cache"

Response.AddHeader "Pragma","no-cache"

Response.Expires = 0

Response.Buffer = True

%>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<title>Central de Assessoria ao Usuario de Informatica</title>

</head>

<body>

<% if request.cookies("compra")("1")<> "" then %>

<% dim c1,r1,cods

set c1=server.createObject("adodb.connection")

set r1=server.createObject("adodb.recordset")

c1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath(".") & "\Dados\Dados.mdb;" %>

<% A = request.cookies("compra")("1")

B = replace (A,"0","") %>

<% dim mat(100)

cods = request.cookies("compra")("1")

y=0

For x=1 to len(cods)-1 step 2

mat(y)=mid(cods,x,2)

y=y+1

next%>

<%for each e in mat

if not isempty(e) then

set r1=c1.execute("select * from produtos where ID = '" & e & "'")%>

<br>

<font face = "comic sans ms" color = "Silver"><b><i><%

response.write "<font color='White'>" & "Produto:" & "</font>" & " " & r1("produto") & "<BR> " & "<BR>"

response.write "<font color='White'>" & "Preço:" & "</font>" &"R$"& " " & r1("preço") & "<BR> " & "<BR>"&"</center>"%> <br><input type="image" src="file:///C|/Inetpub/wwwroot/bot_apagarsel.gif" name="AP" Onclick="window.open('Delconf.asp?id=<%=r1("id")%>','principal')">

<input type="image" src="file:///C|/Inetpub/wwwroot/bot_apagartud.gif" name="AP" Onclick="window.open('apagartudo.asp','principal')">

</b></i></font>

<br>

<hr>

<% else

exit for

end if

next

%>

<input type ="submit" name="Finalizar" Value="Finalizar compra" style="color: #FF0000; font-weight: bold" Onclick="window.open('finalcompra.asp','principal')" >

<% else%><p><center><i><b> <% response.write "Nenhum Item no Carrinho"

end if%>

</b></i></center>

</body>

</html>

Aqui o codigo de quando a pessoa compra.

comprou.asp

<% response.cookies("compra")("1")= request.cookies("compra")("1") & request.querystring("id") %>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<title>Central de Assessoria ao Usuario de Informatica</title>

</head>

<body>

<% dim c1,r1

set c1=server.createObject("adodb.connection")

set r1=server.createObject("adodb.recordset")

c1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath(".") & "\Dados\Dados.mdb;"

set r1=c1.execute("select * from produtos where id = '" & request.querystring("id") & " '")

%>

<table border="1" width="100%">

<tr>

<td width="100%" bordercolor="#FFFF00" bordercolorlight="#FFFF00" bordercolordark="#808000">

<p align="center"><i><b>Produto </b></i></p>

<p align="center"><font color = "yellow"><b><%=r1("produto")%></b></font>

<p align="center"><b><i>Foi Adquirido.</i></b>

<form method="POST" action="comprou.asp" webbot-action="--WEBBOT-SELF--">

<!--webbot bot="SaveResults" startspan

U-File="../_private/form_results.txt" S-Format="TEXT/CSV"

S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot

bot="SaveResults" endspan i-checksum="43374" -->

<% r1.close

c1.close

set r1=nothing

set c1=nothing %>

</form>

</td>

</tr>

</table>

<p align="center"></p>

<p align="center">&nbsp;</p>

</body>

</html>

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.6k
×
×
  • Create New...