From 5a50c67a8fc1dab1967b34a6c83f567e847829e6 Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Thu, 4 Dec 2003 18:16:04 +0000 Subject: - added mdkwebadmin.pl to launch online admin --- mdkwebadmin.pl | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 mdkwebadmin.pl (limited to 'mdkwebadmin.pl') diff --git a/mdkwebadmin.pl b/mdkwebadmin.pl new file mode 100644 index 00000000..883cf04f --- /dev/null +++ b/mdkwebadmin.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl -w +################################################################################ +# # +# # +# Copyright (C) 2002 MandrakeSoft # +# +# Daouda Lo # +# # +# This program is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License Version 2 as # +# published by the Free Software Foundation. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # +################################################################################ + +use strict; +use lib qw(/usr/lib/libDrakX); +use standalone; +use ugtk2 qw(:all); +use common; + +my ($ent, $link); +my $execbin = '/usr/bin/mdkwebadmin'; +my ($opt) = @ARGV; +@ARGV == 1 && ($opt eq '--direct' || $opt eq '--link') or exit(1); + +$opt eq '--direct' and exec "$execbin"; +my $w = ugtk2->new('mdkwebadmin.pl'); +unless ($::isEmbedded) { + $w->{rwindow}->set_title(N("Connect to remote Site")); + $w->{window}->set_border_width(5); +} + +gtkadd($w->{window}, + gtkpack_(Gtk2::VBox->new(0,5), + 1, Gtk2::Label->new(N("Enter the webmin address server below \n")), + 1, $ent = Gtk2::Entry->new(), + 0, Gtk2::HSeparator->new, + 0, gtkpack(create_hbox(), + gtksignal_connect(Gtk2::Button->new(N("Connect")), clicked => sub { + $link = 'https://' . $ent->get_text() . ':10000/'; + exec "$execbin $link"; + }), + gtksignal_connect(Gtk2::Button->new(N("Abort")), clicked => \&quit)))); +$w->{window}->show_all; +$w->main; + +sub quit() { ugtk2->exit(0) } -- cgit v1.2.1