[2] | 1 | <?php |
---|
| 2 | /***************************************************************************\ |
---|
| 3 | * eGroupWare - Contacts Center * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * Written by: * |
---|
| 6 | * - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net> * |
---|
| 7 | * - Jonas Goes <jqhcb@users.sourceforge.net> * |
---|
| 8 | * sponsored by Thyamad - http://www.thyamad.com * |
---|
| 9 | * ------------------------------------------------------------------------- * |
---|
| 10 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 11 | * under the terms of the GNU General Public License as published by the * |
---|
| 12 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 13 | * option) any later version. * |
---|
| 14 | \***************************************************************************/ |
---|
| 15 | |
---|
| 16 | $GLOBALS['phpgw_info'] = array(); |
---|
| 17 | |
---|
| 18 | $GLOBALS['phpgw_info']['flags'] = array( |
---|
| 19 | 'currentapp' => 'contactcenter', |
---|
| 20 | 'noheader' => true, |
---|
| 21 | //'nonavbar' => true |
---|
| 22 | ); |
---|
| 23 | include('../header.inc.php'); |
---|
[358] | 24 | |
---|
[284] | 25 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; |
---|
[1598] | 26 | |
---|
| 27 | $prefs = CreateObject('contactcenter.ui_preferences'); |
---|
| 28 | $actual = $prefs->get_preferences(); |
---|
| 29 | |
---|
[3794] | 30 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['empNumShow'] = $actual['empNum'] ? true : false; |
---|
| 31 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['cellShow'] = $actual['cell'] ? true : false; |
---|
| 32 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['departmentShow'] = $actual['department'] ? true : false; |
---|
[4765] | 33 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['personCardEmail'] = $actual['personCardEmail'] && $actual['personCardEmail'] != '_NONE_'? $actual['personCardEmail'] : 1; |
---|
| 34 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['personCardPhone'] = $actual['personCardPhone'] && $actual['personCardPhone'] != '_NONE_'? $actual['personCardPhone'] : 2; |
---|
[3794] | 35 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['displayConnectorDefault']= $actual['displayConnectorDefault'] ? true : false; |
---|
| 36 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['displayConnector']= $actual['displayConnector'] ? true : false; |
---|
[1598] | 37 | |
---|
[358] | 38 | //Enable/Disable VoIP Service -> Voip Server Config |
---|
| 39 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] = false; |
---|
[395] | 40 | $voip_groups = array(); |
---|
[358] | 41 | if($GLOBALS['phpgw_info']['server']['voip_groups']) { |
---|
[395] | 42 | foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){ |
---|
| 43 | $a_voip = explode(";",$voip_group); |
---|
| 44 | $voip_groups[] = $a_voip[1]; |
---|
| 45 | } |
---|
| 46 | foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){ |
---|
| 47 | if(array_search($group['account_name'],$voip_groups) !== FALSE){ |
---|
[358] | 48 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] = true; |
---|
| 49 | break; |
---|
| 50 | } |
---|
| 51 | } |
---|
[1598] | 52 | } |
---|
| 53 | |
---|
[498] | 54 | // Verificar se há contatos compartilhados para o usuario logado |
---|
| 55 | $acl = CreateObject("phpgwapi.acl",$GLOBALS['phpgw_info']['user']['account_id']); |
---|
| 56 | $grants = $acl->get_grants("contactcenter"); |
---|
| 57 | foreach($grants as $id => $rights){ |
---|
| 58 | if ($id != $GLOBALS['phpgw_info']['user']['account_id']) { |
---|
| 59 | $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['shared_contacts'] = true; |
---|
| 60 | } |
---|
| 61 | } |
---|
[1598] | 62 | $obj = CreateObject('phpgwapi.config','contactcenter'); |
---|
| 63 | $opts = $obj->read_repository(); |
---|
| 64 | echo '<script> var v_label = \'' . $opts['cc_ldap_legend'] . '\'; var v_atrib = \'' . $opts['cc_ldap_atrib'] . '\'; v_min = \'' . $opts['cc_ldap_min'] . '\' </script>'; |
---|
| 65 | $opts = null; |
---|
| 66 | $obj = CreateObject('contactcenter.ui_data'); |
---|
| 67 | $obj->index(); |
---|
| 68 | |
---|
[6908] | 69 | echo '<script type="text/javascript" src="../prototype/plugins/jquery/jquery.min.js"></script>'; |
---|
[2] | 70 | $GLOBALS['phpgw']->common->phpgw_footer(); |
---|
| 71 | ?> |
---|