]> git.sur5r.net Git - contagged/blobdiff - index.php
mod_auth_ldap, non-anon binding and openxchange support
[contagged] / index.php
index 22d5c10936c3e3fb53bc2d9b309916dc739f7be3..f797e5e0637952272bb77ffe56f1260fc8c85073 100644 (file)
--- a/index.php
+++ b/index.php
   //prepare templates
   tpl_std();
   tpl_markers();
+  tpl_categories();
+  tpl_timezone();
+  tpl_country();
   $smarty->assign('list',$list);
   $smarty->assign('filter',$_REQUEST['filter']);
+  $smarty->assign('marker',$_REQUEST['marker']);
+  $smarty->assign('search',$_REQUEST['search']);
   //display templates
   if($_REQUEST['export'] == 'csv'){
     header("Content-Type: text/csv");
     $search = $_REQUEST['search'];
     $org    = $_REQUEST['org'];
     $marker = $_REQUEST['marker'];
+    $categories = $_REQUEST['categories'];
     $_SESSION[ldapab][filter] = $filter;
     if(empty($filter)) $filter='a';
 
     if(!empty($marker)){
       $marker = utf8_encode($marker);
       $ldapfilter = "(&(objectClass=contactPerson)(marker=$marker))";
+    }elseif(!empty($categories)){
+      $categories = utf8_encode($categories);
+      $ldapfilter = "(&(objectClass=OXUserObject)(OXUserCategories=$categories))";
     }elseif(!empty($search)){
       $search = trim($search);
       $words=preg_split('/\s+/',$search);
         $other .= '(!(sn='.chr($i).'*))';
       }
       $ldapfilter = "(&(objectClass=inetOrgPerson)$other)";
+    }elseif($filter=='*'){
+      $ldapfilter = "(objectClass=inetOrgPerson)";
     }else{
       $filter = utf8_encode($filter);
       $ldapfilter = "(&(objectClass=inetOrgPerson)(sn=$filter*))";