Nettoyage du code

This commit is contained in:
Rodolphe Quiedeville 2003-09-07 19:23:26 +00:00
parent 79620aebc8
commit dee9bc76ca

View File

@ -21,14 +21,7 @@
* *
*/ */
/*
*
* $viewall
*
*/
require("./pre.inc.php3"); require("./pre.inc.php3");
//require("./bank.lib.php3");
//require("./account.class.php");
if ($HTTP_POST_VARS["action"] == 'add' && $account) if ($HTTP_POST_VARS["action"] == 'add' && $account)
{ {
@ -101,15 +94,15 @@ if ($account)
{ {
$viewline = 20; $viewline = 20;
} }
$acct=new Account($db);
print "<b>Bank</b> - &nbsp;-"; $acct->fetch($account);
print "<a href=\"$PHP_SELF?viewall=1&account=$account\">Voir tout</a>"; print_titre("Compte : " .$acct->label);
/* /*
* Formulaire de recherche * Formulaire de recherche
* *
*/ */
print '<form method="post" action="'."$PHP_SELF?viewall=$viewall&vline=$vline&account=$account".'">'; print '<form method="post" action="'."$PHP_SELF?vline=$vline&account=$account".'">';
print '<input type="hidden" name="action" value="search">'; print '<input type="hidden" name="action" value="search">';
print '<TABLE border="1" width="100%" cellspacing="0" cellpadding="2">'; print '<TABLE border="1" width="100%" cellspacing="0" cellpadding="2">';
print "<TR>"; print "<TR>";
@ -125,7 +118,7 @@ if ($account)
* *
* *
*/ */
print "<form method=\"post\" action=\"$PHP_SELF?viewall=$viewall&vline=$vline&account=$account\">"; print "<form method=\"post\" action=\"$PHP_SELF?vline=$vline&account=$account\">";
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print "<TR class=\"liste_titre\">"; print "<TR class=\"liste_titre\">";
print "<td>Date</td><td>Type</td><td>Description</TD>"; print "<td>Date</td><td>Type</td><td>Description</TD>";
@ -169,8 +162,6 @@ if ($account)
} }
if ($viewall) { $nbline=0; }
/* Another solution /* Another solution
* create temporary table solde type=heap select amount from llx_bank limit 100 ; * create temporary table solde type=heap select amount from llx_bank limit 100 ;
* select sum(amount) from solde ; * select sum(amount) from solde ;
@ -355,13 +346,8 @@ if ($account)
print '<td colspan="4" align="center"><input type="submit" value="Ajouter"></td></tr>'; print '<td colspan="4" align="center"><input type="submit" value="Ajouter"></td></tr>';
} }
print "</table></form>"; print "</table></form>";
print "<a href=\"categ.php3\">Edit Categories</a>";
print " <a href=\"budget.php3\">Budgets</a>";
} else { } else {
print_titre ("Comptes bancaires"); print_titre ("Comptes bancaires");