[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] javassh/inc class.so_jssh.inc.php class.ui_jssh...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] javassh/inc class.so_jssh.inc.php class.ui_jssh... |
Date: |
Thu, 28 Dec 2006 14:29:54 +0000 |
CVSROOT: /sources/phpgroupware
Module name: javassh
Changes by: Dave Hall <skwashd> 06/12/28 14:29:54
Modified files:
inc : class.so_jssh.inc.php class.ui_jssh.inc.php
hook_sidebox_menu.inc.php
Log message:
get this working properly in HEAD
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/javassh/inc/class.so_jssh.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/javassh/inc/class.ui_jssh.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/javassh/inc/hook_sidebox_menu.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
Patches:
Index: class.so_jssh.inc.php
===================================================================
RCS file: /sources/phpgroupware/javassh/inc/class.so_jssh.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.so_jssh.inc.php 15 May 2005 12:29:54 -0000 1.2
+++ class.so_jssh.inc.php 28 Dec 2006 14:29:54 -0000 1.3
@@ -15,7 +15,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* at your option) any later version. *
\**********************************************************************/
- /* $Id: class.so_jssh.inc.php,v 1.2 2005/05/15 12:29:54 skwashd Exp $ */
+ /* $Id: class.so_jssh.inc.php,v 1.3 2006/12/28 14:29:54 skwashd Exp $ */
class so_jssh
{
@@ -28,6 +28,7 @@
function get_servers()
{
+ $servers = array();
$this->db->query('SELECT * FROM phpgw_javassh_servers
WHERE active=1');
while($this->db->next_record())
{
Index: class.ui_jssh.inc.php
===================================================================
RCS file: /sources/phpgroupware/javassh/inc/class.ui_jssh.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.ui_jssh.inc.php 15 May 2005 12:29:54 -0000 1.2
+++ class.ui_jssh.inc.php 28 Dec 2006 14:29:54 -0000 1.3
@@ -15,20 +15,22 @@
* the Free Software Foundation; either version 2 of the License, or *
* at your option) any later version. *
\**********************************************************************/
- /* $Id: class.ui_jssh.inc.php,v 1.2 2005/05/15 12:29:54 skwashd Exp $ */
+ /* $Id: class.ui_jssh.inc.php,v 1.3 2006/12/28 14:29:54 skwashd Exp $ */
class ui_jssh
{
var $bo;
var $t;
- var $public_functions = array('index' => True,
+ var $public_functions = array
+ (
+ 'index' => True,
'connect' => True,
'css' => True,
'admin_list' => True,
'admin_delete' => True,
'admin_edit' => True,
'admin_save' => True,
- 'admin_view' => True,
+ 'admin_view' => True
);
function ui_jssh()
@@ -104,15 +106,20 @@
exit;
}
+ $id = 0;
+ $server = array('protocol' => 'ssh');
if(isset($_GET['id']))
{
- $server =
$this->bo->find_server(trim($_GET['id']));
+ $id = $_GET['id'];
+ $server = $this->bo->find_server($id);
}
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
+
+ $GLOBALS['phpgw']->common->phpgw_header(true);
$this->t->set_file(array('show' => $tpl.'.tpl'));
- $lang = array('lang_done' => lang('done'),
+ $lang = array
+ (
+ 'lang_done' => lang('done'),
'lang_host' =>
lang('host'),
'lang_port' =>
lang('port'),
'lang_protocol' =>
lang('protocol'),
@@ -122,7 +129,7 @@
$this->t->set_var($lang);
$this->t->set_var($server);
- $this->t->set_var('server_id', $_GET['id']);
+ $this->t->set_var('server_id', $id);
$this->t->set_var('action',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' =>
'javassh.ui_jssh.admin_save')));
$this->t->set_var('selected_' . $server['protocol'],
'selected');
@@ -133,6 +140,12 @@
function admin_save()
{
+
if(!isset($GLOBALS['phpgw_info']['user']['apps']['admin']))
+ {
+ $GLOBALS['phpgw']->redirect_link('/home.php');
+ exit;
+ }
+
$server['id'] = $_POST['id'];
$server['host'] = $_POST['host'];
$server['port'] = $_POST['port'];
@@ -149,17 +162,18 @@
function index()
{
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
$servers = $this->bo->get_servers();
- if(is_array($servers))
+ if ( count($servers) )
{
$this->t->set_file('index', 'index.tpl');
$this->t->set_block('index','server','servers');
$this->t->set_var('action',
$GLOBALS['phpgw']->link('/index.php',
array('menuaction' =>
'javassh.ui_jssh.connect')));
- $lang = array('lang_javassh_connect'=>
lang('javassh login'),
+ $lang = array
+ (
+ 'lang_javassh_connect' =>
lang('javassh login'),
'lang_server' =>
lang('server'),
'lang_connect' =>
lang('connect'),
'lang_clear' =>
lang('clear'),
@@ -198,30 +212,23 @@
$plugins = 'Status,Socket,Telnet,Terminal';
}
- $this->t->set_var('css', $this->css());
- $this->t->set_var('pgtitle',
htmlentities($GLOBALS['phpgw_info']['server']['title'] . ' ['
- . lang('javassh') . '] - ' . $server['title']));
+ $page_title =
isset($GLOBALS['phpgw_info']['server']['title']) ?
htmlentities($GLOBALS['phpgw_info']['server']['title']) : '';
+ $page_title .= '[' . lang('javassh') . '] - ' .
$server['title'];
+
+ $this->t->set_var('pgtitle', $page_title);
$this->t->set_var($applet);
$this->t->set_var('plugins', $plugins);
$this->t->set_var($server);
$this->t->set_var('lang_logout', lang('logout'));
- $this->t->set_var('colorset', $applet['url'] .
'colorSet.conf');
+ $this->t->set_var('colorset', $applet['applet_url'] .
'colorSet.conf');
$this->t->pfp('out', 'connect');
}
function css()
{
- $css = 'tr.th { background-color:' .
$GLOBALS['phpgw_info']['theme']['th_bg'] . "; font-weight: bold; }\n";
- $css .= 'tr.rowon { background-color:' .
$GLOBALS['phpgw_info']['theme']['row_on'] . "; }\n";
- $css .= 'tr.rowoff { background-color:' .
$GLOBALS['phpgw_info']['theme']['row_off'] . "; }\n";
- if($_GET['menuaction'] == 'javassh.ui_jssh.connect')
- {
- $css .= "a, p, td {font-family: Arial,
Helvetica, Monaco, sana-serif; font-size: 11pt; text-decoration: none;}\n";
- $css .= "a:hover {color:#FF0000;
text-decoration: underline;}\n";
- }
- return $css;
+ return '';
}
}
?>
Index: hook_sidebox_menu.inc.php
===================================================================
RCS file: /sources/phpgroupware/javassh/inc/hook_sidebox_menu.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- hook_sidebox_menu.inc.php 9 Sep 2006 10:38:51 -0000 1.3
+++ hook_sidebox_menu.inc.php 28 Dec 2006 14:29:54 -0000 1.4
@@ -10,7 +10,7 @@
* option) any later version. *
\**************************************************************************/
- /* $Id: hook_sidebox_menu.inc.php,v 1.3 2006/09/09 10:38:51 skwashd Exp $ */
+ /* $Id: hook_sidebox_menu.inc.php,v 1.4 2006/12/28 14:29:54 skwashd Exp $ */
{
/*
@@ -27,14 +27,14 @@
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '.
lang('Menu');
$bo_jssh = createObject('javassh.bo_jssh');
$servers = $bo_jssh->get_servers();
- if(!is_array($servers))
+ if ( !count($servers))
{
if(isset($GLOBALS['phpgw_info']['user']['apps']['admin']))
{
$file[] = array
(
'text' => 'no servers available - please add
one',
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction',
'javassh.ui_jssh.list_servers'))
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'javassh.ui_jssh.admin_list'))
);
}
else
@@ -55,9 +55,8 @@
if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
{
- $file = array();
$menu_title = lang('Administration');
- $file[] = array
+ $file = array
(
array
(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] javassh/inc class.so_jssh.inc.php class.ui_jssh...,
Dave Hall <=