diff --git a/addressbook/inc/class.boXport.inc.php b/addressbook/inc/class.boXport.inc.php index 07f4e0ad45..64b6205505 100644 --- a/addressbook/inc/class.boXport.inc.php +++ b/addressbook/inc/class.boXport.inc.php @@ -35,7 +35,7 @@ function boXport($session=False) { - $this->contacts = &$GLOBALS['phpgw']->contacts; + $this->contacts = &$GLOBALS['egw']->contacts; $this->so = CreateObject('addressbook.soaddressbook'); if($session) { @@ -97,13 +97,13 @@ if($this->use_session) { if($this->debug) { echo '
Save:'; _debug_array($data); } - $GLOBALS['phpgw']->session->appsession('session_data','addressbook',$data); + $GLOBALS['egw']->session->appsession('session_data','addressbook',$data); } } function read_sessiondata() { - $data = $GLOBALS['phpgw']->session->appsession('session_data','addressbook'); + $data = $GLOBALS['egw']->session->appsession('session_data','addressbook'); if($this->debug) { echo '
Read:'; _debug_array($data); } $this->start = $data['start']; @@ -349,7 +349,7 @@ // Read in user custom fields, if any $customfields = array(); - while(list($col,$descr) = @each($GLOBALS['phpgw_info']['user']['preferences']['addressbook'])) + while(list($col,$descr) = @each($GLOBALS['egw_info']['user']['preferences']['addressbook'])) { if(substr($col,0,6) == 'extra_') { @@ -391,7 +391,7 @@ // Here, buffer becomes a string suitable for printing $buffer = $contacts->export_end_file($buffer); - $tsvfilename = $GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $tsvfilename; + $tsvfilename = $GLOBALS['egw_info']['server']['temp_dir'] . SEP . $tsvfilename; return $buffer; } diff --git a/addressbook/inc/class.boaddressbook.inc.php b/addressbook/inc/class.boaddressbook.inc.php index 194063c2cc..82805e5a9a 100644 --- a/addressbook/inc/class.boaddressbook.inc.php +++ b/addressbook/inc/class.boaddressbook.inc.php @@ -194,13 +194,13 @@ if($this->use_session) { if($this->debug) { echo '
Save:'; _debug_array($data); } - $GLOBALS['phpgw']->session->appsession('session_data','addressbook',$data); + $GLOBALS['egw']->session->appsession('session_data','addressbook',$data); } } function read_sessiondata() { - $data = $GLOBALS['phpgw']->session->appsession('session_data','addressbook'); + $data = $GLOBALS['egw']->session->appsession('session_data','addressbook'); if($this->debug) { echo '
Read:'; _debug_array($data); } $this->start = $data['start']; @@ -227,12 +227,12 @@ { foreach($dirty[$i] as $name => $value) { - $cleaned[$i][$name] = $GLOBALS['phpgw']->strip_html($dirty[$i][$name]); + $cleaned[$i][$name] = $GLOBALS['egw']->strip_html($dirty[$i][$name]); } } else { - $cleaned[$i] == $GLOBALS['phpgw']->strip_html($dirty[$i]); + $cleaned[$i] == $GLOBALS['egw']->strip_html($dirty[$i]); } } return $cleaned; @@ -251,7 +251,7 @@ if(is_array($new_fields) && count($new_fields)) { - if(!$GLOBALS['phpgw_info']['user']['apps']['admin']) + if(!$GLOBALS['egw_info']['user']['apps']['admin']) { $GLOBALS['server']->xmlrpc_error($GLOBALS['xmlrpcerr']['no_access'],$GLOBALS['xmlrpcstr']['no_access']); } @@ -338,12 +338,12 @@ } if(!is_array($account)) { - $GLOBALS['phpgw']->accounts->account_id = $account; - $account = $GLOBALS['phpgw']->accounts->read_repository(); + $GLOBALS['egw']->accounts->account_id = $account; + $account = $GLOBALS['egw']->accounts->read_repository(); } $prefs->account_id = $account['account_id']; $prefs->read_repository(); - $freebusy_url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/freebusy.php?user='.$account['account_lid']; + $freebusy_url = $GLOBALS['egw_info']['server']['webserver_url'].'/calendar/freebusy.php?user='.$account['account_lid']; if($freebusy_url[0] == '/') { $freebusy_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$freebusy_url; @@ -353,7 +353,7 @@ $ret = array( 'n_family' => $lastname, 'n_given' => $firstname, - 'fn' => $GLOBALS['phpgw']->common->display_fullname($account['account_lid'],$firstname,$lastname), + 'fn' => $GLOBALS['egw']->common->display_fullname($account['account_lid'],$firstname,$lastname), 'email' => $prefs->email_address($account['account_id']), 'freebusy_url' => $freebusy_url, 'rights' => PHPGW_ACL_READ, // readonly access @@ -370,14 +370,14 @@ switch($type) { case 'all': // all - $accounts = $GLOBALS['phpgw']->accounts->get_list('accounts'); + $accounts = $GLOBALS['egw']->accounts->get_list('accounts'); break; case 'calendar': // Calendar users - $accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar'); + $accounts = $GLOBALS['egw']->acl->get_ids_for_location('run',1,'calendar'); break; case 'groupmates': // Groupmates $accounts = array(); - foreach($GLOBALS['phpgw']->accounts->membership() as $group) + foreach($GLOBALS['egw']->accounts->membership() as $group) { $accounts[] = $group['account_id']; } @@ -385,11 +385,11 @@ } foreach($accounts as $key => $account) { - if($type == 'calendar' && $GLOBALS['phpgw']->accounts->get_type($account) == 'g' || $type == 'groupmates') + if($type == 'calendar' && $GLOBALS['egw']->accounts->get_type($account) == 'g' || $type == 'groupmates') { // $account is a group unset($accounts[$key]); - $members = $GLOBALS['phpgw']->accounts->member($account); + $members = $GLOBALS['egw']->accounts->member($account); if(is_array($members)) { foreach($members as $member) @@ -502,7 +502,7 @@ $vcard = CreateObject('phpgwapi.vcard'); $entry = $vcard->in_file($filename); /* _debug_array($entry);exit; */ - $entry['owner'] = (int)$GLOBALS['phpgw_info']['user']['account_id']; + $entry['owner'] = (int)$GLOBALS['egw_info']['user']['account_id']; $entry['access'] = 'private'; $entry['tid'] = 'n'; /* _debug_array($entry);exit; */ @@ -534,11 +534,11 @@ $fields['email'] = $add_email; $referer = urlencode($referer); - $this->so->add_entry($GLOBALS['phpgw_info']['user']['account_id'],$fields,'private','','n'); + $this->so->add_entry($GLOBALS['egw_info']['user']['account_id'],$fields,'private','','n'); $ab_id = $this->get_lastid(); Header('Location: ' - . $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uiaddressbook.view&ab_id=$ab_id&referer=$referer")); + . $GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uiaddressbook.view&ab_id=$ab_id&referer=$referer")); } function add_entry($fields) @@ -551,7 +551,7 @@ } if(!@$fields['owner']) { - $fields['owner'] = (int)$GLOBALS['phpgw_info']['user']['account_id']; + $fields['owner'] = (int)$GLOBALS['egw_info']['user']['account_id']; } if(empty($fields['access'])) { @@ -565,7 +565,7 @@ if($id) { - $GLOBALS['phpgw']->contenthistory->updateTimeStamp('contacts', $id, 'add', time()); + $GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $id, 'add', time()); } if($this->xmlrpc && !$id) @@ -596,7 +596,7 @@ $ok = $this->so->update_entry($fields); if($ok) { - $GLOBALS['phpgw']->contenthistory->updateTimeStamp('contacts', $fields['ab_id'], 'modify', time()); + $GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $fields['ab_id'], 'modify', time()); } } if($this->xmlrpc && !$ok) @@ -626,7 +626,7 @@ if($this->check_perms($id,PHPGW_ACL_DELETE)) { $this->so->delete_entry($id); - $GLOBALS['phpgw']->contenthistory->updateTimeStamp('contacts', $id, 'delete', time()); + $GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $id, 'delete', time()); } elseif($this->xmlrpc) { @@ -666,7 +666,7 @@ function save_preferences($prefs,$other,$qfields,$fcat_id) { - $GLOBALS['phpgw']->preferences->read_repository(); + $GLOBALS['egw']->preferences->read_repository(); if(is_array($prefs)) { /* _debug_array($prefs);exit; */ @@ -675,39 +675,39 @@ /* echo '
checking: ' . $pref . '=' . $prefs[$pref]; */ if($prefs[$pref] == 'on') { - $GLOBALS['phpgw']->preferences->add('addressbook',$pref,'addressbook_on'); + $GLOBALS['egw']->preferences->add('addressbook',$pref,'addressbook_on'); } else { - $GLOBALS['phpgw']->preferences->delete('addressbook',$pref); + $GLOBALS['egw']->preferences->delete('addressbook',$pref); } } } if(is_array($other)) { - $GLOBALS['phpgw']->preferences->delete('addressbook','mainscreen_showbirthdays'); + $GLOBALS['egw']->preferences->delete('addressbook','mainscreen_showbirthdays'); if($other['mainscreen_showbirthdays']) { - $GLOBALS['phpgw']->preferences->add('addressbook','mainscreen_showbirthdays',True); + $GLOBALS['egw']->preferences->add('addressbook','mainscreen_showbirthdays',True); } - $GLOBALS['phpgw']->preferences->delete('addressbook','default_filter'); + $GLOBALS['egw']->preferences->delete('addressbook','default_filter'); if($other['default_filter']) { - $GLOBALS['phpgw']->preferences->add('addressbook','default_filter',$other['default_filter']); + $GLOBALS['egw']->preferences->add('addressbook','default_filter',$other['default_filter']); } - $GLOBALS['phpgw']->preferences->delete('addressbook','autosave_category'); + $GLOBALS['egw']->preferences->delete('addressbook','autosave_category'); if($other['autosave_category']) { - $GLOBALS['phpgw']->preferences->add('addressbook','autosave_category',True); + $GLOBALS['egw']->preferences->add('addressbook','autosave_category',True); } } - $GLOBALS['phpgw']->preferences->delete('addressbook','default_category'); - $GLOBALS['phpgw']->preferences->add('addressbook','default_category',$fcat_id); + $GLOBALS['egw']->preferences->delete('addressbook','default_category'); + $GLOBALS['egw']->preferences->add('addressbook','default_category',$fcat_id); - $GLOBALS['phpgw']->preferences->save_repository(True); + $GLOBALS['egw']->preferences->save_repository(True); } function list_methods($_type='xmlrpc') diff --git a/addressbook/inc/class.soaddressbook.inc.php b/addressbook/inc/class.soaddressbook.inc.php index f0749488fc..df49e76542 100644 --- a/addressbook/inc/class.soaddressbook.inc.php +++ b/addressbook/inc/class.soaddressbook.inc.php @@ -22,14 +22,14 @@ function soaddressbook() { - if(!is_object($GLOBALS['phpgw']->contacts)) + if(!is_object($GLOBALS['egw']->contacts)) { - $GLOBALS['phpgw']->contacts = CreateObject('phpgwapi.contacts'); + $GLOBALS['egw']->contacts = CreateObject('phpgwapi.contacts'); } - $this->contacts = &$GLOBALS['phpgw']->contacts; + $this->contacts = &$GLOBALS['egw']->contacts; $this->grants = &$this->contacts->grants; - /* _debug_array($GLOBALS['phpgw_info']); */ + /* _debug_array($GLOBALS['egw_info']); */ /* _debug_array($grants); */ } diff --git a/addressbook/inc/class.uiXport.inc.php b/addressbook/inc/class.uiXport.inc.php index 3de1fc9c0a..6dff77add4 100644 --- a/addressbook/inc/class.uiXport.inc.php +++ b/addressbook/inc/class.uiXport.inc.php @@ -32,7 +32,7 @@ function uiXport() { - $this->template = $GLOBALS['phpgw']->template; + $this->template = $GLOBALS['egw']->template; $this->cat = CreateObject('phpgwapi.categories'); $this->bo = CreateObject('addressbook.boXport',True); $this->browser = CreateObject('phpgwapi.browser'); @@ -106,14 +106,14 @@ { if($conv_type == 'none') { - $GLOBALS['phpgw_info']['flags']['noheader'] = False; - $GLOBALS['phpgw_info']['flags']['noheader'] = True; - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['noheader'] = False; + $GLOBALS['egw_info']['flags']['noheader'] = True; + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo lang('No conversion type <none> could be located. Please choose a conversion type from the list'); - echo ' ' . lang('OK') . ''; - $GLOBALS['phpgw']->common->phpgw_footer(); - $GLOBALS['phpgw']->common->phpgw_exit(); + echo ' ' . lang('OK') . ''; + $GLOBALS['egw']->common->phpgw_footer(); + $GLOBALS['egw']->common->phpgw_exit(); } $buffer = $this->bo->import($tsvfile,$conv_type,$private,$fcat_id); @@ -122,30 +122,30 @@ if($conv_type == 'Debug LDAP' || $conv_type == 'Debug SQL') { // filename, default application/octet-stream, length of file, default nocache True - $GLOBALS['phpgw']->browser->content_header($tsvfilename,'',strlen($buffer)); + $GLOBALS['egw']->browser->content_header($tsvfilename,'',strlen($buffer)); echo $buffer; } else { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo "
$buffer
"; - echo ''.lang('OK').''; - $GLOBALS['phpgw']->common->phpgw_footer(); + echo ''.lang('OK').''; + $GLOBALS['egw']->common->phpgw_footer(); } } else { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo "
$buffer
"; - echo ''.lang('OK').''; - $GLOBALS['phpgw']->common->phpgw_footer(); + echo ''.lang('OK').''; + $GLOBALS['egw']->common->phpgw_footer(); } } else { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); set_time_limit(0); @@ -181,11 +181,11 @@ $this->template->set_var('lang_none', lang('none')); $this->template->set_var('lang_cancel',lang('Cancel')); $this->template->set_var('lang_cat',lang('Select Category')); - $this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - $this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']); - $this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']); + $this->template->set_var('cancel_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $this->template->set_var('navbar_bg',$GLOBALS['egw_info']['theme']['navbar_bg']); + $this->template->set_var('navbar_text',$GLOBALS['egw_info']['theme']['navbar_text']); $this->template->set_var('import_text',lang('Import from LDIF, CSV, or VCard')); - $this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import')); + $this->template->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import')); $this->template->set_var('cat_link',$this->cat_option($this->cat_id,True,False)); $this->template->set_var('tsvfilename',''); $this->template->set_var('conv',$conv); @@ -211,7 +211,7 @@ $this->template->set_var('lang_debug',lang('Debug output in browser')); $this->template->pparse('out','import'); } -// $GLOBALS['phpgw']->common->phpgw_footer(); +// $GLOBALS['egw']->common->phpgw_footer(); } function export() @@ -226,14 +226,14 @@ { if($conv_type == 'none') { - $GLOBALS['phpgw_info']['flags']['noheader'] = False; - $GLOBALS['phpgw_info']['flags']['noheader'] = True; - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['noheader'] = False; + $GLOBALS['egw_info']['flags']['noheader'] = True; + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo lang('No conversion type <none> could be located. Please choose a conversion type from the list'); - echo ' ' . lang('OK') . ''; - $GLOBALS['phpgw']->common->phpgw_footer(); - $GLOBALS['phpgw']->common->phpgw_exit(); + echo ' ' . lang('OK') . ''; + $GLOBALS['egw']->common->phpgw_footer(); + $GLOBALS['egw']->common->phpgw_exit(); } $buffer = $this->bo->export($conv_type,$fcat_id); @@ -251,18 +251,18 @@ } else { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo "
\n";
 					echo $buffer;
 					echo "\n
\n"; - echo '' . lang('OK') . ''; - $GLOBALS['phpgw']->common->phpgw_footer(); + echo '' . lang('OK') . ''; + $GLOBALS['egw']->common->phpgw_footer(); } } else { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); set_time_limit(0); @@ -300,11 +300,11 @@ $this->template->set_var('lang_export_instructions',lang('Download export file (Uncheck to debug output in browser)')); $this->template->set_var('lang_select',lang('Select the type of conversion:')); $this->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False)); - $this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/addressbook/index.php')); - $this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']); - $this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']); + $this->template->set_var('cancel_url',$GLOBALS['egw']->link('/addressbook/index.php')); + $this->template->set_var('navbar_bg',$GLOBALS['egw_info']['theme']['navbar_bg']); + $this->template->set_var('navbar_text',$GLOBALS['egw_info']['theme']['navbar_text']); $this->template->set_var('export_text',lang('Export from Addressbook')); - $this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export')); + $this->template->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export')); $this->template->set_var('filename',lang('Export file name')); $this->template->set_var('conv',$conv); $this->template->set_var('debug',lang('')); @@ -317,7 +317,7 @@ $this->template->set_var('cat_id',$this->cat_id); $this->template->pparse('out','export'); - $GLOBALS['phpgw']->common->phpgw_footer(); + $GLOBALS['egw']->common->phpgw_footer(); } } } diff --git a/addressbook/inc/class.uiaddressbook.inc.php b/addressbook/inc/class.uiaddressbook.inc.php index 9c64e2c437..c177b37150 100644 --- a/addressbook/inc/class.uiaddressbook.inc.php +++ b/addressbook/inc/class.uiaddressbook.inc.php @@ -59,15 +59,15 @@ function uiaddressbook() { - $GLOBALS['phpgw']->country = CreateObject('phpgwapi.country'); - $GLOBALS['phpgw']->browser = CreateObject('phpgwapi.browser'); - $GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs'); + $GLOBALS['egw']->country = CreateObject('phpgwapi.country'); + $GLOBALS['egw']->browser = CreateObject('phpgwapi.browser'); + $GLOBALS['egw']->nextmatchs = CreateObject('phpgwapi.nextmatchs'); $this->fields = CreateObject('addressbook.uifields'); $this->bo = CreateObject('addressbook.boaddressbook',True); $this->cat = CreateObject('phpgwapi.categories'); // $this->company = CreateObject('phpgwapi.categories','addressbook_company'); - $this->prefs = $GLOBALS['phpgw_info']['user']['preferences']['addressbook']; + $this->prefs = $GLOBALS['egw_info']['user']['preferences']['addressbook']; $this->_set_sessiondata(); } @@ -239,16 +239,16 @@ function index() { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); - $GLOBALS['phpgw']->template->set_file(array('addressbook_list_t' => 'index.tpl')); - $GLOBALS['phpgw']->template->set_block('addressbook_list_t','addressbook_header','addressbook_header'); - $GLOBALS['phpgw']->template->set_block('addressbook_list_t','column','column'); - $GLOBALS['phpgw']->template->set_block('addressbook_list_t','row','row'); - $GLOBALS['phpgw']->template->set_block('addressbook_list_t','delete_block','delete_block'); - $GLOBALS['phpgw']->template->set_block('addressbook_list_t','addressbook_footer','addressbook_footer'); - $GLOBALS['phpgw']->template->set_block('addressbook_list_t','addressbook_alpha','addressbook_alpha'); + $GLOBALS['egw']->template->set_file(array('addressbook_list_t' => 'index.tpl')); + $GLOBALS['egw']->template->set_block('addressbook_list_t','addressbook_header','addressbook_header'); + $GLOBALS['egw']->template->set_block('addressbook_list_t','column','column'); + $GLOBALS['egw']->template->set_block('addressbook_list_t','row','row'); + $GLOBALS['egw']->template->set_block('addressbook_list_t','delete_block','delete_block'); + $GLOBALS['egw']->template->set_block('addressbook_list_t','addressbook_footer','addressbook_footer'); + $GLOBALS['egw']->template->set_block('addressbook_list_t','addressbook_alpha','addressbook_alpha'); /* Setup query for 1st char of fullname, company, lastname using user lang */ $chars = lang('alphabet'); @@ -261,23 +261,23 @@ $aar[] = 'all'; foreach($aar as $char) { - $GLOBALS['phpgw']->template->set_var('charclass',$this->cquery == $char || + $GLOBALS['egw']->template->set_var('charclass',$this->cquery == $char || $char == 'all' && !$this->cquery ? 'letter_box_active' : 'letter_box'); if($char == 'all') { - $GLOBALS['phpgw']->template->set_var('charlink', - $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index&cquery=') + $GLOBALS['egw']->template->set_var('charlink', + $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index&cquery=') ); } else { - $GLOBALS['phpgw']->template->set_var('charlink', - $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index&cquery=' . $char) + $GLOBALS['egw']->template->set_var('charlink', + $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index&cquery=' . $char) ); } - $GLOBALS['phpgw']->template->set_var('char',$char != 'all' ? strtoupper($char) : lang('all')); - $GLOBALS['phpgw']->template->fp('alphalinks','addressbook_alpha',True); + $GLOBALS['egw']->template->set_var('char',$char != 'all' ? strtoupper($char) : lang('all')); + $GLOBALS['egw']->template->fp('alphalinks','addressbook_alpha',True); } unset($aar); unset($char); @@ -298,10 +298,10 @@ if($this->prefs['autosave_category']) { - $GLOBALS['phpgw']->preferences->read_repository(); - $GLOBALS['phpgw']->preferences->delete('addressbook','default_category'); - $GLOBALS['phpgw']->preferences->add('addressbook','default_category',$this->cat_id); - $GLOBALS['phpgw']->preferences->save_repository(); + $GLOBALS['egw']->preferences->read_repository(); + $GLOBALS['egw']->preferences->delete('addressbook','default_category'); + $GLOBALS['egw']->preferences->add('addressbook','default_category',$this->cat_id); + $GLOBALS['egw']->preferences->save_repository(); } /* global here so nextmatchs accepts our setting of $query and $filter - may be changed again below */ @@ -318,7 +318,7 @@ $showcol = $this->display_name($column); $cols .= ' ' . "\n"; $cols .= ' '; - $cols .= $GLOBALS['phpgw']->nextmatchs->show_sort_order($this->sort, + $cols .= $GLOBALS['egw']->nextmatchs->show_sort_order($this->sort, $column,$this->order,'/index.php',$showcol,'&menuaction=addressbook.uiaddressbook.index' ); $cols .= "\n "; @@ -371,7 +371,7 @@ $showcol = $this->display_name($col); $cols .= ' ' . "\n"; $cols .= ' '; - $cols .= $GLOBALS['phpgw']->nextmatchs->show_sort_order( + $cols .= $GLOBALS['egw']->nextmatchs->show_sort_order( $this->sort,$col,$this->order, "/index.php",$showcol, '&menuaction=addressbook.uiaddressbook.index&cat_id=' . $this->cat_id . '&cquery=' . $this->cquery @@ -389,10 +389,10 @@ $this->start = 0; } - if($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] && - $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0) + if($GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'] && + $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'] > 0) { - $this->limit = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']; + $this->limit = $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']; } else { @@ -428,7 +428,7 @@ case 'private': $qfilter .= ',access=private'; /* fall through */ case 'yours': - $qfilter .= ',owner=' . $GLOBALS['phpgw_info']['user']['account_id']; + $qfilter .= ',owner=' . $GLOBALS['egw_info']['user']['account_id']; break; default: $qfilter .= ',owner=' . $this->filter; @@ -440,7 +440,7 @@ if(!$userid) { - $userid = $GLOBALS['phpgw_info']['user']['account_id']; + $userid = $GLOBALS['egw_info']['user']['account_id']; } if($nosearch && !$this->query) @@ -468,80 +468,80 @@ $GLOBALS['query'] = $this->query; $GLOBALS['filter'] = $this->filter; - $search_filter = $GLOBALS['phpgw']->nextmatchs->show_tpl('/index.php', + $search_filter = $GLOBALS['egw']->nextmatchs->show_tpl('/index.php', $this->start, $total_records, '&menuaction=addressbook.uiaddressbook.index&fcat_id=' . $this->cat_id . '&cquery=' . $this->cquery,'95%', - $GLOBALS['phpgw_info']['theme']['th_bg'],1,1,1,array('filter' => $this->filter,'yours' => 1), + $GLOBALS['egw_info']['theme']['th_bg'],1,1,1,array('filter' => $this->filter,'yours' => 1), $this->cat_id ); $query = $filter = ''; - $lang_showing = $GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$this->start); + $lang_showing = $GLOBALS['egw']->nextmatchs->show_hits($total_records,$this->start); /* set basic vars and parse the header */ - $GLOBALS['phpgw']->template->set_var('font',$GLOBALS['phpgw_info']['theme']['font']); - $GLOBALS['phpgw']->template->set_var('lang_actions',lang('Actions')); - $GLOBALS['phpgw']->template->set_var('check',$GLOBALS['phpgw']->common->image('phpgwapi','transparent')); - $GLOBALS['phpgw']->template->set_var('select_all',''); + $GLOBALS['egw']->template->set_var('font',$GLOBALS['egw_info']['theme']['font']); + $GLOBALS['egw']->template->set_var('lang_actions',lang('Actions')); + $GLOBALS['egw']->template->set_var('check',$GLOBALS['egw']->common->image('phpgwapi','transparent')); + $GLOBALS['egw']->template->set_var('select_all',''); if(count($entries)) { - $GLOBALS['phpgw']->template->set_var('check', $GLOBALS['phpgw']->common->image('addressbook','check')); - $GLOBALS['phpgw']->template->set_var('select_all',lang('Select all')); + $GLOBALS['egw']->template->set_var('check', $GLOBALS['egw']->common->image('addressbook','check')); + $GLOBALS['egw']->template->set_var('select_all',lang('Select all')); } - $GLOBALS['phpgw']->template->set_var('searchreturn',$noprefs . ' ' . $searchreturn); - $GLOBALS['phpgw']->template->set_var('lang_showing',$lang_showing); - $GLOBALS['phpgw']->template->set_var('search_filter',$search_filter); + $GLOBALS['egw']->template->set_var('searchreturn',$noprefs . ' ' . $searchreturn); + $GLOBALS['egw']->template->set_var('lang_showing',$lang_showing); + $GLOBALS['egw']->template->set_var('search_filter',$search_filter); /* - $GLOBALS['phpgw']->template->set_var('lang_show',lang('Show') . ':'); - $GLOBALS['phpgw']->template->set_var('contact_type_list',$this->formatted_list('typeid',$this->contact_types,$this->typeid,False,True)); - $GLOBALS['phpgw']->template->set_var('self_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $GLOBALS['egw']->template->set_var('lang_show',lang('Show') . ':'); + $GLOBALS['egw']->template->set_var('contact_type_list',$this->formatted_list('typeid',$this->contact_types,$this->typeid,False,True)); + $GLOBALS['egw']->template->set_var('self_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); */ - $GLOBALS['phpgw']->template->set_var('lang_show',''); - $GLOBALS['phpgw']->template->set_var('contact_type_list',''); - $GLOBALS['phpgw']->template->set_var('self_url',''); + $GLOBALS['egw']->template->set_var('lang_show',''); + $GLOBALS['egw']->template->set_var('contact_type_list',''); + $GLOBALS['egw']->template->set_var('self_url',''); - $GLOBALS['phpgw']->template->set_var('cats',lang('Category')); - $GLOBALS['phpgw']->template->set_var('cats_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - /* $GLOBALS['phpgw']->template->set_var('cats_link',$this->cat_option($this->cat_id)); */ - $GLOBALS['phpgw']->template->set_var('lang_cats',lang('Select')); - // $GLOBALS['phpgw']->template->set_var('lang_addressbook',lang('Address book')); - $GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']); - $GLOBALS['phpgw']->template->set_var('th_font',$GLOBALS['phpgw_info']['theme']['font']); - $GLOBALS['phpgw']->template->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']); - $GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.delete')); - $GLOBALS['phpgw']->template->set_var('lang_add',lang('Add')); - $GLOBALS['phpgw']->template->set_var('add_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.add')); - $GLOBALS['phpgw']->template->set_var('lang_addvcard',lang('AddVCard')); - $GLOBALS['phpgw']->template->set_var('vcard_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uivcard.in')); - $GLOBALS['phpgw']->template->set_var('lang_import',lang('Import Contacts')); - $GLOBALS['phpgw']->template->set_var('import_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import')); - $GLOBALS['phpgw']->template->set_var('lang_import_alt',lang('Alt. CSV Import')); - $GLOBALS['phpgw']->template->set_var('import_alt_url',$GLOBALS['phpgw']->link('/addressbook/csv_import.php')); - $GLOBALS['phpgw']->template->set_var('lang_export',lang('Export Contacts')); - $GLOBALS['phpgw']->template->set_var('export_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export')); - $GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete')); - $GLOBALS['phpgw']->template->set_var('column_count',count($columns_to_display)); + $GLOBALS['egw']->template->set_var('cats',lang('Category')); + $GLOBALS['egw']->template->set_var('cats_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + /* $GLOBALS['egw']->template->set_var('cats_link',$this->cat_option($this->cat_id)); */ + $GLOBALS['egw']->template->set_var('lang_cats',lang('Select')); + // $GLOBALS['egw']->template->set_var('lang_addressbook',lang('Address book')); + $GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']); + $GLOBALS['egw']->template->set_var('th_font',$GLOBALS['egw_info']['theme']['font']); + $GLOBALS['egw']->template->set_var('th_text',$GLOBALS['egw_info']['theme']['th_text']); + $GLOBALS['egw']->template->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.delete')); + $GLOBALS['egw']->template->set_var('lang_add',lang('Add')); + $GLOBALS['egw']->template->set_var('add_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.add')); + $GLOBALS['egw']->template->set_var('lang_addvcard',lang('AddVCard')); + $GLOBALS['egw']->template->set_var('vcard_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uivcard.in')); + $GLOBALS['egw']->template->set_var('lang_import',lang('Import Contacts')); + $GLOBALS['egw']->template->set_var('import_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import')); + $GLOBALS['egw']->template->set_var('lang_import_alt',lang('Alt. CSV Import')); + $GLOBALS['egw']->template->set_var('import_alt_url',$GLOBALS['egw']->link('/addressbook/csv_import.php')); + $GLOBALS['egw']->template->set_var('lang_export',lang('Export Contacts')); + $GLOBALS['egw']->template->set_var('export_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export')); + $GLOBALS['egw']->template->set_var('lang_delete',lang('Delete')); + $GLOBALS['egw']->template->set_var('column_count',count($columns_to_display)); - $GLOBALS['phpgw']->template->set_var('start',$this->start); - $GLOBALS['phpgw']->template->set_var('sort',$this->sort); - $GLOBALS['phpgw']->template->set_var('order',$this->order); - $GLOBALS['phpgw']->template->set_var('filter',$this->filter); - $GLOBALS['phpgw']->template->set_var('query',$this->query); - $GLOBALS['phpgw']->template->set_var('cat_id',$this->cat_id); + $GLOBALS['egw']->template->set_var('start',$this->start); + $GLOBALS['egw']->template->set_var('sort',$this->sort); + $GLOBALS['egw']->template->set_var('order',$this->order); + $GLOBALS['egw']->template->set_var('filter',$this->filter); + $GLOBALS['egw']->template->set_var('query',$this->query); + $GLOBALS['egw']->template->set_var('cat_id',$this->cat_id); - $GLOBALS['phpgw']->template->set_var('qfield',$qfield); - $GLOBALS['phpgw']->template->set_var('cols',$cols); + $GLOBALS['egw']->template->set_var('qfield',$qfield); + $GLOBALS['egw']->template->set_var('cols',$cols); - $GLOBALS['phpgw']->template->pparse('out','addressbook_header'); + $GLOBALS['egw']->template->pparse('out','addressbook_header'); /* Show the entries */ /* each entry */ for($i=0;$itemplate->set_var('columns',''); - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var('row_tr_color',$tr_color); + $GLOBALS['egw']->template->set_var('columns',''); + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var('row_tr_color',$tr_color); $myid = $entries[$i]['id']; $myowner = $entries[$i]['owner']; @@ -565,20 +565,20 @@ } elseif(($column == 'email') || ($column == 'email_home')) { - if($GLOBALS['phpgw_info']['user']['apps']['email']) + if($GLOBALS['egw_info']['user']['apps']['email']) { $ref = ''; } - elseif($GLOBALS['phpgw_info']['user']['apps']['felamimail']) + elseif($GLOBALS['egw_info']['user']['apps']['felamimail']) { $link_data = array( 'menuaction' => 'felamimail.uicompose.compose', 'send_to' => base64_encode($coldata) ); $ref = ''; } else @@ -591,58 +591,58 @@ { $ref = ''; $data = $coldata; } - $GLOBALS['phpgw']->template->set_var('col_data',$ref.$data); - $GLOBALS['phpgw']->template->parse('columns','column',True); + $GLOBALS['egw']->template->set_var('col_data',$ref.$data); + $GLOBALS['egw']->template->parse('columns','column',True); } $actions = ' '; if($this->bo->check_perms($entries[$i],PHPGW_ACL_EDIT)) { $actions .= ' '; } if($this->bo->check_perms($entries[$i],PHPGW_ACL_DELETE)) { $actions .= ''; } $actions .= ''; - $GLOBALS['phpgw']->template->set_var('actions',$actions); + $GLOBALS['egw']->template->set_var('actions',$actions); - $GLOBALS['phpgw']->template->parse('rows','row',True); - $GLOBALS['phpgw']->template->pparse('out','row'); + $GLOBALS['egw']->template->parse('rows','row',True); + $GLOBALS['egw']->template->pparse('out','row'); reset($columns_to_display); } - $GLOBALS['phpgw']->template->set_var('delete_button',''); + $GLOBALS['egw']->template->set_var('delete_button',''); if(count($entries)) { - $GLOBALS['phpgw']->template->fp('delete_button','delete_block'); + $GLOBALS['egw']->template->fp('delete_button','delete_block'); } - $GLOBALS['phpgw']->template->pfp('out','addressbook_footer'); + $GLOBALS['egw']->template->pfp('out','addressbook_footer'); $this->save_sessiondata(); - /* $GLOBALS['phpgw']->common->phpgw_footer(); */ + /* $GLOBALS['egw']->common->phpgw_footer(); */ } function add_email() @@ -675,12 +675,12 @@ $fields['tid'] = 'n'; $referer = urlencode($referer); - $fields['owner'] = $GLOBALS['phpgw_info']['user']['account_id']; + $fields['owner'] = $GLOBALS['egw_info']['user']['account_id']; // _debug_array($fields);exit; $this->bo->add_entry($fields); $ab_id = $this->bo->get_lastid(); - $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id . '&referer=' . $referer); + $GLOBALS['egw']->redirect_link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id . '&referer=' . $referer); } function copy() @@ -698,14 +698,14 @@ 'fields' => $this->bo->stock_contact_fields + $this->extrafields + $customfields )); - $addnew['note'] .= "\n".lang("Copied by %1, from record #%2.",$GLOBALS['phpgw']->accounts->id2name($addnew['owner']),$addnew['id']); - $addnew['owner'] = $GLOBALS['phpgw_info']['user']['account_id']; + $addnew['note'] .= "\n".lang("Copied by %1, from record #%2.",$GLOBALS['egw']->accounts->id2name($addnew['owner']),$addnew['id']); + $addnew['owner'] = $GLOBALS['egw_info']['user']['account_id']; unset($addnew['rights']); unset($addnew['id']); $ab_id = $this->bo->add_entry($addnew); - $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=addressbook.uiaddressbook.edit&ab_id=' . $ab_id); + $GLOBALS['egw']->redirect_link('/index.php','menuaction=addressbook.uiaddressbook.edit&ab_id=' . $ab_id); } function add() @@ -716,7 +716,7 @@ $referer = urlencode($fields['referer']); unset($fields['referer']); - $fields['owner'] = $GLOBALS['phpgw_info']['user']['account_id']; + $fields['owner'] = $GLOBALS['egw_info']['user']['account_id']; $ab_id = $this->bo->add_entry($fields); if(@is_array($ab_id) || !$ab_id) @@ -729,15 +729,15 @@ if(!$errors) { Header('Location: ' - . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id . '&referer=' . $referer)); - $GLOBALS['phpgw']->common->phpgw_exit(); + . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id . '&referer=' . $referer)); + $GLOBALS['egw']->common->phpgw_exit(); } } - $GLOBALS['phpgw']->template->set_file(array('add' => 'add.tpl')); + $GLOBALS['egw']->template->set_file(array('add' => 'add.tpl')); - $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Add'); - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Add'); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); $custom = $this->fields->read_custom_fields(); @@ -748,16 +748,16 @@ $this->addressbook_form('','menuaction=addressbook.uiaddressbook.add','Add','',$customfields,$this->cat_id); - $GLOBALS['phpgw']->template->set_var('errors',''); + $GLOBALS['egw']->template->set_var('errors',''); if(@is_array($errors)) { - $GLOBALS['phpgw']->template->set_var('errors',implode(',',$errors)); + $GLOBALS['egw']->template->set_var('errors',implode(',',$errors)); } - $GLOBALS['phpgw']->template->set_var('lang_save',lang('Save')); - $GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel')); - $GLOBALS['phpgw']->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - $GLOBALS['phpgw']->template->parse('out','add'); - $GLOBALS['phpgw']->template->pparse('out','add'); + $GLOBALS['egw']->template->set_var('lang_save',lang('Save')); + $GLOBALS['egw']->template->set_var('lang_cancel',lang('Cancel')); + $GLOBALS['egw']->template->set_var('cancel_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $GLOBALS['egw']->template->parse('out','add'); + $GLOBALS['egw']->template->pparse('out','add'); } function edit() @@ -774,7 +774,7 @@ } else { - $userid = $GLOBALS['phpgw_info']['user']['account_id']; + $userid = $GLOBALS['egw_info']['user']['account_id']; } $_fields['owner'] = $userid; $referer = urlencode($_fields['referer']); @@ -783,10 +783,10 @@ $this->bo->update_entry($_fields); Header('Location: ' - . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $_fields['ab_id'] . '&referer=' . $referer) + . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $_fields['ab_id'] . '&referer=' . $referer) ); - $GLOBALS['phpgw']->common->phpgw_exit(); + $GLOBALS['egw']->common->phpgw_exit(); } /* First, make sure they have permission to this entry */ @@ -794,12 +794,12 @@ if(!$this->bo->check_perms($check[0],PHPGW_ACL_EDIT)) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - $GLOBALS['phpgw']->common->phpgw_exit(); + Header('Location: ' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $GLOBALS['egw']->common->phpgw_exit(); } - $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Edit'); - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Edit'); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); /* Read in user custom fields, if any */ @@ -817,24 +817,24 @@ $this->addressbook_form('edit','menuaction=addressbook.uiaddressbook.edit',lang('Edit'),$fields[0],$customfields); - $GLOBALS['phpgw']->template->set_file(array('edit' => 'edit.tpl')); + $GLOBALS['egw']->template->set_file(array('edit' => 'edit.tpl')); - $GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']); - $GLOBALS['phpgw']->template->set_var('ab_id',(int) $_GET['ab_id']); - $GLOBALS['phpgw']->template->set_var('tid',$check[0]['tid']); - $GLOBALS['phpgw']->template->set_var('referer',$referer); - $GLOBALS['phpgw']->template->set_var('lang_save',lang('Save')); - $GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel')); - $GLOBALS['phpgw']->template->set_var('cancel_link','
'); + $GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']); + $GLOBALS['egw']->template->set_var('ab_id',(int) $_GET['ab_id']); + $GLOBALS['egw']->template->set_var('tid',$check[0]['tid']); + $GLOBALS['egw']->template->set_var('referer',$referer); + $GLOBALS['egw']->template->set_var('lang_save',lang('Save')); + $GLOBALS['egw']->template->set_var('lang_cancel',lang('Cancel')); + $GLOBALS['egw']->template->set_var('cancel_link',''); - if(($this->bo->grants[$check[0]['owner']] & PHPGW_ACL_DELETE) || $check[0]['owner'] == $GLOBALS['phpgw_info']['user']['account_id']) + if(($this->bo->grants[$check[0]['owner']] & PHPGW_ACL_DELETE) || $check[0]['owner'] == $GLOBALS['egw_info']['user']['account_id']) { - $GLOBALS['phpgw']->template->set_var('delete_link',''); - $GLOBALS['phpgw']->template->set_var('delete_button',''); + $GLOBALS['egw']->template->set_var('delete_link',''); + $GLOBALS['egw']->template->set_var('delete_button',''); } - $GLOBALS['phpgw']->template->pfp('out','edit'); + $GLOBALS['egw']->template->pfp('out','edit'); } function delete() @@ -859,7 +859,7 @@ } if((!$ab_id && !$select) || $_POST['no']) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + Header('Location: ' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); } if(!@is_array($select)) @@ -874,35 +874,35 @@ } $check = $this->bo->read_entry(array('id' => $_id, 'fields' => array('owner' => 'owner','tid' => 'tid'))); - if(!(($this->bo->grants[$check[0]['owner']] & PHPGW_ACL_DELETE) || $check[0]['owner'] == $GLOBALS['phpgw_info']['user']['account_id'])) + if(!(($this->bo->grants[$check[0]['owner']] & PHPGW_ACL_DELETE) || $check[0]['owner'] == $GLOBALS['egw_info']['user']['account_id'])) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - $GLOBALS['phpgw']->common->phpgw_exit(); + Header('Location: ' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $GLOBALS['egw']->common->phpgw_exit(); } } - $GLOBALS['phpgw']->template->set_file(array('delete' => 'delete.tpl')); + $GLOBALS['egw']->template->set_file(array('delete' => 'delete.tpl')); if(!$_POST['yes']) { - $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Delete'); - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Delete'); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); if(count($select) == 1) { - $GLOBALS['phpgw']->template->set_var('lang_sure',lang('Are you sure you want to delete this entry ?')); + $GLOBALS['egw']->template->set_var('lang_sure',lang('Are you sure you want to delete this entry ?')); } else { - $GLOBALS['phpgw']->template->set_var('lang_sure',lang('Are you sure you want to delete these entries ?')); + $GLOBALS['egw']->template->set_var('lang_sure',lang('Are you sure you want to delete these entries ?')); } - $GLOBALS['phpgw']->template->set_var('no_link',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - $GLOBALS['phpgw']->template->set_var('lang_no',lang('NO')); - $GLOBALS['phpgw']->template->set_var('yes_link',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.delete&ab_id=' . $ab_id . '&confirm=true')); - $GLOBALS['phpgw']->template->set_var('select',implode(',',$select)); - $GLOBALS['phpgw']->template->set_var('lang_yes',lang('YES')); - $GLOBALS['phpgw']->template->pparse('out','delete'); + $GLOBALS['egw']->template->set_var('no_link',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $GLOBALS['egw']->template->set_var('lang_no',lang('NO')); + $GLOBALS['egw']->template->set_var('yes_link',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.delete&ab_id=' . $ab_id . '&confirm=true')); + $GLOBALS['egw']->template->set_var('select',implode(',',$select)); + $GLOBALS['egw']->template->set_var('lang_yes',lang('YES')); + $GLOBALS['egw']->template->pparse('out','delete'); } else { @@ -914,7 +914,7 @@ { $this->bo->delete_entry(array('id' => $_id)); } - @Header('Location: ' . $GLOBALS['phpgw']->link('/addressbook/index.php','menuaction=addressbook.uiaddressbook.index')); + @Header('Location: ' . $GLOBALS['egw']->link('/addressbook/index.php','menuaction=addressbook.uiaddressbook.index')); } } @@ -928,7 +928,7 @@ $pair = split('=',$var); if($pair[0] == 'sq') { - $pair[1] = $GLOBALS['phpgw']->session->sq; + $pair[1] = $GLOBALS['egw']->session->sq; } $vars[$i] = implode('=',$pair); $i++; @@ -946,21 +946,21 @@ /* First, make sure they have permission to this entry */ if(!$ab_id || !$this->bo->check_perms($ab_id,PHPGW_ACL_READ)) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); - $GLOBALS['phpgw']->common->phpgw_exit(); + Header('Location: ' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $GLOBALS['egw']->common->phpgw_exit(); } elseif(!$submit && $ab_id) { - $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Address book - view'); - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['app_header'] = lang('Address book - view'); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); } - $GLOBALS['phpgw']->template->set_file(array('view_t' => 'view.tpl')); - $GLOBALS['phpgw']->template->set_block('view_t','view_header','view_header'); - $GLOBALS['phpgw']->template->set_block('view_t','view_row','view_row'); - $GLOBALS['phpgw']->template->set_block('view_t','view_footer','view_footer'); - $GLOBALS['phpgw']->template->set_block('view_t','view_buttons','view_buttons'); + $GLOBALS['egw']->template->set_file(array('view_t' => 'view.tpl')); + $GLOBALS['egw']->template->set_block('view_t','view_header','view_header'); + $GLOBALS['egw']->template->set_block('view_t','view_row','view_row'); + $GLOBALS['egw']->template->set_block('view_t','view_footer','view_footer'); + $GLOBALS['egw']->template->set_block('view_t','view_buttons','view_buttons'); $custom = $this->fields->read_custom_fields(); $customfields = array(); @@ -1006,21 +1006,21 @@ { if($this->display_name($colname[$column])) { - $GLOBALS['phpgw']->template->set_var('display_col',$this->display_name($colname[$column])); + $GLOBALS['egw']->template->set_var('display_col',$this->display_name($colname[$column])); } elseif($this->display_name($column)) { - $GLOBALS['phpgw']->template->set_var('display_col',$this->display_name($column)); + $GLOBALS['egw']->template->set_var('display_col',$this->display_name($column)); } else { - $GLOBALS['phpgw']->template->set_var('display_col',ucfirst($column)); + $GLOBALS['egw']->template->set_var('display_col',ucfirst($column)); } $ref = $data = ''; if($fields[0][$column]) { - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var('th_bg',$tr_color); + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var('th_bg',$tr_color); $coldata = $fields[0][$column]; /* Some fields require special formatting. */ if(($column == 'note' || $column == 'pubkey') && $coldata) @@ -1055,9 +1055,9 @@ } elseif((($column == 'email') || ($column == 'email_home')) && $coldata) { - if($GLOBALS['phpgw_info']['user']['apps']['email']) + if($GLOBALS['egw_info']['user']['apps']['email']) { - $ref='link('/email/compose.php','to=' . urlencode($coldata)) . '" target="_new">'; } else @@ -1069,7 +1069,7 @@ elseif($column == 'bday') { list($month,$day,$year) = explode('/',$coldata); - $data = $GLOBALS['phpgw']->common->dateformatorder($year,$month,$day,True); + $data = $GLOBALS['egw']->common->dateformatorder($year,$month,$day,True); } else { @@ -1079,17 +1079,17 @@ if(!$data) { - $GLOBALS['phpgw']->template->set_var('ref_data',' '); + $GLOBALS['egw']->template->set_var('ref_data',' '); } else { - $GLOBALS['phpgw']->template->set_var('ref_data',$ref . $data); + $GLOBALS['egw']->template->set_var('ref_data',$ref . $data); } - $GLOBALS['phpgw']->template->parse('cols','view_row',True); + $GLOBALS['egw']->template->parse('cols','view_row',True); } } /* Following cleans up view_row, since we were only using it to fill {cols} */ - //$GLOBALS['phpgw']->template->set_var('view_row',''); + //$GLOBALS['egw']->template->set_var('view_row',''); $fields['cat_id'] = is_array($this->cat_id) ? implode(',',$this->cat_id) : $this->cat_id; @@ -1109,34 +1109,34 @@ $this->cat_id = count($cats) > 1 ? $cats[1] : $cats[0]; } - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var(array( - 'ref_data' => $GLOBALS['phpgw']->common->grab_owner_name($record_owner), + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var(array( + 'ref_data' => $GLOBALS['egw']->common->grab_owner_name($record_owner), 'display_col' => lang('Record owner'), 'th_bg' => $tr_color )); - $GLOBALS['phpgw']->template->parse('cols','view_row',True); + $GLOBALS['egw']->template->parse('cols','view_row',True); - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var(array( + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var(array( 'ref_data' => $access_check, 'display_col' => lang('Record access'), 'th_bg' => $tr_color )); - $GLOBALS['phpgw']->template->parse('cols','view_row',True); + $GLOBALS['egw']->template->parse('cols','view_row',True); if($catname) { - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var(array( + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var(array( 'ref_data' => $catname, 'display_col' => lang('Category'), 'th_bg' => $tr_color )); - $GLOBALS['phpgw']->template->parse('cols','view_row',True); + $GLOBALS['egw']->template->parse('cols','view_row',True); } - if(($this->bo->grants[$record_owner] & PHPGW_ACL_EDIT) || ($record_owner == $GLOBALS['phpgw_info']['user']['account_id'])) + if(($this->bo->grants[$record_owner] & PHPGW_ACL_EDIT) || ($record_owner == $GLOBALS['egw_info']['user']['account_id'])) { $extra_vars = array('cd' => 16,'query' => $this->query,'cat_id' => $this->cat_id); @@ -1145,30 +1145,30 @@ $extra_vars += array('referer' => urlencode($referer)); } - $GLOBALS['phpgw']->template->set_var('edit_button',$this->html_1button_form('edit','Edit', - $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.edit&ab_id=' .$ab_id))); + $GLOBALS['egw']->template->set_var('edit_button',$this->html_1button_form('edit','Edit', + $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.edit&ab_id=' .$ab_id))); } - $GLOBALS['phpgw']->template->set_var('copy_button',$this->html_1button_form('submit','copy', - $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.copy&ab_id=' . $fields[0]['id']))); + $GLOBALS['egw']->template->set_var('copy_button',$this->html_1button_form('submit','copy', + $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.copy&ab_id=' . $fields[0]['id']))); if($fields[0]['n_family'] && $fields[0]['n_given']) { - $GLOBALS['phpgw']->template->set_var('vcard_button',$this->html_1button_form('VCardForm','VCard', - $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uivcard.out&ab_id=' .$ab_id))); + $GLOBALS['egw']->template->set_var('vcard_button',$this->html_1button_form('VCardForm','VCard', + $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uivcard.out&ab_id=' .$ab_id))); } else { - $GLOBALS['phpgw']->template->set_var('vcard_button',lang('no vcard')); + $GLOBALS['egw']->template->set_var('vcard_button',lang('no vcard')); } - $GLOBALS['phpgw']->template->set_var('done_button',$this->html_1button_form('DoneForm','Done', - $referer ? $referer : $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'))); - $GLOBALS['phpgw']->template->set_var('access_link',$access_link); + $GLOBALS['egw']->template->set_var('done_button',$this->html_1button_form('DoneForm','Done', + $referer ? $referer : $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'))); + $GLOBALS['egw']->template->set_var('access_link',$access_link); - $GLOBALS['phpgw']->template->set_var('view_row',''); // cleanup to avoid showing categories twice - $GLOBALS['phpgw']->template->pfp('phpgw_body','view_t'); + $GLOBALS['egw']->template->set_var('view_row',''); // cleanup to avoid showing categories twice + $GLOBALS['egw']->template->pfp('phpgw_body','view_t'); - $GLOBALS['phpgw']->hooks->process(array( + $GLOBALS['egw']->hooks->process(array( 'location' => 'addressbook_view', 'ab_id' => $ab_id )); @@ -1200,7 +1200,7 @@ if($_POST['cancel']) { - $GLOBALS['phpgw']->redirect_link('/preferences/index.php'); + $GLOBALS['egw']->redirect_link('/preferences/index.php'); } if($_POST['save']) @@ -1214,25 +1214,25 @@ { @reset($qfields); $this->bo->save_preferences($prefs,$other,$qfields,$fcat_id); - $GLOBALS['phpgw']->redirect_link('/preferences/index.php'); + $GLOBALS['egw']->redirect_link('/preferences/index.php'); } } - $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Addressbook').' '.lang('Preferences'); - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' '.lang('Preferences'); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); if($totalerrors) { - echo '

' . $GLOBALS['phpgw']->common->error_list($errors) . '
'; + echo '

' . $GLOBALS['egw']->common->error_list($errors) . '
'; } - $GLOBALS['phpgw']->template->set_file(array('preferences' => 'preferences.tpl')); + $GLOBALS['egw']->template->set_file(array('preferences' => 'preferences.tpl')); - $GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences')); + $GLOBALS['egw']->template->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences')); $i = 0; $j = 0; - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); // while(list($col, $descr) = each($qfields)) foreach($qfields as $col => $descr) @@ -1245,14 +1245,14 @@ $coltest = ereg_replace('\*','',$showcol); if($coltest) { - $GLOBALS['phpgw']->template->set_var($col,$showcol); - if($GLOBALS['phpgw_info']['user']['preferences']['addressbook'][$col]) + $GLOBALS['egw']->template->set_var($col,$showcol); + if($GLOBALS['egw_info']['user']['preferences']['addressbook'][$col]) { - $GLOBALS['phpgw']->template->set_var($col.'_checked',' checked'); + $GLOBALS['egw']->template->set_var($col.'_checked',' checked'); } else { - $GLOBALS['phpgw']->template->set_var($col.'_checked',''); + $GLOBALS['egw']->template->set_var($col.'_checked',''); } } } @@ -1264,7 +1264,7 @@ '.lang('Custom Fields').': '; - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); $i = 0; while(list($cf) = each($customfields)) { @@ -1286,24 +1286,24 @@ { $custom_var .= "  \n \n"; } - $GLOBALS['phpgw']->template->set_var('custom_fields',$custom_var); + $GLOBALS['egw']->template->set_var('custom_fields',$custom_var); } else { - $GLOBALS['phpgw']->template->set_var('custom_fields',''); + $GLOBALS['egw']->template->set_var('custom_fields',''); } - $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var(tr_color,$tr_color); - $GLOBALS['phpgw']->template->set_var('lang_showbirthday',lang('show birthday reminders on main screen')); + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var(tr_color,$tr_color); + $GLOBALS['egw']->template->set_var('lang_showbirthday',lang('show birthday reminders on main screen')); if($this->prefs['mainscreen_showbirthdays']) { - $GLOBALS['phpgw']->template->set_var('show_birthday',' checked'); + $GLOBALS['egw']->template->set_var('show_birthday',' checked'); } else { - $GLOBALS['phpgw']->template->set_var('show_birthday',''); + $GLOBALS['egw']->template->set_var('show_birthday',''); } $list = array( @@ -1312,35 +1312,35 @@ 'private' => lang('Private') /*, 'blank' => lang('Blank') */ ); - $GLOBALS['phpgw']->template->set_var('lang_default_filter',lang('Default Filter')); - $GLOBALS['phpgw']->template->set_var('filter_select',$this->formatted_list('other[default_filter]',$list,$this->prefs['default_filter'])); + $GLOBALS['egw']->template->set_var('lang_default_filter',lang('Default Filter')); + $GLOBALS['egw']->template->set_var('filter_select',$this->formatted_list('other[default_filter]',$list,$this->prefs['default_filter'])); - $GLOBALS['phpgw']->template->set_var('lang_autosave',lang('Autosave default category')); + $GLOBALS['egw']->template->set_var('lang_autosave',lang('Autosave default category')); if($this->prefs['autosave_category']) { - $GLOBALS['phpgw']->template->set_var('autosave',' checked'); + $GLOBALS['egw']->template->set_var('autosave',' checked'); } else { - $GLOBALS['phpgw']->template->set_var('autosave',''); + $GLOBALS['egw']->template->set_var('autosave',''); } - $GLOBALS['phpgw']->template->set_var('lang_defaultcat',lang('Default Category')); - $GLOBALS['phpgw']->template->set_var('cat_select',$this->cat_option($this->prefs['default_category'], false, false)); - $GLOBALS['phpgw']->template->set_var('lang_fields',lang('Fields to show in address list')); - $GLOBALS['phpgw']->template->set_var('lang_personal',lang('Personal')); - $GLOBALS['phpgw']->template->set_var('lang_business',lang('Business')); - $GLOBALS['phpgw']->template->set_var('lang_home',lang('Home')); - $GLOBALS['phpgw']->template->set_var('lang_phones',lang('Extra').' '.lang('Phone Numbers')); - $GLOBALS['phpgw']->template->set_var('lang_other',lang('Other').' '.lang('Fields')); - $GLOBALS['phpgw']->template->set_var('lang_otherprefs',lang('Other').' '.lang('Preferences')); - $GLOBALS['phpgw']->template->set_var('lang_save',lang('Save')); - $GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel')); - $GLOBALS['phpgw']->template->set_var('th_bg', $GLOBALS['phpgw_info']['theme']['th_bg']); - $GLOBALS['phpgw']->template->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']); - $GLOBALS['phpgw']->template->set_var('row_on', $GLOBALS['phpgw_info']['theme']['row_on']); - $GLOBALS['phpgw']->template->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']); + $GLOBALS['egw']->template->set_var('lang_defaultcat',lang('Default Category')); + $GLOBALS['egw']->template->set_var('cat_select',$this->cat_option($this->prefs['default_category'], false, false)); + $GLOBALS['egw']->template->set_var('lang_fields',lang('Fields to show in address list')); + $GLOBALS['egw']->template->set_var('lang_personal',lang('Personal')); + $GLOBALS['egw']->template->set_var('lang_business',lang('Business')); + $GLOBALS['egw']->template->set_var('lang_home',lang('Home')); + $GLOBALS['egw']->template->set_var('lang_phones',lang('Extra').' '.lang('Phone Numbers')); + $GLOBALS['egw']->template->set_var('lang_other',lang('Other').' '.lang('Fields')); + $GLOBALS['egw']->template->set_var('lang_otherprefs',lang('Other').' '.lang('Preferences')); + $GLOBALS['egw']->template->set_var('lang_save',lang('Save')); + $GLOBALS['egw']->template->set_var('lang_cancel',lang('Cancel')); + $GLOBALS['egw']->template->set_var('th_bg', $GLOBALS['egw_info']['theme']['th_bg']); + $GLOBALS['egw']->template->set_var('th_text',$GLOBALS['egw_info']['theme']['th_text']); + $GLOBALS['egw']->template->set_var('row_on', $GLOBALS['egw_info']['theme']['row_on']); + $GLOBALS['egw']->template->set_var('row_off',$GLOBALS['egw_info']['theme']['row_off']); - $GLOBALS['phpgw']->template->pparse('out','preferences'); + $GLOBALS['egw']->template->pparse('out','preferences'); } function get_form() @@ -1498,11 +1498,11 @@ { $referer = $_GET['referer'] ? $_GET['referer'] : $_POST['referer']; - $GLOBALS['phpgw']->template->set_file(array('form' => 'form.tpl')); + $GLOBALS['egw']->template->set_file(array('form' => 'form.tpl')); - if(($GLOBALS['phpgw_info']['server']['countrylist'] == 'user_choice' && - $GLOBALS['phpgw_info']['user']['preferences']['common']['countrylist'] == 'use_select') || - ($GLOBALS['phpgw_info']['server']['countrylist'] == 'force_select')) + if(($GLOBALS['egw_info']['server']['countrylist'] == 'user_choice' && + $GLOBALS['egw_info']['user']['preferences']['common']['countrylist'] == 'use_select') || + ($GLOBALS['egw_info']['server']['countrylist'] == 'force_select')) { $countrylist = True; } @@ -1583,9 +1583,9 @@ { $value = str_replace('_',' ',$value); $custom .= ' - +   - '.$value.': + '.$value.': '; @@ -1607,7 +1607,7 @@ } $str[$name] .= '>'; $str[$name] = $pref[0].$str[$name].$pref[1]; - $GLOBALS['phpgw']->template->set_var("pref_".$name,$str[$name]); + $GLOBALS['egw']->template->set_var("pref_".$name,$str[$name]); } if(strlen($bday) > 2) @@ -1743,7 +1743,7 @@ if($action) { - echo ''; + echo ''; } if(!ereg('^http://',$url)) @@ -1751,150 +1751,150 @@ $url = 'http://' . $url; } - $birthday = $GLOBALS['phpgw']->common->dateformatorder($bday_year,$bday_month,$bday_day) + $birthday = $GLOBALS['egw']->common->dateformatorder($bday_year,$bday_month,$bday_day) . ''.lang('(e.g. 1969)').''; if($format == 'edit') { - $create .= '' . lang("Created by") . ':' + $create .= '' . lang("Created by") . ':' . '' - . $GLOBALS['phpgw']->common->grab_owner_name($fields["owner"]); + . $GLOBALS['egw']->common->grab_owner_name($fields["owner"]); } else { $create .= ''; } - $GLOBALS['phpgw']->template->set_var('lang_home',lang('Home')); - $GLOBALS['phpgw']->template->set_var('lang_business',lang('Business')); - $GLOBALS['phpgw']->template->set_var('lang_personal',lang('Personal')); + $GLOBALS['egw']->template->set_var('lang_home',lang('Home')); + $GLOBALS['egw']->template->set_var('lang_business',lang('Business')); + $GLOBALS['egw']->template->set_var('lang_personal',lang('Personal')); - $GLOBALS['phpgw']->template->set_var('lang_lastname',lang('Last Name')); - $GLOBALS['phpgw']->template->set_var('lastname',$lastname); - $GLOBALS['phpgw']->template->set_var('lang_firstname',lang('First Name')); - $GLOBALS['phpgw']->template->set_var('firstname',$firstname); - $GLOBALS['phpgw']->template->set_var('lang_middle',lang('Middle Name')); - $GLOBALS['phpgw']->template->set_var('middle',$middle); - $GLOBALS['phpgw']->template->set_var('lang_prefix',lang('Prefix')); - $GLOBALS['phpgw']->template->set_var('prefix',$prefix); - $GLOBALS['phpgw']->template->set_var('lang_suffix',lang('Suffix')); - $GLOBALS['phpgw']->template->set_var('suffix',$suffix); - $GLOBALS['phpgw']->template->set_var('lang_birthday',lang('Birthday')); - $GLOBALS['phpgw']->template->set_var('birthday',$birthday); + $GLOBALS['egw']->template->set_var('lang_lastname',lang('Last Name')); + $GLOBALS['egw']->template->set_var('lastname',$lastname); + $GLOBALS['egw']->template->set_var('lang_firstname',lang('First Name')); + $GLOBALS['egw']->template->set_var('firstname',$firstname); + $GLOBALS['egw']->template->set_var('lang_middle',lang('Middle Name')); + $GLOBALS['egw']->template->set_var('middle',$middle); + $GLOBALS['egw']->template->set_var('lang_prefix',lang('Prefix')); + $GLOBALS['egw']->template->set_var('prefix',$prefix); + $GLOBALS['egw']->template->set_var('lang_suffix',lang('Suffix')); + $GLOBALS['egw']->template->set_var('suffix',$suffix); + $GLOBALS['egw']->template->set_var('lang_birthday',lang('Birthday')); + $GLOBALS['egw']->template->set_var('birthday',$birthday); - $GLOBALS['phpgw']->template->set_var('lang_company',lang('Company Name')); - $GLOBALS['phpgw']->template->set_var('company',$company); - $GLOBALS['phpgw']->template->set_var('lang_department',lang('Department')); - $GLOBALS['phpgw']->template->set_var('department',$department); - $GLOBALS['phpgw']->template->set_var('lang_title',lang('Title')); - $GLOBALS['phpgw']->template->set_var('title',$title); - $GLOBALS['phpgw']->template->set_var('lang_email',lang('Business Email')); - $GLOBALS['phpgw']->template->set_var('email',$email); - $GLOBALS['phpgw']->template->set_var('lang_email_type',lang('Business EMail Type')); - $GLOBALS['phpgw']->template->set_var('email_type',$email_type); - $GLOBALS['phpgw']->template->set_var('lang_url',lang('URL')); - $GLOBALS['phpgw']->template->set_var('url',$url); - $GLOBALS['phpgw']->template->set_var('lang_timezone',lang('time zone offset')); - $GLOBALS['phpgw']->template->set_var('timezone',$time_zone); - $GLOBALS['phpgw']->template->set_var('lang_fax',lang('Business Fax')); - $GLOBALS['phpgw']->template->set_var('fax',$fax); - $GLOBALS['phpgw']->template->set_var('lang_wphone',lang('Business Phone')); - $GLOBALS['phpgw']->template->set_var('wphone',$wphone); - $GLOBALS['phpgw']->template->set_var('lang_pager',lang('Pager')); - $GLOBALS['phpgw']->template->set_var('pager',$pager); - $GLOBALS['phpgw']->template->set_var('lang_mphone',lang('Cell Phone')); - $GLOBALS['phpgw']->template->set_var('mphone',$mphone); - $GLOBALS['phpgw']->template->set_var('lang_msgphone',lang('Message Phone')); - $GLOBALS['phpgw']->template->set_var('msgphone',$msgphone); - $GLOBALS['phpgw']->template->set_var('lang_isdnphone',lang('ISDN Phone')); - $GLOBALS['phpgw']->template->set_var('isdnphone',$isdnphone); - $GLOBALS['phpgw']->template->set_var('lang_carphone',lang('Car Phone')); - $GLOBALS['phpgw']->template->set_var('carphone',$carphone); - $GLOBALS['phpgw']->template->set_var('lang_vidphone',lang('Video Phone')); - $GLOBALS['phpgw']->template->set_var('vidphone',$vidphone); + $GLOBALS['egw']->template->set_var('lang_company',lang('Company Name')); + $GLOBALS['egw']->template->set_var('company',$company); + $GLOBALS['egw']->template->set_var('lang_department',lang('Department')); + $GLOBALS['egw']->template->set_var('department',$department); + $GLOBALS['egw']->template->set_var('lang_title',lang('Title')); + $GLOBALS['egw']->template->set_var('title',$title); + $GLOBALS['egw']->template->set_var('lang_email',lang('Business Email')); + $GLOBALS['egw']->template->set_var('email',$email); + $GLOBALS['egw']->template->set_var('lang_email_type',lang('Business EMail Type')); + $GLOBALS['egw']->template->set_var('email_type',$email_type); + $GLOBALS['egw']->template->set_var('lang_url',lang('URL')); + $GLOBALS['egw']->template->set_var('url',$url); + $GLOBALS['egw']->template->set_var('lang_timezone',lang('time zone offset')); + $GLOBALS['egw']->template->set_var('timezone',$time_zone); + $GLOBALS['egw']->template->set_var('lang_fax',lang('Business Fax')); + $GLOBALS['egw']->template->set_var('fax',$fax); + $GLOBALS['egw']->template->set_var('lang_wphone',lang('Business Phone')); + $GLOBALS['egw']->template->set_var('wphone',$wphone); + $GLOBALS['egw']->template->set_var('lang_pager',lang('Pager')); + $GLOBALS['egw']->template->set_var('pager',$pager); + $GLOBALS['egw']->template->set_var('lang_mphone',lang('Cell Phone')); + $GLOBALS['egw']->template->set_var('mphone',$mphone); + $GLOBALS['egw']->template->set_var('lang_msgphone',lang('Message Phone')); + $GLOBALS['egw']->template->set_var('msgphone',$msgphone); + $GLOBALS['egw']->template->set_var('lang_isdnphone',lang('ISDN Phone')); + $GLOBALS['egw']->template->set_var('isdnphone',$isdnphone); + $GLOBALS['egw']->template->set_var('lang_carphone',lang('Car Phone')); + $GLOBALS['egw']->template->set_var('carphone',$carphone); + $GLOBALS['egw']->template->set_var('lang_vidphone',lang('Video Phone')); + $GLOBALS['egw']->template->set_var('vidphone',$vidphone); - $GLOBALS['phpgw']->template->set_var('lang_ophone',lang('Other Number')); - $GLOBALS['phpgw']->template->set_var('ophone',$ophone); - $GLOBALS['phpgw']->template->set_var('lang_bstreet',lang('Business Street')); - $GLOBALS['phpgw']->template->set_var('bstreet',$bstreet); - $GLOBALS['phpgw']->template->set_var('lang_address2',lang('Address Line 2')); - $GLOBALS['phpgw']->template->set_var('address2',$address2); - $GLOBALS['phpgw']->template->set_var('lang_address3',lang('Address Line 3')); - $GLOBALS['phpgw']->template->set_var('address3',$address3); - $GLOBALS['phpgw']->template->set_var('lang_bcity',lang('Business City')); - $GLOBALS['phpgw']->template->set_var('bcity',$bcity); - $GLOBALS['phpgw']->template->set_var('lang_bstate',lang('Business State')); - $GLOBALS['phpgw']->template->set_var('bstate',$bstate); - $GLOBALS['phpgw']->template->set_var('lang_bzip',lang('Business Zip Code')); - $GLOBALS['phpgw']->template->set_var('bzip',$bzip); - $GLOBALS['phpgw']->template->set_var('lang_bcountry',lang('Business Country')); - $GLOBALS['phpgw']->template->set_var('bcountry',$bcountry); + $GLOBALS['egw']->template->set_var('lang_ophone',lang('Other Number')); + $GLOBALS['egw']->template->set_var('ophone',$ophone); + $GLOBALS['egw']->template->set_var('lang_bstreet',lang('Business Street')); + $GLOBALS['egw']->template->set_var('bstreet',$bstreet); + $GLOBALS['egw']->template->set_var('lang_address2',lang('Address Line 2')); + $GLOBALS['egw']->template->set_var('address2',$address2); + $GLOBALS['egw']->template->set_var('lang_address3',lang('Address Line 3')); + $GLOBALS['egw']->template->set_var('address3',$address3); + $GLOBALS['egw']->template->set_var('lang_bcity',lang('Business City')); + $GLOBALS['egw']->template->set_var('bcity',$bcity); + $GLOBALS['egw']->template->set_var('lang_bstate',lang('Business State')); + $GLOBALS['egw']->template->set_var('bstate',$bstate); + $GLOBALS['egw']->template->set_var('lang_bzip',lang('Business Zip Code')); + $GLOBALS['egw']->template->set_var('bzip',$bzip); + $GLOBALS['egw']->template->set_var('lang_bcountry',lang('Business Country')); + $GLOBALS['egw']->template->set_var('bcountry',$bcountry); if($countrylist) { - $GLOBALS['phpgw']->template->set_var('bcountry',$GLOBALS['phpgw']->country->form_select($bcountry,'entry[bcountry]')); + $GLOBALS['egw']->template->set_var('bcountry',$GLOBALS['egw']->country->form_select($bcountry,'entry[bcountry]')); } else { - $GLOBALS['phpgw']->template->set_var('bcountry',''); + $GLOBALS['egw']->template->set_var('bcountry',''); } - $GLOBALS['phpgw']->template->set_var('lang_badrtype',lang('Address Type')); - $GLOBALS['phpgw']->template->set_var('badrtype',$badrtype); + $GLOBALS['egw']->template->set_var('lang_badrtype',lang('Address Type')); + $GLOBALS['egw']->template->set_var('badrtype',$badrtype); - $GLOBALS['phpgw']->template->set_var('lang_hphone',lang('Home Phone')); - $GLOBALS['phpgw']->template->set_var('hphone',$hphone); - $GLOBALS['phpgw']->template->set_var('lang_hemail',lang('Home Email')); - $GLOBALS['phpgw']->template->set_var('hemail',$hemail); - $GLOBALS['phpgw']->template->set_var('lang_hemail_type',lang('Home EMail Type')); - $GLOBALS['phpgw']->template->set_var('hemail_type',$hemail_type); - $GLOBALS['phpgw']->template->set_var('lang_hstreet',lang('Home Street')); - $GLOBALS['phpgw']->template->set_var('hstreet',$hstreet); - $GLOBALS['phpgw']->template->set_var('lang_hcity',lang('Home City')); - $GLOBALS['phpgw']->template->set_var('hcity',$hcity); - $GLOBALS['phpgw']->template->set_var('lang_hstate',lang('Home State')); - $GLOBALS['phpgw']->template->set_var('hstate',$hstate); - $GLOBALS['phpgw']->template->set_var('lang_hzip',lang('Home Zip Code')); - $GLOBALS['phpgw']->template->set_var('hzip',$hzip); - $GLOBALS['phpgw']->template->set_var('lang_hcountry',lang('Home Country')); + $GLOBALS['egw']->template->set_var('lang_hphone',lang('Home Phone')); + $GLOBALS['egw']->template->set_var('hphone',$hphone); + $GLOBALS['egw']->template->set_var('lang_hemail',lang('Home Email')); + $GLOBALS['egw']->template->set_var('hemail',$hemail); + $GLOBALS['egw']->template->set_var('lang_hemail_type',lang('Home EMail Type')); + $GLOBALS['egw']->template->set_var('hemail_type',$hemail_type); + $GLOBALS['egw']->template->set_var('lang_hstreet',lang('Home Street')); + $GLOBALS['egw']->template->set_var('hstreet',$hstreet); + $GLOBALS['egw']->template->set_var('lang_hcity',lang('Home City')); + $GLOBALS['egw']->template->set_var('hcity',$hcity); + $GLOBALS['egw']->template->set_var('lang_hstate',lang('Home State')); + $GLOBALS['egw']->template->set_var('hstate',$hstate); + $GLOBALS['egw']->template->set_var('lang_hzip',lang('Home Zip Code')); + $GLOBALS['egw']->template->set_var('hzip',$hzip); + $GLOBALS['egw']->template->set_var('lang_hcountry',lang('Home Country')); if($countrylist) { - $GLOBALS['phpgw']->template->set_var('hcountry',$GLOBALS['phpgw']->country->form_select($hcountry,'entry[hcountry]')); + $GLOBALS['egw']->template->set_var('hcountry',$GLOBALS['egw']->country->form_select($hcountry,'entry[hcountry]')); } else { - $GLOBALS['phpgw']->template->set_var('hcountry',''); + $GLOBALS['egw']->template->set_var('hcountry',''); } - $GLOBALS['phpgw']->template->set_var('lang_hadrtype',lang('Address Type')); - $GLOBALS['phpgw']->template->set_var('hadrtype',$hadrtype); + $GLOBALS['egw']->template->set_var('lang_hadrtype',lang('Address Type')); + $GLOBALS['egw']->template->set_var('hadrtype',$hadrtype); - $GLOBALS['phpgw']->template->set_var('create',$create); - $GLOBALS['phpgw']->template->set_var('lang_notes',lang('notes')); - $GLOBALS['phpgw']->template->set_var('notes',$notes); - $GLOBALS['phpgw']->template->set_var('lang_label',lang('label')); - $GLOBALS['phpgw']->template->set_var('label',$label); - $GLOBALS['phpgw']->template->set_var('lang_pubkey',lang('Public Key')); - $GLOBALS['phpgw']->template->set_var('pubkey',$pubkey); - $GLOBALS['phpgw']->template->set_var('access_check',$access_check); + $GLOBALS['egw']->template->set_var('create',$create); + $GLOBALS['egw']->template->set_var('lang_notes',lang('notes')); + $GLOBALS['egw']->template->set_var('notes',$notes); + $GLOBALS['egw']->template->set_var('lang_label',lang('label')); + $GLOBALS['egw']->template->set_var('label',$label); + $GLOBALS['egw']->template->set_var('lang_pubkey',lang('Public Key')); + $GLOBALS['egw']->template->set_var('pubkey',$pubkey); + $GLOBALS['egw']->template->set_var('access_check',$access_check); - $GLOBALS['phpgw']->template->set_var('lang_private',lang('Private')); + $GLOBALS['egw']->template->set_var('lang_private',lang('Private')); - $GLOBALS['phpgw']->template->set_var('lang_cats',lang('Category')); - $GLOBALS['phpgw']->template->set_var('cats_link',$cats_link); + $GLOBALS['egw']->template->set_var('lang_cats',lang('Category')); + $GLOBALS['egw']->template->set_var('cats_link',$cats_link); if($customfields) { - $GLOBALS['phpgw']->template->set_var('lang_custom',lang('Custom Fields').':'); - $GLOBALS['phpgw']->template->set_var('custom',$custom); + $GLOBALS['egw']->template->set_var('lang_custom',lang('Custom Fields').':'); + $GLOBALS['egw']->template->set_var('custom',$custom); } else { - $GLOBALS['phpgw']->template->set_var('lang_custom',''); - $GLOBALS['phpgw']->template->set_var('custom',''); + $GLOBALS['egw']->template->set_var('lang_custom',''); + $GLOBALS['egw']->template->set_var('custom',''); } - $GLOBALS['phpgw']->template->set_var('th_bg', $GLOBALS['phpgw_info']['theme']['th_bg']); - $GLOBALS['phpgw']->template->set_var('th_text', $GLOBALS['phpgw_info']['theme']['th_text']); - $GLOBALS['phpgw']->template->set_var('row_on', $GLOBALS['phpgw_info']['theme']['row_on']); - $GLOBALS['phpgw']->template->set_var('row_off', $GLOBALS['phpgw_info']['theme']['row_off']); - $GLOBALS['phpgw']->template->set_var('row_text',$GLOBALS['phpgw_info']['theme']['row_text']); + $GLOBALS['egw']->template->set_var('th_bg', $GLOBALS['egw_info']['theme']['th_bg']); + $GLOBALS['egw']->template->set_var('th_text', $GLOBALS['egw_info']['theme']['th_text']); + $GLOBALS['egw']->template->set_var('row_on', $GLOBALS['egw_info']['theme']['row_on']); + $GLOBALS['egw']->template->set_var('row_off', $GLOBALS['egw_info']['theme']['row_off']); + $GLOBALS['egw']->template->set_var('row_text',$GLOBALS['egw_info']['theme']['row_text']); - $GLOBALS['phpgw']->template->pfp('out','form'); + $GLOBALS['egw']->template->pfp('out','form'); } /* end form function */ } ?> diff --git a/addressbook/inc/class.uifields.inc.php b/addressbook/inc/class.uifields.inc.php index f8c8a0defb..19d38a912f 100644 --- a/addressbook/inc/class.uifields.inc.php +++ b/addressbook/inc/class.uifields.inc.php @@ -26,27 +26,27 @@ { if (!$only_bo) { - $GLOBALS['phpgw']->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - $GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs'); + $GLOBALS['egw']->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); + $GLOBALS['egw']->nextmatchs = CreateObject('phpgwapi.nextmatchs'); } $this->config = CreateObject('phpgwapi.config','addressbook'); } function index() { - if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) + if(!$GLOBALS['egw']->acl->check('run',1,'admin')) { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo lang('access not permitted'); - $GLOBALS['phpgw']->common->phpgw_exit(); + $GLOBALS['egw']->common->phpgw_exit(); } - $GLOBALS['phpgw']->template->set_file(array( + $GLOBALS['egw']->template->set_file(array( 'field_list_t' => 'listfields.tpl', 'field_list' => 'listfields.tpl' )); - $GLOBALS['phpgw']->template->set_block('field_list_t','field_list','list'); + $GLOBALS['egw']->template->set_block('field_list_t','field_list','list'); $field = $_POST['field']; $start = $_POST['start'] ? $_POST['start'] : $_GET['start']; @@ -60,14 +60,14 @@ . '' . "\n" . '' . "\n"; - $GLOBALS['phpgw']->template->set_var('lang_action',lang('Custom Fields')); - $GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.add')); - $GLOBALS['phpgw']->template->set_var('lang_add',lang('Add')); - $GLOBALS['phpgw']->template->set_var('title_fields',lang('addressbook').' - '.lang('Custom Fields')); - $GLOBALS['phpgw']->template->set_var('lang_search',lang('Search')); - $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index')); - $GLOBALS['phpgw']->template->set_var('lang_done',lang('Done')); - $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php')); + $GLOBALS['egw']->template->set_var('lang_action',lang('Custom Fields')); + $GLOBALS['egw']->template->set_var('add_action',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.add')); + $GLOBALS['egw']->template->set_var('lang_add',lang('Add')); + $GLOBALS['egw']->template->set_var('title_fields',lang('addressbook').' - '.lang('Custom Fields')); + $GLOBALS['egw']->template->set_var('lang_search',lang('Search')); + $GLOBALS['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index')); + $GLOBALS['egw']->template->set_var('lang_done',lang('Done')); + $GLOBALS['egw']->template->set_var('doneurl',$GLOBALS['egw']->link('/admin/index.php')); if(!$start) { @@ -82,28 +82,28 @@ $fields = $this->read_custom_fields($start,$limit,$query,$sort); $total_records = count($fields); - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); - $GLOBALS['phpgw']->template->set_var('left',$GLOBALS['phpgw']->nextmatchs->left('/index.php',$start,$total_records,'menuaction=addressbook.uifields.index')); - $GLOBALS['phpgw']->template->set_var('right',$GLOBALS['phpgw']->nextmatchs->right('/index.php',$start,$total_records,'menuaction=addressbook.uifields.index')); + $GLOBALS['egw']->template->set_var('left',$GLOBALS['egw']->nextmatchs->left('/index.php',$start,$total_records,'menuaction=addressbook.uifields.index')); + $GLOBALS['egw']->template->set_var('right',$GLOBALS['egw']->nextmatchs->right('/index.php',$start,$total_records,'menuaction=addressbook.uifields.index')); - $GLOBALS['phpgw']->template->set_var('lang_showing',$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$start)); + $GLOBALS['egw']->template->set_var('lang_showing',$GLOBALS['egw']->nextmatchs->show_hits($total_records,$start)); - $GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']); - $GLOBALS['phpgw']->template->set_var('sort_field',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'name',$order,'/index.php',lang('Name')),'menuaction=addressbook.uifields.index'); - $GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit')); - $GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete')); + $GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']); + $GLOBALS['egw']->template->set_var('sort_field',$GLOBALS['egw']->nextmatchs->show_sort_order($sort,'name',$order,'/index.php',lang('Name')),'menuaction=addressbook.uifields.index'); + $GLOBALS['egw']->template->set_var('lang_edit',lang('Edit')); + $GLOBALS['egw']->template->set_var('lang_delete',lang('Delete')); for($i=0;$inextmatchs->alternate_row_color($tr_color); - $GLOBALS['phpgw']->template->set_var(tr_color,$tr_color); + $tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color); + $GLOBALS['egw']->template->set_var(tr_color,$tr_color); $field = $fields[$i]['name']; $title = $fields[$i]['title']; - $GLOBALS['phpgw']->template->set_var('cfield',$title); + $GLOBALS['egw']->template->set_var('cfield',$title); $params = array( 'menuaction' => 'addressbook.uifields.edit', @@ -114,27 +114,27 @@ 'order' => $order, 'filter' => $filter ); - $GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$params)); - $GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit')); + $GLOBALS['egw']->template->set_var('edit',$GLOBALS['egw']->link('/index.php',$params)); + $GLOBALS['egw']->template->set_var('lang_edit_entry',lang('Edit')); $params['menuaction'] = 'addressbook.uifields.delete'; - $GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$params)); - $GLOBALS['phpgw']->template->set_var('lang_delete_entry',lang('Delete')); - $GLOBALS['phpgw']->template->parse('list','field_list',True); + $GLOBALS['egw']->template->set_var('delete',$GLOBALS['egw']->link('/index.php',$params)); + $GLOBALS['egw']->template->set_var('lang_delete_entry',lang('Delete')); + $GLOBALS['egw']->template->parse('list','field_list',True); } - $GLOBALS['phpgw']->template->parse('out','field_list_t',True); - $GLOBALS['phpgw']->template->p('out'); + $GLOBALS['egw']->template->parse('out','field_list_t',True); + $GLOBALS['egw']->template->p('out'); } function add() { - if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) + if(!$GLOBALS['egw']->acl->check('run',1,'admin')) { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo lang('access not permitted'); - $GLOBALS['phpgw']->common->phpgw_exit(); + $GLOBALS['egw']->common->phpgw_exit(); } $field = stripslashes($_POST['field']); @@ -144,9 +144,9 @@ $sort = $_POST['sort']; $submit = $_POST['submit']; - $GLOBALS['phpgw']->template->set_file(array('form' => 'field_form.tpl')); - $GLOBALS['phpgw']->template->set_block('form','add','addhandle'); - $GLOBALS['phpgw']->template->set_block('form','edit','edithandle'); + $GLOBALS['egw']->template->set_file(array('form' => 'field_form.tpl')); + $GLOBALS['egw']->template->set_block('form','add','addhandle'); + $GLOBALS['egw']->template->set_block('form','edit','edithandle'); if($submit) { @@ -169,49 +169,49 @@ } } - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); if($errorcount) { - $GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); + $GLOBALS['egw']->template->set_var('message',$GLOBALS['egw']->common->error_list($error)); } if(($submit) && (!$error) && (!$errorcount)) { - $GLOBALS['phpgw']->template->set_var('message',lang('Field %1 has been added !', $field_name)); + $GLOBALS['egw']->template->set_var('message',lang('Field %1 has been added !', $field_name)); } if((!$submit) && (!$error) && (!$errorcount)) { - $GLOBALS['phpgw']->template->set_var('message',''); + $GLOBALS['egw']->template->set_var('message',''); } - $GLOBALS['phpgw']->template->set_var('title_fields',lang('Add Custom Field')); - $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.add')); - $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index')); - $GLOBALS['phpgw']->template->set_var('hidden_vars',''); + $GLOBALS['egw']->template->set_var('title_fields',lang('Add Custom Field')); + $GLOBALS['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.add')); + $GLOBALS['egw']->template->set_var('doneurl',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index')); + $GLOBALS['egw']->template->set_var('hidden_vars',''); - $GLOBALS['phpgw']->template->set_var('lang_name',lang('Field name')); + $GLOBALS['egw']->template->set_var('lang_name',lang('Field name')); - $GLOBALS['phpgw']->template->set_var('lang_add',lang('Add')); - $GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form')); - $GLOBALS['phpgw']->template->set_var('lang_done',lang('Done')); + $GLOBALS['egw']->template->set_var('lang_add',lang('Add')); + $GLOBALS['egw']->template->set_var('lang_reset',lang('Clear Form')); + $GLOBALS['egw']->template->set_var('lang_done',lang('Done')); - $GLOBALS['phpgw']->template->set_var('field_name',$field_name); + $GLOBALS['egw']->template->set_var('field_name',$field_name); - $GLOBALS['phpgw']->template->set_var('edithandle',''); - $GLOBALS['phpgw']->template->set_var('addhandle',''); - $GLOBALS['phpgw']->template->pparse('out','form'); - $GLOBALS['phpgw']->template->pparse('addhandle','add'); + $GLOBALS['egw']->template->set_var('edithandle',''); + $GLOBALS['egw']->template->set_var('addhandle',''); + $GLOBALS['egw']->template->pparse('out','form'); + $GLOBALS['egw']->template->pparse('addhandle','add'); } function edit() { - if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) + if(!$GLOBALS['egw']->acl->check('run',1,'admin')) { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo lang('access not permitted'); - $GLOBALS['phpgw']->common->phpgw_exit(); + $GLOBALS['egw']->common->phpgw_exit(); } $field = stripslashes($_POST['field'] ? $_POST['field'] : $_GET['field']); @@ -223,12 +223,12 @@ if(!$field) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uifields.index&sort=$sort&query=$query&start=$start")); + Header('Location: ' . $GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uifields.index&sort=$sort&query=$query&start=$start")); } - $GLOBALS['phpgw']->template->set_file(array('form' => 'field_form.tpl')); - $GLOBALS['phpgw']->template->set_block('form','add','addhandle'); - $GLOBALS['phpgw']->template->set_block('form','edit','edithandle'); + $GLOBALS['egw']->template->set_file(array('form' => 'field_form.tpl')); + $GLOBALS['egw']->template->set_block('form','add','addhandle'); + $GLOBALS['egw']->template->set_block('form','edit','edithandle'); $hidden_vars = '' . "\n" . '' . "\n" @@ -249,20 +249,20 @@ } } - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); if($errorcount) { - $GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); + $GLOBALS['egw']->template->set_var('message',$GLOBALS['egw']->common->error_list($error)); } if(($submit) && (!$error) && (!$errorcount)) { - $GLOBALS['phpgw']->template->set_var('message',lang('Field %1 has been updated !', $field_name)); + $GLOBALS['egw']->template->set_var('message',lang('Field %1 has been updated !', $field_name)); } if((!$submit) && (!$error) && (!$errorcount)) { - $GLOBALS['phpgw']->template->set_var('message',''); + $GLOBALS['egw']->template->set_var('message',''); } if($submit) @@ -272,39 +272,39 @@ else { $fields = $this->read_custom_fields($start,$limit,$field); - $field = $GLOBALS['phpgw']->strip_html($fields[0]['title']); + $field = $GLOBALS['egw']->strip_html($fields[0]['title']); $fn = $fields[0]['name']; } - $GLOBALS['phpgw']->template->set_var('title_fields',lang('Edit Custom Field')); - $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.edit')); - $GLOBALS['phpgw']->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uifields.delete&field=$fn&start=$start&query=$query&sort=$sort")); - $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uifields.index&start=$start&query=$query&sort=$sort")); + $GLOBALS['egw']->template->set_var('title_fields',lang('Edit Custom Field')); + $GLOBALS['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.edit')); + $GLOBALS['egw']->template->set_var('deleteurl',$GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uifields.delete&field=$fn&start=$start&query=$query&sort=$sort")); + $GLOBALS['egw']->template->set_var('doneurl',$GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uifields.index&start=$start&query=$query&sort=$sort")); - $GLOBALS['phpgw']->template->set_var('hidden_vars',$hidden_vars); - $GLOBALS['phpgw']->template->set_var('lang_name',lang('Field name')); + $GLOBALS['egw']->template->set_var('hidden_vars',$hidden_vars); + $GLOBALS['egw']->template->set_var('lang_name',lang('Field name')); - $GLOBALS['phpgw']->template->set_var('lang_done',lang('Done')); - $GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit')); - $GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete')); + $GLOBALS['egw']->template->set_var('lang_done',lang('Done')); + $GLOBALS['egw']->template->set_var('lang_edit',lang('Edit')); + $GLOBALS['egw']->template->set_var('lang_delete',lang('Delete')); - $GLOBALS['phpgw']->template->set_var('field_name',$field); + $GLOBALS['egw']->template->set_var('field_name',$field); - $GLOBALS['phpgw']->template->set_var('edithandle',''); - $GLOBALS['phpgw']->template->set_var('addhandle',''); + $GLOBALS['egw']->template->set_var('edithandle',''); + $GLOBALS['egw']->template->set_var('addhandle',''); - $GLOBALS['phpgw']->template->pparse('out','form'); - $GLOBALS['phpgw']->template->pparse('edithandle','edit'); + $GLOBALS['egw']->template->pparse('out','form'); + $GLOBALS['egw']->template->pparse('edithandle','edit'); } function delete() { - if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) + if(!$GLOBALS['egw']->acl->check('run',1,'admin')) { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); echo lang('access not permitted'); - $GLOBALS['phpgw']->common->phpgw_exit(); + $GLOBALS['egw']->common->phpgw_exit(); } $field = urldecode($_POST['field'] ? $_POST['field'] : $_GET['field']); @@ -315,17 +315,17 @@ if(!$field) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index')); + Header('Location: ' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index')); } if($_POST['confirm']) { $this->save_custom_field($field); - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uifields.index&start=$start&query=$query&sort=$sort")); + Header('Location: ' . $GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uifields.index&start=$start&query=$query&sort=$sort")); } else { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); $hidden_vars = '' . "\n" @@ -334,15 +334,15 @@ . '' . "\n" . '' . "\n"; - $GLOBALS['phpgw']->template->set_file(array('field_delete' => 'delete_common.tpl')); - $GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete this field?')); + $GLOBALS['egw']->template->set_file(array('field_delete' => 'delete_common.tpl')); + $GLOBALS['egw']->template->set_var('messages',lang('Are you sure you want to delete this field?')); - $nolinkf = $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uifields.index&field_id=$field_id&start=$start&query=$query&sort=$sort"); + $nolinkf = $GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uifields.index&field_id=$field_id&start=$start&query=$query&sort=$sort"); $nolink = '
' . lang('No') . ''; - $GLOBALS['phpgw']->template->set_var('no',$nolink); + $GLOBALS['egw']->template->set_var('no',$nolink); - $yeslinkf = $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifieldsdelete&field_id=' . $field_id . '&confirm=True'); - $yeslinkf = '' + $yeslinkf = $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifieldsdelete&field_id=' . $field_id . '&confirm=True'); + $yeslinkf = '' . $hidden_vars . '' . '' @@ -351,9 +351,9 @@ $yeslink = '' . lang('Yes') . ''; $yeslink = $yeslinkf; - $GLOBALS['phpgw']->template->set_var('yes',$yeslink); + $GLOBALS['egw']->template->set_var('yes',$yeslink); - $GLOBALS['phpgw']->template->pparse('out','field_delete'); + $GLOBALS['egw']->template->pparse('out','field_delete'); } } diff --git a/addressbook/inc/class.uivcard.inc.php b/addressbook/inc/class.uivcard.inc.php index 6353701930..78a4e1d867 100644 --- a/addressbook/inc/class.uivcard.inc.php +++ b/addressbook/inc/class.uivcard.inc.php @@ -34,7 +34,7 @@ function uivcard() { - $this->template = &$GLOBALS['phpgw']->template; + $this->template = &$GLOBALS['egw']->template; $this->contacts = CreateObject('phpgwapi.contacts'); $this->browser = CreateObject('phpgwapi.browser'); $this->vcard = CreateObject('phpgwapi.vcard'); @@ -51,13 +51,13 @@ $ab_id = $this->bo->add_vcard($uploadedfile); if($ab_id) { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id)); + Header('Location: ' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id)); } } - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); - echo ''; + echo ''; if($action == 'GetFile') { @@ -68,7 +68,7 @@ $this->template->set_var('lang_load_vcard', lang('load vcard')); $this->template->set_var('vcard_header','

 ' . lang('Address book - VCard in') . '


'); - $this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uivcard.in')); + $this->template->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uivcard.in')); $this->template->set_var('lang_access',lang('Access')); $this->template->set_var('lang_groups',lang('Which groups')); $this->template->set_var('access_option',$access_option); @@ -76,7 +76,7 @@ $this->template->pparse('out','vcardin'); - $GLOBALS['phpgw']->common->phpgw_footer(); + $GLOBALS['egw']->common->phpgw_footer(); } function out() @@ -87,24 +87,24 @@ if($nolname || $nofname) { - $GLOBALS['phpgw']->common->phpgw_header(); + $GLOBALS['egw']->common->phpgw_header(); echo parse_navbar(); } if(!$ab_id) { - Header('Location: ' . $GLOBALS['phpgw']->link('/addressbook/index.php')); - $GLOBALS['phpgw']->common->phpgw_exit(); + Header('Location: ' . $GLOBALS['egw']->link('/addressbook/index.php')); + $GLOBALS['egw']->common->phpgw_exit(); } // First, make sure they have permission to this entry $check = $this->bo->read_entry(array('id' => $ab_id, 'fields' => array('owner' => 'owner'))); $perms = $this->contacts->check_perms($this->contacts->grants[$check[0]['owner']],PHPGW_ACL_READ); - if((!$perms) && ($check[0]['owner'] != $GLOBALS['phpgw_info']['user']['account_id'])) + if((!$perms) && ($check[0]['owner'] != $GLOBALS['egw_info']['user']['account_id'])) { - Header("Location: " . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.get_list')); - $GLOBALS['phpgw']->common->phpgw_exit(); + Header("Location: " . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.get_list')); + $GLOBALS['egw']->common->phpgw_exit(); } $extrafields = array('address2' => 'address2'); @@ -134,11 +134,11 @@ if($lastname == '') { /* Run away here. */ - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uivcard.out&nolname=1&ab_id=$ab_id")); + Header('Location: ' . $GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uivcard.out&nolname=1&ab_id=$ab_id")); } if($firstname == '') { - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uivcard.out&nofname=1&ab_id=$ab_id")); + Header('Location: ' . $GLOBALS['egw']->link('/index.php',"menuaction=addressbook.uivcard.out&nofname=1&ab_id=$ab_id")); } if($email) @@ -177,7 +177,7 @@ $this->browser->content_header($filename,'text/x-vcard'); echo $entry; exit; - //$GLOBALS['phpgw']->common->exit; + //$GLOBALS['egw']->common->exit; } /* !nolname && !nofname */ if($nofname) @@ -185,7 +185,7 @@ echo '

'; echo lang("This person's first name was not in the address book.") .'
'; echo lang('Vcards require a first name entry.') . '

'; - echo 'link('/addressbook/index.php', "order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . ''; echo '
'; } @@ -195,14 +195,14 @@ echo '

'; echo lang("This person's last name was not in the address book.") . '
'; echo lang('Vcards require a last name entry.') . '

'; - echo 'link('/addressbook/index.php', "order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . ''; echo '
'; } if($nolname || $nofname) { - //$GLOBALS['phpgw']->common->phpgw_footer(); + //$GLOBALS['egw']->common->phpgw_footer(); } } } diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index 6b439c0f60..23ca649c98 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -60,7 +60,7 @@ } /* Get global and app-specific category listings */ - $cats_link .= $GLOBALS['phpgw']->categories->formated_list('select','all',$cat_id,True); + $cats_link .= $GLOBALS['egw']->categories->formated_list('select','all',$cat_id,True); $cats_link .= ''."\n"; return $cats_link; } @@ -134,8 +134,8 @@ { $i = 0; $j = 0; $fields = array(); - @reset($GLOBALS['phpgw_info']['user']['preferences']['addressbook']); - while(list($col,$descr) = @each($GLOBALS['phpgw_info']['user']['preferences']['addressbook'])) + @reset($GLOBALS['egw_info']['user']['preferences']['addressbook']); + while(list($col,$descr) = @each($GLOBALS['egw_info']['user']['preferences']['addressbook'])) { if( substr($col,0,6) == 'extra_' ) { @@ -162,15 +162,15 @@ function save_custom_field($old='',$new='') { - $GLOBALS['phpgw']->preferences->read_repository($GLOBALS['phpgw_info']['user']['account_id']); + $GLOBALS['egw']->preferences->read_repository($GLOBALS['egw_info']['user']['account_id']); if($old) { - $GLOBALS['phpgw']->preferences->delete('addressbook','extra_'.$old); + $GLOBALS['egw']->preferences->delete('addressbook','extra_'.$old); } if($new) { - $GLOBALS['phpgw']->preferences->add('addressbook','extra_'.$new); + $GLOBALS['egw']->preferences->add('addressbook','extra_'.$new); } - $GLOBALS['phpgw']->preferences->save_repository(1); + $GLOBALS['egw']->preferences->save_repository(1); } ?> diff --git a/addressbook/inc/hook_admin.inc.php b/addressbook/inc/hook_admin.inc.php index b7eb028cd5..8b3cd3c287 100644 --- a/addressbook/inc/hook_admin.inc.php +++ b/addressbook/inc/hook_admin.inc.php @@ -16,9 +16,9 @@ // Only Modify the $file and $title variables..... $title = $appname; $file = Array( - 'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), - 'Edit custom fields' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'), - 'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook') + 'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), + 'Edit custom fields' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index'), + 'Global Categories' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook') ); //Do not modify below this line display_section($appname,$title,$file); diff --git a/addressbook/inc/hook_config_validate.inc.php b/addressbook/inc/hook_config_validate.inc.php index 7e3a9c5afd..7dd1c4e0a6 100644 --- a/addressbook/inc/hook_config_validate.inc.php +++ b/addressbook/inc/hook_config_validate.inc.php @@ -16,16 +16,16 @@ Set a global flag to indicate this file was found by admin/config.php. config.php will unset it after parsing the form values. */ - $GLOBALS['phpgw_info']['server']['found_validation_hook'] = True; + $GLOBALS['egw_info']['server']['found_validation_hook'] = True; /* Check a specific setting. Name must match the setting. */ function ldap_contact_context($value='') { - if($value == $GLOBALS['phpgw_info']['server']['ldap_context']) + if($value == $GLOBALS['egw_info']['server']['ldap_context']) { $GLOBALS['config_error'] = 'Contact context for ldap must be different from the context used for accounts'; } - elseif($value == $GLOBALS['phpgw_info']['server']['ldap_group_context']) + elseif($value == $GLOBALS['egw_info']['server']['ldap_group_context']) { $GLOBALS['config_error'] = 'Contact context for ldap must be different from the context used for groups'; } diff --git a/addressbook/inc/hook_notifywindow.inc.php b/addressbook/inc/hook_notifywindow.inc.php index 3a14271a28..154d57dfa1 100644 --- a/addressbook/inc/hook_notifywindow.inc.php +++ b/addressbook/inc/hook_notifywindow.inc.php @@ -15,15 +15,15 @@ if($d1 == 'htt' || $d1 == 'ftp') { echo "Failed attempt to break in via an old Security Hole!
\n"; - $GLOBALS['phpgw']->common->phpgw_exit(); + $GLOBALS['egw']->common->phpgw_exit(); } unset($d1); $tmp_app_inc = PHPGW_APP_INC; - define('PHPGW_APP_INC',$GLOBALS['phpgw']->common->get_inc_dir('addressbook')); + define('PHPGW_APP_INC',$GLOBALS['egw']->common->get_inc_dir('addressbook')); - if($GLOBALS['phpgw_info']['user']['apps']['addressbook'] - && $GLOBALS['phpgw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays']) + if($GLOBALS['egw_info']['user']['apps']['addressbook'] + && $GLOBALS['egw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays']) { echo "\n\n"; @@ -33,29 +33,29 @@ 'n_family' => 'n_family', 'bday' => 'bday' ); - $now = time() - ((60 * 60) * (int)$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']); - $today = $GLOBALS['phpgw']->common->show_date($now,'n/d/'); + $now = time() - ((60 * 60) * (int)$GLOBALS['egw_info']['user']['preferences']['common']['tz_offset']); + $today = $GLOBALS['egw']->common->show_date($now,'n/d/'); // echo $today."\n"; - $bdays = $c->read(0,15,$qfields,$today,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']); + $bdays = $c->read(0,15,$qfields,$today,'tid=n','','',$GLOBALS['egw_info']['user']['account_id']); while(list($key,$val) = @each($bdays)) { $tmp = '' + . $GLOBALS['egw']->link('/.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) . '">' . $val['n_given'] . ' ' . $val['n_family'] . ''; echo '' . lang("Today is %1's birthday!", $tmp) . "\n"; } - $tomorrow = $GLOBALS['phpgw']->common->show_date($now + 86400,'n/d/'); + $tomorrow = $GLOBALS['egw']->common->show_date($now + 86400,'n/d/'); // echo $tomorrow."\n"; - $bdays = $c->read(0,15,$qfields,$tomorrow,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']); + $bdays = $c->read(0,15,$qfields,$tomorrow,'tid=n','','',$GLOBALS['egw_info']['user']['account_id']); while(list($key,$val) = @each($bdays)) { $tmp = '' + . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) . '">' . $val['n_given'] . ' ' . $val['n_family'] . ''; echo '' . lang("Tomorrow is %1's birthday.", $tmp) . "\n"; } diff --git a/addressbook/inc/hook_preferences.inc.php b/addressbook/inc/hook_preferences.inc.php index 10a1f43017..a25ba9023b 100644 --- a/addressbook/inc/hook_preferences.inc.php +++ b/addressbook/inc/hook_preferences.inc.php @@ -15,9 +15,9 @@ // Only Modify the $file and $title variables..... $title = $appname; $file = Array( - 'Preferences' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'), - 'Grant Access' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname), - 'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True') + 'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'), + 'Grant Access' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname), + 'Edit Categories' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True') ); //Do not modify below this line display_section($appname,$title,$file); diff --git a/addressbook/inc/hook_sidebox_menu.inc.php b/addressbook/inc/hook_sidebox_menu.inc.php index 2f4ff3a94c..a318b8f07b 100644 --- a/addressbook/inc/hook_sidebox_menu.inc.php +++ b/addressbook/inc/hook_sidebox_menu.inc.php @@ -23,33 +23,33 @@ display_sidebox can be called as much as you like */ - $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); + $menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); $file = Array( - 'Add'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.add'), + 'Add'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.add'), '_NewLine_', // give a newline - 'import contacts' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import'), - 'export contacts' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export') + 'import contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import'), + 'export contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export') ); display_sidebox($appname,$menu_title,$file); - if($GLOBALS['phpgw_info']['user']['apps']['preferences']) + if($GLOBALS['egw_info']['user']['apps']['preferences']) { $menu_title = lang('Preferences'); $file = Array( - 'Addressbook preferences'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'), - 'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=addressbook'), - 'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=addressbook&cats_level=True&global_cats=True') + 'Addressbook preferences'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'), + 'Grant Access'=>$GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=addressbook'), + 'Edit Categories' =>$GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=addressbook&cats_level=True&global_cats=True') ); display_sidebox($appname,$menu_title,$file); } - if ($GLOBALS['phpgw_info']['user']['apps']['admin']) + if ($GLOBALS['egw_info']['user']['apps']['admin']) { $menu_title = lang('Administration'); $file = Array( - 'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook'), - 'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'), - 'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook') + 'Configuration'=>$GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook'), + 'Custom Fields'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index'), + 'Global Categories' =>$GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook') ); display_sidebox($appname,$menu_title,$file); }