<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <title>Le coût de votre pizza</title> </head> <body> <% size = cgi.params["chosen_size"][0] total = Pizza::SIZE_PRICES[size] %> Vous avez choisi une pizza de format <b><%= size %></b> avec les garnitures suivantes: <ul> <% Pizza::TOPPINGS.keys.sort.each do |topping| if(cgi.params[topping][0]) total += Pizza::TOPPING_PRICES[size] %> <li><b><%= Pizza::TOPPINGS[topping]%></b></li> <% end end %> </ul> pour un total de <b>$<%=fmt(total)%></b>.<br/> Veuillez nous donner les informations pour confirmer votre commande<br/> <form action="<%= ENV['SCRIPT_NAME'] %>" method="get"> Nom: <input type="text" name="name" value="" size="20"/><br/> Téléphone: <input type="text" name="phone" value="" size="20"/><br/> <input type="hidden" name="chosen_size" value="<%= size %>"/> <input type="hidden" name="total" value="<%= total%>"/> <input type="hidden" name="request" value="merci"/> <% Pizza::TOPPINGS.keys.sort.each do |topping| if(cgi.params[topping][0] == "yes") %> <input type="hidden" name="<%= topping %>" value="yes"/> <% end end %> <input type="submit" value="confirmer"/> </form> </body> </html>