Changeset 6920
- Timestamp:
- 07/31/12 16:01:37 (12 years ago)
- Location:
- trunk/reports
- Files:
-
- 8 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reports/inc/class.functions.inc.php
r6057 r6920 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, … … 119 122 $result['raw_context'] = $acl[0]['context']; 120 123 121 $all_contexts = preg_split('/%/', $acl[0]['context']);124 $all_contexts = split("%", $acl[0]['context']); 122 125 foreach ($all_contexts as $index=>$context) 123 126 { … … 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 } 889 890 function get_list_user_sector_logon($query, $contexts,$sizelimit,$numacesso) 891 { 1113 1114 function get_num_users_sector($query, $contexts) { 892 1115 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 893 1116 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; … … 896 1119 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 897 1120 ldap_bind($ldap_conn,$dn,$passwd); 898 899 $filter="(&(phpgwAccountType=u)(|(uid=*)))"; 1121 1122 $filter="(phpgwAccountType=u)"; 1123 $justthese = array("uidnumber"); 1124 $count = 0; 1125 foreach ($contexts as $index=>$context) { 1126 $search = ldap_search($ldap_conn, $query, $filter, $justthese); 1127 $count+=ldap_count_entries($ldap_conn, $search); 1128 } 1129 return $count; 1130 } 1131 1132 function get_list_user_sector_logon($query, $contexts,$sizelimit,$numacesso) 1133 { 1134 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1135 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1136 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1137 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1138 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1139 ldap_bind($ldap_conn,$dn,$passwd); 1140 1141 $filter="(phpgwAccountType=u)"; 900 1142 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp"); 901 1143 … … 1071 1313 function make_lang($ram_lang) 1072 1314 { 1073 $a_lang = preg_split('/_/', $ram_lang);1315 $a_lang = split("_", $ram_lang); 1074 1316 $a_lang_reverse = array_reverse ( $a_lang, true ); 1075 1317 array_pop ( $a_lang_reverse ); … … 1254 1496 ldap_bind($ldap_conn,$dn,$passwd); 1255 1497 1256 $filter="(&(phpgwAccountType=u) (|(uid=*)))";1498 $filter="(&(phpgwAccountType=u))"; 1257 1499 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp","telephoneNumber"); 1258 1500 … … 1318 1560 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1319 1561 } 1562 1563 function Paginate_cota($type, $query, $contexts, $Field, $Order = 'asc', $Page = null, $PerPage = null ) 1564 { 1565 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1566 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1567 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1568 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1569 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1570 ldap_bind($ldap_conn,$dn,$passwd); 1571 1572 $filter="(|(phpgwAccountType=u)(|(phpgwAccountType=s)))"; 1573 $justthese = array("uidnumber", "uid", "cn", "mail","accountstatus","dn","createtimestamp","telephoneNumber"); 1574 1575 foreach ($contexts as $index=>$context) 1576 { 1577 $search=ldap_search($ldap_conn, $query, $filter, $justthese); 1578 1579 $rConnection = $ldap_conn; 1580 $rSearch = $search; 1581 $sOrder = $Order; 1582 $iPage = $Page; 1583 $iPerPage = $PerPage; 1584 $sField = $Field; 1585 1586 $iTotalEntries = ldap_count_entries( $rConnection, $rSearch ); 1587 1588 if ( $iPage === null || $iPerPage === null ) 1589 { 1590 # fetch all in one page 1591 $iStart = 0; 1592 $iEnd = $iTotalEntries - 1; 1593 } 1594 else 1595 { 1596 # calculate range of page 1597 $iFimPage = ( ceil( $iTotalEntries / $iPerPage ) - 1 ) * $iPage; 1598 1599 $iStart = ( ceil( ($iPage -1) * $iPerPage )); 1600 $iEnd = $iPage * $iPerPage; 1601 1602 1603 if ( $sOrder === "desc" ) 1604 { 1605 # revert range 1606 $iStart = $iTotalEntries - 1 - $iEnd; 1607 $iEnd = $iStart + $iPerPage - 1; 1608 } 1609 } 1610 1611 /********* Importante Mostra o resultado da paginação ********** 1612 var_dump( $iStart . " " . $iEnd ); 1613 ****************** Só descomentar ******************************/ 1614 1615 # fetch entries 1616 ldap_sort( $rConnection, $rSearch, $sField ); 1617 1618 $aList = array(); 1619 for ( 1620 $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch ); 1621 $iCurrent <= $iEnd && is_resource( $rEntry ); 1622 $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry ) 1623 ) 1624 { 1625 if ( $iCurrent >= $iStart ) 1626 { 1627 array_push( $aList, ldap_get_attributes( $rConnection, $rEntry )); 1628 } 1629 } 1630 } 1631 1632 ldap_close($ldap_conn); 1633 1634 # if order is desc revert page's entries 1635 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1636 } 1637 1638 function Paginate_shareAccount($type, $query, $contexts, $Field, $Order = 'asc', $Page = null, $PerPage = null ) 1639 1640 { 1641 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1642 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1643 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1644 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1645 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1646 ldap_bind($ldap_conn,$dn,$passwd); 1647 1648 $filter="(phpgwAccountType=s)"; 1649 $justthese = array("uid", "cn", "mail","accountstatus"); 1650 1651 foreach ($contexts as $index=>$context) 1652 { 1653 $search=ldap_search($ldap_conn, $query, $filter, $justthese); 1654 1655 $rConnection = $ldap_conn; 1656 $rSearch = $search; 1657 $sOrder = $Order; 1658 $iPage = $Page; 1659 $iPerPage = $PerPage; 1660 $sField = $Field; 1661 1662 $iTotalEntries = ldap_count_entries( $rConnection, $rSearch ); 1663 1664 if ( $iPage === null || $iPerPage === null ) 1665 { 1666 # fetch all in one page 1667 $iStart = 0; 1668 $iEnd = $iTotalEntries - 1; 1669 } 1670 else 1671 { 1672 # calculate range of page 1673 $iFimPage = ( ceil( $iTotalEntries / $iPerPage ) - 1 ) * $iPage; 1674 1675 $iStart = ( ceil( ($iPage -1) * $iPerPage )); 1676 $iEnd = $iPage * $iPerPage; 1677 1678 if ( $sOrder === "desc" ) 1679 { 1680 # revert range 1681 $iStart = $iTotalEntries - 1 - $iEnd; 1682 $iEnd = $iStart + $iPerPage - 1; 1683 } 1684 } 1685 1686 # fetch entries 1687 ldap_sort( $rConnection, $rSearch, $sField ); 1688 1689 $aList = array(); 1690 for ( 1691 $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch ); 1692 $iCurrent <= $iEnd && is_resource( $rEntry ); 1693 $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry ) 1694 ) 1695 { 1696 if ( $iCurrent >= $iStart ) 1697 { 1698 array_push( $aList, ldap_get_attributes( $rConnection, $rEntry )); 1699 } 1700 } 1701 } 1702 1703 ldap_close($ldap_conn); 1704 1705 # if order is desc revert page's entries 1706 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1707 } 1708 1709 function Paginate_institutionalAccount($type, $query, $contexts, $Field, $Order = 'asc', $Page = null, $PerPage = null ) 1710 { 1711 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1712 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1713 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1714 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1715 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1716 ldap_bind($ldap_conn,$dn,$passwd); 1717 1718 $filter="(phpgwAccountType=i)"; 1719 $justthese = array("uid", "cn", "mail","accountstatus","mailforwardingaddress"); 1720 1721 foreach ($contexts as $index=>$context) 1722 { 1723 $search=ldap_search($ldap_conn, $query, $filter, $justthese); 1724 1725 $rConnection = $ldap_conn; 1726 $rSearch = $search; 1727 $sOrder = $Order; 1728 $iPage = $Page; 1729 $iPerPage = $PerPage; 1730 $sField = $Field; 1731 1732 $iTotalEntries = ldap_count_entries( $rConnection, $rSearch ); 1733 1734 if ( $iPage === null || $iPerPage === null ) 1735 { 1736 # fetch all in one page 1737 $iStart = 0; 1738 $iEnd = $iTotalEntries - 1; 1739 } 1740 else 1741 { 1742 # calculate range of page 1743 $iFimPage = ( ceil( $iTotalEntries / $iPerPage ) - 1 ) * $iPage; 1744 1745 $iStart = ( ceil( ($iPage -1) * $iPerPage )); 1746 $iEnd = $iPage * $iPerPage; 1747 1748 if ( $sOrder === "desc" ) 1749 { 1750 # revert range 1751 $iStart = $iTotalEntries - 1 - $iEnd; 1752 $iEnd = $iStart + $iPerPage - 1; 1753 } 1754 } 1755 1756 # fetch entries 1757 ldap_sort( $rConnection, $rSearch, $sField ); 1758 1759 $aList = array(); 1760 for ( 1761 $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch ); 1762 $iCurrent <= $iEnd && is_resource( $rEntry ); 1763 $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry ) 1764 ) 1765 { 1766 if ( $iCurrent >= $iStart ) 1767 { 1768 array_push( $aList, ldap_get_attributes( $rConnection, $rEntry )); 1769 } 1770 } 1771 } 1772 1773 ldap_close($ldap_conn); 1774 1775 # if order is desc revert page's entries 1776 return $sOrder === "desc" ? array_reverse( $aList ) : $aList; 1777 } 1778 1320 1779 1321 1780 function get_list_ou_user_logon($query,$contexts,$sizelimit) -
trunk/reports/inc/class.imap_functions.inc.php
r5291 r6920 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 } -
trunk/reports/inc/class.uireports.inc.php
r5921 r6920 97 97 $newval = str_replace(' ','_',$newval); 98 98 /* Don't show passwords in the form */ 99 if( preg_match('/passwd/',$value) || preg_match('/password/',$value) || preg_match('/root_pw/',$value))99 if(ereg('passwd',$value) || ereg('password',$value) || ereg('root_pw',$value)) 100 100 { 101 101 $t->set_var($value,''); -
trunk/reports/inc/class.uireports_cota.inc.php
r5934 r6920 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 … … 101 100 // Save query 102 101 $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))); 105 104 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 106 105 … … 137 136 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 138 137 { 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))); 141 140 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 142 141 } … … 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 … … 205 204 { 206 205 $grouplist = trim($_POST[setor]); 207 $grouplist = trim( preg_replace('/-/','',$grouplist));206 $grouplist = trim(ereg_replace("-","",$grouplist)); 208 207 $organizacao = trim($_POST[organizacao]); 209 208 $setordn = trim($_POST[setordn]); … … 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 … … 514 513 515 514 $grouplist = trim($_POST[setor]); 516 $grouplist = trim( preg_replace('/-/','',$grouplist));515 $grouplist = trim(ereg_replace("-","",$grouplist)); 517 516 518 517 $setordn = trim($_POST[setordn]); … … 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 -
trunk/reports/inc/class.uireports_fpdf.inc.php
r5291 r6920 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); -
trunk/reports/inc/class.uireports_logon.inc.php
r5934 r6920 67 67 68 68 $grouplist = trim($_POST[setor]); 69 $grouplist = trim( preg_replace('/-/','',$grouplist));69 $grouplist = trim(ereg_replace("-","",$grouplist)); 70 70 71 71 $setordn = trim($_POST[setordn]); … … 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 … … 286 285 // Save query 287 286 $varorganizacao = explode(",",$contextsdn); 288 $varorganizacao_nome = trim(strtoupper( preg_replace('/ou=/','',$varorganizacao[0])));289 $varorganizacao_nome = trim(strtoupper( preg_replace('/DC=/','',$varorganizacao_nome)));287 $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 288 $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 290 289 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 291 290 … … 329 328 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 330 329 { 331 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sector)));332 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sectorok)));330 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 331 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 333 332 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 334 333 } … … 403 402 404 403 $grouplist = trim($_POST[setor]); 405 $grouplist = trim( preg_replace('/-/','',$grouplist));404 $grouplist = trim(ereg_replace("-","",$grouplist)); 406 405 $organizacao = trim($_POST[organizacao]); 407 406 $setordn = trim($_POST[setordn]); … … 474 473 // ************ PAGINAÇÃO ******************************* 475 474 476 // verifica se exixte usuarios no LDAP 477 $account_info = $this->functions->get_list_user_sector_logon($setordn,$contexts,0,$numacesso); 478 479 if (!count($account_info)) 480 { 481 $p->set_var('message',lang('No user found')); 482 $p->parse('rows','row_empty',True); 483 } 484 else if (count($account_info)) 485 { 486 if ($vnumacesso==0){ 475 476 if ($vnumacesso==0){ 477 $numreg = $this->functions->get_num_users_sector($setordn,$contexts); 478 if ($numreg==0){ 479 $p->set_var('message',lang('No user found')); 480 $p->parse('rows','row_empty',True); 481 } 482 else { 487 483 //url do paginador 488 484 $url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/index.php?menuaction=reports.uireports_logon.report_logon_group_setor_print'; … … 507 503 508 504 // conta total dos registros 509 $numreg = count($account_info);510 505 511 506 // numero de registro por paginação … … 612 607 'row_mail' => (!$accountr['account_mail']?'<font color=red>Sem E-mail</font>':$accountr['account_mail']), 613 608 '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'],609 'row_li_date' => $accountr['li_date'] ==lang('Never login') ? '<font color="#FF0000">'.$accountr['li_date'].'</font>' : $accountr['li_date'], 615 610 'row_li_dias' => $accountr['li_dias'] 616 611 ); … … 693 688 $p->set_var($vart); 694 689 // ************************* FIM PAGINAÇÃO *********************** 695 696 }else{ 690 } 691 } 692 else{ 697 693 // ******** caso não for zero não vai paginar ***************** 698 //url do paginador 699 $url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/index.php?menuaction=reports.uireports_logon.report_logon_group_setor_print'; 700 701 // conta total dos registros 702 $numreg = count($account_info); 703 694 //url do paginador 695 $url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/index.php?menuaction=reports.uireports_logon.report_logon_group_setor_print'; 696 697 // conta total dos registros 698 699 // ********** busca no LDAP as informação total e imprime **************** 700 $paginas =$this->functions->get_list_user_sector_logon($setordn,$contexts,0,$numacesso); 701 702 if(count($paginas)==0) { 703 $p->set_var('message',lang('No user found')); 704 $p->parse('rows','row_empty',True); 705 } 706 else { 704 707 // Imprime valores de contagen de registro e pagina 705 $p->set_var('cont_user', $numreg);708 $p->set_var('cont_user',count($paginas)); 706 709 $p->set_var('cont_page',"1"); 707 710 $p->set_var('page_now',"1"); 708 709 // ********** busca no LDAP as informação paginada e imprime **************** 710 $paginas =$this->functions->get_list_user_sector_logon($setordn,$contexts,0,$numacesso); 711 711 712 712 $tmpp = array(); 713 713 $contap = 0; … … 718 718 $access_log_array = explode("#",$access_log); 719 719 720 if ($numacesso<> "Nunca logou"){720 if ($numacesso<>lang('Never login')){ 721 721 $accountp['li_dias'] = $access_log_array[1]; 722 722 $accountp['li_date'] = $access_log_array[0]; … … 749 749 } 750 750 } 751 751 752 752 if (count($sortp)) 753 753 { … … 778 778 'row_loginid' => $accountr['account_lid'], 779 779 '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']),780 'row_status' => $accountr['account_status'] == 'active' ? '<font color="#0033FF">'.lang('Activated').'</font> ' : '<font color="#FF0000">'.lang('Disabled').'</font>', 781 'row_mail' => (!$accountr['account_mail']?'<font color=red>'.lang('Without E-mail').'</font>':$accountr['account_mail']), 782 782 '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'],783 'row_li_date' => $accountr['li_date'] ==lang('Never login') ? '<font color="#FF0000">'.$accountr['li_date'].'</font>' : $accountr['li_date'], 784 784 'row_li_dias' => $accountr['li_dias'] 785 785 ); … … 789 789 $p->parse('rows','row',True); 790 790 } 791 // ********************** Fim ****************************792 }791 } 792 // ********************** Fim **************************** 793 793 } 794 794 -
trunk/reports/inc/class.uireports_maillists.inc.php
r5934 r6920 66 66 67 67 $grouplist = trim($_POST[setor]); 68 $grouplist = trim( preg_replace('/-/','',$grouplist));68 $grouplist = trim(ereg_replace("-","",$grouplist)); 69 69 70 70 $setordn = trim($_POST[setordn]); … … 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); … … 192 192 // Save query 193 193 $varorganizacao = explode(",",$contextsdn); 194 $varorganizacao_nome = trim(strtoupper( preg_replace('/ou=/','',$varorganizacao[0])));195 $varorganizacao_nome = trim(strtoupper( preg_replace('/DC=/','',$varorganizacao_nome)));194 $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 195 $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 196 196 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 197 197 … … 235 235 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 236 236 { 237 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sector)));238 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sectorok)));237 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 238 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 239 239 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 240 240 } … … 301 301 { 302 302 $grouplist = trim($_POST[setor]); 303 $grouplist = trim( preg_replace('/-/','',$grouplist));303 $grouplist = trim(ereg_replace("-","",$grouplist)); 304 304 $organizacao = trim($_POST[organizacao]); 305 305 $setordn = trim($_POST[setordn]); … … 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 -
trunk/reports/inc/class.uireports_users.inc.php
r5934 r6920 66 66 67 67 $grouplist = trim($_POST[setor]); 68 $grouplist = trim( preg_replace('/-/','',$grouplist));68 $grouplist = trim(ereg_replace("-","",$grouplist)); 69 69 70 70 $setordn = trim($_POST[setordn]); … … 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 … … 211 210 // Save query 212 211 $varorganizacao = explode(",",$contextsdn); 213 $varorganizacao_nome = trim(strtoupper( preg_replace('/ou=/','',$varorganizacao[0])));214 $varorganizacao_nome = trim(strtoupper( preg_replace('/DC=/','',$varorganizacao_nome)));212 $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 213 $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 215 214 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 216 215 … … 254 253 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 255 254 { 256 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sector)));257 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sectorok)));255 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 256 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 258 257 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 259 258 } … … 320 319 { 321 320 $grouplist = trim($_POST[setor]); 322 $grouplist = trim( preg_replace('/-/','',$grouplist));321 $grouplist = trim(ereg_replace("-","",$grouplist)); 323 322 $organizacao = trim($_POST[organizacao]); 324 323 $setordn = trim($_POST[setordn]); … … 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 -
trunk/reports/inc/class.uireports_usersgroups.inc.php
r5934 r6920 66 66 67 67 $grouplist = trim($_POST[setor]); 68 $grouplist = trim( preg_replace('/-/','',$grouplist));68 $grouplist = trim(ereg_replace("-","",$grouplist)); 69 69 70 70 $setordn = trim($_POST[setordn]); … … 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; … … 189 189 // Save query 190 190 $varorganizacao = explode(",",$contextsdn); 191 $varorganizacao_nome = trim(strtoupper( preg_replace('/ou=/','',$varorganizacao[0])));192 $varorganizacao_nome = trim(strtoupper( preg_replace('/DC=/','',$varorganizacao_nome)));191 $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 192 $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 193 193 $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 194 194 … … 232 232 if ( trim(strtoupper($varorganizacao_nome)) != trim(strtoupper($sector))) 233 233 { 234 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sector)));235 $sectorok = trim(strtoupper( preg_replace('/dc=/','',$sectorok)));234 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 235 $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 236 236 $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 237 237 } … … 298 298 { 299 299 $grouplist = trim($_POST[setor]); 300 $grouplist = trim( preg_replace('/-/','',$grouplist));300 $grouplist = trim(ereg_replace("-","",$grouplist)); 301 301 $organizacao = trim($_POST[organizacao]); 302 302 $setordn = trim($_POST[setordn]); -
trunk/reports/index.php
r5291 r6920 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'), -
trunk/reports/setup/phpgw_pt-br.lang
r5870 r6920 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 -
trunk/reports/templates/default/index.tpl
r5291 r6920 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.