*** empty log message ***
This commit is contained in:
parent
052c51f86f
commit
f6cf259853
@ -33,13 +33,17 @@ if ($action == 'add')
|
||||
|
||||
$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->modepaiementid = $modepaiement;
|
||||
@ -121,13 +125,8 @@ if ($action == 'create') {
|
||||
print_date_select();
|
||||
print "</td>";
|
||||
|
||||
print '<td rowspan="9" 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>";
|
||||
|
||||
$author = $GLOBALS["REMOTE_USER"];
|
||||
print "<input type=\"hidden\" name=\"author\" value=\"$author\">\n";
|
||||
|
||||
|
||||
print "<tr><td>Type :</td><td>\n";
|
||||
|
||||
$paiement = new Paiement($db);
|
||||
@ -140,7 +139,6 @@ if ($action == 'create') {
|
||||
|
||||
$sql = "SELECT rowid, libelle FROM llx_don_projet ORDER BY rowid";
|
||||
|
||||
|
||||
if ($db->query($sql))
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
@ -167,14 +165,15 @@ if ($action == 'create') {
|
||||
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>Adresse</td><td><input type="text" name="adresse" 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 "</form>\n";
|
||||
print "</table>\n";
|
||||
@ -201,12 +200,9 @@ if ($rowid > 0 && $action == 'edit')
|
||||
print strftime("%d %B %Y",$don->date);
|
||||
print "</td>";
|
||||
|
||||
print '<td rowspan="9" valign="top" width="50%">Commentaires :<br>';
|
||||
print '<td rowspan="11" valign="top" width="50%">Commentaires :<br>';
|
||||
print nl2br($don->commentaire).'</td></tr>';
|
||||
|
||||
$author = $GLOBALS["REMOTE_USER"];
|
||||
print "<input type=\"hidden\" name=\"author\" value=\"$author\">\n";
|
||||
|
||||
if ($don->statut == 1)
|
||||
{
|
||||
print "<tr><td>Type :</td><td>";
|
||||
@ -230,11 +226,13 @@ if ($rowid > 0 && $action == 'edit')
|
||||
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>Adresse</td><td>'.$don->adresse.' </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";
|
||||
|
||||
@ -55,7 +55,7 @@ $pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
$sql = "SELECT d.rowid, ".$db->pdate("d.datedon")." as datedon, d.nom, d.amount, p.libelle as projet";
|
||||
$sql = "SELECT d.rowid, ".$db->pdate("d.datedon")." as datedon, d.prenom, d.nom, d.societe, d.amount, p.libelle as projet";
|
||||
$sql .= " FROM llx_don as d, llx_don_projet as p";
|
||||
$sql .= " WHERE p.rowid = d.fk_don_projet AND d.fk_statut = $statut";
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
|
||||
@ -70,7 +70,7 @@ if ($result)
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
|
||||
print '<TR class="liste_titre">';
|
||||
print "<td>Nom</td>";
|
||||
print "<td>Prenom Nom / Société</td>";
|
||||
print "<td>Date</td>";
|
||||
print "<td>Projet</td>";
|
||||
print "<td align=\"right\">Montant</TD>";
|
||||
@ -83,7 +83,7 @@ if ($result)
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".stripslashes($objp->nom)."</a></TD>\n";
|
||||
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->datedon)."</a></td>\n";
|
||||
print "<TD>$objp->projet</TD>\n";
|
||||
print '<TD align="right">'.price($objp->amount).'</TD><td> </td>';
|
||||
|
||||
@ -24,13 +24,16 @@ class Don
|
||||
{
|
||||
var $id;
|
||||
var $db;
|
||||
var $date;
|
||||
var $amount;
|
||||
var $prenom;
|
||||
var $nom;
|
||||
var $societe;
|
||||
var $adresse;
|
||||
var $cp;
|
||||
var $ville;
|
||||
var $date;
|
||||
var $pays;
|
||||
var $email;
|
||||
var $public;
|
||||
var $projetid;
|
||||
var $modepaiement;
|
||||
@ -71,10 +74,14 @@ class Don
|
||||
Function check()
|
||||
{
|
||||
$err = 0;
|
||||
if (strlen(trim($this->nom)) == 0)
|
||||
|
||||
if (strlen(trim($this->societe)) == 0)
|
||||
{
|
||||
$error_string[$err] = "Le nom saisi est invalide";
|
||||
$err++;
|
||||
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)
|
||||
@ -95,12 +102,30 @@ class Don
|
||||
$err++;
|
||||
}
|
||||
|
||||
if ($this->amount == 0)
|
||||
if (strlen(trim($this->email)) == 0)
|
||||
{
|
||||
$error_string[$err] = "Le montant du don est invalide";
|
||||
$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++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->amount == 0)
|
||||
{
|
||||
$error_string[$err] = "Le montant du don est null";
|
||||
$err++;
|
||||
}
|
||||
|
||||
if ($err)
|
||||
{
|
||||
@ -126,8 +151,8 @@ class Don
|
||||
|
||||
$this->date = $this->db->idate($this->date);
|
||||
|
||||
$sql = "INSERT INTO llx_don (datec, amount, fk_paiement, nom, adresse, cp, ville, pays, public, fk_don_projet, note, fk_user_author, datedon)";
|
||||
$sql .= " VALUES (now(), $this->amount, $this->modepaiementid,'$this->nom','$this->adresse', '$this->cp','$this->ville','$this->pays',$this->public, $this->projetid, '$this->commentaire', $userid, '$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);
|
||||
|
||||
@ -177,7 +202,7 @@ class Don
|
||||
*/
|
||||
Function fetch($rowid)
|
||||
{
|
||||
$sql = "SELECT d.rowid, ".$this->db->pdate("d.datedon")." as datedon, d.nom, d.amount, p.libelle as projet, d.fk_statut, d.adresse, d.cp, d.ville, d.public, d.amount, d.fk_paiement, d.note, cp.libelle";
|
||||
$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 .= " 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";
|
||||
|
||||
@ -189,11 +214,15 @@ class Don
|
||||
$obj = $this->db->fetch_object(0);
|
||||
|
||||
$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->public = $obj->public;
|
||||
$this->modepaiementid = $obj->fk_paiement;
|
||||
|
||||
@ -28,20 +28,21 @@
|
||||
<tr id="projet">
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="public">
|
||||
<select name="public">
|
||||
<option value="1">oui</option>
|
||||
<option value="0">non</option>
|
||||
</select>
|
||||
</tr>
|
||||
|
||||
<tr id="prenom">
|
||||
<input type="text" name="prenom" size="30" />
|
||||
</tr>
|
||||
|
||||
<tr id="nom">
|
||||
<input type="text" name="nom" size="40" />
|
||||
</tr>
|
||||
|
||||
<tr id="societe">
|
||||
<input type="text" name="societe" size="40" />
|
||||
</tr>
|
||||
|
||||
<tr id="adresse">
|
||||
<input type="text" name="adresse" size="40" />
|
||||
<textarea name="adresse" wrap="soft" cols="40" rows="3"></textarea>
|
||||
</tr>
|
||||
|
||||
<tr id="cp">
|
||||
@ -49,24 +50,35 @@
|
||||
</tr>
|
||||
|
||||
<tr id="ville">
|
||||
<input type="text" name="ville" size="40" />
|
||||
<input type="text" name="ville" size="30" />
|
||||
</tr>
|
||||
|
||||
<tr id="pays">
|
||||
<input type="text" name="pays" size="25" value="France"/>
|
||||
</tr>
|
||||
|
||||
<tr id="email">
|
||||
<input type="text" name="email" size="40" />
|
||||
<input type="text" name="email" size="50" />
|
||||
</tr>
|
||||
|
||||
<tr id="montant">
|
||||
<input type="text" name="montant" size="10" />
|
||||
</tr>
|
||||
|
||||
<tr id="public">
|
||||
<select name="public">
|
||||
<option value="1">oui/yes</option>
|
||||
<option value="0">non/no</option>
|
||||
</select>
|
||||
</tr>
|
||||
|
||||
<tr id="commentaire">
|
||||
<textarea name="commentaire" wrap="soft" cols="40" rows="6"></textarea>
|
||||
<textarea name="commentaire" wrap="soft" cols="40" rows="6"></textarea>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="center" class="titre">
|
||||
<input type="submit" value="Enregistrer" />
|
||||
<td colspan="3" align="center" class="titre">
|
||||
<input type="submit" value="Enregistrer / Submit" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -41,21 +41,29 @@
|
||||
|
||||
<tr id="projet">
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="public">
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="prenom">
|
||||
<script language="php">
|
||||
print $don->prenom;
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="nom">
|
||||
<script language="php">
|
||||
print $don->nom;
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="societe">
|
||||
<script language="php">
|
||||
print $don->societe;
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="adresse">
|
||||
<script language="php">
|
||||
print "$don->adresse";
|
||||
print nl2br(stripslashes($don->adresse));
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
@ -71,6 +79,12 @@
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="pays">
|
||||
<script language="php">
|
||||
print $don->pays;
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="email">
|
||||
<script language="php">
|
||||
print $don->email;
|
||||
@ -79,9 +93,23 @@
|
||||
|
||||
<tr id="montant">
|
||||
<script language="php">
|
||||
print number_format($don->amount, 2, '.', ' ');
|
||||
print $don->amount;
|
||||
</script>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
<tr id="public">
|
||||
<script language="php">
|
||||
$yn[0]="non/no";
|
||||
$yn[1]="oui/yes";
|
||||
print $yn[$don->public];
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
<tr id="commentaire">
|
||||
<script language="php">
|
||||
print nl2br(stripslashes($don->commentaire));
|
||||
</script>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
@ -5,13 +5,15 @@
|
||||
<!-- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -->
|
||||
<!-- $Id$ -->
|
||||
|
||||
<xsl:template match="/html[@lang='fr']/body/div[@class='main']/form/table[@id='formulaire']">
|
||||
<xsl:template match="table[@id='formulaire']">
|
||||
<table cellpadding="4" cellspacing="0">
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</table>
|
||||
<p>
|
||||
La FSF France s'engage à n'utliser vos informations personnelles
|
||||
qu'exclusivement pour le traitement de votre don.
|
||||
qu'exclusivement pour le traitement de votre don. Vous ne
|
||||
receverez aucun email de la la part de la FSF France autre que
|
||||
pour la gestion de votre don.
|
||||
</p>
|
||||
|
||||
|
||||
@ -166,7 +168,7 @@
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/html[@lang='fr']/body/div[@class='main']/form/table/tr[@id='montant']">
|
||||
<xsl:template match="table/tr[@id='montant']">
|
||||
<tr>
|
||||
<td class="titre">
|
||||
Montant
|
||||
@ -188,8 +190,7 @@
|
||||
<td class="valeur">
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
<div class="commentaire">
|
||||
Acceptez-vous vos noms
|
||||
et prénoms soient affichés dans la liste des <a href="donateurs.php">donateurs</a> ?<br />
|
||||
Acceptez-vous vos noms et prénoms ou le nom de votre société soient affichés dans la liste des <a href="donateurs.php">donateurs</a> ?<br />
|
||||
Do you allow us to list your name, firstaname or company name on the donations list ?
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -29,23 +29,26 @@ $conf = new Conf();
|
||||
if ($conf->don->enabled)
|
||||
{
|
||||
|
||||
$db = new Db();
|
||||
$don = new Don($db);
|
||||
|
||||
$don->projetid = $HTTP_POST_VARS["projetid"];
|
||||
$don->date = time();
|
||||
$don->prenom = $HTTP_POST_VARS["prenom"];
|
||||
$don->nom = $HTTP_POST_VARS["nom"];
|
||||
$don->societe = $HTTP_POST_VARS["societe"];
|
||||
$don->adresse = $HTTP_POST_VARS["adresse"];
|
||||
$don->cp = $HTTP_POST_VARS["cp"];
|
||||
$don->ville = $HTTP_POST_VARS["ville"];
|
||||
$don->pays = $HTTP_POST_VARS["pays"];
|
||||
$don->public = $HTTP_POST_VARS["public"];
|
||||
$don->email = $HTTP_POST_VARS["email"];
|
||||
$don->amount = $HTTP_POST_VARS["montant"];
|
||||
$don->commentaire = $HTTP_POST_VARS["commentaire"];
|
||||
|
||||
|
||||
if ($HTTP_POST_VARS["action"] == 'add')
|
||||
{
|
||||
|
||||
$db = new Db();
|
||||
$don = new Don($db);
|
||||
|
||||
$don->projetid = $HTTP_POST_VARS["projetid"];
|
||||
$don->date = time();
|
||||
$don->nom = $HTTP_POST_VARS["nom"];
|
||||
$don->adresse = $HTTP_POST_VARS["adresse"];
|
||||
$don->cp = $HTTP_POST_VARS["cp"];
|
||||
$don->ville = $HTTP_POST_VARS["ville"];
|
||||
$don->public = $HTTP_POST_VARS["public"];
|
||||
$don->email = $HTTP_POST_VARS["email"];
|
||||
$don->amount = $HTTP_POST_VARS["montant"];
|
||||
$don->commentaire = $HTTP_POST_VARS["commentaire"];
|
||||
|
||||
|
||||
if ($don->check())
|
||||
{
|
||||
@ -58,20 +61,6 @@ if ($conf->don->enabled)
|
||||
}
|
||||
elseif ($HTTP_POST_VARS["action"] == 'valid')
|
||||
{
|
||||
|
||||
$db = new Db();
|
||||
$don = new Don($db);
|
||||
|
||||
$don->projetid = $HTTP_POST_VARS["projetid"];
|
||||
$don->date = time();
|
||||
$don->nom = $HTTP_POST_VARS["nom"];
|
||||
$don->adresse = $HTTP_POST_VARS["adresse"];
|
||||
$don->cp = $HTTP_POST_VARS["cp"];
|
||||
$don->ville = $HTTP_POST_VARS["ville"];
|
||||
$don->public = $HTTP_POST_VARS["public"];
|
||||
$don->email = $HTTP_POST_VARS["email"];
|
||||
$don->amount = $HTTP_POST_VARS["montant"];
|
||||
$don->commentaire = $HTTP_POST_VARS["commentaire"];
|
||||
|
||||
if ($don->check())
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user