Revision 3102,
926 bytes
checked in by amuller, 14 years ago
(diff) |
Ticket #986 - Efetuado merge para o Branch 2.2( atualizacao do modulo)
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | class CommonFunctions |
---|
4 | { |
---|
5 | private $userJabber; |
---|
6 | private $password; |
---|
7 | |
---|
8 | function __construct() |
---|
9 | { |
---|
10 | $this->userJabber = $_SESSION['phpgw_info']['jabberit_messenger']['user_jabber']."@".$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']; |
---|
11 | $this->password = $_SESSION['phpgw_info']['jabberit_messenger']['passwd']; |
---|
12 | } |
---|
13 | |
---|
14 | function getUserCurrentUserJabber() |
---|
15 | { |
---|
16 | return "YWxleG5K87W".base64_encode($this->userJabber); |
---|
17 | //return $this->gerador().base64_encode($this->userJabber); |
---|
18 | } |
---|
19 | |
---|
20 | function getUserCurrentPassword() |
---|
21 | { |
---|
22 | return "TWxGeG55K7W".base64_encode($this->password); |
---|
23 | //return $this->gerador().base64_encode($this->password); |
---|
24 | } |
---|
25 | |
---|
26 | private function gerador() |
---|
27 | { |
---|
28 | $char = "ABCDEFGHIJKLMNOPQRSTUVWXTZ0123456789abcdefghiklmnopqrstuvwxyz"; |
---|
29 | $key = ""; |
---|
30 | |
---|
31 | for( $i = 0 ; $i < 61; $i++ ) |
---|
32 | { |
---|
33 | $key .= substr($char, $i, mt_rand(1,61)); |
---|
34 | } |
---|
35 | |
---|
36 | $key = strlen($key).$key; |
---|
37 | |
---|
38 | return $key; |
---|
39 | } |
---|
40 | |
---|
41 | } |
---|
42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.