define('NB_PER_PAGE', 25);
-new_group_page('xnet/groupe/annuaire.tpl');
+if ($globals->asso('pub') == 'public')
+ new_group_page('xnet/groupe/annuaire.tpl');
+else
+ new_groupadmin_page('xnet/groupe/annuaire.tpl');
+
$page->assign('admin', may_update());
$tri = (Env::get('order') == 'alpha' ? 'promo, nom, prenom' : 'nom, prenom, promo');
if (has_perms()) {
$globals->xdb->execute(
"UPDATE groupex.asso
- SET nom={?}, diminutif={?}, cat={?}, dom={?}, descr={?}, site={?}, mail={?}, resp={?}, forum={?}, mail_domain={?}, ax={?}, sub_url={?}
+ SET nom={?}, diminutif={?}, cat={?}, dom={?}, descr={?}, site={?}, mail={?}, resp={?}, forum={?}, mail_domain={?}, ax={?}, pub={?}, sub_url={?}
WHERE id={?}",
Post::get('nom'), Post::get('diminutif'), Post::get('cat'), Post::getInt('dom'),
Post::get('descr'), Post::get('site'), Post::get('mail'), Post::get('resp'),
- Post::get('forum'), Post::get('mail_domain'), Post::has('ax'), Post::get('sub_url'), $globals->asso('id'));
+ Post::get('forum'), Post::get('mail_domain'), Post::has('ax'), Post::has('pub')?'private':'public', Post::get('sub_url'), $globals->asso('id'));
if (Post::get('mail_domain')) {
$globals->xdb->execute('INSERT INTO virtual_domains (domain) VALUES({?})', Post::get('mail_domain'));
}
} else {
$globals->xdb->execute(
"UPDATE groupex.asso
- SET descr={?}, site={?}, mail={?}, resp={?}, forum={?}, ax={?}, sub_url={?}
+ SET descr={?}, site={?}, mail={?}, resp={?}, forum={?}, ax={?}, pub= {?}, sub_url={?}
WHERE id={?}",
Post::get('descr'), Post::get('site'), Post::get('mail'), Post::get('resp'),
- Post::get('forum'), Post::has('ax'), Post::get('sub_url'), $globals->asso('id'));
+ Post::get('forum'), Post::has('ax'), Post::has('pub')?'private':'public', Post::get('sub_url'), $globals->asso('id'));
}
if ($_FILES['logo']['name']) {