tutta la pagina:
codice:
<%
set rs = Server.CreateObject("ADODB.recordset")
sql = "SELECT SUM(totale) AS Totalone " &_
"FROM ordini WHERE chiuso = false " &_
" GROUP BY chiuso, tavolo ORDER BY tavolo "
rs.open sql, conn
%>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Nuova Ricevuta</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link media="print" rel="stylesheet" href="images/stampa.css" type="text/css">
<link href="images/bcm.css" rel="stylesheet" type="text/css" />
<script>
<!--
function elimina()
{
return confirm("Creando la ricevuta tutte le comande verranno chiuse. Continuare?");
}
-->
</script>
</head>
<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="150" rowspan="2" valign="top" id="colsin"> </td>
<td width="600" valign="top">[img]images/tit-ricevute-new.gif[/img]</td>
</tr>
<tr>
<td width="600" valign="top"><div align="left">
<p align="left"></p>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><div align="center"><font color="#0000FF" size="2">Questi
sono i tavoli che hanno comande "aperte".
Scegliere il tavolo a cui creare la ricevuta e premere su "vai"</font>
<hr width="95%" />
</div></td>
</tr>
<% If not rs.bof or not rs.eof then
do while not rs.eof %>
<tr>
<td width="500"><div align="center">Tavolo n. <%=rs("tavolo")%> - totale
€ <%=formatnumber(rs("totalone"),2)%></div></td>
<td width="50"><div align="center">&persone=<%=rs("persone")%>" onclick="return elimina();">[img]images/b-sendshort.gif[/img]</div></td>
</tr>
<tr>
<td colspan="2"><hr width="95%" /></td>
</tr>
<% rs.movenext
loop
rs.close
set rs = nothing
else %>
<tr>
<td colspan="2"><div align="center">Non ci sono comande aperte!</div></td>
</tr>
<% End If %>
</table>
</p>
</td>
</tr>
<tr>
<td colspan="2">[img]images/bottom.gif[/img]</td>
</tr>
</table>
</body>
</html>
<%
Conn.close
set conn = nothing %>