Modificare il file:
\Ordine_OLD\formdati.asp
<!--#include file="config.asp" --> <% Set marca = Server.CreateObject("ADODB.Recordset") marca.ActiveConnection = MM_ecommerce_STRING marca.Source = "SELECT DISTINCT Marca FROM Prodotti" marca.CursorType = 0 marca.CursorLocation = 2 marca.LockType = 1 marca.Open() marca_numRows = 0 %> <% Set Tipo = Server.CreateObject("ADODB.Recordset") Tipo.ActiveConnection = MM_ecommerce_STRING Tipo.Source = "SELECT DISTINCT Classe FROM Prodotti" Tipo.CursorType = 0 Tipo.CursorLocation = 2 Tipo.LockType = 1 Tipo.Open() Tipo_numRows = 0 %> <% prodotti__MMColParam = "1" If (Request.QueryString("ID") <> "") Then prodotti__MMColParam = Request.QueryString("ID") End If %> <% Repeat1__numRows = -1 Repeat1__index = 0 marca_numRows = marca_numRows + Repeat1__numRows %> <% Repeat2__numRows = -1 Repeat2__index = 0 Tipo_numRows = Tipo_numRows + Repeat2__numRows %> <% Repeat3__numRows = 10 Repeat3__index = 0 marca_numRows = marca_numRows + Repeat3__numRows %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Lista Nascite - Acqisizione Ordine</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; } .Stile2 { font-size: x-small; font-family: Verdana, Arial, Helvetica, sans-serif; } --> </style> <link href="../CSS/style.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve contenere un indirizzo di e-mail.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' deve contenere un numero.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' deve contenere un numero fra '+min+' e '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' richiesto.\n'; } } if (errors) alert('I campi contrassegnati\n\ncon asterisco sono\n\nobbligatori\n\nOppure l\'indirizzo Email\n\nnon è valido.'); document.MM_returnValue = (errors == ''); } function contr() { if (document.form1.Conferma.checked==true && document.form1.Email.value=="") { document.form1.Conferma.checked=false; } } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve contenere un indirizzo e-mail.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' deve contenere un numero.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' deve contenere un numero fra '+min+' e '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' richiesto.\n'; } } if (errors) alert('I campi con * sono obbligatori e il campo\nE-mail deve contenere\nun indirizzo email valido.'); document.MM_returnValue = (errors == ''); } //--> </script> <style type="text/css"> <!-- .Stile12 {color: #000000} --> </style> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> <form action="Ordine/send.asp" method="post" name="form1" onSubmit="MM_validateForm('Nome','','R','Cognome2','','R','PIVAoCF2','','R','Indirizzo2','','R','Citta2','','R','Provincia2','','R','CAP2','','R','Telefono12','','R','Email','','NisEmail');return document.MM_returnValue"> <table width="560" height="285" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td height="19" valign="middle" bgcolor="#efefef"> <div align="right" class="Stile3"><strong>Raccolta Dati </strong></div></td> </tr> <tr> <td width="556" height="266" valign="top" style="border-left-width: 0px; border-right: 0px solid #FFCC33; border-top-width: 0px; border-bottom: 0px solid #FFCC33"> <table border="0"> <tr> <td> </td> </tr> </table> <div align="center"> <table border="0" bordercolor="#FFCC33" style="border-collapse:collapse"> <tr> <td><b><font size="2">Lista:</font><font size="2" color="#0000FF"> <% response.write N_lista %></font></b><br> <table border="0" align="center"> <tr> <td style="border-collapse:collapse; border:1px solid #C0C0C0 ; "><div align="center" class="Stile12"> Nome Articolo</div></td> <td style="border: 1px solid #C0C0C0"><div align="center" class="Stile12">Quantità</div></td> </tr> <% i=Session("Contatore") k=1 totale=0 while i >= 0 quale=Session("Prodotti"&i) quanti=Session("Quantita"&i) if quale <> "" then Set prodotti = Server.CreateObject("ADODB.Recordset") prodotti.ActiveConnection = MM_ecommerce_STRING prodotti.Source = "SELECT * FROM Prodotti WHERE ID="&quale prodotti.CursorType = 0 prodotti.CursorLocation = 2 prodotti.LockType = 1 prodotti.Open() prodotti_numRows = 0 '********************************************* ' Modifica per quantità = 1 '********************************************* quanti = 1 'prezzo=(prodotti_noz.Fields.Item("Prezzo").value)*quanti prezzo=(prodotti_noz.Fields.Item("Prezzo").value)*quanti totale=totale+prezzo %> <tr bgcolor="#EFEFEF"> <td width="232"><div align="left" class="Stile12"><span class="Stile2"><strong><%=(prodotti.Fields.Item("Descrizione").value)%></strong></span></div></td> <td width="67"><div align="center" class="Stile12"><strong><%=quanti%> </strong></div></td> </tr> <% prodotti.Close() Set prodotti = Nothing k=k+1 end if i=i-1 wend iva=totale*ivaaq/100 totale=totale+iva totale=totale+spesespedizione %> </table> <div align="center"><br> <span class="Stile4 Stile12"><strong>Totale acquisto= <%=FormatCurrency(totale,2)%></strong></span></div></td> </tr> </table> </div> <p align="center"><span class="Stile4"><em> </em></span></p> <table border="0" align="center"> <tr> <td width="338" bgcolor="#EFEFEF"><p align="center"> </p> <p align="center" class="Stile3"><strong>Dati per l'ordine </strong></p> <table width="366" border="0" align="center"> <tr> <td width="80"> <div align="right"><font size="2"><b><font color="#FF0000">*</font></b>Nome:</font></div></td> <td width="276"> <p align="left" class="Stile2"> <input name="Nome" type="text" style="font-family: Verdana; font-size: 10px; border: 1px solid #efefef" value="<%= Request.Cookies("DaMaSOFTLista")("Nome") %>" size="20"> </p></td> </tr> <tr> <td><div align="right"><font size="2"><b> <font color="#FF0000">*</font></b>Cognome:</font></div></td> <td><span class="Stile2"> <input name="Cognome" type="text" id="Cognome2" style="font-family: Verdana; font-size: 10px; border: 1px solid #efefef" value="<%= Request.Cookies("DaMaSOFTLista") ("Cognome") %>" size="20"> </span></td> </tr> <tr> <td><div align="right"><font size="2"><b> <font color="#FF0000">*</font></b>Telefono1:</font></div></td> <td><span class="Stile2"> <input name="Telefono1" type="text" id="Telefono12" style="font-family: Verdana; font-size: 10px; border: 1px solid #efefef" value="<%= Request.Cookies("DaMaSOFTLista")("Telefono1") %>" size="20"> </span></td> </tr> <tr> <td><div align="right"><font size="2">Telefono2:</font></div></td> <td><span class="Stile2"> <input name="Telefono2" type="text" id="Telefono23" style="font-family: Verdana; font-size: 10px; border: 1px solid #efefef" value="<%= Request.Cookies("DaMaSOFTLista")("Telefono2") %>" size="20"> </span></td> </tr> <tr> <td><div align="right"><font size="2"><b> <font color="#FF0000">*</font></b>E-mail:</font></div></td> <td><span class="Stile2"> <input name="Email" type="text" id="Email" style="font-family: Verdana; font-size: 10px; border: 1px solid #efefef" value="<%= Request.Cookies("DaMaSOFTLista")("Email") %>" size="46"> </span></td> </tr> <tr> <td style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px"><div align="right"> <font size="2"><b> <font color="#FF0000">*</font></b>Messaggio:</font></div></td> <td style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px"><span class="Stile2"> <input name="Messaggio" type="text" id="CAP2" style="font-family: Verdana; font-size: 10px; border: 1px solid #efefef" value="<%= Request.Cookies("DaMaSOFTLista")("Messaggio") %>" size="46"> </span></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2" align="center"> <font size="2">Metodo pagamento:</font> <select name="MetodoPag" size="1" class="Stile3" id="select" style="font-family: Verdana; font-size: 10px; border: 1px solid #FFCC66; background-color: #efefef"> <option value="Bonifico-Bancario">Bonifico Bancario</option> <option value="Contanti">Contanti</option> </select></td> </tr> <%if conf="Si" then%> <tr> <td colspan="2" align="center"><font size="2">Ricevi E-mail di conferma: </font> <input name="Conferma" type="checkbox" id="Conferma" onClick="MM_callJS('contr()')" value="Si" checked> </td> </tr> <% end if%> <tr> <td> </td> <td><input name="TotaleConIva" type="hidden" id="TotaleConIva2" value="<%=totale%> Euro"></td> </tr> </table></td> </tr> </table> <p align="center"><%z=k z=z-1 if z > 0 then%> <input name="submit" type="submit" style="font-family: Verdana; font-size: 10px; border-style: solid; border-width: 1px; background-color: " value="Acquista"> <%end if%> <input name="submit2" type="button" style="font-family: Verdana; font-size: 10px; border-style: solid; border-width: 1px; background-color: " onClick="MM_goToURL('parent','?az=carrList');return document.MM_returnValue" value="Torna Al Carrello"> <br> <br> </p></td> </tr> </table> </form> <p align="center" class="Stile2"> </p> </body> </html>
[
Íàçàä
]