source: branches/2.2/reports1_0/inc/class.uireports_users.inc.php @ 3472

Revision 3472, 21.0 KB checked in by eduardoalex, 13 years ago (diff)

Ticket #1200 - Adicionado relatorio de usuarios por organizacao.

Line 
1<?php
2        /*************************************************************************************\
3        * Expresso Relatório                                                                                                     *
4        * by Elvio Rufino da Silva (elviosilva@yahoo.com.br, elviosilva@cepromat.mt.gov.br)  *
5        * -----------------------------------------------------------------------------------*
6        *  This program is free software; you can redistribute it and/or modify it                       *
7        *  under the terms of the GNU General Public License as published by the                         *
8        *  Free Software Foundation; either version 2 of the License, or (at your                        *
9        *  option) any later version.                                                                                                            *
10        *************************************************************************************/
11
12        class uireports_users
13        {
14                var $public_functions = array
15                (
16                        'report_users_print_pdf'                        => True,
17                        'report_users_group'                            => True,
18                        'report_users_group_setor_print'        => True,
19                        'get_user_info'                                         => True,
20                        'css'                                                           => True
21                );
22
23                var $nextmatchs;
24                var $user;
25                var $functions;
26                var $current_config;
27                var $ldap_functions;
28                var $db_functions;
29
30                function uireports_users()
31                {
32                        $this->user                     = CreateObject('reports1_0.user');
33                        $this->nextmatchs       = CreateObject('phpgwapi.nextmatchs');
34                        $this->functions        = CreateObject('reports1_0.functions');
35                        $this->ldap_functions = CreateObject('reports1_0.ldap_functions');
36                        $this->db_functions = CreateObject('reports1_0.db_functions');
37                        $this->fpdf = CreateObject('reports1_0.uireports_fpdf'); // Class para PDF
38                                                                       
39                        $c = CreateObject('phpgwapi.config','reports1_0'); // cria o objeto relatorio no $c
40                        $c->read_repository(); // na classe config do phpgwapi le os dados da tabela phpgw_config where relatorio, como passagem acima
41                        $this->current_config = $c->config_data; // carrega os dados em do array no current_config
42
43                        if(!@is_object($GLOBALS['phpgw']->js))
44                        {
45                                $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
46                        }
47                        $GLOBALS['phpgw']->js->validate_file('jscode','cc','reports1_0');
48                }
49               
50                function report_users_print_pdf()
51                {
52                        $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid'];
53                        $acl = $this->functions->read_acl($account_lid);
54                        $raw_context = $acl['raw_context'];
55                        $contexts = $acl['contexts'];
56                        foreach ($acl['contexts_display'] as $index=>$tmp_context)
57                        {
58                                $context_display .= $tmp_context;
59                        }
60
61
62                        if (!$this->functions->check_acl($account_lid,'list_users'))
63                        {
64                                $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/reports1_0/inc/access_denied.php'));
65                        }
66
67                        $grouplist = trim($_POST[setor]);
68                        $grouplist = trim(ereg_replace("-","",$grouplist));
69
70                        $setordn = trim($_POST[setordn]);
71                        $subtitulo1 = trim($_POST[subtitulo]);
72
73                        define('FPDF_FONTPATH','font/');
74                        $data_atual = date("d/m/Y");
75                        $titulo_system = $GLOBALS['phpgw_info']['apps']['reports1_0']['title'];                 
76
77                        $pdf=new uireports_fpdf("L");
78                        $pdf->Open();
79                        $pdf->AddPage();
80                        $pdf->SetTitle('Relatório Gerado pelo Expresso Reports');
81
82                        //Set font and colors
83                        $pdf->SetFont('Arial','B',14);
84                        $pdf->SetFillColor(0,0,0);
85                        $pdf->SetTextColor(0,0,200);
86                        $pdf->SetDrawColor(0,0,0);
87                        $pdf->SetLineWidth(.2);
88
89                        //Table header
90                        $SubTitulo = lang('reports title2');
91                        $SubTituloR = lang('report organization');
92                        $SubTitulo1 = $subtitulo1;
93                        $GLOBALS['phpgw_info']['apps']['reports1_0']['subtitle'] = $SubTituloR;
94                        $pdf->Cell(0,8,$SubTitulo,0,1,'C',0);
95
96
97                        //Set font and colors
98                        $pdf->SetFont('Arial','B',8);
99                        $pdf->SetFillColor(0,0,0);
100                        $pdf->SetTextColor(0,0,200);
101                        $pdf->SetDrawColor(0,0,0);
102                        $pdf->SetLineWidth(.3);
103
104                        $pdf->MultiCell(0,3,$SubTitulo1,0,'C',0);
105                                               
106                        $pdf->Cell(0,2,' ',0,1,'C',0);
107                        $pdf->Cell(0,5,'Data..: '.$data_atual,0,0,'L',0);
108                        $pdf->Cell(0,5,$titulo_system,0,1,'R',0);
109                                                                                               
110                        $account_info = $this->functions->get_list_user_sector($setordn,$contexts,0);
111                                               
112                        if (count($account_info))
113                        {
114                                //Restore font and colors
115                                $pdf->SetFont('Arial','',8);
116                                $pdf->SetFillColor(224,235,255);
117                                $pdf->SetTextColor(0);
118
119                                $pdf->Cell(55,5,lang('loginid'),1,0,'L',1);
120                                $pdf->Cell(80,5,lang('name'),1,0,'L',1);
121                                $pdf->Cell(80,5,lang('report email'),1,0,'L',1);
122                                $pdf->Cell(35,5,lang('report phone'),1,0,'L',1);
123                                $pdf->Cell(20,5,lang('status'),1,1,'L',1);
124                               
125                                while (list($null,$account) = each($account_info))
126                                {
127                                                $row_loginid = $account['account_lid'];
128                                                $row_cn = $account['account_cn'];
129                                                $row_mail = (!$account['account_mail'] ? '<font color=red>Sem E-mail</font>' : $account['account_mail']);
130                                                $row_phone = (!$account['account_phone'] ? '-' : $account['account_phone']);
131                                                $row_status = $account['account_accountstatus'] == 'active' ? 'Ativado' : 'Desativado';
132                                                $pdf->Cell(55,5,$row_loginid,0,0,'L',0);
133                                                $pdf->Cell(80,5,$row_cn,0,0,'L',0);
134                                                $pdf->Cell(80,5,$row_mail,0,0,'L',0);
135                                                $pdf->Cell(35,5,$row_phone,0,0,'L',0);
136                                        if ($row_status == 'Ativado')
137                                        {
138                                                //Restaura cor fonte
139                                                $pdf->SetTextColor(0);
140                                                $pdf->Cell(20,5,$row_status,0,1,'L',0);
141                                        }
142                                        else
143                                        {
144                                                //Muda cor fonte
145                                                $pdf->SetTextColor(256,0,0);
146                                                $pdf->Cell(20,5,$row_status,0,1,'L',0);                                 
147                                                //Restaura cor fonte
148                                                $pdf->SetTextColor(0);
149                                        }
150                                }
151                        }
152
153                        $pdf->Output();
154
155                        return;
156                }
157
158                function report_users_group()
159                {
160                        $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid'];
161                        $manager_acl = $this->functions->read_acl($account_lid);
162                        $raw_context = $acl['raw_context'];
163                        $contexts = $manager_acl['contexts'];
164                        $conta_context = count($manager_acl['contexts_display']);
165                        foreach ($manager_acl['contexts_display'] as $index=>$tmp_context)
166                        {
167                                $index = $index +1;
168
169                                if ($conta_context == $index)
170                                {
171                                        $context_display .= $tmp_context;
172                                }
173                                else
174                                {
175                                        $context_display .= $tmp_context.'&nbsp;|&nbsp;';
176                                }
177                        }
178                       
179                        // Verifica se tem acesso a este modulo
180                        if (!$this->functions->check_acl($account_lid,'list_sectors'))
181                        {
182                                $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/reports1_0/inc/access_denied.php'));
183                        }
184
185                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
186                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
187                       
188                        $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['reports1_0']['title'].' - '.lang('report organization');
189                        $GLOBALS['phpgw']->common->phpgw_header();
190
191                        $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
192                        $p->set_file(array('groups'   => 'report_users_group.tpl'));
193                        $p->set_block('groups','list','list');
194                        $p->set_block('groups','row','row');
195                        $p->set_block('groups','row_empty','row_empty');
196
197                        // Seta as variaveis padroes.
198                        $var = Array(
199                                'th_bg'                                 => $GLOBALS['phpgw_info']['theme']['th_bg'],
200                                'back_url'                              => $GLOBALS['phpgw']->link('/reports1_0/index.php'),
201                                'context_display'               => $context_display
202                        );
203                        $p->set_var($var);
204                        $p->set_var($this->functions->make_dinamic_lang($p, 'list'));
205                       
206
207                        $GLOBALS['organizacaodn'] = $_POST['organizacaodn'];
208
209                        $contextsdn = $GLOBALS['organizacaodn'];
210
211                        // Save query
212                        $varorganizacao = explode(",",$contextsdn);
213                        $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0])));
214                        $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome)));
215                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid];
216
217                        // carrega os grupos no listbox
218                        /************* DESCOMENTE ESTE PARTE DO CODIGO PARA LISTAR TODOS OS GRUPOS, SEM LISTAR POR USUSARIO LOGADO ***********
219                        $sectors_info = $this->functions->get_groups_list($contexts,"*");
220                        $sectors_info_dn = $this->functions->get_groups_list_dn($contexts,"*");
221                        /* ************************************* FIM *********************************************************************** */
222
223                        $sectors_info = $this->functions->get_list_context_logon($user_logon,$contexts,0);
224                        $sectors_info_dn = $this->functions->get_list_groups_dn($user_logon,$contexts,0);
225
226                        if (!count($sectors_info))
227                        {
228                                $p->set_var('notselect',lang('No matches found'));
229                        }
230                        else
231                        {
232                                foreach($sectors_info as $context=>$sector)
233                                {
234                                       
235                                        $sectordn = $sectors_info_dn[$context];
236
237                                        $tr_color = $this->nextmatchs->alternate_row_color($tr_color);
238                                       
239                                        if ($context == 0 && $contextsdn <> "")
240                                        {
241                                                if (trim(strtoupper($varorganizacao_nome)) ==  trim(strtoupper($sector)))
242                                                {
243                                                        $sector_options .= "<option selected value='" .$contextsdn. "'>" .$varorganizacao_nome. "</option>";
244                                                }
245                                                else
246                                                {
247                                                        $sector_options .= "<option selected value='" .$contextsdn. "'>" .$varorganizacao_nome. "</option>";
248                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sector . "</option>";
249                                                }
250
251                                        }
252                                        else
253                                        {
254                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector)))
255                                                {
256                                                        $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector)));
257                                                        $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok)));
258                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>";
259                                                }
260                                        }
261
262                                        $varselect = Array(
263                                                'tr_color'      => $tr_color,
264                                                'organizacaodn' => $contextsdn,
265                                                'group_name'    => $sector_options
266                                        );                                     
267                                }
268
269                                $p->set_var($varselect);
270                        }
271
272                        // ************** inicio carregar a sub-lista das organizações ****************
273                        //Admin make a search
274                        if ($GLOBALS['organizacaodn'] != '')
275                        {
276                                // Conta a quantidade de Usuario do grupo raiz
277                                $account_user = $this->functions->get_list_user_sector($contextsdn,$contexts,0);
278                                $totaluser = "(".count($account_user).")";
279
280                                $p->set_var('organizacao', $varorganizacao_nome);
281                                $p->set_var('all_user', lang('all'));
282                                $p->set_var('total_user', $totaluser);
283
284                                $setorg = $contextsdn;
285
286                                $groups_info = $this->functions->get_sectors_list($contexts,$setorg);
287
288                                if (!count($groups_info))
289                                {
290                                        $p->set_var('message',lang('No sector found'));
291                                        $p->parse('rows','row_empty',True);                             
292                                }
293                                else
294                                {
295                                        $ii = 0;
296                                        foreach($groups_info as $context=>$groups)
297                                        {
298                                                $explode_groups = explode("#",$groups);
299                                                $ii = $ii + 1;
300                                                $tr_color = $this->nextmatchs->alternate_row_color($tr_color);
301                                                $varsuborg = Array(
302                                                        'tr_color'                                      => $tr_color,
303                                                        'formname'                                      => "form".$ii,
304                                                        'formsubmit'                            => "document.form".$ii.".submit()",
305                                                        'sector_name'                           => $explode_groups[0],
306                                                        'sector_namedn'                         => $explode_groups[1],
307                                                        'sector_namedn_completo'        => $explode_groups[2],                 
308                                                );                                     
309
310                                                $p->set_var($varsuborg);                                       
311                                                $p->parse('rows','row',True);
312                                        }
313                                }
314                        }
315
316                        $p->pfp('out','list');
317                }
318
319                function report_users_group_setor_print()
320                {
321                        $grouplist = trim($_POST[setor]);
322                        $grouplist = trim(ereg_replace("-","",$grouplist));
323                        $organizacao = trim($_POST[organizacao]);
324                        $setordn = trim($_POST[setordn]);
325                        $organizacaodn = trim($_POST[organizacaodn]);
326                        $sectornamedncompleto = trim($_POST[sectornamedncompleto]);
327                        $Psectornamedncompleto = trim($_POST[Psectornamedncompleto]);
328
329                        if ($sectornamedncompleto=="" && $Psectornamedncompleto=="")
330                        {                       
331                                $sectornamedncompleto = $organizacao;
332                        }
333                        else if ($sectornamedncompleto=="" && $Psectornamedncompleto <> "")
334                        {
335                                $sectornamedncompleto = $Psectornamedncompleto;
336                        }
337                        else
338                        {
339                                $sectornamedncompleto = $organizacao." | ".$sectornamedncompleto;
340                        }
341
342                        $data_atual = date("d/m/Y");
343                        $titulo_system = $GLOBALS['phpgw_info']['apps']['reports1_0']['title'];
344                       
345                        $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid'];
346                        $acl = $this->functions->read_acl($account_lid);
347                        $raw_context = $acl['raw_context'];
348                        $contexts = $acl['contexts'];
349                        foreach ($acl['contexts_display'] as $index=>$tmp_context)
350                        {
351                                $context_display .= $tmp_context;
352                        }
353                        // Verifica se o administrador tem acesso.
354                        if (!$this->functions->check_acl($account_lid,'list_users'))
355                        {
356                                $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/reports1_0/inc/access_denied.php'));
357                        }
358
359                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
360                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
361                        $GLOBALS['phpgw_info']['flags']['app_header'] =  $GLOBALS['phpgw_info']['apps']['reports1_0']['title'].' - '.lang('report user');
362                        $GLOBALS['phpgw']->common->phpgw_header();
363
364                        $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
365                        $p->set_file(Array('accounts' => 'report_users_group_print.tpl'));
366                        $p->set_block('accounts','body');
367                        $p->set_block('accounts','rowpag');
368                        $p->set_block('accounts','row');
369                        $p->set_block('accounts','row_empty');
370                       
371                        $var = Array(
372                                'bg_color'                                      => $GLOBALS['phpgw_info']['theme']['bg_color'],
373                                'th_bg'                                         => $GLOBALS['phpgw_info']['theme']['th_bg'],
374                                'subtitulo'                                     => lang('reports title2'),
375                                'subtitulo1'                            => $sectornamedncompleto,
376                                'context'                                       => $raw_context,
377                                'titulo'                                        => $titulo_system,
378                                'data_atual'                            => $data_atual,                         
379                                'context_display'                       => $context_display,
380                                'organizacaodn'                         => $organizacaodn,
381                                'organizacao'                           => $organizacao,
382                                'sector_name'                           => $grouplist,
383                                'sector_namedn'                         => $setordn,
384                                'imapDelimiter'                         => $_SESSION['phpgw_info']['expresso']['email_server']['imapDelimiter']
385                        );
386
387                        $p->set_var($var);
388                        $p->set_var($this->functions->make_dinamic_lang($p, 'body'));
389
390                        // ************ PAGINAÇÃO *******************************
391
392                        // verifica se exixte usuarios no LDAP
393                        $account_info = $this->functions->get_list_user_sector($setordn,$contexts,0);
394
395                        if (!count($account_info))
396                        {
397                                $p->set_var('message',lang('No user found'));
398                                $p->parse('rows','row_empty',True);
399                        }
400                        else if (count($account_info))
401                        {
402                                //url do paginador
403                                $url = '/index.php?menuaction=reports1_0.uireports_users.report_users_group_setor_print';
404
405                                // **** Grupo de paginas ****
406                                $gpag = $_POST[gpage];
407
408                                $grupopage = 20;
409                               
410                                if (!$gpag){
411                                        $gpag  = 1;
412                                }
413
414                                // recebe o numero da pagina
415                                $npag = $_POST[page];
416
417                                // verifica se o get com o numero da pagina é nulo
418                                if (!$npag)
419                                {
420                                        $npag = 1;
421                                }
422
423                                // conta total dos registros
424                                $numreg = count($account_info);
425                               
426                                // numero de registro por paginação
427                                $numpage = 53;
428                               
429                                $tp = ceil($numreg/$numpage);
430                                $inicio = $page - 1;
431                                $inicio = $inicio * $numpage;
432       
433                                // valor maximo de paginação
434                                $totalnpag =  (int)($tp/$grupopage);
435                                $restonpag = $tp % $grupopage;
436
437                                if ($restonpag > 0)
438                                {
439                                        $maxtotalnpag = $totalnpag + 1;
440                                }
441                                else
442                                {
443                                        $maxtotalnpag = $totalnpag;
444                                }
445                                // inicio fim para imprimir a paginação
446                                if( $tp > $grupopage)
447                                {
448                                        // inicio do for da paginação
449                                        if ($gpag <= ($totalnpag))
450                                        {
451                                                $fimgpg = $gpag * $grupopage;
452                                                $iniciogpg = (($fimgpg - $grupopage)+1);
453                                        }
454                                        else
455                                        {
456                                                $iniciogpg = (($gpag - 1) * $grupopage);
457                                                $fimgpg = $iniciogpg + $restonpag;
458                                        }
459                                }
460                                else
461                                {
462                                        // inicio do for da paginação
463                                        $iniciogpg = 1;
464                                        $fimgpg =  $tp;
465                                }
466
467                                // Imprime valores de contagen de registro e pagina
468                                $p->set_var('cont_user',$numreg);
469                                $p->set_var('cont_page',$tp);
470                                $p->set_var('page_now',$npag);
471
472                                // ********** busca no LDAP as informação paginada e imprime ****************
473                                $paginas = $this->functions->Paginate_user('accounts',$setordn,$contexts,'cn','asc',$npag,$numpage);
474
475                                $tmpp = array();
476
477                                while (list($null,$accountp) = each($paginas))
478                                {
479                                        $tmpp[$accountp['uid'][0]]['account_id']         = $accountp['uidNumber'][0];
480                                        $tmpp[$accountp['uid'][0]]['account_lid'] = $accountp['uid'][0];
481                                        $tmpp[$accountp['uid'][0]]['account_cn']         = $accountp['cn'][0];
482                                        $tmpp[$accountp['uid'][0]]['account_phone']      = $accountp['telephoneNumber'][0];
483                                        $tmpp[$accountp['uid'][0]]['account_status']= $accountp['accountStatus'][0];
484                                        $tmpp[$accountp['uid'][0]]['account_mail']= $accountp['mail'][0];
485                                        $sortp[] = $accountp['uid'][0];
486                                        if (count($sortp))
487                                        {
488                                                natcasesort($sortp);
489                                                foreach ($sortp as $user_uidp)
490                                                $returnp[$user_uidp] = $tmpp[$user_uidp];
491                                        }
492                                }
493
494                                while (list($null,$accountr) = each($returnp))
495                                {
496                                        $this->nextmatchs->template_alternate_row_color($p);
497
498                                        $varr = array(
499                                                'row_loginid'   => $accountr['account_lid'],
500                                                'row_cn'                => $accountr['account_cn'],
501                                                'row_status'    => $accountr['account_status'] == 'active' ? '<font color="#0033FF">Ativado</font> ' : '<font color="#FF0000">Desativado</font>',
502                                                'row_phone'             => (!$accountr['account_phone'] ? '-' : $accountr['account_phone']),
503                                                'row_mail'              => (!$accountr['account_mail'] ? '<font color=red>Sem E-mail</font>' : $accountr['account_mail'])
504                                        );
505                                       
506                                        $p->set_var($varr);
507       
508                                        $p->parse('rows','row',True);
509                                }
510                                // ********************** Fim ****************************
511
512                                // grupo de pagina anteriores
513                                if ($gpag > 1)
514                                {
515                                        $gpaga = $gpag - 1;
516                                        $varp = Array(
517                                                'paginat'       =>      "<form name='anterior' method='POST' action='$url'>
518                                                <input type='hidden' name='setor' value='$grouplist'>
519                                                <input type='hidden' name='organizacao' value='$organizacao'>
520                                                <input type='hidden' name='setordn' value='$setordn'>
521                                                <input type='hidden' name='organizacaodn' value='$organizacaodn'>
522                                                <input type='hidden' name='page' value='$npag'>
523                                                <input type='hidden' name='gpage' value='$gpaga'>
524                                                <input type='hidden' name='Psectornamedncompleto' value='$sectornamedncompleto'>
525                                                <div style='float:left;' onClick='document.anterior.submit()'><a href='#'>".lang('Previous Pages')."<<&nbsp;&nbsp;&nbsp;</a></div></form>"
526                                        );
527                                        $p->set_var($varp);                                             
528       
529                                                $p->parse('pages','rowpag',True);
530                                }
531                                // **** FIM *******
532
533                                // imprime a paginação
534                                if ($fimgpg > 1)
535                                {
536                                        for($x = $iniciogpg; $x <= $fimgpg; $x++)
537                                        {
538                                                $varp = Array(
539                                                        'paginat'       =>  "<form name='form".$x."' method='POST' action='$url'>
540                                                        <input type='hidden' name='setor' value='$grouplist'>
541                                                        <input type='hidden' name='organizacao' value='$organizacao'>
542                                                        <input type='hidden' name='setordn' value='$setordn'>
543                                                        <input type='hidden' name='organizacaodn' value='$organizacaodn'>
544                                                        <input type='hidden' name='page' value='$x'>
545                                                        <input type='hidden' name='gpage' value='$gpag'>
546                                                        <input type='hidden' name='Psectornamedncompleto' value='$sectornamedncompleto'>
547                                                        <div style='float:left;' onClick='document.form".$x.".submit()'><a href='#'>$x&nbsp;</a></div></form>"
548                                                );
549
550                                                $p->set_var($varp);                                             
551       
552                                                $p->parse('pages','rowpag',True);
553                                        }
554                                }
555               
556                                // proximo grupo de pagina
557                                if ($gpag < $maxtotalnpag && $maxtotalnpag > 0)
558                                {
559                                        $gpagp = $gpag + 1;
560                                        $varp = Array(
561                                                'paginat'       =>  "<form name='proximo' method='POST' action='$url'>
562                                                <input type='hidden' name='setor' value='$grouplist'>
563                                                <input type='hidden' name='organizacao' value='$organizacao'>
564                                                <input type='hidden' name='setordn' value='$setordn'>
565                                                <input type='hidden' name='organizacaodn' value='$organizacaodn'>
566                                                <input type='hidden' name='page' value='$npag'>
567                                                <input type='hidden' name='gpage' value='$gpagp'>
568                                                <input type='hidden' name='Psectornamedncompleto' value='$sectornamedncompleto'>
569                                                <div style='float:left;' onClick='document.proximo.submit()'><a href='#'>&nbsp;&nbsp;&nbsp;>>".lang('Next Page')."</a></div></form>"
570                                        );
571                                        $p->set_var($varp);                                             
572
573                                        $p->parse('pages','rowpag',True);
574                                }
575
576                        // ************************* FIM PAGINAÇÃO ***********************                                                     
577                        }
578
579                        $p->pfp('out','body');
580                }
581
582                function get_user_info($userdn,$usercontexts,$usersizelimit)
583                {
584                        $user_info = $this->functions->Paginate_user('accounts',$setordn,$contexts,'cn','asc',$npag,$numpage);
585
586                        return $user_info;
587                }
588
589                function css()
590                {
591                        $appCSS =
592                        'th.activetab
593                        {
594                                color:#000000;
595                                background-color:#D3DCE3;
596                                border-top-width : 1px;
597                                border-top-style : solid;
598                                border-top-color : Black;
599                                border-left-width : 1px;
600                                border-left-style : solid;
601                                border-left-color : Black;
602                                border-right-width : 1px;
603                                border-right-style : solid;
604                                border-right-color : Black;
605                                font-size: 12px;
606                                font-family: Tahoma, Arial, Helvetica, sans-serif;
607                        }
608                       
609                        th.inactivetab
610                        {
611                                color:#000000;
612                                background-color:#E8F0F0;
613                                border-bottom-width : 1px;
614                                border-bottom-style : solid;
615                                border-bottom-color : Black;
616                                font-size: 12px;
617                                font-family: Tahoma, Arial, Helvetica, sans-serif;                             
618                        }
619                       
620                        .td_left {border-left:1px solid Gray; border-top:1px solid Gray; border-bottom:1px solid Gray;}
621                        .td_right {border-right:1px solid Gray; border-top:1px solid Gray; border-bottom:1px solid Gray;}
622                       
623                        div.activetab{ display:inline; }
624                        div.inactivetab{ display:none; }';
625                       
626                        return $appCSS;
627                }
628
629        }
630?>
Note: See TracBrowser for help on using the repository browser.