* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
FROM {$this->table}_def AS g
INNER JOIN {$this->table}_ins AS i ON (i.{$this->group_field} = g.id)
WHERE i.{$this->user_field} = {?}",
FROM {$this->table}_def AS g
INNER JOIN {$this->table}_ins AS i ON (i.{$this->group_field} = g.id)
WHERE i.{$this->user_field} = {?}",
while (list($gid, $text) = $res->next()) {
$value[intval($gid)] = $text;
}
while (list($gid, $text) = $res->next()) {
$value[intval($gid)] = $text;
}
{
XDB::execute("DELETE FROM {$this->table}_ins
WHERE {$this->user_field} = {?}",
{
XDB::execute("DELETE FROM {$this->table}_ins
WHERE {$this->user_field} = {?}",
}
XDB::execute("INSERT INTO {$this->table}_ins ({$this->user_field}, {$this->group_field})
VALUES " . implode(',', $insert));
}
XDB::execute("INSERT INTO {$this->table}_ins ({$this->user_field}, {$this->group_field})
VALUES " . implode(',', $insert));
{
$page->assign('mygroups', XDB::iterator("SELECT a.nom, a.site, a.diminutif, a.unsub_url, a.pub, m.perms
FROM groupex.asso AS a
INNER JOIN groupex.membres AS m ON (m.asso_id = a.id)
WHERE m.uid = {?} AND (a.cat = 'GroupesX' OR a.cat = 'Institutions')",
{
$page->assign('mygroups', XDB::iterator("SELECT a.nom, a.site, a.diminutif, a.unsub_url, a.pub, m.perms
FROM groupex.asso AS a
INNER JOIN groupex.membres AS m ON (m.asso_id = a.id)
WHERE m.uid = {?} AND (a.cat = 'GroupesX' OR a.cat = 'Institutions')",
$page->assign('listgroups', XDB::iterator("SELECT a.nom, a.diminutif, a.sub_url,
IF (a.cat = 'Institutions', a.cat, d.nom) AS dom
FROM groupex.asso AS a
$page->assign('listgroups', XDB::iterator("SELECT a.nom, a.diminutif, a.sub_url,
IF (a.cat = 'Institutions', a.cat, d.nom) AS dom
FROM groupex.asso AS a
WHERE a.inscriptible != 0
AND (a.cat = 'GroupesX' OR a.cat = 'Institutions')
ORDER BY a.cat, a.dom, a.nom"));
WHERE a.inscriptible != 0
AND (a.cat = 'GroupesX' OR a.cat = 'Institutions')
ORDER BY a.cat, a.dom, a.nom"));