Min webshop vikrer på serveren men ikke på de andre Computer
God aften. Jeg har sat en webshop op men nå jeg prøver at bestille en vare på server hvor den ligger på. virker det fin. men på de andre manskiner gør den ikke. Ved i hvorfor? Server køre IIS. med ASP.
Jeg kommer fin nok ind på siden. Men nå jeg så prøver at bestille en vare skriver den ok. men så klikker jeg på gå yil kasse så er vare væk. den skriver ikke sådan noget
ja . men jeg er nok nød til at se noget kode for hvor du henter indkøbsvognen - den vises fint i siden inden man går til indkøbskurven, men den henter vist ikke variablerne med over
<html><% Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" &Server.MapPath("webshop.mdb") Session.Lcid = 1053 %> <!--#include file="installningar.asp" --> <% Function kollabild(text) dim filesys, newfolder set filer = CreateObject("Scripting.FileSystemObject") mappen = Server.MapPath(mapp) If Not filer.FolderExists(mappen) Then filer.CreateFolder mappen End If filen = mapp & "/" & text & ".gif" If Not filer.FileExists(Server.MapPath(filen)) Then Response.Write "bilder/nopicture.gif" Else Response.Write "filer/" & text & ".gif" End if Set filer = Nothing End Function %> <head> <title>Webshop</title> <link rel="stylesheet" href="style.css" type="text/css"> </head>
</td> </tr> <tr colspan=2> <td> </td> <td></td> </tr> </table> <% RecSet.MoveNext Loop END IF RecSet.Close Set RecSet = Nothing
ELSEIF Request("show") = "kundvagn" then %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top">Indkøbsvong <span class="vit"><br> </span> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <% varde = Request.Cookies(""& Session.SessionID &"") hamta = Split(varde,"&") ReDim MyArray(4,Ubound(hamta)) for x = 0 to ubound(hamta) hamta2 = Split(hamta(x),"=") IF Len(hamta2(0)) > 0 AND len(hamta2(1)) > 0 then SQL = "SELECT * FROM produkter WHERE id =" & int(hamta2(0)) Set RecSet = Connect.Execute(SQL) MyArray(0,x) = hamta2(0) MyArray(1,x) = hamta2(1) MyArray(2,x) = RecSet("artnr") MyArray(3,x) = RecSet("namn") MyArray(4,x) = RecSet("pris")
RecSet.Close Set RecSet = nothing END IF next For i = 0 To Ubound(myArray,2) IF Len(MyArray(0,i)) > 0 then andra = andra & myArray(0,i) & "=" & myArray(1,i) IF NOT i = Ubound(myArray,2) then andra = andra & "|" END IF END IF Next Session("andra") = andra %> <tr> <td width="50"><strong>Art.nr</strong></td> <td width="120">Navn</td> <td width="55">Pris</td> <td width="55"> <div align="center">Antal</div></td> <td width="55"> <div align="right">Total</div></td> <td width="65"> <div align="center">Slet</div></td> <td><div align="left"><strong> </strong></div></td> </tr> <% count = 0 ant = 0 total = 0 For i = 0 To Ubound(myArray,2) IF Len(MyArray(0,i)) > 0 then%> <tr> <form namn="minsida" action="change.asp?id=<%=MyArray(0,i)%>" method="post"> <td><%=MyArray(2,i)%></td> <td><%=MyArray(3,i)%></td> <td> <% Response.Write FormatCurrency(MyArray(4,i))%> </td> <td><div align="center"> <input name="antal" type="text" size="3" value="<%Response.Write MyArray(1,i) strAntal = MyArray(1,i) ant = ant + strAntal %>" style="background: #A2B1C2; border: #85A0B8 1px solid; font-family: verdana; font-size: 10px; font-color: #21283D"> </div> </td> <td> <div align="right"> <% tal1 = round(MyArray(4,i),2) tal2 = round(MyArray(1,i),2) pris = tal1 * tal2
IF Instr(pris,",") then pris2 = Split(pris,",") decital = pris2(1) IF NOT Len(decital) <> 1 then decital = "" & decital & "0" END IF IF decital < 25 then summa = pris2(0) ELSEIF decital > 24 AND decital < 75 then summa = pris2(0) + 0.50 ELSE summa = pris2(0) + 1 END IF ELSE summa = pris END IF IF instr(summa2,",") then summa2 = split(summa,",") IF len(summa2(1)) <> 1 then kontroll = summa & " kr" ELSE kontroll = summa & "0 kr" END IF ELSE kontroll = summa & " kr" END IF Response.Write FormatCurrency(kontroll)
total = total + summa %> </div> </td> <td><div align="center"><a href="change.asp?del=ja&id=<%=myArray(0,i)%>"><img src="bilder/radera.gif" width="8" height="13" border="0"></a></div></td> <td><div align="center"> <strong><INPUT TYPE="image" SRC="bilder/andra.gif" VALUE="submit"> </strong></div></td> </form> </tr> <% count = count + 1 END IF Next IF count <> 0 then%> <tr> <td colspan="7"> </td> </tr> <tr> <td colspan="7"><div align="center">Totalt <b><%=ant%></b> <%IF ant > 1 then Response.Write "produkter" ELSE Response.Write "produkt" END IF%> som sammanlagt kostar <b><% total2 =FormatCurrency(total) total2 = Replace(total2," kr","") Response.Write total2%> </b>kronor</div></td> </tr> <%ELSE%> <tr> <td colspan="7"><em>Der er ingen produkter i kundevognen</em></td> </tr> <%END IF%> </table> <span class="vit"> </span></td> </tr> </table> <%ELSEIF Request("show") = "kassa" then %> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td>Kassen <span class="vit"><br> </span> <table width="90%%" border="0" cellpadding="0" cellspacing="0"> <% varde = Request.Cookies(""& Session.SessionID &"") hamta = Split(varde,"&") ReDim MyArray(4,Ubound(hamta)) for x = 0 to ubound(hamta) hamta2 = Split(hamta(x),"=") IF Len(hamta2(0)) > 0 AND len(hamta2(1)) > 0 then SQL = "SELECT * FROM produkter WHERE id =" & int(hamta2(0)) Set RecSet = Connect.Execute(SQL) MyArray(0,x) = hamta2(0) MyArray(1,x) = hamta2(1) MyArray(2,x) = RecSet("artnr") MyArray(3,x) = RecSet("namn") MyArray(4,x) = RecSet("pris")
RecSet.Close Set RecSet = nothing END IF next For i = 0 To Ubound(myArray,2) IF Len(MyArray(0,i)) > 0 then andra = andra & myArray(0,i) & "=" & myArray(1,i) IF NOT i = Ubound(myArray,2) then andra = andra & "|" END IF END IF Next Session("andra") = andra %> <tr> <td width="55"><strong>Art.nr</strong></td> <td width="160">Navn</td> <td width="65">Pris</td> <td width="60"> <div align="center">Antal</div></td> <td> <div align="right">Tital</div></td> </tr> <% count = 0 ant = 0 total = 0 For i = 0 To Ubound(myArray,2) IF Len(MyArray(0,i)) > 0 then%> <tr> <td><%=MyArray(2,i)%></td> <td><%=MyArray(3,i)%></td> <td> <% Response.Write FormatCurrency(MyArray(4,i))%> </td> <td><div align="center"> <% Response.Write MyArray(1,i) strAntal = MyArray(1,i) ant = ant + strAntal %> </div></td> <td> <div align="right"> <% tal1 = round(MyArray(4,i),2) tal2 = round(MyArray(1,i),2) pris = tal1 * tal2
IF Instr(pris,",") then pris2 = Split(pris,",") decital = pris2(1) IF NOT Len(decital) <> 1 then decital = "" & decital & "0" END IF IF decital < 25 then summa = pris2(0) ELSEIF decital > 24 AND decital < 75 then summa = pris2(0) + 0.50 ELSE summa = pris2(0) + 1 END IF ELSE summa = pris END IF IF instr(summa2,",") then summa2 = split(summa,",") IF len(summa2(1)) <> 1 then kontroll = summa & " kr" ELSE kontroll = summa & "0 kr" END IF ELSE kontroll = summa & " kr" END IF Response.Write FormatCurrency(kontroll)
total = total + summa %> </div></td> </tr> <% count = count + 1 END IF Next IF count <> 0 then%> <tr> <td colspan="5"> </td> </tr> <tr> <td colspan="5"> <div align="right"> <table width="118" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="50">Summa:</td> <td width="68" align="right"> <div align="right"> <% Response.Write Rtrim(FormatCurrency(total)) total2 = total %> </div></td> </tr> <tr> <td width="50">Moms:</td> <td width="68" align="right"> <div align="right"> <% IF inklmoms = 0 then pris = Round(total/4,2) IF Instr(pris,",") then pris2 = Split(pris,",") If len(pris2(1)) > 2 then decital = left(pris2(1),2) ELSE decital = pris2(1) END IF IF NOT Len(decital) <> 1 then decital = "" & decital & "0" END IF IF decital < 25 then summa = pris2(0) ELSEIF decital > 24 AND decital < 75 then summa = pris2(0) + 0.50 ELSE summa = pris2(0) + 1 END IF ELSE summa = pris END IF IF instr(summa,",") then summa2 = split(summa,",") IF len(summa2(1)) = 1 then mkontroll = "" & summa & "0" ELSE mkontroll = "" & summa & "" END IF ELSE mkontroll = "" & summa & "" END IF Response.Write mkontroll & " kr"
ELSE Response.Write "<i>Ingår</i>" END IF %> </div></td> </tr> <tr> <td width="50">Frakt:</td> <td width="68" align="right"> <div align="right"> <%Response.Write FormatCurrency(frakt)%> </div></td> </tr> <tr> <td width="50">Totalt:</td> <td width="68" align="right"> <div align="right"> <%abtotalen = total2 + mkontroll + frakt Response.Write FormatCurrency(abtotalen)%> </div></td> </tr> </table> </div></td> </tr> <tr> <td colspan="5"><form action="order.asp" method="post"> <table width="157" border="0" cellpadding="0" cellspacing="1"> <tr> <td height="15" colspan="2" width="155">Bestillingeinfomation</td> </tr> <% IF len(Session("webshopfel")) > 0 then falt = Split(Session("falt"),"|") fel = 1 ELSE fel = 0 END IF %> <tr> <td width="138">Navn:</td> <td width="16"><% Response.Write "<input name='namn' type=text style='background: #A2B1C2; border: #85A0B8 1px solid;" Response.Write " font-family: verdana; font-size: 10px; font-color: #21283D' size=30" IF fel > 0 then Response.Write " value='" & falt(0) & "'>" ELSE Response.Write ">" END IF %></td></tr> <tr> <td width="138">Adresse:</td> <td width="16"><% Response.Write "<input name='adress' type=text style='background: #A2B1C2; border: #85A0B8 1px solid;" Response.Write " font-family: verdana; font-size: 10px; font-color: #21283D' size=30" IF fel > 0 then Response.Write " value='" & falt(1) & "'>" ELSE Response.Write ">" END IF %></td> </tr> <tr> <td width="138">Postnr:</td> <td width="16"> <% Response.Write "<input name='postnr1' type=text style='background: #A2B1C2; border: #85A0B8 1px solid;" Response.Write " font-family: verdana; font-size: 10px; font-color: #21283D' size=3 maxlength=3" IF fel > 0 then Response.Write " value='" & falt(2) & "'>" ELSE Response.Write ">" END IF %>
</td> </tr> <tr> <td width="138">Telefonnr:</td> <td width="16"><% Response.Write "<input name='tfn1' type=text style='background: #A2B1C2; border: #85A0B8 1px solid;" Response.Write " font-family: verdana; font-size: 10px; font-color: #21283D' size=5" IF fel > 0 then Response.Write " value='" & falt(5) & "'>" ELSE Response.Write ">" END IF %></td> </tr> <tr> <td height="20" width="138">E-Mail Adresse:</td> <td width="16"><% Response.Write "<input name='epost' type=text style='background: #A2B1C2; border: #85A0B8 1px solid;" Response.Write " font-family: verdana; font-size: 10px; font-color: #21283D' size=30" IF fel > 0 then Response.Write " value='" & falt(7) & "'>" ELSE Response.Write ">" END IF%></td> </tr> <tr> <td width="138">Ørive info:</td> <td width="16"><% Response.Write "<input name='ovrigt' type=text style='background: #A2B1C2; border: #85A0B8 1px solid;" Response.Write " font-family: verdana; font-size: 10px; font-color: #21283D' size=30" IF fel > 0 then Response.Write " value='" & falt(8) & "'>" ELSE Response.Write ">" END IF%></td> </tr> <tr> <td colspan="2" width="155"><input type="submit" name="Submit2" value="Send bestilling" style="background: #85A0B8; border: #85A0B8 1px solid; font-family: verdana; font-size: 10px"></td> </tr> <%IF Len(Session("webshopfel")) > 0 then%> <tr> <td colspan="2" width="155"><%=Session("webshopfel")%></td> </tr> <%Session("webshopfel") = "" ELSEIF Len(Request("skickad")) > 0 then%> <tr><td width="138"><%Response.Write "Nu är din beställning skickad!"%></td> <td width="16"></td> </tr><%END IF%> </table> </form></td> </tr> <%ELSE%> <%IF Request("skickad") = "ja" then %> <tr><td colspan="5">Din bestillinge er nu sendt</td></tr><%ELSE%> <tr> <td colspan="5">Ingen produkter i vongen</td> </tr> <%END IF END IF%> </table></td> </tr> </table> <%ELSE%> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top">Velkommen til HJ-DATA WebShop. Webshoppen vil inde for kort tid bruges. </td> </tr> </table> <%END IF%> </td> </tr> </table>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.