*** empty log message ***

This commit is contained in:
Rodolphe Quiedeville 2002-12-27 21:54:03 +00:00
parent e4efd9cb3f
commit 205846f7cf
3 changed files with 47 additions and 9 deletions

View File

@ -59,8 +59,7 @@ if ($action == 'add')
print "Erreur";
$action = "create";
}
}
}
if ($action == 'delete')
{
@ -130,10 +129,6 @@ if ($action == 'create') {
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">';
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
print "<input type=\"hidden\" name=\"facid\" value=\"$facid\">";
print "<input type=\"hidden\" name=\"facnumber\" value=\"$obj->facnumber\">";
print "<input type=\"hidden\" name=\"socid\" value=\"$obj->idp\">";
print "<input type=\"hidden\" name=\"societe\" value=\"$obj->nom\">";
print "<tr><td>Date du don :</td><td>";
print_date_select();

View File

@ -159,7 +159,7 @@ class Don
}
/*
*
* Création
*
*
*/
@ -188,6 +188,48 @@ class Don
}
}
/*
* 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 .= " 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
*
@ -222,7 +264,7 @@ class Don
*/
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";
$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";
@ -245,6 +287,7 @@ class Don
$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;

View File

@ -49,7 +49,7 @@ class Form {
$num = $this->db->num_rows();
$i = 0;
if (strlen($id))
if (strlen("$id"))
{
while ($i < $num)
{