codice:<?php $con = mysql_connect("localhost", "root", "password"); if (!$con) { die("Error: " . mysql_error()); } mysql_select_db("cassagestionalenegozionicola", $con); $result = mysql_query("SELECT a.nomearticolo,a.soglia,q.quantita,d.codicebarre FROM articolidett a, articoliquantita q, articoli d where a.codarticolo = d.codarticolo and a.codarticolo = q.codarticolo;"); ?> <!DOCTYPE html> <html> <head> <title>DataTables</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script src="media/js/jquery.js" type="text/javascript"></script> <script src="media/js/jquery.dataTables.js" type="text/javascript"></script> <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script> <script type="text/javascript" src="script/dhtmlPopup.js"></script> <style type="text/css"> @import "media/css/demo_table_jui.css"; @import "media/themes/smoothness/jquery-ui-1.8.4.custom.css"; </style> <style> *{ font-family: arial; } </style> <script type="text/javascript" charset="utf-8"> var arrayArticoli = new Array(); $(document).ready(function(){ $('#datatables').dataTable({ "sPaginationType":"full_numbers", "aaSorting":[[2, "desc"]], "bJQueryUI":true }); }); function mostraArticoliOrdine(codiceBarre, nomeArticolo) { popUp = new DHTMLPopup(document.getElementById("innerFrame"), document.getElementById("draggBar"), '510', '200', 'Spazio e Capacità Giornaliere Richieste'); document.getElementById("codiceBarre").value=codiceBarre; document.getElementById("nomeArticolo").value=nomeArticolo; document.getElementById("quantita").value=""; popUp.show(); } function saveRiga(){ } </script> </head> <body> <div data-role="page" id="home"> <div data-role="header"> <h1>EasyManagement</h1> </div> <div data-role="content"> <table id="datatables" class="display"> <thead> <tr> <th>Codice Barre</th> <th>Nome Articolo</th> <th>Quantità</th> <th>Soglia Minima</th> <th></th> </tr> </thead> <tbody> <?php while ($row = mysql_fetch_array($result)) { ?> <tr> <td><?php echo $row['codicebarre']?></td> <td><?php echo $row['nomearticolo']?></td> <td><?php echo $row['quantita']?></td> <td><?php echo $row['soglia']?></td> <td>','<?php echo $row['nomearticolo']?>');">+</td> </tr> <?php } ?> </tbody> </table> <table id="tableOrdini" class="display"> <thead> <tr> <th>Codice Barre</th> <th>Nome Articolo</th> <th>Quantità</th> <th></th> </tr> </thead> <tbody> //qui sarebbe da completare </script> </tbody> </table> </div> </div> <div id="screenLock" style="position:absolute;filter:alpha(opacity=6);background-color:#0000ff;z-index:1;display:none; height:100%;"></div> <div id="table-container"> <div id="innerFrame" class="divFrame"> <table class ="tableInnerFrame4" > <tr height="20px"> <td width="100%" > <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td class="colonnaPopUp" onmousedown="popUp.mouseDown(event);"> <div id="draggBar" class="barraFrame" onMouseover="dragswitch=1;" onMouseout="dragswitch=0"> <font face="Verdana" color="#FFFFFF"></font> </div> </td> <td class="classeX" style="cursor:hand"> <a style="cursor:hand" onclick="javascript:popUp.hide();">[img]images/x.png[/img]</a> </td> </tr> </table> </td> </tr> <tr> <td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2"> <div> <table style="border:0px" class="tableInnerFrame4"> <tr> <td style="text-align:left;border:0px;">Codice Barre</td> <td style="text-align:left;border:0px"> <input id="codiceBarre" type="text" /> </td> </tr> <tr> <td style="text-align:left;border:0px">Nome Articolo</td> <td style="text-align:left;border:0px"> <input id="nomeArticolo" type="text"/></td> </tr> <tr> <td style="text-align:left;border:0px">Quantità</td> <td style="text-align:left;border:0px"><input id="quantita" type="text"/></td> </tr> <tr> <td style="text-align:center;border:0px" colspan="2"> <input type="button" value="Inserisci" onclick="javascript:saveRiga();"/> <input type="button" value="Esci" onclick="javascript:popUp.hide();"/> </td> </tr> </table> </div> </td> </tr> </table> </div> </div> </body> </html>