Revision 2620,
926 bytes
checked in by alexandrecorreia, 14 years ago
(diff) |
Ticket #986 - Correcao para evitar o excesso de requisicoes, quando o servidor aceita apenas uma.
|
Rev | Line | |
---|
[2607] | 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); |
---|
[2620] | 17 | //return $this->gerador().base64_encode($this->userJabber); |
---|
[2607] | 18 | } |
---|
| 19 | |
---|
| 20 | function getUserCurrentPassword() |
---|
| 21 | { |
---|
| 22 | return "TWxGeG55K7W".base64_encode($this->password); |
---|
[2620] | 23 | //return $this->gerador().base64_encode($this->password); |
---|
[2607] | 24 | } |
---|
| 25 | |
---|
[2620] | 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 | |
---|
[2607] | 41 | } |
---|
| 42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.