Ragazzi ho questo codice e non c'è nulla da fare non vuole funzionare jquery! Non mi funziona! Dove sbaglio??
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><script src="../tablesorter/js/jquery.js" type="text/javascript"></script> <script src="../tablesorter/js/jquery.tablesorter.js" type="text/javascript"></script> </head><body> <script type="text/javascript"> $(document).ready(function() { $("table").tablesorter(); } ); </script> <table border="1" class="tablesorter" id="table" > <thead><tr> <th><b>ID</b></th> <td><b>AVVIA TRATTATIVA</b></td> <td><b>STATO TRATTATIVA</b></td> <th><b>USERNAME</b></th> <th><b>NAZIONALITA'</b></th> <th><b>CAMBIO EURO</b></th> <th><b>QUANTITA' DISPONIBILE PER LA VENDITA</b></th> <th><b>METODI DI PAGAMENTI ACCETTATI</b></th> <th><b>STATUS</b></th> </tr> </thead>
<?php session_start();require_once('lib/Users.class.php');$login = New Users;$login->access_denied();$db_username = $login->get_username();$attiva = "ATTIVA";
// includiamo il file di configurazione include "db_config_reload.php";
// seleziono i campi nelle varie tabelle$query = mysql_query("SELECT seller.id, seller.username, seller.change, seller.amount, seller.paymetod, users.nazionalita FROM seller, users WHERE seller.username = users.username AND seller.status_trattativa = 0") or die(mysql_error());
// scorro con un array la query e quindi i vari campi delle varie tabellewhile($row = mysql_fetch_array($query))
{
extract($row); $table .= " <tbody> "; $table .= "<tr>"; $table .= (($i++)%2 == 0) ? "<tr style=\"background-color: #DDDDDD;\">" : "<tr style=\"background-color: #FFFFFF;\">"; $table .= "<form action=\"insert_ask.php\" method=\"post\">"; $table .= "<input type=\"hidden\" name=\"insert_ask\" value=\"{$id};{$change};{$amount};{$paymetod};{$username};{$db_username}\" /> "; $table .= "<td> {$id} </td>"; $table .= "<td> <input type=\"submit\" value=\"Avvia Trattativa\" onClick=\"return confirm('Trattativa id: $id, sicuro che è questa la trattativa che vuoi avviare?');\"/> </td>"; $table .= "</form>"; $table .= "<td> {$status_trattativa} {$attiva} </td>"; $table .= "<td> {$username} </td>"; $table .= "<td> {$nazionalita} </td>"; $table .= "<td> {$change} </td>"; $table .= "<td> {$amount} </td>"; $table .= "<td> {$paymetod} </td>";
if(mysql_num_rows(mysql_query("SELECT username FROM users_online WHERE username = '".$username."'")) > 0) { $table .= "<td> ONLINE </td>"; } else { $table .= "<td> OFFLINE </td>"; } $table .= "</tr>"; $table .= " </tbody> ";}$table .= "</table>"; echo $table;?></body></html>
non so perche tutto il codice qui sul forum me lo ammucchia come se non prendesse gli a capo.