diff --git a/admin/addserver.php b/admin/addserver.php deleted file mode 100644 index 09ddefb062..0000000000 --- a/admin/addserver.php +++ /dev/null @@ -1,132 +0,0 @@ -template->set_file(array('form' => 'server_form.tpl')); - $GLOBALS['phpgw']->template->set_block('form','add','addhandle'); - $GLOBALS['phpgw']->template->set_block('form','edit','edithandle'); - - $is = CreateObject('phpgwapi.interserver'); - $server_id = $GLOBALS['HTTP_POST_VARS']['server_id']; - $server = $is->read_repository($server_id); - - function formatted_list($name,$list,$id='',$default=False,$java=False) - { - $select = "\n" .''."\n"; - - return $select; - } - - $submit = $GLOBALS['HTTP_POST_VARS']['submit']; - if ($submit) - { - $errorcount = 0; - - if($is->name2id($GLOBALS['HTTP_POST_VARS']['server_name'])) - { - $error[$errorcount++] = lang('That server name has been used already !'); - } - - if (!$GLOBALS['HTTP_POST_VARS']['server_name']) - { - $error[$errorcount++] = lang('Please enter a name for that server !'); - } - - if (!$error) - { - $server_info = array( - 'server_name' => addslashes($GLOBALS['HTTP_POST_VARS']['server_name']), - 'server_url' => addslashes($GLOBALS['HTTP_POST_VARS']['server_url']), - 'trust_level' => intval($GLOBALS['HTTP_POST_VARS']['trust_level']), - 'trust_rel' => intval($GLOBALS['HTTP_POST_VARS']['trust_rel']), - 'username' => addslashes($GLOBALS['HTTP_POST_VARS']['server_username']), - 'password' => $GLOBALS['HTTP_POST_VARS']['server_password'] ? $GLOBALS['HTTP_POST_VARS']['server_password'] : $server['password'], - 'server_mode' => addslashes($GLOBALS['HTTP_POST_VARS']['server_mode']), - 'server_security' => addslashes($GLOBALS['HTTP_POST_VARS']['server_security']), - 'admin_name' => addslashes($GLOBALS['HTTP_POST_VARS']['admin_name']), - 'admin_email' => addslashes($GLOBALS['HTTP_POST_VARS']['admin_email']) - ); - - $is->create($server_info); - } - } - - if ($errorcount) - { - $GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); - } - if (($submit) && (! $error) && (! $errorcount)) - { - $GLOBALS['phpgw']->template->set_var('message',lang('Server x has been added !', $server_name)); - } - if ((!$submit) && (!$error) && (!$errorcount)) - { - $GLOBALS['phpgw']->template->set_var('message',''); - } - - $GLOBALS['phpgw']->template->set_var('title_servers',lang('Add Peer Server')); - $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/admin/addserver.php')); - $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/servers.php')); - $GLOBALS['phpgw']->template->set_var('hidden_vars',''); - - $GLOBALS['phpgw']->template->set_var('lang_name',lang('Server name')); - $GLOBALS['phpgw']->template->set_var('lang_url',lang('Server URL')); - $GLOBALS['phpgw']->template->set_var('lang_mode',lang('Server Type(mode)')); - $GLOBALS['phpgw']->template->set_var('lang_security',lang('Security')); - $GLOBALS['phpgw']->template->set_var('lang_trust',lang('Trust Level')); - $GLOBALS['phpgw']->template->set_var('lang_relationship',lang('Trust Relationship')); - $GLOBALS['phpgw']->template->set_var('lang_username',lang('Server Username')); - $GLOBALS['phpgw']->template->set_var('lang_password',lang('Server Password')); - $GLOBALS['phpgw']->template->set_var('lang_admin_name',lang('Admin Name')); - $GLOBALS['phpgw']->template->set_var('lang_admin_email',lang('Admin Email')); - $GLOBALS['phpgw']->template->set_var('lang_add',lang('Add')); - $GLOBALS['phpgw']->template->set_var('lang_default',lang('Default')); - $GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form')); - $GLOBALS['phpgw']->template->set_var('lang_done',lang('Done')); - - $GLOBALS['phpgw']->template->set_var('server_name',$server['server_name']); - $GLOBALS['phpgw']->template->set_var('server_url',$server['server_url']); - $GLOBALS['phpgw']->template->set_var('server_username',$server['username']); - $GLOBALS['phpgw']->template->set_var('server_mode',formatted_list('server_mode',$is->server_modes,$server['server_mode'])); - $GLOBALS['phpgw']->template->set_var('server_security',formatted_list('server_security',$is->security_types,$server['server_security'])); - $GLOBALS['phpgw']->template->set_var('ssl_note',lang('Note: SSL available only if PHP is compiled with curl support')); - $GLOBALS['phpgw']->template->set_var('pass_note',lang('(Stored password will not be shown here)')); - $GLOBALS['phpgw']->template->set_var('trust_level',formatted_list('trust_level',$is->trust_levels,$server['trust_level'])); - $GLOBALS['phpgw']->template->set_var('trust_relationship',formatted_list('trust_rel',$is->trust_relationships,$server['trust_rel'],True)); - $GLOBALS['phpgw']->template->set_var('admin_name',$GLOBALS['phpgw']->strip_html($server['admin_name'])); - $GLOBALS['phpgw']->template->set_var('admin_email',$GLOBALS['phpgw']->strip_html($server['admin_email'])); - - $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['phpgw']->common->phpgw_footer(); -?> diff --git a/admin/deleteserver.php b/admin/deleteserver.php deleted file mode 100644 index c3aa5c3c76..0000000000 --- a/admin/deleteserver.php +++ /dev/null @@ -1,68 +0,0 @@ - True, - 'nonavbar' => True - ); - } - - $phpgw_info['flags']['currentapp'] = 'admin'; - include('../header.inc.php'); - - if (!$server_id) - { - Header('Location: ' . $phpgw->link('/admin/servers.php')); - } - - if ($confirm) - { - $is->delete($server_id); - Header('Location: ' . $phpgw->link('/admin/servers.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter")); - } - else - { - $hidden_vars = - '\n" - . '\n" - . '\n" - . '\n" - . '\n" - . '' . "\n"; - - $phpgw->template->set_file(array('server_delete' => 'delete_common.tpl')); - $phpgw->template->set_var('messages',lang('Are you sure you want to delete this server?')); - - $nolinkf = $phpgw->link('/admin/servers.php',"server_id=$server_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"); - $nolink = "" . lang('No') .""; - $phpgw->template->set_var('no',$nolink); - - $yeslinkf = $phpgw->link('/admin/deleteserver.php',"server_id=$server_id&confirm=True"); - $yeslinkf = '
'; - - $yeslink = '' . lang('Yes') .''; - $yeslink = $yeslinkf; - $phpgw->template->set_var('yes',$yeslink); - - $phpgw->template->pparse('out','server_delete'); - } - - $phpgw->common->phpgw_footer(); -?> diff --git a/admin/editserver.php b/admin/editserver.php deleted file mode 100644 index f3cbd37055..0000000000 --- a/admin/editserver.php +++ /dev/null @@ -1,150 +0,0 @@ -link('/admin/servers.php',"sort=$sort&order=$order&query=$query&start=$start" - . "&filter=$filter")); - } - - $GLOBALS['phpgw']->template->set_file(array('form' => 'server_form.tpl')); - $GLOBALS['phpgw']->template->set_block('form','add','addhandle'); - $GLOBALS['phpgw']->template->set_block('form','edit','edithandle'); - - function formatted_list($name,$list,$id='',$default=False,$java=False) - { - $select = "\n" .''."\n"; - - return $select; - } - - $is = CreateObject('phpgwapi.interserver',$server_id); - $server = $is->read_repository($GLOBALS['HTTP_GET_VARS']['server_id']); - - $hidden_vars = "\n" - . "\n" - . "\n" - . "\n" - . "\n" - . "\n"; - - if ($submit) - { - $errorcount = 0; - - $tmp = $is->name2id($server_name); - if(0) - { - $error[$errorcount++] = lang('That server name has been used already !'); - } - - if (!$server_name) - { - $error[$errorcount++] = lang('Please enter a name for that server !'); - } - - if (!$error) - { - $server_info = array( - 'server_name' => addslashes($server_name), - 'server_url' => addslashes($server_url), - 'trust_level' => intval($trust_level), - 'trust_rel' => intval($trust_rel), - 'username' => addslashes($server_username), - 'password' => $server_password ? $server_password : $server['password'], - 'server_mode' => addslashes($server_mode), - 'server_security' => addslashes($server_security), - 'admin_name' => addslashes($admin_name), - 'admin_email' => addslashes($admin_email) - ); - - $is->server = $server_info; - $is->save_repository($server_id); - $server = $is->read_repository($server_id); - } - } - - if ($errorcount) - { - $phpgw->template->set_var('message',$phpgw->common->error_list($error)); - } - if (($submit) && (!$error) && (!$errorcount)) - { - $phpgw->template->set_var('message',lang("Server x has been updated !",$server_name)); - } - if ((!$submit) && (!$error) && (!$errorcount)) - { - $phpgw->template->set_var('message',''); - } - - $phpgw->template->set_var('title_servers',lang('Edit Peer Server')); - $phpgw->template->set_var('actionurl',$phpgw->link('/admin/editserver.php')); - $phpgw->template->set_var('deleteurl',$phpgw->link('/admin/deleteserver.php',"server_id=$server_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter")); - $phpgw->template->set_var('doneurl',$phpgw->link('/admin/servers.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter")); - - $phpgw->template->set_var('lang_name',lang('Server name')); - $phpgw->template->set_var('lang_url',lang('Server URL')); - $phpgw->template->set_var('lang_trust',lang('Trust Level')); - $phpgw->template->set_var('lang_relationship',lang('Trust Relationship')); - $phpgw->template->set_var('lang_username',lang('Server Username')); - $phpgw->template->set_var('lang_password',lang('Server Password')); - $phpgw->template->set_var('lang_mode',lang('Server Type(mode)')); - $phpgw->template->set_var('lang_security',lang('Security')); - $phpgw->template->set_var('lang_admin_name',lang('Admin Name')); - $phpgw->template->set_var('lang_admin_email',lang('Admin Email')); - $phpgw->template->set_var('lang_edit',lang('Edit')); - $phpgw->template->set_var('lang_default',lang('Default')); - $phpgw->template->set_var('lang_reset',lang('Clear Form')); - $phpgw->template->set_var('lang_done',lang('Done')); - $phpgw->template->set_var('hidden_vars',$hidden_vars); - $phpgw->template->set_var('lang_delete',lang('Delete')); - - $phpgw->template->set_var('server_name',$server['server_name']); - $phpgw->template->set_var('server_url',$server['server_url']); - $phpgw->template->set_var('server_username',$server['username']); - $phpgw->template->set_var('server_mode',formatted_list('server_mode',$is->server_modes,$server['server_mode'])); - $phpgw->template->set_var('server_security',formatted_list('server_security',$is->security_types,$server['server_security'])); - $phpgw->template->set_var('ssl_note',lang('Note: SSL available only if PHP is compiled with curl support')); - $phpgw->template->set_var('pass_note',lang('(Stored password will not be shown here)')); - $phpgw->template->set_var('trust_level',formatted_list('trust_level',$is->trust_levels,$server['trust_level'])); - $phpgw->template->set_var('trust_relationship',formatted_list('trust_rel',$is->trust_relationships,$server['trust_rel'],True)); - $phpgw->template->set_var('admin_name',$phpgw->strip_html($server['admin_name'])); - $phpgw->template->set_var('admin_email',$phpgw->strip_html($server['admin_email'])); - - $phpgw->template->set_var('edithandle',''); - $phpgw->template->set_var('addhandle',''); - - $phpgw->template->pparse('out','form'); - $phpgw->template->pparse('edithandle','edit'); - - $phpgw->common->phpgw_footer(); -?> diff --git a/admin/servers.php b/admin/servers.php deleted file mode 100644 index 7873399e17..0000000000 --- a/admin/servers.php +++ /dev/null @@ -1,113 +0,0 @@ - 'admin', - 'enable_config_class' => True, - 'enable_nextmatchs_class' => True); - - include('../header.inc.php'); - - $phpgw->template->set_file(array('server_list_t' => 'listservers.tpl')); - $phpgw->template->set_block('server_list_t','server_list','list'); - - $common_hidden_vars = - '\n" - . '\n" - . '\n" - . '\n" - . '\n"; - - $phpgw->template->set_var('lang_action',lang('Server List')); - $phpgw->template->set_var('add_action',$phpgw->link('/admin/addserver.php')); - $phpgw->template->set_var('lang_add',lang('Add')); - $phpgw->template->set_var('title_servers',lang('Peer Servers')); - $phpgw->template->set_var('lang_search',lang('Search')); - $phpgw->template->set_var('actionurl',$phpgw->link('/admin/servers.php')); - $phpgw->template->set_var('lang_done',lang('Done')); - $phpgw->template->set_var('doneurl',$phpgw->link('/admin/index.php')); - - if(!$start) - { - $start = 0; - } - - if($phpgw_info['user']['preferences']['common']['maxmatchs'] && - $phpgw_info['user']['preferences']['common']['maxmatchs'] > 0) - { - $limit = $phpgw_info['user']['preferences']['common']['maxmatchs']; - } - else - { - $limit = 15; - } - - if(!$sort) - { - $sort = 'ASC'; - } - - if($order) - { - $ordermethod = "ORDER BY $order $sort "; - } - else - { - $ordermethod = " ORDER BY server_name ASC "; - } - - if ($query) - { - $querymethod = " WHERE name like '%$query%' OR title like '%$query%'"; - } - - $is = CreateObject('phpgwapi.interserver'); - $servers = $is->get_list(); - - $left = $phpgw->nextmatchs->left('/admin/servers.php',$start,$total_records); - $right = $phpgw->nextmatchs->right('/admin/servers.php',$start,$total_records); - $phpgw->template->set_var('left',$left); - $phpgw->template->set_var('right',$right); - - $phpgw->template->set_var('lang_showing',$phpgw->nextmatchs->show_hits($total_records,$start)); - - $phpgw->template->set_var('th_bg',$phpgw_info['theme']['th_bg']); - $phpgw->template->set_var('sort_name',$phpgw->nextmatchs->show_sort_order($sort,'server_name',$order,'/admin/servers.php',lang('Name'))); - $phpgw->template->set_var('sort_url', $phpgw->nextmatchs->show_sort_order($sort,'server_url',$order,'/admin/servers.php',lang('URL'))); - $phpgw->template->set_var('lang_default',lang('Default')); - $phpgw->template->set_var('lang_edit',lang('Edit')); - $phpgw->template->set_var('lang_delete',lang('Delete')); - - while(list($key,$server) = @each($servers)) - { - $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); - $phpgw->template->set_var('tr_color',$tr_color); - $server_id = $server['server_id']; - - $phpgw->template->set_var(array( - 'server_name' => $phpgw->strip_html($server['server_name']), - 'server_url' => $phpgw->strip_html($server['server_url']) - )); - - $phpgw->template->set_var('edit',$phpgw->link('/admin/editserver.php',"server_id=$server_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter")); - $phpgw->template->set_var('lang_edit_entry',lang('Edit')); - - $phpgw->template->set_var('delete',$phpgw->link('/admin/deleteserver.php',"server_id=$server_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter")); - $phpgw->template->set_var('lang_delete_entry',lang('Delete')); - $phpgw->template->parse('list','server_list',True); - } - - $phpgw->template->parse('out','server_list_t',True); - $phpgw->template->p('out'); - - $phpgw->common->phpgw_footer(); -?>