mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Converting to new egw arrays
This commit is contained in:
parent
72aa737bc4
commit
2cc1972c51
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
function boXport($session=False)
|
function boXport($session=False)
|
||||||
{
|
{
|
||||||
$this->contacts = &$GLOBALS['phpgw']->contacts;
|
$this->contacts = &$GLOBALS['egw']->contacts;
|
||||||
$this->so = CreateObject('addressbook.soaddressbook');
|
$this->so = CreateObject('addressbook.soaddressbook');
|
||||||
if($session)
|
if($session)
|
||||||
{
|
{
|
||||||
@ -97,13 +97,13 @@
|
|||||||
if($this->use_session)
|
if($this->use_session)
|
||||||
{
|
{
|
||||||
if($this->debug) { echo '<br>Save:'; _debug_array($data); }
|
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()
|
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); }
|
if($this->debug) { echo '<br>Read:'; _debug_array($data); }
|
||||||
|
|
||||||
$this->start = $data['start'];
|
$this->start = $data['start'];
|
||||||
@ -349,7 +349,7 @@
|
|||||||
|
|
||||||
// Read in user custom fields, if any
|
// Read in user custom fields, if any
|
||||||
$customfields = array();
|
$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_')
|
if(substr($col,0,6) == 'extra_')
|
||||||
{
|
{
|
||||||
@ -391,7 +391,7 @@
|
|||||||
// Here, buffer becomes a string suitable for printing
|
// Here, buffer becomes a string suitable for printing
|
||||||
$buffer = $contacts->export_end_file($buffer);
|
$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;
|
return $buffer;
|
||||||
}
|
}
|
||||||
|
@ -194,13 +194,13 @@
|
|||||||
if($this->use_session)
|
if($this->use_session)
|
||||||
{
|
{
|
||||||
if($this->debug) { echo '<br>Save:'; _debug_array($data); }
|
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()
|
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); }
|
if($this->debug) { echo '<br>Read:'; _debug_array($data); }
|
||||||
|
|
||||||
$this->start = $data['start'];
|
$this->start = $data['start'];
|
||||||
@ -227,12 +227,12 @@
|
|||||||
{
|
{
|
||||||
foreach($dirty[$i] as $name => $value)
|
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
|
else
|
||||||
{
|
{
|
||||||
$cleaned[$i] == $GLOBALS['phpgw']->strip_html($dirty[$i]);
|
$cleaned[$i] == $GLOBALS['egw']->strip_html($dirty[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $cleaned;
|
return $cleaned;
|
||||||
@ -251,7 +251,7 @@
|
|||||||
|
|
||||||
if(is_array($new_fields) && count($new_fields))
|
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']);
|
$GLOBALS['server']->xmlrpc_error($GLOBALS['xmlrpcerr']['no_access'],$GLOBALS['xmlrpcstr']['no_access']);
|
||||||
}
|
}
|
||||||
@ -338,12 +338,12 @@
|
|||||||
}
|
}
|
||||||
if(!is_array($account))
|
if(!is_array($account))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->accounts->account_id = $account;
|
$GLOBALS['egw']->accounts->account_id = $account;
|
||||||
$account = $GLOBALS['phpgw']->accounts->read_repository();
|
$account = $GLOBALS['egw']->accounts->read_repository();
|
||||||
}
|
}
|
||||||
$prefs->account_id = $account['account_id'];
|
$prefs->account_id = $account['account_id'];
|
||||||
$prefs->read_repository();
|
$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] == '/')
|
if($freebusy_url[0] == '/')
|
||||||
{
|
{
|
||||||
$freebusy_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$freebusy_url;
|
$freebusy_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$freebusy_url;
|
||||||
@ -353,7 +353,7 @@
|
|||||||
$ret = array(
|
$ret = array(
|
||||||
'n_family' => $lastname,
|
'n_family' => $lastname,
|
||||||
'n_given' => $firstname,
|
'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']),
|
'email' => $prefs->email_address($account['account_id']),
|
||||||
'freebusy_url' => $freebusy_url,
|
'freebusy_url' => $freebusy_url,
|
||||||
'rights' => PHPGW_ACL_READ, // readonly access
|
'rights' => PHPGW_ACL_READ, // readonly access
|
||||||
@ -370,14 +370,14 @@
|
|||||||
switch($type)
|
switch($type)
|
||||||
{
|
{
|
||||||
case 'all': // all
|
case 'all': // all
|
||||||
$accounts = $GLOBALS['phpgw']->accounts->get_list('accounts');
|
$accounts = $GLOBALS['egw']->accounts->get_list('accounts');
|
||||||
break;
|
break;
|
||||||
case 'calendar': // Calendar users
|
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;
|
break;
|
||||||
case 'groupmates': // Groupmates
|
case 'groupmates': // Groupmates
|
||||||
$accounts = array();
|
$accounts = array();
|
||||||
foreach($GLOBALS['phpgw']->accounts->membership() as $group)
|
foreach($GLOBALS['egw']->accounts->membership() as $group)
|
||||||
{
|
{
|
||||||
$accounts[] = $group['account_id'];
|
$accounts[] = $group['account_id'];
|
||||||
}
|
}
|
||||||
@ -385,11 +385,11 @@
|
|||||||
}
|
}
|
||||||
foreach($accounts as $key => $account)
|
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
|
// $account is a group
|
||||||
unset($accounts[$key]);
|
unset($accounts[$key]);
|
||||||
$members = $GLOBALS['phpgw']->accounts->member($account);
|
$members = $GLOBALS['egw']->accounts->member($account);
|
||||||
if(is_array($members))
|
if(is_array($members))
|
||||||
{
|
{
|
||||||
foreach($members as $member)
|
foreach($members as $member)
|
||||||
@ -502,7 +502,7 @@
|
|||||||
$vcard = CreateObject('phpgwapi.vcard');
|
$vcard = CreateObject('phpgwapi.vcard');
|
||||||
$entry = $vcard->in_file($filename);
|
$entry = $vcard->in_file($filename);
|
||||||
/* _debug_array($entry);exit; */
|
/* _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['access'] = 'private';
|
||||||
$entry['tid'] = 'n';
|
$entry['tid'] = 'n';
|
||||||
/* _debug_array($entry);exit; */
|
/* _debug_array($entry);exit; */
|
||||||
@ -534,11 +534,11 @@
|
|||||||
$fields['email'] = $add_email;
|
$fields['email'] = $add_email;
|
||||||
$referer = urlencode($referer);
|
$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();
|
$ab_id = $this->get_lastid();
|
||||||
|
|
||||||
Header('Location: '
|
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)
|
function add_entry($fields)
|
||||||
@ -551,7 +551,7 @@
|
|||||||
}
|
}
|
||||||
if(!@$fields['owner'])
|
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']))
|
if(empty($fields['access']))
|
||||||
{
|
{
|
||||||
@ -565,7 +565,7 @@
|
|||||||
|
|
||||||
if($id)
|
if($id)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->contenthistory->updateTimeStamp('contacts', $id, 'add', time());
|
$GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $id, 'add', time());
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->xmlrpc && !$id)
|
if($this->xmlrpc && !$id)
|
||||||
@ -596,7 +596,7 @@
|
|||||||
$ok = $this->so->update_entry($fields);
|
$ok = $this->so->update_entry($fields);
|
||||||
if($ok)
|
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)
|
if($this->xmlrpc && !$ok)
|
||||||
@ -626,7 +626,7 @@
|
|||||||
if($this->check_perms($id,PHPGW_ACL_DELETE))
|
if($this->check_perms($id,PHPGW_ACL_DELETE))
|
||||||
{
|
{
|
||||||
$this->so->delete_entry($id);
|
$this->so->delete_entry($id);
|
||||||
$GLOBALS['phpgw']->contenthistory->updateTimeStamp('contacts', $id, 'delete', time());
|
$GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $id, 'delete', time());
|
||||||
}
|
}
|
||||||
elseif($this->xmlrpc)
|
elseif($this->xmlrpc)
|
||||||
{
|
{
|
||||||
@ -666,7 +666,7 @@
|
|||||||
|
|
||||||
function save_preferences($prefs,$other,$qfields,$fcat_id)
|
function save_preferences($prefs,$other,$qfields,$fcat_id)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->read_repository();
|
$GLOBALS['egw']->preferences->read_repository();
|
||||||
if(is_array($prefs))
|
if(is_array($prefs))
|
||||||
{
|
{
|
||||||
/* _debug_array($prefs);exit; */
|
/* _debug_array($prefs);exit; */
|
||||||
@ -675,39 +675,39 @@
|
|||||||
/* echo '<br>checking: ' . $pref . '=' . $prefs[$pref]; */
|
/* echo '<br>checking: ' . $pref . '=' . $prefs[$pref]; */
|
||||||
if($prefs[$pref] == 'on')
|
if($prefs[$pref] == 'on')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->add('addressbook',$pref,'addressbook_on');
|
$GLOBALS['egw']->preferences->add('addressbook',$pref,'addressbook_on');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->delete('addressbook',$pref);
|
$GLOBALS['egw']->preferences->delete('addressbook',$pref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(is_array($other))
|
if(is_array($other))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->delete('addressbook','mainscreen_showbirthdays');
|
$GLOBALS['egw']->preferences->delete('addressbook','mainscreen_showbirthdays');
|
||||||
if($other['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'])
|
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'])
|
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['egw']->preferences->delete('addressbook','default_category');
|
||||||
$GLOBALS['phpgw']->preferences->add('addressbook','default_category',$fcat_id);
|
$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')
|
function list_methods($_type='xmlrpc')
|
||||||
|
@ -22,14 +22,14 @@
|
|||||||
|
|
||||||
function soaddressbook()
|
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;
|
$this->grants = &$this->contacts->grants;
|
||||||
|
|
||||||
/* _debug_array($GLOBALS['phpgw_info']); */
|
/* _debug_array($GLOBALS['egw_info']); */
|
||||||
/* _debug_array($grants); */
|
/* _debug_array($grants); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
function uiXport()
|
function uiXport()
|
||||||
{
|
{
|
||||||
$this->template = $GLOBALS['phpgw']->template;
|
$this->template = $GLOBALS['egw']->template;
|
||||||
$this->cat = CreateObject('phpgwapi.categories');
|
$this->cat = CreateObject('phpgwapi.categories');
|
||||||
$this->bo = CreateObject('addressbook.boXport',True);
|
$this->bo = CreateObject('addressbook.boXport',True);
|
||||||
$this->browser = CreateObject('phpgwapi.browser');
|
$this->browser = CreateObject('phpgwapi.browser');
|
||||||
@ -106,14 +106,14 @@
|
|||||||
{
|
{
|
||||||
if($conv_type == 'none')
|
if($conv_type == 'none')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['flags']['noheader'] = False;
|
$GLOBALS['egw_info']['flags']['noheader'] = False;
|
||||||
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
|
$GLOBALS['egw_info']['flags']['noheader'] = True;
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
echo lang('<b>No conversion type <none> could be located.</b> Please choose a conversion type from the list');
|
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>';
|
echo ' <a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import') . '">' . lang('OK') . '</a>';
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
$buffer = $this->bo->import($tsvfile,$conv_type,$private,$fcat_id);
|
$buffer = $this->bo->import($tsvfile,$conv_type,$private,$fcat_id);
|
||||||
|
|
||||||
@ -122,30 +122,30 @@
|
|||||||
if($conv_type == 'Debug LDAP' || $conv_type == 'Debug SQL')
|
if($conv_type == 'Debug LDAP' || $conv_type == 'Debug SQL')
|
||||||
{
|
{
|
||||||
// filename, default application/octet-stream, length of file, default nocache True
|
// 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;
|
echo $buffer;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
echo "<pre>$buffer</pre>";
|
echo "<pre>$buffer</pre>";
|
||||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index') . '">'.lang('OK').'</a>';
|
echo '<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index') . '">'.lang('OK').'</a>';
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
echo "<pre>$buffer</pre>";
|
echo "<pre>$buffer</pre>";
|
||||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'). '">'.lang('OK').'</a>';
|
echo '<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'). '">'.lang('OK').'</a>';
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
@ -181,11 +181,11 @@
|
|||||||
$this->template->set_var('lang_none', lang('none'));
|
$this->template->set_var('lang_none', lang('none'));
|
||||||
$this->template->set_var('lang_cancel',lang('Cancel'));
|
$this->template->set_var('lang_cancel',lang('Cancel'));
|
||||||
$this->template->set_var('lang_cat',lang('Select Category'));
|
$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('cancel_url',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
|
||||||
$this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
|
$this->template->set_var('navbar_bg',$GLOBALS['egw_info']['theme']['navbar_bg']);
|
||||||
$this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
|
$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('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('cat_link',$this->cat_option($this->cat_id,True,False));
|
||||||
$this->template->set_var('tsvfilename','');
|
$this->template->set_var('tsvfilename','');
|
||||||
$this->template->set_var('conv',$conv);
|
$this->template->set_var('conv',$conv);
|
||||||
@ -211,7 +211,7 @@
|
|||||||
$this->template->set_var('lang_debug',lang('Debug output in browser'));
|
$this->template->set_var('lang_debug',lang('Debug output in browser'));
|
||||||
$this->template->pparse('out','import');
|
$this->template->pparse('out','import');
|
||||||
}
|
}
|
||||||
// $GLOBALS['phpgw']->common->phpgw_footer();
|
// $GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function export()
|
function export()
|
||||||
@ -226,14 +226,14 @@
|
|||||||
{
|
{
|
||||||
if($conv_type == 'none')
|
if($conv_type == 'none')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['flags']['noheader'] = False;
|
$GLOBALS['egw_info']['flags']['noheader'] = False;
|
||||||
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
|
$GLOBALS['egw_info']['flags']['noheader'] = True;
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
echo lang('<b>No conversion type <none> could be located.</b> Please choose a conversion type from the list');
|
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>';
|
echo ' <a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$buffer = $this->bo->export($conv_type,$fcat_id);
|
$buffer = $this->bo->export($conv_type,$fcat_id);
|
||||||
@ -251,18 +251,18 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
echo "<pre>\n";
|
echo "<pre>\n";
|
||||||
echo $buffer;
|
echo $buffer;
|
||||||
echo "\n</pre>\n";
|
echo "\n</pre>\n";
|
||||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
echo '<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export') . '">' . lang('OK') . '</a>';
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
set_time_limit(0);
|
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_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('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('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('cancel_url',$GLOBALS['egw']->link('/addressbook/index.php'));
|
||||||
$this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
|
$this->template->set_var('navbar_bg',$GLOBALS['egw_info']['theme']['navbar_bg']);
|
||||||
$this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
|
$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('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('filename',lang('Export file name'));
|
||||||
$this->template->set_var('conv',$conv);
|
$this->template->set_var('conv',$conv);
|
||||||
$this->template->set_var('debug',lang(''));
|
$this->template->set_var('debug',lang(''));
|
||||||
@ -317,7 +317,7 @@
|
|||||||
$this->template->set_var('cat_id',$this->cat_id);
|
$this->template->set_var('cat_id',$this->cat_id);
|
||||||
$this->template->pparse('out','export');
|
$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)
|
if (!$only_bo)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
$GLOBALS['egw']->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||||
$GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
$GLOBALS['egw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||||
}
|
}
|
||||||
$this->config = CreateObject('phpgwapi.config','addressbook');
|
$this->config = CreateObject('phpgwapi.config','addressbook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function index()
|
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 parse_navbar();
|
||||||
echo lang('access not permitted');
|
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_t' => 'listfields.tpl',
|
||||||
'field_list' => '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'];
|
$field = $_POST['field'];
|
||||||
$start = $_POST['start'] ? $_POST['start'] : $_GET['start'];
|
$start = $_POST['start'] ? $_POST['start'] : $_GET['start'];
|
||||||
@ -60,14 +60,14 @@
|
|||||||
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
||||||
. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n";
|
. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n";
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Custom Fields'));
|
$GLOBALS['egw']->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['egw']->template->set_var('add_action',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.add'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
|
$GLOBALS['egw']->template->set_var('lang_add',lang('Add'));
|
||||||
$GLOBALS['phpgw']->template->set_var('title_fields',lang('addressbook').' - '.lang('Custom Fields'));
|
$GLOBALS['egw']->template->set_var('title_fields',lang('addressbook').' - '.lang('Custom Fields'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
|
$GLOBALS['egw']->template->set_var('lang_search',lang('Search'));
|
||||||
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'));
|
$GLOBALS['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
|
$GLOBALS['egw']->template->set_var('lang_done',lang('Done'));
|
||||||
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
|
$GLOBALS['egw']->template->set_var('doneurl',$GLOBALS['egw']->link('/admin/index.php'));
|
||||||
|
|
||||||
if(!$start)
|
if(!$start)
|
||||||
{
|
{
|
||||||
@ -82,28 +82,28 @@
|
|||||||
$fields = $this->read_custom_fields($start,$limit,$query,$sort);
|
$fields = $this->read_custom_fields($start,$limit,$query,$sort);
|
||||||
$total_records = count($fields);
|
$total_records = count($fields);
|
||||||
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->set_var('left',$GLOBALS['phpgw']->nextmatchs->left('/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['phpgw']->template->set_var('right',$GLOBALS['phpgw']->nextmatchs->right('/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['egw']->template->set_var('th_bg',$GLOBALS['egw_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['egw']->template->set_var('sort_field',$GLOBALS['egw']->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['egw']->template->set_var('lang_edit',lang('Edit'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
|
$GLOBALS['egw']->template->set_var('lang_delete',lang('Delete'));
|
||||||
|
|
||||||
for($i=0;$i<count($fields);$i++)
|
for($i=0;$i<count($fields);$i++)
|
||||||
{
|
{
|
||||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
|
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
||||||
$GLOBALS['phpgw']->template->set_var(tr_color,$tr_color);
|
$GLOBALS['egw']->template->set_var(tr_color,$tr_color);
|
||||||
|
|
||||||
$field = $fields[$i]['name'];
|
$field = $fields[$i]['name'];
|
||||||
$title = $fields[$i]['title'];
|
$title = $fields[$i]['title'];
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->set_var('cfield',$title);
|
$GLOBALS['egw']->template->set_var('cfield',$title);
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'menuaction' => 'addressbook.uifields.edit',
|
'menuaction' => 'addressbook.uifields.edit',
|
||||||
@ -114,27 +114,27 @@
|
|||||||
'order' => $order,
|
'order' => $order,
|
||||||
'filter' => $filter
|
'filter' => $filter
|
||||||
);
|
);
|
||||||
$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$params));
|
$GLOBALS['egw']->template->set_var('edit',$GLOBALS['egw']->link('/index.php',$params));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
|
$GLOBALS['egw']->template->set_var('lang_edit_entry',lang('Edit'));
|
||||||
|
|
||||||
$params['menuaction'] = 'addressbook.uifields.delete';
|
$params['menuaction'] = 'addressbook.uifields.delete';
|
||||||
$GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$params));
|
$GLOBALS['egw']->template->set_var('delete',$GLOBALS['egw']->link('/index.php',$params));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_delete_entry',lang('Delete'));
|
$GLOBALS['egw']->template->set_var('lang_delete_entry',lang('Delete'));
|
||||||
$GLOBALS['phpgw']->template->parse('list','field_list',True);
|
$GLOBALS['egw']->template->parse('list','field_list',True);
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->parse('out','field_list_t',True);
|
$GLOBALS['egw']->template->parse('out','field_list_t',True);
|
||||||
$GLOBALS['phpgw']->template->p('out');
|
$GLOBALS['egw']->template->p('out');
|
||||||
}
|
}
|
||||||
|
|
||||||
function add()
|
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 parse_navbar();
|
||||||
echo lang('access not permitted');
|
echo lang('access not permitted');
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$field = stripslashes($_POST['field']);
|
$field = stripslashes($_POST['field']);
|
||||||
@ -144,9 +144,9 @@
|
|||||||
$sort = $_POST['sort'];
|
$sort = $_POST['sort'];
|
||||||
$submit = $_POST['submit'];
|
$submit = $_POST['submit'];
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->set_file(array('form' => 'field_form.tpl'));
|
$GLOBALS['egw']->template->set_file(array('form' => 'field_form.tpl'));
|
||||||
$GLOBALS['phpgw']->template->set_block('form','add','addhandle');
|
$GLOBALS['egw']->template->set_block('form','add','addhandle');
|
||||||
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
|
$GLOBALS['egw']->template->set_block('form','edit','edithandle');
|
||||||
|
|
||||||
if($submit)
|
if($submit)
|
||||||
{
|
{
|
||||||
@ -169,49 +169,49 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
if($errorcount)
|
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))
|
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))
|
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['egw']->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['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.add'));
|
||||||
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'));
|
$GLOBALS['egw']->template->set_var('doneurl',$GLOBALS['egw']->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('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['egw']->template->set_var('lang_add',lang('Add'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
|
$GLOBALS['egw']->template->set_var('lang_reset',lang('Clear Form'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
|
$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['egw']->template->set_var('edithandle','');
|
||||||
$GLOBALS['phpgw']->template->set_var('addhandle','');
|
$GLOBALS['egw']->template->set_var('addhandle','');
|
||||||
$GLOBALS['phpgw']->template->pparse('out','form');
|
$GLOBALS['egw']->template->pparse('out','form');
|
||||||
$GLOBALS['phpgw']->template->pparse('addhandle','add');
|
$GLOBALS['egw']->template->pparse('addhandle','add');
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit()
|
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 parse_navbar();
|
||||||
echo lang('access not permitted');
|
echo lang('access not permitted');
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$field = stripslashes($_POST['field'] ? $_POST['field'] : $_GET['field']);
|
$field = stripslashes($_POST['field'] ? $_POST['field'] : $_GET['field']);
|
||||||
@ -223,12 +223,12 @@
|
|||||||
|
|
||||||
if(!$field)
|
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['egw']->template->set_file(array('form' => 'field_form.tpl'));
|
||||||
$GLOBALS['phpgw']->template->set_block('form','add','addhandle');
|
$GLOBALS['egw']->template->set_block('form','add','addhandle');
|
||||||
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
|
$GLOBALS['egw']->template->set_block('form','edit','edithandle');
|
||||||
|
|
||||||
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||||
. '<input type="hidden" name="query" value="' . $query . '">' . "\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();
|
echo parse_navbar();
|
||||||
|
|
||||||
if($errorcount)
|
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))
|
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))
|
if((!$submit) && (!$error) && (!$errorcount))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->template->set_var('message','');
|
$GLOBALS['egw']->template->set_var('message','');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($submit)
|
if($submit)
|
||||||
@ -272,39 +272,39 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$fields = $this->read_custom_fields($start,$limit,$field);
|
$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'];
|
$fn = $fields[0]['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->set_var('title_fields',lang('Edit Custom Field'));
|
$GLOBALS['egw']->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['egw']->template->set_var('actionurl',$GLOBALS['egw']->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['egw']->template->set_var('deleteurl',$GLOBALS['egw']->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('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['egw']->template->set_var('hidden_vars',$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_done',lang('Done'));
|
$GLOBALS['egw']->template->set_var('lang_done',lang('Done'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
|
$GLOBALS['egw']->template->set_var('lang_edit',lang('Edit'));
|
||||||
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
|
$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['egw']->template->set_var('edithandle','');
|
||||||
$GLOBALS['phpgw']->template->set_var('addhandle','');
|
$GLOBALS['egw']->template->set_var('addhandle','');
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->pparse('out','form');
|
$GLOBALS['egw']->template->pparse('out','form');
|
||||||
$GLOBALS['phpgw']->template->pparse('edithandle','edit');
|
$GLOBALS['egw']->template->pparse('edithandle','edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete()
|
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 parse_navbar();
|
||||||
echo lang('access not permitted');
|
echo lang('access not permitted');
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$field = urldecode($_POST['field'] ? $_POST['field'] : $_GET['field']);
|
$field = urldecode($_POST['field'] ? $_POST['field'] : $_GET['field']);
|
||||||
@ -315,17 +315,17 @@
|
|||||||
|
|
||||||
if(!$field)
|
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'])
|
if($_POST['confirm'])
|
||||||
{
|
{
|
||||||
$this->save_custom_field($field);
|
$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
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
$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="start" value="' . $start .'">' . "\n"
|
||||||
. '<input type="hidden" name="field" value="' . $field .'">' . "\n";
|
. '<input type="hidden" name="field" value="' . $field .'">' . "\n";
|
||||||
|
|
||||||
$GLOBALS['phpgw']->template->set_file(array('field_delete' => 'delete_common.tpl'));
|
$GLOBALS['egw']->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_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>';
|
$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 = $GLOBALS['egw']->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 = '<form method="POST" name="yesbutton" action="' . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.delete') . '">'
|
||||||
. $hidden_vars
|
. $hidden_vars
|
||||||
. '<input type="hidden" name="field_id" value="' . $field_id . '">'
|
. '<input type="hidden" name="field_id" value="' . $field_id . '">'
|
||||||
. '<input type="hidden" name="confirm" value="True">'
|
. '<input type="hidden" name="confirm" value="True">'
|
||||||
@ -351,9 +351,9 @@
|
|||||||
|
|
||||||
$yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>';
|
$yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>';
|
||||||
$yeslink = $yeslinkf;
|
$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()
|
function uivcard()
|
||||||
{
|
{
|
||||||
$this->template = &$GLOBALS['phpgw']->template;
|
$this->template = &$GLOBALS['egw']->template;
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$this->browser = CreateObject('phpgwapi.browser');
|
$this->browser = CreateObject('phpgwapi.browser');
|
||||||
$this->vcard = CreateObject('phpgwapi.vcard');
|
$this->vcard = CreateObject('phpgwapi.vcard');
|
||||||
@ -51,13 +51,13 @@
|
|||||||
$ab_id = $this->bo->add_vcard($uploadedfile);
|
$ab_id = $this->bo->add_vcard($uploadedfile);
|
||||||
if($ab_id)
|
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 parse_navbar();
|
||||||
echo '<body bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '">';
|
echo '<body bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '">';
|
||||||
|
|
||||||
if($action == 'GetFile')
|
if($action == 'GetFile')
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
$this->template->set_var('lang_load_vcard', lang('load vcard'));
|
$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('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_access',lang('Access'));
|
||||||
$this->template->set_var('lang_groups',lang('Which groups'));
|
$this->template->set_var('lang_groups',lang('Which groups'));
|
||||||
$this->template->set_var('access_option',$access_option);
|
$this->template->set_var('access_option',$access_option);
|
||||||
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
$this->template->pparse('out','vcardin');
|
$this->template->pparse('out','vcardin');
|
||||||
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function out()
|
function out()
|
||||||
@ -87,24 +87,24 @@
|
|||||||
|
|
||||||
if($nolname || $nofname)
|
if($nolname || $nofname)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$ab_id)
|
if(!$ab_id)
|
||||||
{
|
{
|
||||||
Header('Location: ' . $GLOBALS['phpgw']->link('/addressbook/index.php'));
|
Header('Location: ' . $GLOBALS['egw']->link('/addressbook/index.php'));
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// First, make sure they have permission to this entry
|
// First, make sure they have permission to this entry
|
||||||
$check = $this->bo->read_entry(array('id' => $ab_id, 'fields' => array('owner' => 'owner')));
|
$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);
|
$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'));
|
Header("Location: " . $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.get_list'));
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$extrafields = array('address2' => 'address2');
|
$extrafields = array('address2' => 'address2');
|
||||||
@ -134,11 +134,11 @@
|
|||||||
if($lastname == '')
|
if($lastname == '')
|
||||||
{
|
{
|
||||||
/* Run away here. */
|
/* 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 == '')
|
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)
|
if($email)
|
||||||
@ -177,7 +177,7 @@
|
|||||||
$this->browser->content_header($filename,'text/x-vcard');
|
$this->browser->content_header($filename,'text/x-vcard');
|
||||||
echo $entry;
|
echo $entry;
|
||||||
exit;
|
exit;
|
||||||
//$GLOBALS['phpgw']->common->exit;
|
//$GLOBALS['egw']->common->exit;
|
||||||
} /* !nolname && !nofname */
|
} /* !nolname && !nofname */
|
||||||
|
|
||||||
if($nofname)
|
if($nofname)
|
||||||
@ -185,7 +185,7 @@
|
|||||||
echo '<br><br><center>';
|
echo '<br><br><center>';
|
||||||
echo lang("This person's first name was not in the address book.") .'<br>';
|
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 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>';
|
"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>';
|
||||||
echo '</center>';
|
echo '</center>';
|
||||||
}
|
}
|
||||||
@ -195,14 +195,14 @@
|
|||||||
echo '<br><br><center>';
|
echo '<br><br><center>';
|
||||||
echo lang("This person's last name was not in the address book.") . '<br>';
|
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 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>';
|
"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>';
|
||||||
echo '</center>';
|
echo '</center>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($nolname || $nofname)
|
if($nolname || $nofname)
|
||||||
{
|
{
|
||||||
//$GLOBALS['phpgw']->common->phpgw_footer();
|
//$GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get global and app-specific category listings */
|
/* 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";
|
$cats_link .= '</select>'."\n";
|
||||||
return $cats_link;
|
return $cats_link;
|
||||||
}
|
}
|
||||||
@ -134,8 +134,8 @@
|
|||||||
{
|
{
|
||||||
$i = 0; $j = 0;
|
$i = 0; $j = 0;
|
||||||
$fields = array();
|
$fields = array();
|
||||||
@reset($GLOBALS['phpgw_info']['user']['preferences']['addressbook']);
|
@reset($GLOBALS['egw_info']['user']['preferences']['addressbook']);
|
||||||
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_' )
|
if( substr($col,0,6) == 'extra_' )
|
||||||
{
|
{
|
||||||
@ -162,15 +162,15 @@
|
|||||||
|
|
||||||
function save_custom_field($old='',$new='')
|
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)
|
if($old)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->delete('addressbook','extra_'.$old);
|
$GLOBALS['egw']->preferences->delete('addressbook','extra_'.$old);
|
||||||
}
|
}
|
||||||
if($new)
|
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.....
|
// Only Modify the $file and $title variables.....
|
||||||
$title = $appname;
|
$title = $appname;
|
||||||
$file = Array(
|
$file = Array(
|
||||||
'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
|
'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
|
||||||
'Edit custom fields' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'),
|
'Edit custom fields' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index'),
|
||||||
'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
|
'Global Categories' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
|
||||||
);
|
);
|
||||||
//Do not modify below this line
|
//Do not modify below this line
|
||||||
display_section($appname,$title,$file);
|
display_section($appname,$title,$file);
|
||||||
|
@ -16,16 +16,16 @@
|
|||||||
Set a global flag to indicate this file was found by admin/config.php.
|
Set a global flag to indicate this file was found by admin/config.php.
|
||||||
config.php will unset it after parsing the form values.
|
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. */
|
/* Check a specific setting. Name must match the setting. */
|
||||||
function ldap_contact_context($value='')
|
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';
|
$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';
|
$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')
|
if($d1 == 'htt' || $d1 == 'ftp')
|
||||||
{
|
{
|
||||||
echo "Failed attempt to break in via an old Security Hole!<br>\n";
|
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);
|
unset($d1);
|
||||||
|
|
||||||
$tmp_app_inc = PHPGW_APP_INC;
|
$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']
|
if($GLOBALS['egw_info']['user']['apps']['addressbook']
|
||||||
&& $GLOBALS['phpgw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays'])
|
&& $GLOBALS['egw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays'])
|
||||||
{
|
{
|
||||||
echo "\n<!-- Birthday info -->\n";
|
echo "\n<!-- Birthday info -->\n";
|
||||||
|
|
||||||
@ -33,29 +33,29 @@
|
|||||||
'n_family' => 'n_family',
|
'n_family' => 'n_family',
|
||||||
'bday' => 'bday'
|
'bday' => 'bday'
|
||||||
);
|
);
|
||||||
$now = time() - ((60 * 60) * (int)$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']);
|
$now = time() - ((60 * 60) * (int)$GLOBALS['egw_info']['user']['preferences']['common']['tz_offset']);
|
||||||
$today = $GLOBALS['phpgw']->common->show_date($now,'n/d/');
|
$today = $GLOBALS['egw']->common->show_date($now,'n/d/');
|
||||||
// echo $today."\n";
|
// 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))
|
while(list($key,$val) = @each($bdays))
|
||||||
{
|
{
|
||||||
$tmp = '<a href="'
|
$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>';
|
. $val['n_given'] . ' ' . $val['n_family'] . '</a>';
|
||||||
echo '<tr><td align="left">' . lang("Today is %1's birthday!", $tmp) . "</td></tr>\n";
|
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";
|
// 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))
|
while(list($key,$val) = @each($bdays))
|
||||||
{
|
{
|
||||||
$tmp = '<a href="'
|
$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>';
|
. $val['n_given'] . ' ' . $val['n_family'] . '</a>';
|
||||||
echo '<tr><td align="left">' . lang("Tomorrow is %1's birthday.", $tmp) . "</td></tr>\n";
|
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.....
|
// Only Modify the $file and $title variables.....
|
||||||
$title = $appname;
|
$title = $appname;
|
||||||
$file = Array(
|
$file = Array(
|
||||||
'Preferences' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'),
|
'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'),
|
||||||
'Grant Access' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
|
'Grant Access' => $GLOBALS['egw']->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')
|
'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
|
//Do not modify below this line
|
||||||
display_section($appname,$title,$file);
|
display_section($appname,$title,$file);
|
||||||
|
@ -23,33 +23,33 @@
|
|||||||
display_sidebox can be called as much as you like
|
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(
|
$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
|
'_NewLine_', // give a newline
|
||||||
'import contacts' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import'),
|
'import contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import'),
|
||||||
'export contacts' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export')
|
'export contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export')
|
||||||
);
|
);
|
||||||
display_sidebox($appname,$menu_title,$file);
|
display_sidebox($appname,$menu_title,$file);
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['apps']['preferences'])
|
if($GLOBALS['egw_info']['user']['apps']['preferences'])
|
||||||
{
|
{
|
||||||
$menu_title = lang('Preferences');
|
$menu_title = lang('Preferences');
|
||||||
$file = Array(
|
$file = Array(
|
||||||
'Addressbook preferences'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'),
|
'Addressbook preferences'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences'),
|
||||||
'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=addressbook'),
|
'Grant Access'=>$GLOBALS['egw']->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')
|
'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);
|
display_sidebox($appname,$menu_title,$file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
|
if ($GLOBALS['egw_info']['user']['apps']['admin'])
|
||||||
{
|
{
|
||||||
$menu_title = lang('Administration');
|
$menu_title = lang('Administration');
|
||||||
$file = Array(
|
$file = Array(
|
||||||
'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook'),
|
'Configuration'=>$GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook'),
|
||||||
'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'),
|
'Custom Fields'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uifields.index'),
|
||||||
'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
|
'Global Categories' =>$GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
|
||||||
);
|
);
|
||||||
display_sidebox($appname,$menu_title,$file);
|
display_sidebox($appname,$menu_title,$file);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user