Changeset 4570 for branches/2.2
- Timestamp:
- 06/01/11 17:01:47 (13 years ago)
- Location:
- branches/2.2/reports
- Files:
-
- 8 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/reports/inc/class.functions.inc.php
r4033 r4570 24 24 'array_invert' => True, 25 25 'Paginate_user' => True, 26 'Paginate_cota' => True, 27 'Paginate_shareAccount' => True, 28 'Paginate_institutionalAccount' => True, 26 29 'Paginate_user_logon' => True, 27 30 'get_list_all' => True, … … 854 857 } 855 858 859 function get_list_cota_sector($query, $contexts,$sizelimit) 860 { 861 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 862 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 863 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 864 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 865 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 866 ldap_bind($ldap_conn,$dn,$passwd); 867 868 $filter="(|(phpgwAccountType=u)(|(phpgwAccountType=s)))"; 869 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp","telephoneNumber"); 870 871 $tmp = array(); 872 873 foreach ($contexts as $index=>$context) 874 { 875 876 $search = ldap_search($ldap_conn, $query, $filter, $justthese, 0, $sizelimit); 877 $info = ldap_get_entries($ldap_conn, $search); 878 879 for ($i=0; $i < $info['count']; $i++) 880 { 881 $tmp[$info[$i]['uid'][0]]['account_id'] = $info[$i]['uidnumber'][0]; 882 $tmp[$info[$i]['uid'][0]]['account_lid'] = $info[$i]['uid'][0]; 883 $tmp[$info[$i]['uid'][0]]['account_cn'] = $info[$i]['cn'][0]; 884 $tmp[$info[$i]['uid'][0]]['account_mail']= $info[$i]['mail'][0]; 885 $tmp[$info[$i]['uid'][0]]['account_phone']= $info[$i]['telephonenumber'][0]; 886 $tmp[$info[$i]['uid'][0]]['account_accountstatus']= $info[$i]['accountstatus'][0]; 887 $tmp[$info[$i]['uid'][0]]['createtimestamp']= $info[$i]['createtimestamp'][0]; 888 $sort[] = $info[$i]['uid'][0]; 889 } 890 } 891 892 ldap_close($ldap_conn); 893 894 if (count($sort)) 895 { 896 natcasesort($sort); 897 foreach ($sort as $user_uid) 898 $return[$user_uid] = $tmp[$user_uid]; 899 } 900 901 return $return; 902 903 } 904 905 906 function get_list_shareAccounts_sector($query, $contexts,$sizelimit) 907 { 908 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 909 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 910 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 911 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 912 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 913 ldap_bind($ldap_conn,$dn,$passwd); 914 915 $filter="(phpgwAccountType=s)"; 916 $justthese = array("uid", "cn", "mail","accountstatus"); 917 918 $tmp = array(); 919 920 foreach ($contexts as $index=>$context) 921 { 922 923 $search = ldap_search($ldap_conn, $query, $filter, $justthese, 0, $sizelimit); 924 $info = ldap_get_entries($ldap_conn, $search); 925 926 for ($i=0; $i < $info['count']; $i++) 927 { 928 $tmp[$info[$i]['uid'][0]]['account_lid'] = $info[$i]['uid'][0]; 929 $tmp[$info[$i]['uid'][0]]['account_cn'] = $info[$i]['cn'][0]; 930 $tmp[$info[$i]['uid'][0]]['account_mail']= $info[$i]['mail'][0]; 931 $tmp[$info[$i]['uid'][0]]['account_accountstatus']= $info[$i]['accountstatus'][0]; 932 $sort[] = $info[$i]['uid'][0]; 933 } 934 } 935 936 ldap_close($ldap_conn); 937 938 if (count($sort)) 939 { 940 natcasesort($sort); 941 foreach ($sort as $user_uid) 942 $return[$user_uid] = $tmp[$user_uid]; 943 } 944 945 return $return; 946 } 947 948 function get_list_institutionalAccounts_sector($query, $contexts,$sizelimit) 949 { 950 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 951 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 952 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 953 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 954 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 955 ldap_bind($ldap_conn,$dn,$passwd); 956 957 $filter="(phpgwAccountType=i)"; 958 $justthese = array("uid", "cn", "mail","accountstatus","mailForwardingAddress"); 959 960 $tmp = array(); 961 962 foreach ($contexts as $index=>$context) 963 { 964 965 $search = ldap_search($ldap_conn, $query, $filter, $justthese, 0, $sizelimit); 966 $info = ldap_get_entries($ldap_conn, $search); 967 968 for ($i=0; $i < $info['count']; $i++) 969 { 970 $tmp[$info[$i]['uid'][0]]['account_cn'] = $info[$i]['cn'][0]; 971 $tmp[$info[$i]['uid'][0]]['account_mail']= $info[$i]['mail'][0]; 972 $tmp[$info[$i]['uid'][0]]['account_accountstatus']= $info[$i]['accountstatus'][0]; 973 $tmp[$info[$i]['uid'][0]]['account_mailforwardingaddress']= $info[$i]['mailforwardingaddress']; 974 $sort[] = $info[$i]['uid'][0]; 975 } 976 } 977 978 ldap_close($ldap_conn); 979 980 if (count($sort)) 981 { 982 natcasesort($sort); 983 foreach ($sort as $user_uid) 984 $return[$user_uid] = $tmp[$user_uid]; 985 } 986 987 return $return; 988 } 989 856 990 function get_count_user_sector($query, $contexts,$sizelimit) 857 991 { … … 871 1005 $entries = ldap_get_entries($ldap_conn, $search); 872 1006 $contexts = array(); 873 for ($i=0; $i< $entries['count']; $i++){874 $contexts[] = $entries[$i]['dn'];875 1007 } 876 1008 } 1009 1010 $filter="(phpgwAccountType=u)"; 1011 $justthese = array("dn"); 1012 $search = ldap_search($ldap_conn, $context, $filter, $justthese, 0, $sizelimit); 1013 $entries = ldap_get_entries($ldap_conn, $search); 1014 $total_count = $entries["count"]; 1015 1016 ldap_close($ldap_conn); 1017 1018 return $total_count; 877 1019 } 878 $filter="(&(phpgwAccountType=u)(|(uid=*)))"; 879 $justthese = array("uidnumber"); 880 $total_count = 0; 881 1020 1021 function get_count_cota_sector($query, $contexts,$sizelimit) 1022 { 1023 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1024 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1025 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1026 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1027 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1028 ldap_bind($ldap_conn,$dn,$passwd); 1029 // counting users by sector. 882 1030 foreach ($contexts as $index=>$context) { 1031 if($context == $GLOBALS['phpgw_info']['server'] ["ldap_context"]) { 1032 $contexts[$index] = null; 1033 $justthese = array("dn"); 1034 $filter="(objectClass=OrganizationalUnit)"; 1035 $search = ldap_list($ldap_conn, $context, $filter, $justthese); 1036 $entries = ldap_get_entries($ldap_conn, $search); 1037 $contexts = array(); 1038 } 1039 } 1040 1041 $filter="(|(phpgwAccountType=u)(|(phpgwAccountType=s)))"; 1042 $justthese = array("dn"); 883 1043 $search = ldap_search($ldap_conn, $context, $filter, $justthese, 0, $sizelimit); 884 $total_count += ldap_count_entries($ldap_conn, $search); 885 } 1044 $entries = ldap_get_entries($ldap_conn, $search); 1045 $total_count = $entries["count"]; 1046 1047 ldap_close($ldap_conn); 1048 1049 return $total_count; 1050 } 1051 1052 function get_count_shareAccount_sector($query, $contexts,$sizelimit) 1053 { 1054 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1055 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1056 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1057 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1058 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1059 ldap_bind($ldap_conn,$dn,$passwd); 1060 // counting users by sector. 1061 foreach ($contexts as $index=>$context) { 1062 if($context == $GLOBALS['phpgw_info']['server'] ["ldap_context"]) { 1063 $contexts[$index] = null; 1064 $justthese = array("dn"); 1065 $filter="(objectClass=OrganizationalUnit)"; 1066 $search = ldap_list($ldap_conn, $context, $filter, $justthese); 1067 $entries = ldap_get_entries($ldap_conn, $search); 1068 $contexts = array(); 1069 } 1070 } 1071 1072 $filter="(phpgwAccountType=s)"; 1073 $justthese = array("dn"); 1074 $search = ldap_search($ldap_conn, $context, $filter, $justthese, 0, $sizelimit); 1075 $entries = ldap_get_entries($ldap_conn, $search); 1076 $total_count = $entries["count"]; 1077 1078 ldap_close($ldap_conn); 1079 1080 return $total_count; 1081 } 1082 1083 function get_count_institutionalAccount_sector($query, $contexts,$sizelimit) 1084 { 1085 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1086 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1087 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1088 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1089 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1090 ldap_bind($ldap_conn,$dn,$passwd); 1091 // counting users by sector. 1092 foreach ($contexts as $index=>$context) { 1093 if($context == $GLOBALS['phpgw_info']['server'] ["ldap_context"]) { 1094 $contexts[$index] = null; 1095 $justthese = array("dn"); 1096 $filter="(objectClass=OrganizationalUnit)"; 1097 $search = ldap_list($ldap_conn, $context, $filter, $justthese); 1098 $entries = ldap_get_entries($ldap_conn, $search); 1099 $contexts = array(); 1100 } 1101 } 1102 1103 $filter="(phpgwAccountType=i)"; 1104 $justthese = array("dn"); 1105 $search = ldap_search($ldap_conn, $context, $filter, $justthese, 0, $sizelimit); 1106 $entries = ldap_get_entries($ldap_conn, $search); 1107 $total_count = $entries["count"]; 1108 886 1109 ldap_close($ldap_conn); 1110 887 1111 return $total_count; 888 1112 } … … 897 1121 ldap_bind($ldap_conn,$dn,$passwd); 898 1122 899 $filter="( &(phpgwAccountType=u)(|(uid=*)))";1123 $filter="(phpgwAccountType=u)"; 900 1124 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp"); 901 1125 … … 1254 1478 ldap_bind($ldap_conn,$dn,$passwd); 1255 1479 1256 $filter="(&(phpgwAccountType=u) (|(uid=*)))";1480 $filter="(&(phpgwAccountType=u))"; 1257 1481 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp","telephoneNumber"); 1258 1482 … … 1318 1542 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1319 1543 } 1544 1545 function Paginate_cota($type, $query, $contexts, $Field, $Order = 'asc', $Page = null, $PerPage = null ) 1546 { 1547 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1548 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1549 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1550 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1551 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1552 ldap_bind($ldap_conn,$dn,$passwd); 1553 1554 $filter="(|(phpgwAccountType=u)(|(phpgwAccountType=s)))"; 1555 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp","telephoneNumber"); 1556 1557 foreach ($contexts as $index=>$context) 1558 { 1559 $search=ldap_search($ldap_conn, $query, $filter, $justthese); 1560 1561 $rConnection = $ldap_conn; 1562 $rSearch = $search; 1563 $sOrder = $Order; 1564 $iPage = $Page; 1565 $iPerPage = $PerPage; 1566 $sField = $Field; 1567 1568 $iTotalEntries = ldap_count_entries( $rConnection, $rSearch ); 1569 1570 if ( $iPage === null || $iPerPage === null ) 1571 { 1572 # fetch all in one page 1573 $iStart = 0; 1574 $iEnd = $iTotalEntries - 1; 1575 } 1576 else 1577 { 1578 # calculate range of page 1579 $iFimPage = ( ceil( $iTotalEntries / $iPerPage ) - 1 ) * $iPage; 1580 1581 $iStart = ( ceil( ($iPage -1) * $iPerPage )); 1582 $iEnd = $iPage * $iPerPage; 1583 1584 1585 if ( $sOrder === "desc" ) 1586 { 1587 # revert range 1588 $iStart = $iTotalEntries - 1 - $iEnd; 1589 $iEnd = $iStart + $iPerPage - 1; 1590 } 1591 } 1592 1593 /********* Importante Mostra o resultado da paginação ********** 1594 var_dump( $iStart . " " . $iEnd ); 1595 ****************** Só descomentar ******************************/ 1596 1597 # fetch entries 1598 ldap_sort( $rConnection, $rSearch, $sField ); 1599 1600 $aList = array(); 1601 for ( 1602 $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch ); 1603 $iCurrent <= $iEnd && is_resource( $rEntry ); 1604 $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry ) 1605 ) 1606 { 1607 if ( $iCurrent >= $iStart ) 1608 { 1609 array_push( $aList, ldap_get_attributes( $rConnection, $rEntry )); 1610 } 1611 } 1612 } 1613 1614 ldap_close($ldap_conn); 1615 1616 # if order is desc revert page's entries 1617 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1618 } 1619 1620 function Paginate_shareAccount($type, $query, $contexts, $Field, $Order = 'asc', $Page = null, $PerPage = null ) 1621 1622 { 1623 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1624 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1625 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1626 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1627 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1628 ldap_bind($ldap_conn,$dn,$passwd); 1629 1630 $filter="(phpgwAccountType=s)"; 1631 $justthese = array("uid", "cn", "mail","accountstatus"); 1632 1633 foreach ($contexts as $index=>$context) 1634 { 1635 $search=ldap_search($ldap_conn, $query, $filter, $justthese); 1636 1637 $rConnection = $ldap_conn; 1638 $rSearch = $search; 1639 $sOrder = $Order; 1640 $iPage = $Page; 1641 $iPerPage = $PerPage; 1642 $sField = $Field; 1643 1644 $iTotalEntries = ldap_count_entries( $rConnection, $rSearch ); 1645 1646 if ( $iPage === null || $iPerPage === null ) 1647 { 1648 # fetch all in one page 1649 $iStart = 0; 1650 $iEnd = $iTotalEntries - 1; 1651 } 1652 else 1653 { 1654 # calculate range of page 1655 $iFimPage = ( ceil( $iTotalEntries / $iPerPage ) - 1 ) * $iPage; 1656 1657 $iStart = ( ceil( ($iPage -1) * $iPerPage )); 1658 $iEnd = $iPage * $iPerPage; 1659 1660 if ( $sOrder === "desc" ) 1661 { 1662 # revert range 1663 $iStart = $iTotalEntries - 1 - $iEnd; 1664 $iEnd = $iStart + $iPerPage - 1; 1665 } 1666 } 1667 1668 # fetch entries 1669 ldap_sort( $rConnection, $rSearch, $sField ); 1670 1671 $aList = array(); 1672 for ( 1673 $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch ); 1674 $iCurrent <= $iEnd && is_resource( $rEntry ); 1675 $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry ) 1676 ) 1677 { 1678 if ( $iCurrent >= $iStart ) 1679 { 1680 array_push( $aList, ldap_get_attributes( $rConnection, $rEntry )); 1681 } 1682 } 1683 } 1684 1685 ldap_close($ldap_conn); 1686 1687 # if order is desc revert page's entries 1688 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1689 } 1690 1691 function Paginate_institutionalAccount($type, $query, $contexts, $Field, $Order = 'asc', $Page = null, $PerPage = null ) 1692 { 1693 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1694 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1695 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1696 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1697 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1698 ldap_bind($ldap_conn,$dn,$passwd); 1699 1700 $filter="(phpgwAccountType=i)"; 1701 $justthese = array("uid", "cn", "mail","accountstatus","mailforwardingaddress"); 1702 1703 foreach ($contexts as $index=>$context) 1704 { 1705 $search=ldap_search($ldap_conn, $query, $filter, $justthese); 1706 1707 $rConnection = $ldap_conn; 1708 $rSearch = $search; 1709 $sOrder = $Order; 1710 $iPage = $Page; 1711 $iPerPage = $PerPage; 1712 $sField = $Field; 1713 1714 $iTotalEntries = ldap_count_entries( $rConnection, $rSearch ); 1715 1716 if ( $iPage === null || $iPerPage === null ) 1717 { 1718 # fetch all in one page 1719 $iStart = 0; 1720 $iEnd = $iTotalEntries - 1; 1721 } 1722 else 1723 { 1724 # calculate range of page 1725 $iFimPage = ( ceil( $iTotalEntries / $iPerPage ) - 1 ) * $iPage; 1726 1727 $iStart = ( ceil( ($iPage -1) * $iPerPage )); 1728 $iEnd = $iPage * $iPerPage; 1729 1730 if ( $sOrder === "desc" ) 1731 { 1732 # revert range 1733 $iStart = $iTotalEntries - 1 - $iEnd; 1734 $iEnd = $iStart + $iPerPage - 1; 1735 } 1736 } 1737 1738 # fetch entries 1739 ldap_sort( $rConnection, $rSearch, $sField ); 1740 1741 $aList = array(); 1742 for ( 1743 $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch ); 1744 $iCurrent <= $iEnd && is_resource( $rEntry ); 1745 $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry ) 1746 ) 1747 { 1748 if ( $iCurrent >= $iStart ) 1749 { 1750 array_push( $aList, ldap_get_attributes( $rConnection, $rEntry )); 1751 } 1752 } 1753 } 1754 1755 ldap_close($ldap_conn); 1756 1757 # if order is desc revert page's entries 1758 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1759 } 1760 1320 1761 1321 1762 function get_list_ou_user_logon($query,$contexts,$sizelimit) -
branches/2.2/reports/inc/class.imap_functions.inc.php
r3946 r4570 39 39 return $quota; 40 40 } 41 42 function getMembersShareAccount($uid) 43 { 44 $owner_user_share = imap_getacl($this->imap, "user" . $this->imapDelimiter . $uid); 45 46 //Organiza participantes da conta compartilha em um array, retira apenas os members, 47 $i =0; 48 foreach($owner_user_share as $key => $value) 49 { 50 if ($i != 0) 51 { 52 $return[$i] = $key; 53 } 54 $i++; 55 } 56 57 //Ordena os participantes da conta compartilhada 58 sort($return); 59 60 return $return; 61 } 62 41 63 } -
branches/2.2/reports/inc/class.uireports_cota.inc.php
r4035 r4570 38 38 $this->imap_functions = CreateObject('reports.imap_functions'); 39 39 $this->fpdf = CreateObject('reports.uireports_fpdf'); // Class para PDF 40 // $this->fpdf = CreateObject('reports.fpdf'); // Class para PDF41 40 42 41 $c = CreateObject('phpgwapi.config','reports'); // cria o objeto relatorio no $c … … 157 156 { 158 157 // 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); 160 159 $totaluser = "(".$account_user.")"; 161 160 … … 277 276 278 277 // 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); 280 279 281 280 if (!count($account_info)) … … 357 356 358 357 // ********** 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); 360 359 361 360 $tmpp = array(); … … 418 417 'row_cn' => $accountr['account_cn'], 419 418 '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']) 422 421 ); 423 422 … … 526 525 $pdf->Open(); 527 526 $pdf->AddPage(); 528 $pdf->SetTitle('Relatório Gerado pelo Expresso Reports');529 527 530 528 //Set font and colors … … 537 535 //Table header 538 536 $SubTitulo = lang('reports title4'); 539 $SubTituloR = lang(' report cota organization');537 $SubTituloR = lang('Report Generated by Expresso Reports'); 540 538 $SubTitulo1 = $subtitulo1; 541 539 $GLOBALS['phpgw_info']['apps']['reports']['subtitle'] = $SubTituloR; … … 550 548 $pdf->SetLineWidth(.3); 551 549 552 // $pdf->Cell(0,10,$SubTitulo1,0,1,'C',0);553 550 $pdf->MultiCell(0,3,$SubTitulo1,0,'C',0); 554 551 … … 558 555 $pdf->Cell(0,5,$titulo_system,0,1,'R',0); 559 556 560 $account_info = $this->functions->get_list_ user_sector($setordn,$contexts,0);557 $account_info = $this->functions->get_list_cota_sector($setordn,$contexts,0); 561 558 562 559 if (count($account_info)) … … 596 593 $account_lid = $account['account_lid']; 597 594 $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']); 599 596 $row_mailquota = $user_mailquota; 600 597 $row_mailquota_used = $user_mailquota_used; 601 598 $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'); 603 600 604 601 … … 656 653 function get_user_info($userdn,$usercontexts,$usersizelimit) 657 654 { 658 // $user_info = $this->functions->Paginate_user('accounts',$setordn,$contexts,'cn','asc',$npag,$numpage);659 655 $user_info_imap = $this->imap_functions->get_user_info($user_info_ldap['uid']); 660 656 -
branches/2.2/reports/inc/class.uireports_fpdf.inc.php
r3666 r4570 120 120 } 121 121 122 /* function Header()123 {124 $SubTituloR = lang('report cota organization');125 126 //Restore font and colors127 $this->SetFont('Arial','',8);128 $this->SetFillColor(224,235,255);129 $this->SetTextColor(0);130 131 $this->Cell(95,5,lang('name'),1,0,'L',1);132 // $pdf->Cell(53,5,lang('report email'),1,0,'L',1);133 $this->Cell(17,5,lang('cota'),1,0,'C',1);134 $this->Cell(31,5,lang('cota used'),1,0,'C',1);135 $this->Cell(29,5,lang('percent cota'),1,0,'C',1);136 $this->Cell(20,5,lang('status'),1,1,'C',1);137 138 return;139 }140 */141 122 function Footer() 142 123 { 143 124 // Esta função foi implemantada para realizar o rodapé dos relatórios 144 145 125 $titulo_system = $GLOBALS['phpgw_info']['apps']['reports']['title']; 146 126 $SubTitulo = $GLOBALS['phpgw_info']['apps']['reports']['subtitle']; … … 153 133 154 134 //Imprime o número da página 155 // $this->Cell(0,5,$titulo_system.' '.$SubTitulo.' Página n. '.$this->PageNo(),1,0,'C',1);156 157 135 $this->Rect(9,281,197,6,'D'); 158 136 $this->Cell(55,4,$titulo_system,0,0,'L',1); -
branches/2.2/reports/inc/class.uireports_logon.inc.php
r4035 r4570 76 76 77 77 if ($vnumacesso==999){ 78 $numacesso = "Nunca logou";78 $numacesso = lang('Never login'); 79 79 } 80 80 … … 87 87 $pdf->Open(); 88 88 $pdf->AddPage(); 89 $pdf->SetTitle('Relatório Gerado pelo Expresso Reports');90 89 91 90 //Set font and colors … … 98 97 //Table header 99 98 $SubTitulo = lang('reports title6'); 100 $SubTituloR = lang(' report of time without logging by Organization');99 $SubTituloR = lang('Report Generated by Expresso Reports'); 101 100 $SubTitulo1 = $subtitulo1; 102 101 $GLOBALS['phpgw_info']['apps']['reports']['subtitle'] = $SubTituloR; … … 181 180 $row_cn = $accountr['account_cn']; 182 181 $account_lid = $accountr['account_lid']; 183 $row_mail = (!$accountr['account_mail'] ? 'Sem E-mail': $accountr['account_mail']);182 $row_mail = (!$accountr['account_mail'] ? lang('Without E-mail') : $accountr['account_mail']); 184 183 $row_timestamp = substr($accountr['createTimestamp'], 6, 2)."/".substr($accountr['createTimestamp'], 4, 2)."/".substr($accountr['createTimestamp'], 0, 4); 185 $row_li_date = $accountr['li_date'] == 'Nunca logou' ? 'Nunca logou': $accountr['li_date'];184 $row_li_date = $accountr['li_date'] == lang('Never login') ? lang('Never login') : $accountr['li_date']; 186 185 $row_li_dias = $accountr['li_dias']; 187 $row_status = $accountr['account_status'] == 'active' ? 'Ativado' : 'Desativado';186 $row_status = $accountr['account_status'] == 'active' ? lang('Activated') : lang('Disabled'); 188 187 189 188 $pdf->Cell(60,5,$account_lid,0,0,'L',0); … … 192 191 $pdf->Cell(25,5,$row_timestamp,0,0,'C',0); 193 192 194 if ($row_li_date == 'Nunca logou')193 if ($row_li_date == lang('Never login')) 195 194 { 196 195 //Muda cor fonte … … 612 611 'row_mail' => (!$accountr['account_mail']?'<font color=red>Sem E-mail</font>':$accountr['account_mail']), 613 612 'row_timestamp' => substr($accountr['createTimestamp'], 6, 2)."/".substr($accountr['createTimestamp'], 4, 2)."/".substr($accountr['createTimestamp'], 0, 4), 614 'row_li_date' => $accountr['li_date'] == 'Nunca logou'? '<font color="#FF0000">'.$accountr['li_date'].'</font>' : $accountr['li_date'],613 'row_li_date' => $accountr['li_date'] ==lang('Never login') ? '<font color="#FF0000">'.$accountr['li_date'].'</font>' : $accountr['li_date'], 615 614 'row_li_dias' => $accountr['li_dias'] 616 615 ); … … 718 717 $access_log_array = explode("#",$access_log); 719 718 720 if ($numacesso<> "Nunca logou"){719 if ($numacesso<>lang('Never login')){ 721 720 $accountp['li_dias'] = $access_log_array[1]; 722 721 $accountp['li_date'] = $access_log_array[0]; … … 778 777 'row_loginid' => $accountr['account_lid'], 779 778 'row_cn' => $accountr['account_cn'], 780 'row_status' => $accountr['account_status'] == 'active' ? '<font color="#0033FF"> Ativado</font> ' : '<font color="#FF0000">Desativado</font>',781 'row_mail' => (!$accountr['account_mail']?'<font color=red> Sem E-mail</font>':$accountr['account_mail']),779 'row_status' => $accountr['account_status'] == 'active' ? '<font color="#0033FF">'.lang('Activated').'</font> ' : '<font color="#FF0000">'.lang('Disabled').'</font>', 780 'row_mail' => (!$accountr['account_mail']?'<font color=red>'.lang('Without E-mail').'</font>':$accountr['account_mail']), 782 781 'row_timestamp' => substr($accountr['createTimestamp'], 6, 2)."/".substr($accountr['createTimestamp'], 4, 2)."/".substr($accountr['createTimestamp'], 0, 4), 783 'row_li_date' => $accountr['li_date'] == 'Nunca logou'? '<font color="#FF0000">'.$accountr['li_date'].'</font>' : $accountr['li_date'],782 'row_li_date' => $accountr['li_date'] ==lang('Never login') ? '<font color="#FF0000">'.$accountr['li_date'].'</font>' : $accountr['li_date'], 784 783 'row_li_dias' => $accountr['li_dias'] 785 784 ); -
branches/2.2/reports/inc/class.uireports_maillists.inc.php
r4035 r4570 78 78 $pdf->Open(); 79 79 $pdf->AddPage(); 80 $pdf->SetTitle( 'Relatório Gerado pelo Expresso Reports');80 $pdf->SetTitle(lang('Report Generated by Expresso Reports')); 81 81 82 82 //Set font and colors … … 89 89 //Table header 90 90 $SubTitulo = lang('reports title8'); 91 $SubTituloR = lang(' report organization');91 $SubTituloR = lang('Report Generated by Expresso Reports'); 92 92 $SubTitulo1 = $subtitulo1; 93 93 $GLOBALS['phpgw_info']['apps']['reports']['subtitle'] = $SubTituloR; … … 125 125 $row_loginid = $account['uid']; 126 126 $row_cn = $account['name']; 127 $row_mail = (!$account['email']?'<font color=red> Sem E-mail</font>':$account['email']);127 $row_mail = (!$account['email']?'<font color=red>'.lang('Without E-mail').'</font>':$account['email']); 128 128 $pdf->Cell(40,5,$row_loginid,0,0,'L',0); 129 129 $pdf->Cell(75,5,$row_cn,0,0,'L',0); … … 461 461 $tmpp[$accountp['uid'][0]]['account_lid'] = $accountp['uid'][0]; 462 462 $tmpp[$accountp['uid'][0]]['account_cn'] = $accountp['cn'][0]; 463 $tmpp[$accountp['uid'][0]]['account_mail'] = $accountp['mail'][0];463 $tmpp[$accountp['uid'][0]]['account_mail'] = $accountp['mail'][0]; 464 464 $sortp[] = $accountp['uid'][0]; 465 465 if (count($sortp)) … … 478 478 'row_loginid' => $accountr['account_lid'], 479 479 'row_cn' => $accountr['account_cn'], 480 'row_mail' => (!$accountr['account_mail']?'<font color=red> Sem E-mail</font>':$accountr['account_mail'])480 'row_mail' => (!$accountr['account_mail']?'<font color=red>'.lang('Without E-mail').'</font>':$accountr['account_mail']) 481 481 ); 482 482 -
branches/2.2/reports/inc/class.uireports_users.inc.php
r4035 r4570 78 78 $pdf->Open(); 79 79 $pdf->AddPage(); 80 $pdf->SetTitle( 'Relatório Gerado pelo Expresso Reports');80 $pdf->SetTitle(lang('Report Generated by Expresso Reports')); 81 81 82 82 //Set font and colors … … 89 89 //Table header 90 90 $SubTitulo = lang('reports title2'); 91 $SubTituloR = lang(' report organization');91 $SubTituloR = lang('Report Generated by Expresso Reports'); 92 92 $SubTitulo1 = $subtitulo1; 93 93 $GLOBALS['phpgw_info']['apps']['reports']['subtitle'] = $SubTituloR; 94 94 $pdf->Cell(0,8,$SubTitulo,0,1,'C',0); 95 96 95 97 96 //Set font and colors … … 127 126 $row_loginid = $account['account_lid']; 128 127 $row_cn = $account['account_cn']; 129 $row_mail = (!$account['account_mail'] ? '<font color=red> Sem E-mail</font>' : $account['account_mail']);128 $row_mail = (!$account['account_mail'] ? '<font color=red>'.lang('Without E-mail').'</font>' : $account['account_mail']); 130 129 $row_phone = (!$account['account_phone'] ? '-' : $account['account_phone']); 131 $row_status = $account['account_accountstatus'] == 'active' ? 'Ativado' : 'Desativado';130 $row_status = $account['account_accountstatus'] == 'active' ? lang('Activated') : lang('Disabled'); 132 131 $pdf->Cell(55,5,$row_loginid,0,0,'L',0); 133 132 $pdf->Cell(80,5,$row_cn,0,0,'L',0); 134 133 $pdf->Cell(80,5,$row_mail,0,0,'L',0); 135 134 $pdf->Cell(35,5,$row_phone,0,0,'L',0); 136 if ($row_status == 'Ativado')135 if ($row_status == lang('Activated')) 137 136 { 138 137 //Restaura cor fonte … … 499 498 'row_loginid' => $accountr['account_lid'], 500 499 'row_cn' => $accountr['account_cn'], 501 'row_status' => $accountr['account_status'] == 'active' ? '<font color="#0033FF">Ativado</font> ' : '<font color="#FF0000">Desativado</font>',500 'row_status' => $accountr['account_status'] == 'active' ? '<font color="#0033FF">'.lang('Activated').'</font> ' : '<font color="#FF0000">'.lang('Disabled').'</font>', 502 501 'row_phone' => (!$accountr['account_phone'] ? '-' : $accountr['account_phone']), 503 'row_mail' => (!$accountr['account_mail'] ? '<font color=red>Sem E-mail</font>' : $accountr['account_mail'])502 'row_mail' => (!$accountr['account_mail'] ? '<font color=red>'.lang('Without E-mail').'</font>' : $accountr['account_mail']) 504 503 ); 505 504 -
branches/2.2/reports/inc/class.uireports_usersgroups.inc.php
r4035 r4570 78 78 $pdf->Open(); 79 79 $pdf->AddPage(); 80 $pdf->SetTitle( 'Relatório Gerado pelo Expresso Reports');80 $pdf->SetTitle(lang('Report of institutional accounts of the Organization')); 81 81 82 82 //Set font and colors … … 89 89 //Table header 90 90 $SubTitulo = lang('reports title10'); 91 $SubTituloR = lang(' report organization');91 $SubTituloR = lang('Report Generated by Expresso Reports'); 92 92 $SubTitulo1 = $subtitulo1; 93 93 $GLOBALS['phpgw_info']['apps']['reports']['subtitle'] = $SubTituloR; -
branches/2.2/reports/index.php
r3948 r4570 28 28 'lang_rel_title' => lang('reports'), 29 29 'lang_rel_user_org' => lang('report organization'), 30 'lang_rel_share_account_org' => lang('report share account organization'), 31 'lang_rel_institutional_account_org' => lang('report institutional account organization'), 30 32 'lang_rel_cota_org' => lang('report cota organization'), 31 33 'lang_rel_logon_org' => lang('report of time without logging by Organization'), -
branches/2.2/reports/setup/phpgw_pt-br.lang
r3666 r4570 1 Activated reports pt-br Ativado 2 Date reports pt-br Data 3 Without E-mail reports pt-br Sem E-mail 4 Report of shared accounts of the Organization reports pt-br Relatório das contas compartilhadas da Organização 5 Report shared accounts by Organization reports pt-br Relatório de contas compartilhadas por Organização 6 Report Generated by Expresso Reports reports pt-br Relatório gerado pelo Expresso Reports 7 report institutional account organization reports pt-br Relatório de contas institucionais por Organização 8 Report of institutional accounts of the Organization reports pt-br Relatório de contas institucionais da Organização 9 Report institutional accounts by Organization reports pt-br Relatório de contas institucionais por Organização 1 10 uidNumber reports pt-br UID 2 11 user login reports pt-br Login do usuário … … 27 36 reports reports pt-br Relatórios 28 37 report organization reports pt-br Relatório de usuários por Organização 38 report share account organization reports pt-br Relatório de contas compartilhadas por Organização 29 39 report cota organization reports pt-br Relatório de cotas por Organização 30 40 report maillists organization reports pt-br Relatório de lista de emails por Organização -
branches/2.2/reports/templates/default/index.tpl
r3948 r4570 12 12 </style> 13 13 <table width="90%" border="0" cellspacing="10" cellpadding="0" align="center"> 14 <!-- TODOS OS USUARIOS DO CONTEXTO15 <tr>16 <td width="1%" align="center"><img src='./templates/default/images/user.png'></td>17 <td>18 <a href="../index.php?menuaction=reports.uireports.report_users_print">{lang_rel_user_all}</a>19 </td>20 </tr>21 -->22 14 <tr> 23 15 <td width="1%" align="center"><img src='./templates/default/images/user.png'></td> 24 16 <td> 25 17 <a href="../index.php?menuaction=reports.uireports_users.report_users_group">{lang_rel_user_org}</a> 18 </td> 19 </tr> 20 <tr> 21 <td width="1%" align="center"><img src='./templates/default/images/institutional_account.png'></td> 22 <td> 23 <a href="../index.php?menuaction=reports.uireports_institutionalAccounts.report_institutionalAccounts_group">{lang_rel_institutional_account_org}</a> 24 </td> 25 </tr> 26 <tr> 27 <td width="1%" align="center"><img src='./templates/default/images/mail_share.png'></td> 28 <td> 29 <a href="../index.php?menuaction=reports.uireports_shareAccounts.report_shareAccounts_group">{lang_rel_share_account_org}</a> 26 30 </td> 27 31 </tr>
Note: See TracChangeset
for help on using the changeset viewer.