public function __construct(User $_user, $_intitule, $_site, $_montant, $_msg, $_montantmin = 0, $_montantmax = 999, $_asso_id = 0, $_evt = 0, $_public = false, $_stamp = 0)
{
parent::__construct($_user, false, 'paiements', $_stamp);
$this->titre = $_intitule;
$this->site = $_site;
$this->msg_reponse = $_msg;
$this->asso_id = (string) $_asso_id;
$this->evt = (string) $_evt;
$this->montant = $_montant;
$this->montant_min = $_montantmin;
$this->montant_max = $_montantmax;
$this->public = $_public;
if ($_asso_id) {
$res = XDB::query("SELECT nom FROM groups WHERE id = {?}", $_asso_id);
$this->asso = $res->fetchOneCell();
}
if ($_asso_id && $_evt) {
$res = XDB::query("SELECT intitule FROM group_events WHERE asso_id = {?} AND eid = {?}", $_asso_id, $_evt);
$this->evt_intitule = $res->fetchOneCell();
}
// for future use, when anims can choose there bankaccounts
if ($this->rib_id) {
$res = XDB::query("SELECT owner FROM payment_bankaccounts WHERE id = {?}", $this->rib_id);
$this->rib_nom = $res->fetchOneCell();
}
}