Ignore:
Timestamp:
07/31/12 16:01:37 (12 years ago)
Author:
cristiano
Message:

Ticket #2892 - Backport de relatórios do módulo Reports - Troca do mudulo reports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reports/inc/class.uireports_cota.inc.php

    r5934 r6920  
    3838                        $this->imap_functions = CreateObject('reports.imap_functions'); 
    3939                        $this->fpdf = CreateObject('reports.uireports_fpdf'); // Class para PDF 
    40 //                      $this->fpdf = CreateObject('reports.fpdf'); // Class para PDF 
    4140                                                 
    4241                        $c = CreateObject('phpgwapi.config','reports'); // cria o objeto relatorio no $c 
     
    101100                        // Save query 
    102101                        $varorganizacao = explode(",",$contextsdn); 
    103                         $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 
    104                         $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 
     102                        $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 
     103                        $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 
    105104                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 
    106105 
     
    137136                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector))) 
    138137                                                { 
    139                                                         $sectorok = trim(strtoupper(preg_replace('/dc=/',"",$sector))); 
    140                                                         $sectorok = trim(strtoupper(preg_replace('/DC=/',"",$sectorok))); 
     138                                                        $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 
     139                                                        $sectorok = trim(strtoupper(ereg_replace("DC=","",$sectorok))); 
    141140                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 
    142141                                                } 
     
    157156                        { 
    158157                                // Conta a quantidade de Usuario do grupo raiz 
    159                                 $account_user = $this->functions->get_count_user_sector($contextsdn,$contexts,0); 
     158                                $account_user = $this->functions->get_count_cota_sector($contextsdn,$contexts,0); 
    160159                                $totaluser = "(".$account_user.")"; 
    161160 
     
    205204                { 
    206205                        $grouplist = trim($_POST[setor]); 
    207                         $grouplist = trim(preg_replace('/-/','',$grouplist)); 
     206                        $grouplist = trim(ereg_replace("-","",$grouplist)); 
    208207                        $organizacao = trim($_POST[organizacao]); 
    209208                        $setordn = trim($_POST[setordn]); 
     
    277276 
    278277                        // verifica se exixte usuarios no LDAP 
    279                         $account_info = $this->functions->get_list_user_sector ($setordn,$contexts,0); 
     278                        $account_info = $this->functions->get_list_cota_sector ($setordn,$contexts,0); 
    280279 
    281280                        if (!count($account_info)) 
     
    357356 
    358357                                // ********** busca no LDAP as informação paginada e imprime **************** 
    359                                 $paginas =  $this->functions->Paginate_user('accounts',$setordn,$contexts,'cn','asc',$npag,$numpage); 
     358                                $paginas =  $this->functions->Paginate_cota('accounts',$setordn,$contexts,'cn','asc',$npag,$numpage); 
    360359 
    361360                                $tmpp = array(); 
     
    418417                                                'row_cn'                        => $accountr['account_cn'], 
    419418                                                'percent_cota'          => $percent_cota_c, 
    420                                                 'row_status'            => $accountr['account_status'] == 'active' ? '<font color="#0033FF">Ativado</font> ' : '<font color="#FF0000">Desativado</font>', 
    421                                                 'row_mail'                      => (!$accountr['account_mail']?'<font color=red>Sem E-mail</font>':$accountr['account_mail']) 
     419                                                'row_status'            => $accountr['account_status'] == 'active' ? '<font color="#0033FF">'.lang('Activated').'</font> ' : '<font color="#FF0000">'.lang('Disabled').'</font>', 
     420                                                'row_mail'                      => (!$accountr['account_mail']?'<font color=red>'.lang('Without E-mail').'</font>':$accountr['account_mail']) 
    422421                                        ); 
    423422                                         
     
    514513 
    515514                        $grouplist = trim($_POST[setor]); 
    516                         $grouplist = trim(preg_replace('/-/','',$grouplist)); 
     515                        $grouplist = trim(ereg_replace("-","",$grouplist)); 
    517516 
    518517                        $setordn = trim($_POST[setordn]); 
     
    526525                        $pdf->Open(); 
    527526                        $pdf->AddPage(); 
    528                         $pdf->SetTitle('Relatório Gerado pelo Expresso Reports'); 
    529527 
    530528                        //Set font and colors 
     
    537535                        //Table header 
    538536                        $SubTitulo = lang('reports title4'); 
    539                         $SubTituloR = lang('report cota organization'); 
     537                        $SubTituloR = lang('Report Generated by Expresso Reports'); 
    540538                        $SubTitulo1 = $subtitulo1; 
    541539                        $GLOBALS['phpgw_info']['apps']['reports']['subtitle'] = $SubTituloR; 
     
    550548                        $pdf->SetLineWidth(.3); 
    551549 
    552 //                      $pdf->Cell(0,10,$SubTitulo1,0,1,'C',0); 
    553550                        $pdf->MultiCell(0,3,$SubTitulo1,0,'C',0); 
    554551 
     
    558555                        $pdf->Cell(0,5,$titulo_system,0,1,'R',0); 
    559556                                                                                                 
    560                         $account_info = $this->functions->get_list_user_sector($setordn,$contexts,0); 
     557                        $account_info = $this->functions->get_list_cota_sector($setordn,$contexts,0); 
    561558 
    562559                        if (count($account_info)) 
     
    596593                                        $account_lid = $account['account_lid']; 
    597594                                        $row_cn = $account['account_cn']; 
    598                                         $row_mail = (!$account['account_mail']?'<font color=red>Sem E-mail</font>':$account['account_mail']); 
     595                                        $row_mail = (!$account['account_mail']?'<font color=red>'.lang('Without E-mail').'</font>':$account['account_mail']); 
    599596                                        $row_mailquota = $user_mailquota; 
    600597                                        $row_mailquota_used = $user_mailquota_used; 
    601598                                        $row_percent_cota = $percent_cota; 
    602                                         $row_status = $account['account_accountstatus'] == 'active' ? 'Ativado' : 'Desativado'; 
     599                                        $row_status = $account['account_accountstatus'] == 'active' ? lang('Activated') : lang('Disabled'); 
    603600 
    604601                                         
     
    656653                function get_user_info($userdn,$usercontexts,$usersizelimit) 
    657654                { 
    658 //                      $user_info = $this->functions->Paginate_user('accounts',$setordn,$contexts,'cn','asc',$npag,$numpage); 
    659655                        $user_info_imap = $this->imap_functions->get_user_info($user_info_ldap['uid']); 
    660656 
Note: See TracChangeset for help on using the changeset viewer.