forked from extern/egroupware
Converting to new egw arrays
This commit is contained in:
parent
72aa737bc4
commit
2cc1972c51
@ -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 '<br>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 '<br>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;
|
||||
}
|
||||
|
@ -194,13 +194,13 @@
|
||||
if($this->use_session)
|
||||
{
|
||||
if($this->debug) { echo '<br>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 '<br>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 '<br>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')
|
||||
|
@ -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); */
|
||||
}
|
||||
|
||||
|
@ -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('<b>No conversion type <none> could be located.</b> Please choose a conversion type from the list');
|
||||
echo ' <a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import') . '">' . lang('OK') . '</a>';
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
echo ' <a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import') . '">' . lang('OK') . '</a>';
|
||||
$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 "<pre>$buffer</pre>";
|
||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index') . '">'.lang('OK').'</a>';
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
echo '<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index') . '">'.lang('OK').'</a>';
|
||||
$GLOBALS['egw']->common->phpgw_footer();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
echo "<pre>$buffer</pre>";
|
||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'). '">'.lang('OK').'</a>';
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
echo '<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'). '">'.lang('OK').'</a>';
|
||||
$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('<b>No conversion type <none> could be located.</b> Please choose a conversion type from the list');
|
||||
echo ' <a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
echo ' <a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
||||
$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 "<pre>\n";
|
||||
echo $buffer;
|
||||
echo "\n</pre>\n";
|
||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
echo '<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
||||
$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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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 @@
|
||||
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
||||
. '<input type="hidden" name="filter" value="' . $filter . '">' . "\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;$i<count($fields);$i++)
|
||||
{
|
||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->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','<input type="hidden" name="field" value="' . $field . '">');
|
||||
$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','<input type="hidden" name="field" value="' . $field . '">');
|
||||
|
||||
$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 = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||
. '<input type="hidden" name="query" value="' . $query . '">' . "\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 = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||
@ -334,15 +334,15 @@
|
||||
. '<input type="hidden" name="start" value="' . $start .'">' . "\n"
|
||||
. '<input type="hidden" name="field" value="' . $field .'">' . "\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 = '<a href="' . $nolinkf . '">' . lang('No') . '</a>';
|
||||
$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 = '<form method="POST" name="yesbutton" action="' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.delete') . '">'
|
||||
$yeslinkf = $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifieldsdelete&field_id=' . $field_id . '&confirm=True');
|
||||
$yeslinkf = '<form method="POST" name="yesbutton" action="' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.delete') . '">'
|
||||
. $hidden_vars
|
||||
. '<input type="hidden" name="field_id" value="' . $field_id . '">'
|
||||
. '<input type="hidden" name="confirm" value="True">'
|
||||
@ -351,9 +351,9 @@
|
||||
|
||||
$yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>';
|
||||
$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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 '<body bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '">';
|
||||
echo '<body bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '">';
|
||||
|
||||
if($action == 'GetFile')
|
||||
{
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
$this->template->set_var('lang_load_vcard', lang('load vcard'));
|
||||
$this->template->set_var('vcard_header','<p> <b>' . lang('Address book - VCard in') . '</b><hr><p>');
|
||||
$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 '<br><br><center>';
|
||||
echo lang("This person's first name was not in the address book.") .'<br>';
|
||||
echo lang('Vcards require a first name entry.') . '<br><br>';
|
||||
echo '<a href="' . $GLOBALS['phpgw']->link('/addressbook/index.php',
|
||||
echo '<a href="' . $GLOBALS['egw']->link('/addressbook/index.php',
|
||||
"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>';
|
||||
echo '</center>';
|
||||
}
|
||||
@ -195,14 +195,14 @@
|
||||
echo '<br><br><center>';
|
||||
echo lang("This person's last name was not in the address book.") . '<br>';
|
||||
echo lang('Vcards require a last name entry.') . '<br><br>';
|
||||
echo '<a href="' . $GLOBALS['phpgw']->link('/addressbook/index.php',
|
||||
echo '<a href="' . $GLOBALS['egw']->link('/addressbook/index.php',
|
||||
"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>';
|
||||
echo '</center>';
|
||||
}
|
||||
|
||||
if($nolname || $nofname)
|
||||
{
|
||||
//$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
//$GLOBALS['egw']->common->phpgw_footer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 .= '</select>'."\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);
|
||||
}
|
||||
?>
|
||||
|
@ -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);
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -15,15 +15,15 @@
|
||||
if($d1 == 'htt' || $d1 == 'ftp')
|
||||
{
|
||||
echo "Failed attempt to break in via an old Security Hole!<br>\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<!-- Birthday info -->\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 = '<a href="'
|
||||
. $GLOBALS['phpgw']->link('/.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) . '">'
|
||||
. $GLOBALS['egw']->link('/.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) . '">'
|
||||
. $val['n_given'] . ' ' . $val['n_family'] . '</a>';
|
||||
echo '<tr><td align="left">' . lang("Today is %1's birthday!", $tmp) . "</td></tr>\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 = '<a href="'
|
||||
. $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) . '">'
|
||||
. $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) . '">'
|
||||
. $val['n_given'] . ' ' . $val['n_family'] . '</a>';
|
||||
echo '<tr><td align="left">' . lang("Tomorrow is %1's birthday.", $tmp) . "</td></tr>\n";
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user