.
This commit is contained in:
parent
ffae801b1c
commit
384b5ee54f
@ -18,19 +18,19 @@
|
|||||||
</p>
|
</p>
|
||||||
</sect>
|
</sect>
|
||||||
|
|
||||||
<sect id="adh-statut">
|
<sect id="adh-statut">Statut
|
||||||
|
<p>
|
||||||
Un adherent peut avoir plusieurs statuts differents ils sont.
|
Un adherent peut avoir plusieurs statuts differents ils sont.
|
||||||
|
</p>
|
||||||
</sect>
|
</sect>
|
||||||
|
|
||||||
<sect id="adh-classe">
|
<sect id="adh-classe">Classes PHP
|
||||||
<p>
|
<p>
|
||||||
Classes PHP utilisées pour ce module :
|
Classes PHP utilisées pour ce module :
|
||||||
<list>
|
<list>
|
||||||
<item>adherent.class.php</item>
|
<item>adherent.class.php</item>
|
||||||
</list>
|
</list>
|
||||||
|
</p>
|
||||||
</sect>
|
</sect>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
23
doc/don.sgml
23
doc/don.sgml
@ -1,12 +1,31 @@
|
|||||||
<chapt id="dons">Dons
|
<chapt id="dons">Dons
|
||||||
|
|
||||||
<sect id="don-suffix">Suffixe de commande
|
<sect id="don-conf">Configuration
|
||||||
|
<p>
|
||||||
|
|
||||||
Le suffixe de commande des dons est la valeur 10.
|
$this->enabled = 0;
|
||||||
|
|
||||||
|
/* Paiement en ligne */
|
||||||
|
|
||||||
|
$this->onlinepayment = 0;
|
||||||
|
|
||||||
|
/* Don minimum, 0 pas de limite */
|
||||||
|
$this->minimum = 0;
|
||||||
|
|
||||||
|
/* Email des moderateurs */
|
||||||
|
|
||||||
|
$this->email_moderator = "root@localhost";
|
||||||
|
|
||||||
|
</p>
|
||||||
</sect>
|
</sect>
|
||||||
|
|
||||||
|
<sect id="don-suffix">Suffixe de commande
|
||||||
|
<p>
|
||||||
|
Le suffixe de commande des dons est la valeur 10.
|
||||||
|
</p>
|
||||||
|
</sect>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</chapt>
|
</chapt>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
337
htdocs/adherent.class.php
Normal file
337
htdocs/adherent.class.php
Normal file
@ -0,0 +1,337 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* 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$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Adherent
|
||||||
|
{
|
||||||
|
var $id;
|
||||||
|
var $db;
|
||||||
|
var $prenom;
|
||||||
|
var $nom;
|
||||||
|
var $societe;
|
||||||
|
var $adresse;
|
||||||
|
var $cp;
|
||||||
|
var $ville;
|
||||||
|
var $pays;
|
||||||
|
var $typeid;
|
||||||
|
var $email;
|
||||||
|
var $public;
|
||||||
|
var $commentaire;
|
||||||
|
var $statut;
|
||||||
|
|
||||||
|
var $errorstr;
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function Adherent($DB, $soc_idp="")
|
||||||
|
{
|
||||||
|
$this->db = $DB ;
|
||||||
|
$this->statut = 0;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function print_error_list()
|
||||||
|
{
|
||||||
|
$num = sizeof($this->errorstr);
|
||||||
|
for ($i = 0 ; $i < $num ; $i++)
|
||||||
|
{
|
||||||
|
print "<li>" . $this->errorstr[$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function check($minimum=0)
|
||||||
|
{
|
||||||
|
$err = 0;
|
||||||
|
|
||||||
|
if (strlen(trim($this->societe)) == 0)
|
||||||
|
{
|
||||||
|
if ((strlen(trim($this->nom)) + strlen(trim($this->prenom))) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Vous devez saisir vos nom et prénom ou le nom de votre société.";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->adresse)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "L'adresse saisie est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->cp)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le code postal saisi est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->ville)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "La ville saisie est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->email)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "L'email saisi est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->amount = trim($this->amount);
|
||||||
|
|
||||||
|
$map = range(0,9);
|
||||||
|
for ($i = 0; $i < strlen($this->amount) ; $i++)
|
||||||
|
{
|
||||||
|
if (!isset($map[substr($this->amount, $i, 1)] ))
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le montant du don contient un/des caractère(s) invalide(s)";
|
||||||
|
$err++;
|
||||||
|
$amount_invalid = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $amount_invalid)
|
||||||
|
{
|
||||||
|
if ($this->amount == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le montant du don est null";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($this->amount < $minimum && $minimum > 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le montant minimum du don est de $minimum";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return errors
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($err)
|
||||||
|
{
|
||||||
|
$this->errorstr = $error_string;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Création
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function create($userid)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Insertion dans la base
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->date = $this->db->idate($this->date);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO llx_adherent (datec)";
|
||||||
|
$sql .= " VALUES (now())";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$this->id = $this->db->last_insert_id();
|
||||||
|
return $this->update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
print "<h2><br>$sql<br></h2>";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mise à jour
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function update()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_adherent SET ";
|
||||||
|
$sql .= "prenom = '".$this->prenom ."'";
|
||||||
|
$sql .= ",nom='".$this->nom."'";
|
||||||
|
$sql .= ",societe='".$this->societe."'";
|
||||||
|
$sql .= ",adresse='".$this->adresse."'";
|
||||||
|
$sql .= ",cp='".$this->cp."'";
|
||||||
|
$sql .= ",ville='".$this->ville."'";
|
||||||
|
$sql .= ",pays='".$this->pays."'";
|
||||||
|
$sql .= ",note='".$this->commentaire."'";
|
||||||
|
$sql .= ",email='".$this->email."'";
|
||||||
|
$sql .= ",statut=".$this->statut;
|
||||||
|
$sql .= ",fk_adherent_type=".$this->typeid;
|
||||||
|
|
||||||
|
$sql .= " WHERE rowid = $this->id";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
print "<h2><br>$sql<br></h2>";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Suppression du don
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function delete($rowid)
|
||||||
|
|
||||||
|
{
|
||||||
|
$result = 0;
|
||||||
|
$sql = "DELETE FROM llx_adherent WHERE rowid = $rowid";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "DELETE FROM llx_cotisation WHERE fk_adherent = $rowid";
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
$result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Fetch
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function fetch($rowid)
|
||||||
|
{
|
||||||
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.statut, d.adresse, d.cp, d.ville, d.pays, d.note, d.email, d.fk_adherent_type";
|
||||||
|
$sql .= ",".$this->db->pdate("d.datefin")." as datefin";
|
||||||
|
$sql .= " FROM llx_adherent as d";
|
||||||
|
$sql .= " WHERE d.rowid = $rowid";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ($this->db->num_rows())
|
||||||
|
{
|
||||||
|
|
||||||
|
$obj = $this->db->fetch_object(0);
|
||||||
|
|
||||||
|
$this->id = $obj->rowid;
|
||||||
|
$this->typeid = $obj->fk_adherent_type;
|
||||||
|
$this->date = $obj->datedon;
|
||||||
|
$this->prenom = stripslashes($obj->prenom);
|
||||||
|
$this->nom = stripslashes($obj->nom);
|
||||||
|
$this->societe = stripslashes($obj->societe);
|
||||||
|
$this->statut = $obj->fk_statut;
|
||||||
|
$this->adresse = stripslashes($obj->adresse);
|
||||||
|
$this->cp = stripslashes($obj->cp);
|
||||||
|
$this->ville = stripslashes($obj->ville);
|
||||||
|
$this->email = stripslashes($obj->email);
|
||||||
|
$this->pays = stripslashes($obj->pays);
|
||||||
|
$this->datefin = $obj->datefin;
|
||||||
|
$this->commentaire = stripslashes($obj->note);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cotisation
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function cotisation($date, $montant)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "INSERT INTO llx_cotisation (fk_adherent, dateadh, cotisation)";
|
||||||
|
$sql .= " VALUES ($this->id, ".$this->db->idate($date).", $montant)";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
|
||||||
|
$datefin = mktime(12, 0 , 0,
|
||||||
|
strftime("%m",$date),
|
||||||
|
strftime("%d",$date),
|
||||||
|
strftime("%Y",$date)+1) - (24 * 3600);
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_adherent SET datefin = ".$this->db->idate($datefin)." WHERE rowid =". $this->id;
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
207
htdocs/adherent_type.class.php
Normal file
207
htdocs/adherent_type.class.php
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* 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$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
class AdherentType
|
||||||
|
{
|
||||||
|
var $id;
|
||||||
|
var $libelle;
|
||||||
|
var $statut;
|
||||||
|
var $cotisation; // Soumis à la cotisation
|
||||||
|
var $errorstr;
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function AdherentType($DB, $soc_idp="")
|
||||||
|
{
|
||||||
|
$this->db = $DB ;
|
||||||
|
$this->statut = 1;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function print_error_list()
|
||||||
|
{
|
||||||
|
$num = sizeof($this->errorstr);
|
||||||
|
for ($i = 0 ; $i < $num ; $i++)
|
||||||
|
{
|
||||||
|
print "<li>" . $this->errorstr[$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Création
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function create($userid)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Insertion dans la base
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sql = "INSERT INTO llx_adherent_type (statut)";
|
||||||
|
$sql .= " VALUES ($this->statut)";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$this->id = $this->db->last_insert_id();
|
||||||
|
return $this->update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
print "<h2><br>$sql<br></h2>";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mise à jour
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function update()
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_adherent_type SET ";
|
||||||
|
$sql .= "libelle = '".$this->libelle ."'";
|
||||||
|
$sql .= ",statut=".$this->statut;
|
||||||
|
$sql .= ",cotisation='".$this->cotisation."'";
|
||||||
|
|
||||||
|
$sql .= " WHERE rowid = $this->id";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
print "<h2><br>$sql<br></h2>";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Suppression
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function delete($rowid)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "DELETE FROM llx_adherent_type WHERE rowid = $rowid";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Fetch
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function fetch($rowid)
|
||||||
|
{
|
||||||
|
$sql = "SELECT d.rowid, d.libelle, d.statut, d.cotisation";
|
||||||
|
$sql .= " FROM llx_adherent_type as d";
|
||||||
|
$sql .= " WHERE d.rowid = $rowid";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ($this->db->num_rows())
|
||||||
|
{
|
||||||
|
|
||||||
|
$obj = $this->db->fetch_object(0);
|
||||||
|
|
||||||
|
$this->id = $obj->rowid;
|
||||||
|
$this->libelle = $obj->libelle;
|
||||||
|
$this->statut = $obj->statut;
|
||||||
|
$this->cotisation = $obj->cotisation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function liste_array()
|
||||||
|
{
|
||||||
|
$projets = array();
|
||||||
|
|
||||||
|
$sql = "SELECT rowid, libelle FROM llx_adherent_type";
|
||||||
|
|
||||||
|
if ($this->db->query($sql) )
|
||||||
|
{
|
||||||
|
$nump = $this->db->num_rows();
|
||||||
|
|
||||||
|
if ($nump)
|
||||||
|
{
|
||||||
|
$i = 0;
|
||||||
|
while ($i < $nump)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($i);
|
||||||
|
|
||||||
|
$projets[$obj->rowid] = $obj->libelle;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $projets;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
102
htdocs/adherents/cotisations.php
Normal file
102
htdocs/adherents/cotisations.php
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* 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.php");
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
|
$db = new Db();
|
||||||
|
|
||||||
|
if ($action == 'add') {
|
||||||
|
$datepaye = $db->idate(mktime(12, 0 , 0, $pmonth, $pday, $pyear));
|
||||||
|
|
||||||
|
$paiement = new Paiement($db);
|
||||||
|
|
||||||
|
$paiement->facid = $facid;
|
||||||
|
$paiement->datepaye = $datepaye;
|
||||||
|
$paiement->amount = $amount;
|
||||||
|
$paiement->author = $author;
|
||||||
|
$paiement->paiementid = $paiementid;
|
||||||
|
$paiement->num_paiement = $num_paiement;
|
||||||
|
$paiement->note = $note;
|
||||||
|
|
||||||
|
$paiement->create();
|
||||||
|
|
||||||
|
$action = '';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($sortorder == "") { $sortorder="DESC"; }
|
||||||
|
if ($sortfield == "") { $sortfield="c.dateadh"; }
|
||||||
|
|
||||||
|
if ($page == -1) { $page = 0 ; }
|
||||||
|
|
||||||
|
$offset = $conf->liste_limit * $page ;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, c.cotisation, ".$db->pdate("c.dateadh")." as dateadh";
|
||||||
|
$sql .= " FROM llx_adherent as d, llx_cotisation as c";
|
||||||
|
$sql .= " WHERE d.rowid = c.fk_adherent";
|
||||||
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
print_barre_liste("Liste des cotisations", $page, $PHP_SELF, "&statut=$statut");
|
||||||
|
print "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||||
|
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print "<td>Date</td>";
|
||||||
|
print "<td align=\"right\">Montant</TD>";
|
||||||
|
print "<td>Prenom Nom / Société</td>";
|
||||||
|
print "</TR>\n";
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object( $i);
|
||||||
|
$var=!$var;
|
||||||
|
print "<TR $bc[$var]>";
|
||||||
|
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".strftime("%d %B %Y",$objp->dateadh)."</a></td>\n";
|
||||||
|
print '<TD align="right">'.price($objp->cotisation).'</TD>';
|
||||||
|
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."</a></TD>\n";
|
||||||
|
print "</tr>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $sql;
|
||||||
|
print $db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
|
?>
|
||||||
@ -20,47 +20,46 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require("../../don.class.php");
|
require("../adherent.class.php");
|
||||||
require("../../paiement.class.php");
|
require("../adherent_type.class.php");
|
||||||
|
|
||||||
$db = new Db();
|
$db = new Db();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enregistrer les modifs
|
||||||
|
*/
|
||||||
|
|
||||||
if ($action == 'update')
|
if ($action == 'update')
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($amount > 0)
|
if ($HTTP_POST_VARS["bouton"] == "Enregistrer")
|
||||||
{
|
{
|
||||||
|
|
||||||
$don = new Don($db);
|
$adh = new Adherent($db);
|
||||||
|
|
||||||
$don->id = $HTTP_POST_VARS["rowid"];
|
$adh->id = $HTTP_POST_VARS["rowid"];
|
||||||
$don->prenom = $prenom;
|
$adh->prenom = $prenom;
|
||||||
$don->nom = $nom;
|
$adh->nom = $nom;
|
||||||
$don->statut = $HTTP_POST_VARS["statutid"];
|
$adh->societe = $societe;
|
||||||
$don->societe = $societe;
|
$adh->adresse = $adresse;
|
||||||
$don->adresse = $adresse;
|
$adh->amount = $amount;
|
||||||
$don->amount = $amount;
|
$adh->cp = $cp;
|
||||||
$don->cp = $cp;
|
$adh->ville = $HTTP_POST_VARS["ville"];
|
||||||
$don->ville = $ville;
|
$adh->email = $HTTP_POST_VARS["email"];
|
||||||
$don->email = $email;
|
$adh->date = mktime(12, 0 , 0, $remonth, $reday, $reyear);
|
||||||
$don->date = mktime(12, 0 , 0, $remonth, $reday, $reyear);
|
$adh->note = $HTTP_POST_VARS["note"];
|
||||||
$don->note = $note;
|
$adh->pays = $HTTP_POST_VARS["pays"];
|
||||||
$don->pays = $pays;
|
$adh->typeid = $HTTP_POST_VARS["type"];
|
||||||
$don->public = $public;
|
$adh->commentaire = $HTTP_POST_VARS["comment"];
|
||||||
$don->projetid = $projetid;
|
|
||||||
$don->commentaire = $HTTP_POST_VARS["comment"];
|
|
||||||
$don->modepaiementid = $modepaiement;
|
|
||||||
|
|
||||||
if ($don->update($user->id) )
|
if ($adh->update($user->id) )
|
||||||
{
|
{
|
||||||
Header("Location: fiche.php?rowid=$don->id&action=edit");
|
Header("Location: fiche.php?rowid=$adh->id&action=edit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Erreur";
|
Header("Location: fiche.php?rowid=$rowid&action=edit");
|
||||||
$action = "create";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,9 +70,9 @@ llxHeader();
|
|||||||
if ($rowid)
|
if ($rowid)
|
||||||
{
|
{
|
||||||
|
|
||||||
$don = new Don($db);
|
$adh = new Adherent($db);
|
||||||
$don->id = $rowid;
|
$adh->id = $rowid;
|
||||||
$don->fetch($rowid);
|
$adh->fetch($rowid);
|
||||||
|
|
||||||
$sql = "SELECT s.nom,s.idp, f.amount, f.total, f.facnumber";
|
$sql = "SELECT s.nom,s.idp, f.amount, f.total, f.facnumber";
|
||||||
$sql .= " FROM societe as s, llx_facture as f WHERE f.fk_soc = s.idp";
|
$sql .= " FROM societe as s, llx_facture as f WHERE f.fk_soc = s.idp";
|
||||||
@ -88,79 +87,66 @@ if ($rowid)
|
|||||||
$total = $obj->total;
|
$total = $obj->total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_titre("Saisir un don");
|
print_titre("Edition de la fiche adhérent");
|
||||||
|
|
||||||
|
|
||||||
|
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
||||||
|
|
||||||
|
print '<tr><td width="15%">Prénom</td><td class="valeur" width="35%">'.$adh->prenom.' </td>';
|
||||||
|
|
||||||
|
print '<td valign="top" width="50%">Commentaires</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>Nom</td><td class="valeur">'.$adh->nom.' </td>';
|
||||||
|
|
||||||
|
print '<td rowspan="10" valign="top" width="50%">';
|
||||||
|
print nl2br($adh->commentaire).' </td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<tr><td>Société</td><td class="valeur">'.$adh->societe.' </td></tr>';
|
||||||
|
print '<tr><td>Adresse</td><td class="valeur">'.nl2br($adh->adresse).' </td></tr>';
|
||||||
|
print '<tr><td>CP Ville</td><td class="valeur">'.$adh->cp.' '.$adh->ville.' </td></tr>';
|
||||||
|
print '<tr><td>Pays</td><td class="valeur">'.$adh->pays.' </td></tr>';
|
||||||
|
print '<tr><td>Email</td><td class="valeur">'.$adh->email.' </td></tr>';
|
||||||
|
|
||||||
|
print "</table>\n";
|
||||||
|
|
||||||
|
print "<hr>";
|
||||||
|
|
||||||
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
||||||
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
||||||
|
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||||
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
||||||
|
|
||||||
print "<tr><td>Date du don</td><td>";
|
$htmls = new Form($db);
|
||||||
print_date_select($don->date);
|
$adht = new AdherentType($db);
|
||||||
print "</td>";
|
|
||||||
|
|
||||||
print '<td rowspan="13" valign="top">Commentaires :<br>';
|
|
||||||
print '<textarea name="comment" wrap="soft" cols="40" rows="15">'.$don->commentaire.'</textarea></td></tr>';
|
|
||||||
|
|
||||||
print "<tr><td>Statut du don</td><td>";
|
|
||||||
|
|
||||||
$listst[0] = "Promesse à valider";
|
|
||||||
$listst[1] = "Promesse validée";
|
|
||||||
$listst[2] = "Don payé";
|
|
||||||
$listst[3] = "Don encaissé";
|
|
||||||
|
|
||||||
|
|
||||||
$sel = new Form($db);
|
|
||||||
$sel->select_array("statutid",$listst,$don->statut);
|
|
||||||
|
|
||||||
|
print "<tr><td>Type</td><td>";
|
||||||
|
$htmls->select_array("type", $adht->liste_array(), $adh->typeid);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print "<tr><td>Mode de paiement</td><td>\n";
|
|
||||||
|
|
||||||
$paiement = new Paiement($db);
|
print '<tr><td width="15%">Prénom</td><td width="35%"><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
|
||||||
|
|
||||||
$paiement->select("modepaiement","", $don->modepaiementid);
|
print '<td valign="top" width="50%">Commentaires</td></tr>';
|
||||||
|
|
||||||
print "</td></tr>\n";
|
print '<tr><td>Nom</td><td><input type="text" name="nom" size="40" value="'.$adh->nom.'"></td>';
|
||||||
|
|
||||||
print "<tr><td>Projet</td><td>\n";
|
print '<td rowspan="13" valign="top">';
|
||||||
|
print '<textarea name="comment" wrap="soft" cols="40" rows="15">'.$adh->commentaire.'</textarea></td></tr>';
|
||||||
|
|
||||||
$prj = new ProjetDon($db);
|
print '<tr><td>Societe</td><td><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
|
||||||
$listeprj = $prj->liste_array();
|
|
||||||
|
|
||||||
$sel = new Form($db);
|
|
||||||
$sel->select_array("projetid",$listeprj,$don->projetid);
|
|
||||||
|
|
||||||
|
|
||||||
print "<br>";
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print "<tr><td>Don public</td><td><select name=\"public\">\n";
|
|
||||||
if ($don->public)
|
|
||||||
{
|
|
||||||
print '<option value="1" SELECTED>oui</option>';
|
|
||||||
print '<option value="0">non</option>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<option value="1">oui</option>';
|
|
||||||
print '<option value="0" SELECTED>non</option>';
|
|
||||||
}
|
|
||||||
print "</select><br>";
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print '<tr><td>Prénom</td><td><input type="text" name="prenom" size="40" value="'.$don->prenom.'"></td></tr>';
|
|
||||||
print '<tr><td>Nom</td><td><input type="text" name="nom" size="40" value="'.$don->nom.'"></td></tr>';
|
|
||||||
print '<tr><td>Societe</td><td><input type="text" name="societe" size="40" value="'.$don->societe.'"></td></tr>';
|
|
||||||
print '<tr><td>Adresse</td><td>';
|
print '<tr><td>Adresse</td><td>';
|
||||||
print '<textarea name="adresse" wrap="soft" cols="40" rows="3">'.$don->adresse.'</textarea></td></tr>';
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="3">'.$adh->adresse.'</textarea></td></tr>';
|
||||||
print '<tr><td>CP Ville</td><td><input type="text" name="cp" size="8" value="'.$don->cp.'"> <input type="text" name="ville" size="40" value="'.$don->ville.'"></td></tr>';
|
print '<tr><td>CP Ville</td><td><input type="text" name="cp" size="6" value="'.$adh->cp.'"> <input type="text" name="ville" size="20" value="'.$adh->ville.'"></td></tr>';
|
||||||
print '<tr><td>Pays</td><td><input type="text" name="pays" size="40" value="'.$don->pays.'"></td></tr>';
|
print '<tr><td>Pays</td><td><input type="text" name="pays" size="40" value="'.$adh->pays.'"></td></tr>';
|
||||||
print '<tr><td>Email</td><td><input type="text" name="email" size="40" value="'.$don->email.'"></td></tr>';
|
print '<tr><td>Email</td><td><input type="text" name="email" size="40" value="'.$adh->email.'"></td></tr>';
|
||||||
print '<tr><td>Montant</td><td><input type="text" name="amount" size="10" value="'.$don->amount.'"> euros</td></tr>';
|
print '<tr><td colspan="2" align="center">';
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"></td></tr>';
|
print '<input type="submit" name="bouton" value="Enregistrer"> ';
|
||||||
print "</form>\n";
|
print '<input type="submit" value="Annuler">';
|
||||||
print "</table>\n";
|
print '</td></tr>';
|
||||||
|
print '</form>';
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,91 +20,66 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require("../../don.class.php");
|
require("../adherent.class.php");
|
||||||
require("../../paiement.class.php");
|
require("../adherent_type.class.php");
|
||||||
|
require("../cotisation.class.php");
|
||||||
|
require("../paiement.class.php");
|
||||||
|
|
||||||
|
|
||||||
$db = new Db();
|
$db = new Db();
|
||||||
|
|
||||||
if ($action == 'add')
|
if ($HTTP_POST_VARS["action"] == 'cotisation')
|
||||||
{
|
{
|
||||||
|
$adh = new Adherent($db);
|
||||||
|
$adh->id = $rowid;
|
||||||
|
|
||||||
if ($amount > 0)
|
if ($cotisation > 0)
|
||||||
{
|
{
|
||||||
|
$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation);
|
||||||
$don = new Don($db);
|
|
||||||
|
|
||||||
$don->prenom = $prenom;
|
|
||||||
$don->nom = $nom;
|
|
||||||
$don->societe = $societe;
|
|
||||||
$don->adresse = $adresse;
|
|
||||||
$don->amount = $amount;
|
|
||||||
$don->cp = $cp;
|
|
||||||
$don->ville = $ville;
|
|
||||||
$don->email = $email;
|
|
||||||
$don->date = mktime(12, 0 , 0, $remonth, $reday, $reyear);
|
|
||||||
$don->note = $note;
|
|
||||||
$don->pays = $pays;
|
|
||||||
$don->public = $public;
|
|
||||||
$don->projetid = $projetid;
|
|
||||||
$don->commentaire = $HTTP_POST_VARS["comment"];
|
|
||||||
$don->modepaiementid = $modepaiement;
|
|
||||||
|
|
||||||
if ($don->create($user->id) )
|
|
||||||
{
|
|
||||||
Header("Location: index.php");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
print "Erreur";
|
|
||||||
$action = "create";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'delete')
|
|
||||||
{
|
|
||||||
$don = new Don($db);
|
|
||||||
$don->delete($rowid);
|
|
||||||
Header("Location: liste.php?statut=0");
|
|
||||||
}
|
|
||||||
if ($action == 'commentaire')
|
|
||||||
{
|
|
||||||
$don = new Don($db);
|
|
||||||
$don->set_commentaire($rowid,$HTTP_POST_VARS["commentaire"]);
|
|
||||||
$action = "edit";
|
$action = "edit";
|
||||||
}
|
}
|
||||||
if ($action == 'valid_promesse')
|
|
||||||
|
if ($HTTP_POST_VARS["action"] == 'add')
|
||||||
{
|
{
|
||||||
$don = new Don($db);
|
|
||||||
if ($don->valid_promesse($rowid, $user->id))
|
$adh = new Adherent($db);
|
||||||
|
|
||||||
|
$adh->prenom = $prenom;
|
||||||
|
$adh->nom = $nom;
|
||||||
|
$adh->societe = $societe;
|
||||||
|
$adh->adresse = $adresse;
|
||||||
|
$adh->cp = $cp;
|
||||||
|
$adh->ville = $ville;
|
||||||
|
$adh->email = $email;
|
||||||
|
$adh->note = $note;
|
||||||
|
$adh->pays = $pays;
|
||||||
|
$adh->typeid = $type;
|
||||||
|
$adh->commentaire = $HTTP_POST_VARS["comment"];
|
||||||
|
|
||||||
|
if ($adh->create($user->id) )
|
||||||
{
|
{
|
||||||
Header("Location: liste.php?statut=0");
|
if ($cotisation > 0)
|
||||||
}
|
{
|
||||||
}
|
$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation);
|
||||||
if ($action == 'set_paye')
|
}
|
||||||
{
|
Header("Location: liste.php");
|
||||||
$don = new Don($db);
|
|
||||||
if ($don->set_paye($rowid, $modepaiement))
|
|
||||||
{
|
|
||||||
Header("Location: liste.php?statut=1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($action == 'set_encaisse')
|
|
||||||
{
|
|
||||||
$don = new Don($db);
|
|
||||||
if ($don->set_encaisse($rowid))
|
|
||||||
{
|
|
||||||
Header("Location: liste.php?statut=2");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"] == yes)
|
||||||
|
{
|
||||||
|
$adh = new Adherent($db);
|
||||||
|
$adh->delete($rowid);
|
||||||
|
Header("Location: liste.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Création d'une fiche don */
|
/* Création d'une fiche */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -124,18 +99,37 @@ if ($action == 'create') {
|
|||||||
$total = $obj->total;
|
$total = $obj->total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_titre("Saisir un don");
|
print_titre("Nouvel adhérent");
|
||||||
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
||||||
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
||||||
|
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
print "<tr><td>Date du don</td><td>";
|
$htmls = new Form($db);
|
||||||
print_date_select();
|
$adht = new AdherentType($db);
|
||||||
print "</td>";
|
|
||||||
|
print "<tr><td>Type</td><td>";
|
||||||
|
$htmls->select_array("type", $adht->liste_array());
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
|
print '<tr><td>Prénom</td><td><input type="text" name="prenom" size="40"></td>';
|
||||||
|
|
||||||
print '<td rowspan="11" valign="top">Commentaires :<br>';
|
print '<td rowspan="11" valign="top">Commentaires :<br>';
|
||||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\"></textarea></td></tr>";
|
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\"></textarea></td></tr>";
|
||||||
|
|
||||||
|
|
||||||
|
print '<tr><td>Nom</td><td><input type="text" name="nom" size="40"></td></tr>';
|
||||||
|
print '<tr><td>Societe</td><td><input type="text" name="societe" size="40"></td></tr>';
|
||||||
|
print '<tr><td>Adresse</td><td>';
|
||||||
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="3"></textarea></td></tr>';
|
||||||
|
print '<tr><td>CP Ville</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="40"></td></tr>';
|
||||||
|
print '<tr><td>Pays</td><td><input type="text" name="pays" size="40"></td></tr>';
|
||||||
|
print '<tr><td>Email</td><td><input type="text" name="email" size="40"></td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
print "<tr><td>Date de cotisation</td><td>";
|
||||||
|
print_date_select();
|
||||||
|
print "</td></tr>";
|
||||||
print "<tr><td>Mode de paiement</td><td>\n";
|
print "<tr><td>Mode de paiement</td><td>\n";
|
||||||
|
|
||||||
$paiement = new Paiement($db);
|
$paiement = new Paiement($db);
|
||||||
@ -144,45 +138,8 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
print "<tr><td>Projet</td><td><select name=\"projetid\">\n";
|
print '<tr><td>Cotisation</td><td><input type="text" name="cotisation" size="6"> euros</td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT rowid, libelle FROM llx_don_projet ORDER BY rowid";
|
|
||||||
|
|
||||||
if ($db->query($sql))
|
|
||||||
{
|
|
||||||
$num = $db->num_rows();
|
|
||||||
$i = 0;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$objopt = $db->fetch_object( $i);
|
|
||||||
print "<option value=\"$objopt->rowid\">$objopt->libelle</option>\n";
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $db->error();
|
|
||||||
}
|
|
||||||
print "</select><br>";
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print "<tr><td>Don public</td><td><select name=\"public\">\n";
|
|
||||||
|
|
||||||
print '<option value="1">oui</option>';
|
|
||||||
print '<option value="0">non</option>';
|
|
||||||
|
|
||||||
print "</select><br>";
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print '<tr><td>Prénom</td><td><input type="text" name="prenom" size="40"></td></tr>';
|
|
||||||
print '<tr><td>Nom</td><td><input type="text" name="nom" size="40"></td></tr>';
|
|
||||||
print '<tr><td>Societe</td><td><input type="text" name="societe" size="40"></td></tr>';
|
|
||||||
print '<tr><td>Adresse</td><td>';
|
|
||||||
print '<textarea name="adresse" wrap="soft" cols="40" rows="3"></textarea></td></tr>';
|
|
||||||
print '<tr><td>CP Ville</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="40"></td></tr>';
|
|
||||||
print '<tr><td>Pays</td><td><input type="text" name="pays" size="40"></td></tr>';
|
|
||||||
print '<tr><td>Email</td><td><input type="text" name="email" size="40"></td></tr>';
|
|
||||||
print '<tr><td>Montant</td><td><input type="text" name="amount" size="10"> euros</td></tr>';
|
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"></td></tr>';
|
print '<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"></td></tr>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
@ -191,135 +148,184 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Edition de la fiche don */
|
/* Edition de la fiche */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($rowid > 0 && $action == 'edit')
|
if ($rowid > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$don = new Don($db);
|
$adh = new Adherent($db);
|
||||||
$don->id = $rowid;
|
$adh->id = $rowid;
|
||||||
$don->fetch($rowid);
|
$adh->fetch($rowid);
|
||||||
|
|
||||||
print_titre("Traitement du don");
|
print_titre("Edition de la fiche adhérent");
|
||||||
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
||||||
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
||||||
|
|
||||||
print "<tr><td>Date du don</td><td>";
|
print '<tr><td width="15%">Prénom</td><td class="valeur" width="35%">'.$adh->prenom.' </td>';
|
||||||
print strftime("%d %B %Y",$don->date);
|
|
||||||
print "</td>";
|
|
||||||
|
|
||||||
print '<td rowspan="11" valign="top" width="50%">Commentaires :<br>';
|
print '<td valign="top" width="50%">Commentaires</tr>';
|
||||||
print nl2br($don->commentaire).'</td></tr>';
|
|
||||||
|
|
||||||
if ($don->statut == 1)
|
print '<tr><td>Nom</td><td class="valeur">'.$adh->nom.' </td>';
|
||||||
{
|
|
||||||
print "<tr><td>Mode de paiement</td><td>";
|
|
||||||
$paiement = new Paiement($db);
|
|
||||||
$paiement->select("modepaiement","crédit", $don->modepaiementid);
|
|
||||||
print "</td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($don->statut > 1)
|
print '<td rowspan="11" valign="top" width="50%">';
|
||||||
{
|
print nl2br($adh->commentaire).' </td></tr>';
|
||||||
print "<tr><td>Mode de paiement</td><td>";
|
|
||||||
print $don->modepaiement;
|
|
||||||
print "</td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr><td>Projet</td><td>'.$don->projet.'</td></tr>';
|
print '<tr><td>Société</td><td class="valeur">'.$adh->societe.' </td></tr>';
|
||||||
|
print '<tr><td>Adresse</td><td class="valeur">'.nl2br($adh->adresse).' </td></tr>';
|
||||||
print "<tr><td>Don public</td><td>";
|
print '<tr><td>CP Ville</td><td class="valeur">'.$adh->cp.' '.$adh->ville.' </td></tr>';
|
||||||
|
print '<tr><td>Pays</td><td class="valeur">'.$adh->pays.' </td></tr>';
|
||||||
print $yn[$don->public];
|
print '<tr><td>Email</td><td class="valeur">'.$adh->email.' </td></tr>';
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>Prénom</td><td>'.$don->prenom.' </td></tr>';
|
|
||||||
print '<tr><td>Nom</td><td>'.$don->nom.' </td></tr>';
|
|
||||||
print '<tr><td>Société</td><td>'.$don->societe.' </td></tr>';
|
|
||||||
print '<tr><td>Adresse</td><td>'.nl2br($don->adresse).' </td></tr>';
|
|
||||||
print '<tr><td>CP Ville</td><td>'.$don->cp.' '.$don->ville.' </td></tr>';
|
|
||||||
print '<tr><td>Pays</td><td>'.$don->pays.' </td></tr>';
|
|
||||||
print '<tr><td>Email</td><td>'.$don->email.' </td></tr>';
|
|
||||||
print '<tr><td>Montant</td><td>'.price($don->amount).' euros</td></tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|
||||||
print "<p><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
|
if ($user->admin)
|
||||||
|
|
||||||
/*
|
|
||||||
* Case 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<td align="center" width="25%">[<a href="edit.php?rowid='.$don->id.'">Editer</a>]</td>';
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Case 2
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($don->statut == 1 && $resteapayer > 0)
|
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"25%\">[<a href=\"paiement.php3?facid=$facid&action=create\">Emettre un paiement</a>]</td>";
|
|
||||||
|
print "<p><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Case 1
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '<td align="center" width="25%">[<a href="edit.php?rowid='.$adh->id.'">Editer</a>]</td>';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Case 2
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($adh->statut == 1 && $resteapayer > 0)
|
||||||
|
{
|
||||||
|
print "<td align=\"center\" width=\"25%\">[<a href=\"paiement.php3?facid=$facid&action=create\">Emettre un paiement</a>]</td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "<td align=\"center\" width=\"25%\">-</td>";
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Case 3
|
||||||
|
*/
|
||||||
|
print "<td align=\"center\" width=\"25%\">-</td>";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Case 4
|
||||||
|
*/
|
||||||
|
if ($adh->statut == 0)
|
||||||
|
{
|
||||||
|
print "<td align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?rowid=$adh->id&action=delete\">Supprimer</a>]</td>";
|
||||||
|
}
|
||||||
|
elseif ($adh->statut == 2)
|
||||||
|
{
|
||||||
|
print "<td align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?rowid=$adh->id&action=set_encaisse\">Encaisser</a>]</td>";
|
||||||
}
|
}
|
||||||
elseif ($don->statut == 0)
|
else
|
||||||
|
{
|
||||||
|
print "<td align=\"center\" width=\"25%\">-</td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</tr></table></form><p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, c.cotisation, ".$db->pdate("c.dateadh")." as dateadh";
|
||||||
|
$sql .= " FROM llx_adherent as d, llx_cotisation as c";
|
||||||
|
$sql .= " WHERE d.rowid = c.fk_adherent AND d.rowid=$rowid";
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?rowid=$don->id&action=valid_promesse\">Valider la promesse</a>]</td>";
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
print "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||||
|
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print "<td>Cotisations</td>";
|
||||||
|
print "<td>Date</td>";
|
||||||
|
print "<td align=\"right\">Montant</TD>";
|
||||||
|
print "</TR>\n";
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object( $i);
|
||||||
|
$var=!$var;
|
||||||
|
print "<TR $bc[$var]><td> </td>";
|
||||||
|
print "<TD>".strftime("%d %B %Y",$objp->dateadh)."</td>\n";
|
||||||
|
print '<TD align="right">'.price($objp->cotisation).'</TD>';
|
||||||
|
print "</tr>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"25%\">-</td>";
|
print $sql;
|
||||||
|
print $db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Case 3
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
if ($don->statut == 1 && abs($resteapayer == 0) && $don->paye == 0)
|
print '<form method="post" action="'.$PHP_SELF.'?rowid='.$rowid.'&action=edit">';
|
||||||
|
print '<input type="hidden" name="action" value="cotisation">';
|
||||||
|
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
||||||
|
|
||||||
|
print '<tr><td width="15%">Fin adhésion</td><td width="35%" class="valeur">'.strftime("%d %B %Y",$adh->datefin).' </td>';
|
||||||
|
|
||||||
|
print '<td valign="top" width="50%"> </td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td colspan="3">Nouvelle adhésion</td></tr>';
|
||||||
|
|
||||||
|
print "<tr><td>Date de cotisation</td><td>";
|
||||||
|
print_date_select($adh->datefin + (3600*24));
|
||||||
|
print "</td><td> </td></tr>";
|
||||||
|
print "<tr><td>Mode de paiement</td><td>\n";
|
||||||
|
|
||||||
|
$paiement = new Paiement($db);
|
||||||
|
|
||||||
|
$paiement->select("modepaiement","crédit");
|
||||||
|
|
||||||
|
print "</td><td> </td></tr>\n";
|
||||||
|
print '<tr><td>Cotisation</td><td colspan="2"><input type="text" name="cotisation" size="6"> euros</td></tr>';
|
||||||
|
print '<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"</td></tr>';
|
||||||
|
print '</table>';
|
||||||
|
print "</form>";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Confirmation de la suppression de l'adhérent
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"25%\">";
|
|
||||||
|
|
||||||
print '<input type="hidden" name="action" value="set_paye">';
|
print '<form method="post" action="'.$PHP_SELF.'?rowid='.$rowid.'">';
|
||||||
print '<input type="hidden" name="rowid" value="'.$don->id.'">';
|
print '<input type="hidden" name="action" value="confirm_delete">';
|
||||||
|
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
||||||
|
|
||||||
print '<input type="submit" value="Classer Payé">';
|
print '<tr><td colspan="3">Supprimer un adhérent</td></tr>';
|
||||||
|
print "<tr><td colspan=\"3\">La suppression d'un adhérent entraine la suppression de toutes ses cotisations !!!</td></tr>";
|
||||||
|
|
||||||
|
print '<tr><td class="delete">Etes-vous sur de vouloir supprimer cet adhérent ?</td><td class="delete">';
|
||||||
|
$htmls = new Form($db);
|
||||||
|
|
||||||
|
$htmls->selectyesno("confirm","no");
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
print '<td class="delete" align="center"><input type="submit" value="Confirmer"</td></tr>';
|
||||||
else
|
print '</table>';
|
||||||
{
|
print "</form>";
|
||||||
print "<td align=\"center\" width=\"25%\">-</td>";
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Case 4
|
|
||||||
*/
|
|
||||||
if ($don->statut == 0)
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?rowid=$don->id&action=delete\">Supprimer</a>]</td>";
|
|
||||||
}
|
|
||||||
elseif ($don->statut == 2)
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?rowid=$don->id&action=set_encaisse\">Encaisser</a>]</td>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"25%\">-</td>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr></table></form><p>";
|
|
||||||
/* ************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* Commentaire */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
|
|
||||||
print "<form action=\"$PHP_SELF\" method=\"post\">";
|
|
||||||
print '<input type="hidden" name="action" value="commentaire">';
|
|
||||||
print '<input type="hidden" name="rowid" value="'.$don->id.'">';
|
|
||||||
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
|
|
||||||
print '<tr><td align="center">Commentaires</td></tr>';
|
|
||||||
print '<tr><td><textarea cols="60" rows="20" name="commentaire">'.$don->commentaire.'</textarea></td></tr>';
|
|
||||||
print '<tr><td align="center"><input type="submit" value="Enregistrer"></td></tr>';
|
|
||||||
print '</table></form>';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,16 @@ llxHeader();
|
|||||||
|
|
||||||
$db = new Db();
|
$db = new Db();
|
||||||
|
|
||||||
|
print_titre("Gestion des adherents");
|
||||||
|
|
||||||
|
print '<TABLE border="0" cellspacing="0" cellpadding="4">';
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print "<td> </td>";
|
||||||
|
print "<td>Somme</td>";
|
||||||
|
print "</TR>\n";
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT sum(d.amount) as somme , d.fk_statut FROM llx_don as d GROUP BY d.fk_statut";
|
$sql = "SELECT sum(d.amount) as somme , d.fk_statut FROM llx_don as d GROUP BY d.fk_statut";
|
||||||
|
|
||||||
@ -44,15 +54,6 @@ if ($result)
|
|||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste("Dons", $page, $PHP_SELF);
|
|
||||||
|
|
||||||
print '<TABLE border="0" cellspacing="0" cellpadding="4">';
|
|
||||||
print '<TR class="liste_titre">';
|
|
||||||
print "<td> </td>";
|
|
||||||
print "<td>Somme</td>";
|
|
||||||
print "</TR>\n";
|
|
||||||
|
|
||||||
$var=True;
|
|
||||||
|
|
||||||
for ($i = 0 ; $i < 4 ; $i++)
|
for ($i = 0 ; $i < 4 ; $i++)
|
||||||
{
|
{
|
||||||
@ -68,6 +69,8 @@ print "</table>";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
|
|||||||
85
htdocs/adherents/liste.php
Normal file
85
htdocs/adherents/liste.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* 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.php");
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
|
$db = new Db();
|
||||||
|
|
||||||
|
if ($sortorder == "") { $sortorder="DESC"; }
|
||||||
|
if ($sortfield == "") { $sortfield="d.nom"; }
|
||||||
|
|
||||||
|
if ($page == -1) { $page = 0 ; }
|
||||||
|
|
||||||
|
$offset = $conf->liste_limit * $page ;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin";
|
||||||
|
$sql .= " , d.email, t.libelle as type";
|
||||||
|
$sql .= " FROM llx_adherent as d, llx_adherent_type as t";
|
||||||
|
$sql .= " WHERE d.fk_adherent_type = t.rowid";
|
||||||
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
print_barre_liste("Liste des adhérents", $page, $PHP_SELF, "&statut=$statut");
|
||||||
|
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||||
|
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print "<td>Prenom Nom / Société</td>";
|
||||||
|
print "<td>Date</td>";
|
||||||
|
print "<td>Email</td>";
|
||||||
|
print "<td>Type</td>";
|
||||||
|
print "</TR>\n";
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object( $i);
|
||||||
|
$var=!$var;
|
||||||
|
print "<TR $bc[$var]>";
|
||||||
|
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."</a></TD>\n";
|
||||||
|
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)."</a></td>\n";
|
||||||
|
print "<TD>$objp->email</TD>\n";
|
||||||
|
print "<TD>$objp->type</TD>\n";
|
||||||
|
print "</tr>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $sql;
|
||||||
|
print $db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
|
?>
|
||||||
@ -44,7 +44,7 @@ if ($result)
|
|||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste("Dons", $page, $PHP_SELF);
|
print_titre("Dons");
|
||||||
|
|
||||||
print '<TABLE border="0" cellspacing="0" cellpadding="4">';
|
print '<TABLE border="0" cellspacing="0" cellpadding="4">';
|
||||||
print '<TR class="liste_titre">';
|
print '<TR class="liste_titre">';
|
||||||
|
|||||||
@ -144,17 +144,17 @@ class DonConf {
|
|||||||
Function DonConf() {
|
Function DonConf() {
|
||||||
$this->enabled = 0;
|
$this->enabled = 0;
|
||||||
|
|
||||||
/*
|
/* Paiement en ligne */
|
||||||
* Paiement en ligne
|
|
||||||
*/
|
|
||||||
|
|
||||||
$this->onlinepayment = 0;
|
$this->onlinepayment = 0;
|
||||||
|
|
||||||
/*
|
/* Don minimum, 0 pas de limite */
|
||||||
* Don minimum, 0 pas de limite
|
|
||||||
*/
|
|
||||||
$this->minimum = 0;
|
$this->minimum = 0;
|
||||||
|
|
||||||
|
/* Email des moderateurs */
|
||||||
|
|
||||||
|
$this->email_moderator = "root@localhost";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
464
htdocs/cotisation.class.php
Normal file
464
htdocs/cotisation.class.php
Normal file
@ -0,0 +1,464 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* 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$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Cotisation
|
||||||
|
{
|
||||||
|
var $id;
|
||||||
|
var $db;
|
||||||
|
var $date;
|
||||||
|
var $amount;
|
||||||
|
var $prenom;
|
||||||
|
var $nom;
|
||||||
|
var $societe;
|
||||||
|
var $adresse;
|
||||||
|
var $cp;
|
||||||
|
var $ville;
|
||||||
|
var $pays;
|
||||||
|
var $email;
|
||||||
|
var $public;
|
||||||
|
var $projetid;
|
||||||
|
var $modepaiement;
|
||||||
|
var $modepaiementid;
|
||||||
|
var $commentaire;
|
||||||
|
var $statut;
|
||||||
|
|
||||||
|
var $projet;
|
||||||
|
var $errorstr;
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function Cotisation($DB, $soc_idp="")
|
||||||
|
{
|
||||||
|
$this->db = $DB ;
|
||||||
|
$this->modepaiementid = 0;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function print_error_list()
|
||||||
|
{
|
||||||
|
$num = sizeof($this->errorstr);
|
||||||
|
for ($i = 0 ; $i < $num ; $i++)
|
||||||
|
{
|
||||||
|
print "<li>" . $this->errorstr[$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function check($minimum=0)
|
||||||
|
{
|
||||||
|
$err = 0;
|
||||||
|
|
||||||
|
if (strlen(trim($this->societe)) == 0)
|
||||||
|
{
|
||||||
|
if ((strlen(trim($this->nom)) + strlen(trim($this->prenom))) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Vous devez saisir vos nom et prénom ou le nom de votre société.";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->adresse)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "L'adresse saisie est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->cp)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le code postal saisi est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->ville)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "La ville saisie est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(trim($this->email)) == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "L'email saisi est invalide";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->amount = trim($this->amount);
|
||||||
|
|
||||||
|
$map = range(0,9);
|
||||||
|
for ($i = 0; $i < strlen($this->amount) ; $i++)
|
||||||
|
{
|
||||||
|
if (!isset($map[substr($this->amount, $i, 1)] ))
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le montant du don contient un/des caractère(s) invalide(s)";
|
||||||
|
$err++;
|
||||||
|
$amount_invalid = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $amount_invalid)
|
||||||
|
{
|
||||||
|
if ($this->amount == 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le montant du don est null";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($this->amount < $minimum && $minimum > 0)
|
||||||
|
{
|
||||||
|
$error_string[$err] = "Le montant minimum du don est de $minimum";
|
||||||
|
$err++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return errors
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($err)
|
||||||
|
{
|
||||||
|
$this->errorstr = $error_string;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Création
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function create($userid)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Insertion dans la base
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->date = $this->db->idate($this->date);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO llx_don (datec, amount, fk_paiement,prenom, nom, societe,adresse, cp, ville, pays, public, fk_don_projet, note, fk_user_author, datedon, email)";
|
||||||
|
$sql .= " VALUES (now(), $this->amount, $this->modepaiementid,'$this->prenom','$this->nom','$this->societe','$this->adresse', '$this->cp','$this->ville','$this->pays',$this->public, $this->projetid, '$this->commentaire', $userid, '$this->date','$this->email')";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
return $this->db->last_insert_id();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
print "<h2><br>$sql<br></h2>";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mise à jour
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function update($userid)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->date = $this->db->idate($this->date);
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_don SET ";
|
||||||
|
$sql .= "amount = " . $this->amount;
|
||||||
|
$sql .= ",fk_paiement = ".$this->modepaiementid;
|
||||||
|
$sql .= ",prenom = '".$this->prenom ."'";
|
||||||
|
$sql .= ",nom='".$this->nom."'";
|
||||||
|
$sql .= ",societe='".$this->societe."'";
|
||||||
|
$sql .= ",adresse='".$this->adresse."'";
|
||||||
|
$sql .= ",cp='".$this->cp."'";
|
||||||
|
$sql .= ",ville='".$this->ville."'";
|
||||||
|
$sql .= ",pays='".$this->pays."'";
|
||||||
|
$sql .= ",public=".$this->public;
|
||||||
|
$sql .= ",fk_don_projet=".$this->projetid;
|
||||||
|
$sql .= ",note='".$this->commentaire."'";
|
||||||
|
$sql .= ",datedon='".$this->date."'";
|
||||||
|
$sql .= ",email='".$this->email."'";
|
||||||
|
$sql .= ",fk_statut=".$this->statut;
|
||||||
|
|
||||||
|
$sql .= " WHERE rowid = $this->id";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
print "<h2><br>$sql<br></h2>";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Suppression du don
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function delete($rowid)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "DELETE FROM llx_don WHERE rowid = $rowid AND fk_statut = 0;";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Fetch
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function fetch($rowid)
|
||||||
|
{
|
||||||
|
$sql = "SELECT d.rowid, ".$this->db->pdate("d.datedon")." as datedon, d.prenom, d.nom, d.societe, d.amount, p.libelle as projet, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.fk_don_projet";
|
||||||
|
$sql .= " FROM llx_don as d, llx_don_projet as p, c_paiement as cp";
|
||||||
|
$sql .= " WHERE p.rowid = d.fk_don_projet AND cp.id = d.fk_paiement AND d.rowid = $rowid";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ($this->db->num_rows())
|
||||||
|
{
|
||||||
|
|
||||||
|
$obj = $this->db->fetch_object(0);
|
||||||
|
|
||||||
|
$this->id = $obj->rowid;
|
||||||
|
$this->date = $obj->datedon;
|
||||||
|
$this->prenom = stripslashes($obj->prenom);
|
||||||
|
$this->nom = stripslashes($obj->nom);
|
||||||
|
$this->societe = stripslashes($obj->societe);
|
||||||
|
$this->statut = $obj->fk_statut;
|
||||||
|
$this->adresse = stripslashes($obj->adresse);
|
||||||
|
$this->cp = stripslashes($obj->cp);
|
||||||
|
$this->ville = stripslashes($obj->ville);
|
||||||
|
$this->email = stripslashes($obj->email);
|
||||||
|
$this->pays = stripslashes($obj->pays);
|
||||||
|
$this->projet = $obj->projet;
|
||||||
|
$this->projetid = $obj->fk_don_projet;
|
||||||
|
$this->public = $obj->public;
|
||||||
|
$this->modepaiementid = $obj->fk_paiement;
|
||||||
|
$this->modepaiement = $obj->libelle;
|
||||||
|
$this->amount = $obj->amount;
|
||||||
|
$this->commentaire = stripslashes($obj->note);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Suppression du don
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function valid_promesse($rowid, $userid)
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_don SET fk_statut = 1, fk_user_valid = $userid WHERE rowid = $rowid AND fk_statut = 0;";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Classé comme payé, le don a été recu
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function set_paye($rowid, $modepaiement='')
|
||||||
|
{
|
||||||
|
$sql = "UPDATE llx_don SET fk_statut = 2";
|
||||||
|
|
||||||
|
if ($modepaiement)
|
||||||
|
{
|
||||||
|
$sql .= ", fk_paiement=$modepaiement";
|
||||||
|
}
|
||||||
|
$sql .= " WHERE rowid = $rowid AND fk_statut = 1;";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Classé comme payé, le don a été recu
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function set_commentaire($rowid, $commentaire='')
|
||||||
|
{
|
||||||
|
$sql = "UPDATE llx_don SET note = '$commentaire'";
|
||||||
|
|
||||||
|
$sql .= " WHERE rowid = $rowid ;";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Classé comme encaissé
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function set_encaisse($rowid)
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_don SET fk_statut = 3 WHERE rowid = $rowid AND fk_statut = 2;";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ( $this->db->affected_rows() )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Err : ".$this->db->error();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Somme des dons encaissés
|
||||||
|
*/
|
||||||
|
Function sum_actual()
|
||||||
|
{
|
||||||
|
$sql = "SELECT sum(amount)";
|
||||||
|
$sql .= " FROM llx_don";
|
||||||
|
$sql .= " WHERE fk_statut = 3";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
$row = $this->db->fetch_row(0);
|
||||||
|
|
||||||
|
return $row[0];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Paiement recu en attente d'encaissement
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function sum_pending()
|
||||||
|
{
|
||||||
|
$sql = "SELECT sum(amount)";
|
||||||
|
$sql .= " FROM llx_don";
|
||||||
|
$sql .= " WHERE fk_statut = 2";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
$row = $this->db->fetch_row(0);
|
||||||
|
|
||||||
|
return $row[0];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Somme des promesses de dons validées
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function sum_intent()
|
||||||
|
{
|
||||||
|
$sql = "SELECT sum(amount)";
|
||||||
|
$sql .= " FROM llx_don";
|
||||||
|
$sql .= " WHERE fk_statut = 1";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
$row = $this->db->fetch_row(0);
|
||||||
|
|
||||||
|
return $row[0];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@ -17,6 +17,11 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Classe de gestion du système de paiement de la banque Populaire
|
||||||
|
* de Lorraine et Champagne
|
||||||
|
* http://www.cyberpaiement.tm.fr/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -191,7 +196,7 @@ class Cyberpaiement
|
|||||||
print "\n";
|
print "\n";
|
||||||
print '<input type="hidden" name="CHAMP006" value="'.$this->champ006.'">';
|
print '<input type="hidden" name="CHAMP006" value="'.$this->champ006.'">';
|
||||||
print "\n";
|
print "\n";
|
||||||
print '<input type="hidden" name="CHAMP007" value="'.$this->champ007.'">';
|
print '<input type="hidden" name="CHAMP007" value="'.$this->champ007.'ref='.$this->champ200.'">';
|
||||||
print "\n";
|
print "\n";
|
||||||
print '<input type="hidden" name="CHAMP008" value="'.$this->champ008.'">';
|
print '<input type="hidden" name="CHAMP008" value="'.$this->champ008.'">';
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|||||||
@ -178,7 +178,7 @@ class Don
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
return 1;
|
return $this->db->last_insert_id();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -126,7 +126,27 @@ class Form {
|
|||||||
{
|
{
|
||||||
return $this->errorstr;
|
return $this->errorstr;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Yes/No
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function selectyesno($name,$value='')
|
||||||
|
{
|
||||||
|
print '<select name="'.$name.'">';
|
||||||
|
|
||||||
|
if ($value == 'yes')
|
||||||
|
{
|
||||||
|
print '<option value="yes" SELECTED>oui</option>';
|
||||||
|
print '<option value="no">non</option>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<option value="yes">oui</option>';
|
||||||
|
print '<option value="no" SELECTED>non</option>';
|
||||||
|
}
|
||||||
|
print '</select>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,6 +53,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<script language="php">
|
||||||
|
require("merci_code.php");
|
||||||
|
</script>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
L'initiative <a href="http://eucd.info/">EUCD.INFO</a> a
|
L'initiative <a href="http://eucd.info/">EUCD.INFO</a> a
|
||||||
pour objet de préserver l'intérêt général menacé par la
|
pour objet de préserver l'intérêt général menacé par la
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<input type="hidden" name="CHAMP906" value="0000">
|
<input type="hidden" name="CHAMP906" value="0000">
|
||||||
|
|
||||||
<input type="hidden" name="CHAMP002" value="1234567890">
|
<input type="hidden" name="CHAMP002" value="1234567890">
|
||||||
<input type="hidden" name="CHAMP200" value="123456789012345">
|
<input type="hidden" name="CHAMP200" value="1">
|
||||||
<input type="hidden" name="CHAMP201" value="200">
|
<input type="hidden" name="CHAMP201" value="200">
|
||||||
|
|
||||||
<input type="submit" value="Test Retour">
|
<input type="submit" value="Test Retour">
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- $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
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
@ -16,6 +13,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$
|
||||||
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
-- statut
|
-- statut
|
||||||
@ -27,7 +27,7 @@ create table llx_adherent
|
|||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
statut smallint NOT NULL DEFAULT 0,
|
statut smallint NOT NULL DEFAULT 0,
|
||||||
fk_adherent_type smallint
|
fk_adherent_type smallint,
|
||||||
datec datetime,
|
datec datetime,
|
||||||
prenom varchar(50),
|
prenom varchar(50),
|
||||||
nom varchar(50),
|
nom varchar(50),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user