0) if (add_transaction($_POST["day"], $_POST["accid"], $_POST["catid"], $_POST["amount"], $_POST["desc"]) == 0) $msg .= "Impossible de créer une nouvelle transaction.\n"; else $msg .= "Nouvelle transaction créée.\n"; } $msg = ereg_replace("\n", "
\n", $msg); if ($msg) echo "

$msg

\n"; ?>

Mois de


0; elseif (test_amount($a, $b) != 0) return test_amount($a, $b) > 0; else return test_account($a, $b) >= 0; } break; case "am": function cmp($a, $b) { if (test_amount($a, $b) != 0) return test_amount($a, $b) > 0; elseif (test_day($a, $b) != 0) return test_day($a, $b) > 0; else return test_account($a, $b) >= 0; } break; case "ac": function cmp($a, $b) { if (test_account($a, $b) != 0) return test_account($a, $b) > 0; elseif (test_day($a, $b) != 0) return test_day($a, $b) > 0; else return test_amount($a, $b) >= 0; } break; case "ca": function cmp($a, $b) { if (test_category($a, $b) != 0) return test_category($a, $b) > 0; elseif (test_day($a, $b) != 0) return test_day($a, $b) > 0; else return test_amount($a, $b) >= 0; } break; case "de": function cmp($a, $b) { if (test_description($a, $b) != 0) return test_description($a, $b) > 0; elseif (test_day($a, $b) != 0) return test_day($a, $b) > 0; else return test_amount($a, $b) >= 0; } break; default: function cmp($a, $b) { return 1; } } usort($transactions, "cmp"); } if (nb_transactions()) { foreach ($transactions as $t) { echo "\n"; /* Day selector */ echo "\n"; /* Amount area */ echo "\n"; /* Account selector */ echo "\n"; /* Category selector */ echo "\n"; /* Descrition area */ echo "\n"; /* Erase button */ echo "\n"; echo "\n"; } } /* New entry */ echo "\n"; /* Day selector */ $day = strftime("%d"); echo "\n"; /* Amount area */ echo "\n"; /* Account selector */ echo "\n"; /* Category selector */ echo "\n"; /* Descrition area */ echo "\n"; /* No erase button but a button that make appear del/move form */ echo "\n"; echo "\n"; ?>
Jour Montant Catégorie Description