header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
- readfile(dirname(__FILE__).'/../htdocs.net/images/dflt_carre.jpg');
+ readfile(dirname(__FILE__).'/../htdocs/images/dflt_carre.jpg');
}
exit;
IF(m.origine='X',u.promo,'extérieur') AS promo,
IF(m.origine='X',u.promo,'') AS promo_o,
IF(m.origine='X',a.alias,m.email) AS email,
- IF(m.origine='X',FIND_IN_SET('femme', u.flags),0) AS femme,
+ IF(m.origine='X',FIND_IN_SET('femme', u.flags), m.sexe) AS femme,
m.perms='admin' AS admin,
m.origine='X' AS x,
m.uid
LEFT JOIN auth_user_md5 AS u ON ( u.user_id = m.uid )
LEFT JOIN aliases AS a ON ( a.id = m.uid AND a.type='a_vie' )
WHERE m.asso_id = {?} $ini
+ AND (m.origine = 'ext' OR u.perms != 'pending')
ORDER BY $tri
LIMIT {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE);
$u, $globals->asso('id'));
$n = $res->fetchOneCell();
if ($n) {
- $page->trig("$prenom $nom est déjà membre du groupe !");
+ $page->kill("$prenom $nom est déjà membre du groupe !");
return;
}
elseif (Env::has('accept'))
{
XDB::execute("INSERT INTO groupex.membres
- VALUES ({?}, {?}, 'membre', 'X', NULL, NULL, NULL, NULL)",
+ VALUES ({?}, {?}, 'membre', 'X', NULL, NULL, NULL, NULL, NULL)",
$globals->asso('id'), $uid);
require_once 'diogenes/diogenes.hermes.inc.php';
$mailer = new HermesMailer();
if (Post::has('change')) {
if ($user['origine'] != 'X') {
XDB::query('UPDATE groupex.membres
- SET prenom={?}, nom={?}, email={?}
- WHERE uid={?} AND asso_id={?}',
- Post::v('prenom'), Post::v('nom'),
- Post::v('email'), $user['uid'],
- $globals->asso('id'));
+ SET prenom={?}, nom={?}, email={?}, sexe={?}
+ WHERE uid={?} AND asso_id={?}',
+ Post::v('prenom'), Post::v('nom'),
+ Post::v('email'), Post::v('sexe'),
+ $user['uid'], $globals->asso('id'));
$user['nom'] = Post::v('nom');
$user['prenom'] = Post::v('prenom');
+ $user['sexe'] = Post::v('sexe');
$user['email'] = Post::v('email');
$user['email2'] = Post::v('email');
}
$perms = Post::i('is_admin');
if ($user['perms'] != $perms) {
XDB::query('UPDATE groupex.membres SET perms={?}
- WHERE uid={?} AND asso_id={?}',
- $perms ? 'admin' : 'membre',
- $user['uid'], $globals->asso('id'));
+ WHERE uid={?} AND asso_id={?}',
+ $perms ? 'admin' : 'membre',
+ $user['uid'], $globals->asso('id'));
$user['perms'] = $perms;
$page->trig('permissions modifiées');
}