23 |
*/ |
*/ |
24 |
|
|
25 |
/** |
/** |
26 |
* \brief page intended to be in a frame for navigation |
* \brief main list page |
|
* That file is the only that can be used by the web server |
|
|
* directly, all the others are included. |
|
|
* \file index.php |
|
27 |
* \author mose@ludap.org |
* \author mose@ludap.org |
28 |
*/ |
*/ |
29 |
|
|
30 |
require_once('../setup.php'); |
require_once('../setup.php'); |
31 |
|
|
32 |
if ($action == 'deldel' and $id and $admin) { |
if ($act == "oui oui" and $action == 'deldel' and $delall and $admin) { |
33 |
if ($L->del_user($id)) { |
foreach ($delall as $delid) { |
34 |
$msg = "Utilisateur $id effacé."; |
if ($L->del_user($delid)) { |
35 |
} else { |
$msg = "Utilisateur $id effacé."; |
36 |
$msg = "Impossible d'effacer l'utilisateur $id."; |
} else { |
37 |
|
$msg = "Impossible d'effacer l'utilisateur $id."; |
38 |
|
} |
39 |
} |
} |
40 |
$id = false; |
$delall = false; |
41 |
} |
} |
42 |
|
|
43 |
$S->display('header.tpl'); |
$S->display('header.tpl'); |
48 |
$heads = split(',',$L->conf["simple"]); |
$heads = split(',',$L->conf["simple"]); |
49 |
} |
} |
50 |
if ($searchx) { |
if ($searchx) { |
51 |
$info = $L->get_users_list($heads,$search,20,0,20); |
$info = $L->get_users_list($heads,$searchx,20,0,20); |
52 |
} else { |
} else { |
53 |
$info = array(); |
$info = array(); |
54 |
} |
} |
55 |
|
|
56 |
//echo'<pre>';print_r($search);echo'</pre>'; die(); |
//echo'<pre>';print_r($search);echo'</pre>'; die(); |
57 |
if ($action == 'del') { |
if (($action == 'X') and $delall) { |
58 |
$S->assign('msg', $S->fetch('confirm.tpl')); |
$S->assign('delall',$delall); |
59 |
} |
$S->assign('users',implode('<br />\n',$delall)); |
60 |
$S->assign('info', $info); |
$S->display('confirm.tpl'); |
|
$S->assign('list', $heads); |
|
|
$S->assign('sort', $sort); |
|
|
$S->assign('rsort', $rsort); |
|
|
$S->assign('results',count($info)); |
|
|
$S->assign('colspan',count($heads)+1); |
|
|
$S->assign('cols',count($heads)); |
|
|
$S->assign('searchx', $searchx); |
|
|
|
|
|
if ($useframe) { |
|
|
$S->display('shortlist.tpl'); |
|
61 |
} else { |
} else { |
62 |
$S->display('topbar.tpl'); |
$S->assign('info', $info); |
63 |
$S->display('list.tpl'); |
$S->assign('list', $heads); |
64 |
$S->display('botbar.tpl'); |
$S->assign('sort', $sort); |
65 |
} |
$S->assign('rsort', $rsort); |
66 |
|
$S->assign('results',count($info)); |
67 |
|
$S->assign('colspan',count($heads)+1); |
68 |
|
$S->assign('cols',count($heads)); |
69 |
|
$S->assign('searchx', $searchx); |
70 |
|
|
71 |
|
if ($useframe) { |
72 |
|
$S->display('list.tpl'); |
73 |
|
} else { |
74 |
|
$S->display('topbar.tpl'); |
75 |
|
$S->display('list.tpl'); |
76 |
|
$S->display('botbar.tpl'); |
77 |
|
} |
78 |
|
} |
79 |
$S->display('footer.tpl'); |
$S->display('footer.tpl'); |
80 |
|
|
81 |
ldap_close($L->conn); |
ldap_close($L->conn); |