Relooking
This commit is contained in:
parent
7d676263e8
commit
e7995eaaa5
@ -1,8 +1,5 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,6 +15,9 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
|
* $Id$
|
||||||
|
* $Source$
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php3");
|
require("./pre.inc.php3");
|
||||||
@ -25,29 +25,34 @@ require("./pre.inc.php3");
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
$db = new Db();
|
$db = new Db();
|
||||||
|
|
||||||
|
if ($action == 'add')
|
||||||
if ($action == 'add') {
|
{
|
||||||
$author = $GLOBALS["REMOTE_USER"];
|
$author = $GLOBALS["REMOTE_USER"];
|
||||||
|
|
||||||
if ($credit > 0) {
|
if ($credit > 0)
|
||||||
$amount = $credit ;
|
{
|
||||||
} else {
|
$amount = $credit ;
|
||||||
$amount = - $debit ;
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
$amount = - $debit ;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO llx_bank_categ (label) VALUES ('$label')";
|
$sql = "INSERT INTO llx_bank_categ (label) VALUES ('$label')";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if (!$result) {
|
|
||||||
print $db->error();
|
if (!$result)
|
||||||
print "<p>$sql";
|
{
|
||||||
}
|
print $db->error();
|
||||||
|
print "<p>$sql";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<b>Categorie</b> <a href=\"$PHP_SELF\">reload</a>";
|
print_titre("Catégories");
|
||||||
print "<form method=\"post\" action=\"$PHP_SELF\">";
|
print "<form method=\"post\" action=\"$PHP_SELF\">";
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
||||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||||
print "<TR bgcolor=\"orange\">";
|
print '<TR class="liste_titre">';
|
||||||
print "<td>Num</td><td colspan=\"2\">Description</TD>";
|
print "<td>Num</td><td colspan=\"2\">Description</TD>";
|
||||||
print "</TR>\n";
|
print "</TR>\n";
|
||||||
|
|
||||||
@ -55,24 +60,26 @@ print "</TR>\n";
|
|||||||
$sql = "SELECT rowid, label FROM llx_bank_categ ORDER BY label";
|
$sql = "SELECT rowid, label FROM llx_bank_categ ORDER BY label";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result)
|
||||||
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num) {
|
while ($i < $num)
|
||||||
$objp = $db->fetch_object( $i);
|
{
|
||||||
$var=!$var;
|
$objp = $db->fetch_object( $i);
|
||||||
print "<tr $bc[$var]>";
|
$var=!$var;
|
||||||
print "<td>$objp->rowid</td>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td colspan=\"2\">$objp->label</td>";
|
print "<td>$objp->rowid</td>";
|
||||||
print "</tr>";
|
print "<td colspan=\"2\">$objp->label</td>";
|
||||||
$i++;
|
print "</tr>";
|
||||||
}
|
$i++;
|
||||||
|
}
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td><td><input name=\"label\" type=\"text\" size=45></td>";
|
print "<td> </td><td><input name=\"label\" type=\"text\" size=45></td>";
|
||||||
print "<td align=\"center\"><input type=\"submit\" value=\"ajouter\"</td></tr>";
|
print "<td align=\"center\"><input type=\"submit\" value=\"ajouter\"</td></tr>";
|
||||||
print "</table></form>";
|
print "</table></form>";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user