/[ludap]/ludap/www/list.php
ViewVC logotype

Diff of /ludap/www/list.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mose, Tue Sep 9 15:00:05 2003 UTC revision 1.3 by mose, Sat Sep 13 09:09:24 2003 UTC
# Line 23  copyright (C) 2001, 2002 mose, makina co Line 23  copyright (C) 2001, 2002 mose, makina co
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');
# Line 49  if ($useframe) { Line 48  if ($useframe) {
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);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26