[Mageia-marketing] Team elections

Patricia Fraser trish at thefrasers.org
Tue Mar 6 05:14:56 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bradley,

> Also, if you have a moment, pls see...
> http://bit.ly/wAOrkk

This is a great resource! Thanks for posting it. I've been a bit lax
myself in the top-posting and trimming - associating with too many
people at work who just don't know the right way (and get mad if you
tell them).

As an aside, are you standing or voting in the team election, or both?

Cheers!

- -- 
Trish Fraser, VVMZ4 91L2V
- -35.67896, 142.66637
Tue Mar  6 15:12:54 EST 2012
GNU/Linux 1997-2011 #283226 linuxcounter.net
hermes up 1 day(s), 43 hour(s), 55 min.
kernel 2.6.38.8-desktop-10.mga
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJPVY9AAAoJEFTnxl6Z2dG4HysH/3fOtMmzKzTTJkfUwxZPJe3w
EVkqA4MahqN5dPWKDERDuC46SfPHh5QXXhJ/LCUJ/nyCy7TawU52q/gUzE5YWpZ1
L+mZzHJHpBRNKfFtBQj/Kum0YM8hUY+MeOCkzgHZRA269HA1iAr5OByoNeQUdXBy
qT625wtWcoJzmt0EXVMBDNwVZjTqw36Nyz+QoovgMgUHy5bY1026x4XtMdaQI173
vflASvbLGX+UOl5dpArZhgzGU6fnyRuOWOLsPyEtLZP8IlssvN5FTVIssx8EYWAy
rDoKhHDcBUQRAJgnaWj747b3XoD3gU11p4bSPR4u3Ap8ECJ+r7gqCi8e8Mor8go=
=slt2
-----END PGP SIGNATURE-----


More information about the Mageia-marketing mailing list
ion> Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/http.pm
blob: 70017c41db6f7bcab35025ab44e1deed4303dde0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
package interactive::http;

use diagnostics;
use strict;
use vars qw(@ISA);

@ISA = qw(interactive);

use CGI;
use interactive;
use common;
use log;

my $script_name = $ENV{INTERACTIVE_HTTP};
my $no_header;
my $pipe_r = "/tmp/interactive_http_r";
my $pipe_w = "/tmp/interactive_http_w";

sub open_stdout() {
    open STDOUT, ">$pipe_w" or die;
    $| = 1;
    print CGI::header();
    $no_header = 1;    
}

# cont_stdout must be called after open_stdout and before the first print
sub cont_stdout {
    my ($o_title) = @_;
    print CGI::start_html('-title' => $o_title) if $no_header;
    $no_header = 0;
}

sub new_uid() {
    my ($s, $ms) = gettimeofday();
    $s * 256 + $ms % 256;
}

sub new {
    open_stdout();
    bless {}, $_[0];
}

sub end { 
    -e $pipe_r or return; # do not run this twice
    my $q = CGI->new;
    cont_stdout("Exit");
    print "It's done, thanks for playing", $q->end_html;
    close STDOUT;
    unlink $pipe_r, $pipe_w;
}
sub exit { end(); exit($_[1]) }
END { end() }

sub ask_fromW {
    my ($o, $common, $l, $_l2) = @_;

  redisplay:
    my $uid = new_uid();
    my $q = CGI->new;
    $q->param(state => 'next_step');
    $q->param(uid => $uid);
    cont_stdout($common->{title});

#    print $q->img({ -src => "/icons/$o->{icon}" }) if $o->{icon};
    print @{$common->{messages}};
    print $q->start_form('-name' => 'form', '-action' => $script_name, '-method' => 'post');

    print "<table>\n";

    each_index {
	my $e = $_;

	print "<tr><td>$e->{label}</td><td>\n";

	$e->{type} = 'list' if $e->{type} =~ /(icon|tree)list/;

	#- combo does not exist, fallback to a sensible default
	$e->{type} = $e->{not_edit} ? 'list' : 'entry' if $e->{type} eq 'combo';

	if ($e->{type} eq 'bool') {
	    print $q->checkbox('-name' => "w$::i", '-checked' => ${$e->{val}} && 'on', '-label' => $e->{text} || " ");
	} elsif ($e->{type} eq 'button') {
	    print "nobuttonyet";
	} elsif ($e->{type} =~ /list/) {
	    my %t; 
	    $t{$_} = may_apply($e->{format}, $_) foreach @{$e->{list}};

	    print $q->scrolling_list('-name' => "w$::i",
				     '-values' => $e->{list},
				     '-default' => [ ${$e->{val}} ],
				     '-size' => 5, '-multiple' => '', '-labels' => \%t);
	} else {
	    print $e->{hidden} ?
	      $q->password_field('-name' => "w$::i", '-default' => ${$e->{val}}) :
		   $q->textfield('-name' => "w$::i", '-default' => ${$e->{val}});
	}

	print "</td></tr>\n";
    } @$l;

    print "</table>\n";
    print $q->p;
    print $q->submit('-name' => 'ok_submit', '-value' => $common->{ok} || N("Ok"));
    print $q->submit('-name' => 'cancel_submit', '-value' => $common->{cancel} || N("Cancel")) if $common->{cancel} || !exists $common->{ok};
    print $q->hidden('state'), $q->hidden('uid');
    print $q->end_form, $q->end_html;

    close STDOUT; # page terminated

    while (1) {	
	open(my $F, "<$pipe_r") or die;
	$q = CGI->new($F);
	$q->param('force_exit_dead_prog') and $o->exit;
	last if $q->param('uid') == $uid;

	open_stdout(); # re-open for writing
	cont_stdout(N("Error"));
	print $q->h1(N("Error")), $q->p("Sorry, you cannot go back");
	goto redisplay;
    }
    each_index {
	my $e = $_;
	my $v = $q->param("w$::i");
	if ($e->{type} eq 'bool') {
	    $v = $v eq 'on';
	}
	${$e->{val}} = $v;
    } @$l;

    open_stdout(); # re-open for writing
    $q->param('ok_submit');
}

sub p {
    print "\n" . CGI::br($_) foreach @_;
}

sub wait_messageW {
    my ($_o, $_title, $message, $message_modifiable) = @_;
    cont_stdout();
    print "\n" . CGI::p();
    p($message, $message_modifiable);
}

sub wait_message_nextW {
    my ($_o, $message, $_w) = @_;
    p($message);
}
sub wait_message_endW {
    my ($_o, $_w) = @_;
    p(N("Done"));
    print "\n" . CGI::p();
}

sub ok {
    N("Ok");
}

sub cancel {
    N("Cancel");
}


1;