lot changes
This commit is contained in:
parent
2b1de1b144
commit
cfdda58772
@ -1,8 +1,5 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
* 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
|
||||
@ -18,6 +15,9 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
require("./pre.inc.php3");
|
||||
@ -38,12 +38,13 @@ $db = new Db();
|
||||
*
|
||||
*/
|
||||
|
||||
if ($bid == 0) {
|
||||
if ($bid == 0)
|
||||
{
|
||||
/*
|
||||
* Liste
|
||||
*/
|
||||
print "<b>Budgets</b>";
|
||||
|
||||
print_titre("Budgets");
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
print "<TR class=\"liste_titre\">";
|
||||
echo '<td>Description</TD><td>Nb</td><td colspan=\"2\">Total</td><td>Moyenne</td>';
|
||||
@ -54,45 +55,55 @@ if ($bid == 0) {
|
||||
$sql .= " WHERE d.rowid=l.lineid AND c.rowid = l.fk_categ GROUP BY c.label, c.rowid ORDER BY c.label";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
|
||||
$var=True;
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"$PHP_SELF?bid=$objp->rowid\">$objp->label</a></td>";
|
||||
print "<td>$objp->nombre</td>";
|
||||
print "<td align=\"right\">".price(abs($objp->somme))."</td>";
|
||||
print "<td align=\"right\"><small>".francs(abs($objp->somme))." FF</small></td>";
|
||||
print "<td align=\"right\">".price(abs($objp->somme / $objp->nombre))."</td>";
|
||||
print "</tr>";
|
||||
$i++;
|
||||
$total = $total + abs($objp->somme);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"$PHP_SELF?bid=$objp->rowid\">$objp->label</a></td>";
|
||||
print "<td>$objp->nombre</td>";
|
||||
print "<td align=\"right\">".price(abs($objp->somme))."</td>";
|
||||
print "<td align=\"right\"><small>".francs(abs($objp->somme))." FF</small></td>";
|
||||
print "<td align=\"right\">".price(abs($objp->somme / $objp->nombre))."</td>";
|
||||
print "</tr>";
|
||||
$i++;
|
||||
$total = $total + abs($objp->somme);
|
||||
}
|
||||
$db->free();
|
||||
|
||||
print '<tr><td colspan="2" align="right">Total</td>';
|
||||
print '<td align="right"><b>'.price($total).'</b></td><td> </td></tr>';
|
||||
print "<tr><td colspan=\"3\" align=\"right\"><small>soit en francs</td><td align=\"right\"><small>".francs($total)."</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
$db->free();
|
||||
print "<tr><td colspan=\"2\" align=\"right\">Total</td><td align=\"right\"><b>".price($total)."</b></td></tr>";
|
||||
print "<tr><td colspan=\"3\" align=\"right\"><small>soit en francs</td><td align=\"right\"><small>".francs($total)."</td></tr>\n";
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Vue
|
||||
*/
|
||||
$sql = "SELECT label FROM llx_bank_categ WHERE rowid=$bid";
|
||||
if ( $db->query($sql) ) {
|
||||
if ( $db->num_rows() ) {
|
||||
$budget_name = $db->result(0,0);
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
if ( $db->num_rows() )
|
||||
{
|
||||
$budget_name = $db->result(0,0);
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
|
||||
print "<b>Budget : $budget_name</b>";
|
||||
|
||||
print_titre("Budget : $budget_name");
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
print "<TR class=\"liste_titre\">";
|
||||
@ -104,33 +115,37 @@ if ($bid == 0) {
|
||||
$sql .= " WHERE d.rowid=l.lineid AND l.fk_categ=$bid ORDER by d.dateo DESC";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
|
||||
$var=True;
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td align=\"right\">".strftime("%d %B %Y",$objp->do)."</TD>\n";
|
||||
|
||||
print "<td><a href=\"ligne.php3?rowid=$objp->rowid\">$objp->label</a></td>";
|
||||
print "<td align=\"right\">".price(abs($objp->amount))."</td>";
|
||||
print "<td align=\"right\"><small>".francs(abs($objp->amount))."</small></td>";
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
$total = $total + $objp->amount;
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td align=\"right\">".strftime("%d %B %Y",$objp->do)."</TD>\n";
|
||||
|
||||
print "<td><a href=\"ligne.php3?rowid=$objp->rowid\">$objp->label</a></td>";
|
||||
print "<td align=\"right\">".price(abs($objp->amount))."</td>";
|
||||
print "<td align=\"right\"><small>".francs(abs($objp->amount))."</small></td>";
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
$total = $total + $objp->amount;
|
||||
}
|
||||
$db->free();
|
||||
print "<tr><td colspan=\"2\" align=\"right\">Total</td><td align=\"right\"><b>".price(abs($total))."</b></td><td>euros</td></tr>";
|
||||
print "<tr><td colspan=\"2\" align=\"right\"><small>soit</td><td align=\"right\"><small>".francs(abs($total))."</td><td><small>francs</small></tr>\n";
|
||||
}
|
||||
$db->free();
|
||||
print "<tr><td colspan=\"2\" align=\"right\">Total</td><td align=\"right\"><b>".price(abs($total))."</b></td><td>euros</td></tr>";
|
||||
print "<tr><td colspan=\"2\" align=\"right\"><small>soit</td><td align=\"right\"><small>".francs(abs($total))."</td><td><small>francs</small></tr>\n";
|
||||
} else {
|
||||
print $db->error();
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
* 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
|
||||
@ -18,6 +15,8 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php3");
|
||||
@ -26,18 +25,15 @@ require("./bank.lib.php3");
|
||||
llxHeader();
|
||||
$db = new Db();
|
||||
|
||||
if ($action == 'add') {
|
||||
if ($action == 'add')
|
||||
{
|
||||
$author = $GLOBALS["REMOTE_USER"];
|
||||
|
||||
|
||||
$sql = "INSERT INTO llx_bank_account (label, number, bank) VALUES ('$label','$number','$bank')";
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
if ($action == 'del') {
|
||||
bank_delete_line($db, $rowid);
|
||||
}
|
||||
|
||||
|
||||
print "<b>Configuration</b>";
|
||||
print_titre("Configuration");
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
print "<TR class=\"liste_titre\">";
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/conf/conf.class.php3");
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/lib/mysql.lib.php3");
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/lib/functions.inc.php3");
|
||||
@ -29,6 +28,7 @@ require ($GLOBALS["DOCUMENT_ROOT"]."/menu.class.php3");
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/societe.class.php3");
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/rtplang.class.php");
|
||||
|
||||
|
||||
$conf = new Conf();
|
||||
|
||||
$db = new Db();
|
||||
|
||||
@ -21,10 +21,13 @@
|
||||
*/
|
||||
|
||||
print '<input type="hidden" name="projetid" value="'.$HTTP_POST_VARS["projetid"].'">';
|
||||
print '<input type="hidden" name="prenom" value="'.$HTTP_POST_VARS["prenom"].'">';
|
||||
print '<input type="hidden" name="nom" value="'.$HTTP_POST_VARS["nom"].'">';
|
||||
print '<input type="hidden" name="societe" value="'.$HTTP_POST_VARS["societe"].'">';
|
||||
print '<input type="hidden" name="adresse" value="'.$HTTP_POST_VARS["adresse"].'">';
|
||||
print '<input type="hidden" name="cp" value="'.$HTTP_POST_VARS["cp"].'">';
|
||||
print '<input type="hidden" name="ville" value="'.$HTTP_POST_VARS["ville"].'">';
|
||||
print '<input type="hidden" name="pays" value="'.$HTTP_POST_VARS["pays"].'">';
|
||||
print '<input type="hidden" name="date" value="'.$HTTP_POST_VARS["date"].'">';
|
||||
print '<input type="hidden" name="public" value="'.$HTTP_POST_VARS["public"].'">';
|
||||
print '<input type="hidden" name="email" value="'.$HTTP_POST_VARS["email"].'">';
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
$conf = new Conf();
|
||||
$db = new Db();
|
||||
|
||||
$sql = "SELECT ".$db->pdate("d.datedon")." as datedon, d.nom, d.amount, d.public";
|
||||
$sql = "SELECT ".$db->pdate("d.datedon")." as datedon, d.nom, d.amount, d.public, d.societe";
|
||||
$sql .= " FROM llx_don as d";
|
||||
$sql .= " WHERE d.fk_don_projet = 1 AND d.fk_statut = 3 ORDER BY d.datedon DESC";
|
||||
|
||||
@ -37,7 +37,7 @@ if ( $db->query( $sql) )
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
|
||||
print '<TR>';
|
||||
print "<td>Nom</td>";
|
||||
print "<td>Nom / Société</td>";
|
||||
print "<td>Date</td>";
|
||||
print "<td align=\"right\">Montant</TD>";
|
||||
print "</TR>\n";
|
||||
@ -53,7 +53,7 @@ if ( $db->query( $sql) )
|
||||
print "<TR $bc[$var]>";
|
||||
if ($objp->public)
|
||||
{
|
||||
print "<td>".stripslashes($objp->nom)."</TD>\n";
|
||||
print "<td>".stripslashes($objp->nom)." ".stripslashes($objp->societe)."</TD>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -14,17 +14,35 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Merci pour votre soutient
|
||||
Merci pour votre soutien.
|
||||
</p>
|
||||
<!-- Paiement en ligne -->
|
||||
<!--
|
||||
<form action="pay.php" method="post">
|
||||
<script language="php">
|
||||
require("code_valid.php");
|
||||
</script>
|
||||
<input type="submit" value="Valider" />
|
||||
</form>
|
||||
-->
|
||||
|
||||
<table id="formulaire">
|
||||
<tr id="prenom">
|
||||
<script language="php">
|
||||
print stripslashes($don->prenom);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="nom">
|
||||
<script language="php">
|
||||
print stripslashes($don->nom);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="societe">
|
||||
<script language="php">
|
||||
print stripslashes($don->societe);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="montant">
|
||||
<script language="php">
|
||||
print stripslashes($don->amount);
|
||||
</script>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -31,16 +31,28 @@
|
||||
<tr id="projet">
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="prenom">
|
||||
<script language="php">
|
||||
print stripslashes($don->prenom);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="nom">
|
||||
<script language="php">
|
||||
print stripslashes($don->nom);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="societe">
|
||||
<script language="php">
|
||||
print stripslashes($don->societe);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="adresse">
|
||||
<script language="php">
|
||||
print stripslashes($don->adresse);
|
||||
print nl2br(stripslashes($don->adresse));
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
@ -55,6 +67,12 @@
|
||||
print stripslashes($don->ville);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="pays">
|
||||
<script language="php">
|
||||
print stripslashes($don->pays);
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="email">
|
||||
<script language="php">
|
||||
@ -64,22 +82,26 @@
|
||||
|
||||
<tr id="montant">
|
||||
<script language="php">
|
||||
print number_format($don->amount, 2, '.', ' ');
|
||||
print number_format($don->amount, 0, '', ' ');
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="public">
|
||||
|
||||
<script language="php">
|
||||
$yn[0]="non";
|
||||
$yn[1]="oui";
|
||||
print $yn[$don->public];
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="commentaire">
|
||||
<script language="php">
|
||||
nl2br(print stripslashes($don->commentaire));
|
||||
print nl2br(stripslashes($don->commentaire));
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="center" class="titre">
|
||||
<td colspan="3" align="center" class="titre">
|
||||
<input type="submit" value="Valider" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user