passando variaveis
galera, seguinte, tenho um arquivo senha.pl que está logo abaixo:ESTOU PRECISANDO DE ENVIAR AS INFORMAÇÕES $user, $pass e $mes, MAS NAO CONSIGO, ESTOU PASSANDO O SEGUINTE COMANDO PELO FLASH: btokmail.onRelease=function() { var obj:LoadVars = new LoadVars(); obj.user = usuario.text; obj.pass = senha.text; obj.mes = mesref.text; obj.send("[http://www.caminho/senha.pl",](http://www.caminho/senha.pl) "POST"); }SOH Q EU NAO ENTENDO, POIS SEMPRE O ULTIMO VALOR QUE EU MANDO, PODENDO ELE SER DE QUALQUER NOME, VAI PRA VARIAVEL $user, SERA QUE ALGUEM JA FEZ ISSO ANTES?#!/usr/bin/perlprint "Content-type: text/html", "\n\n";print "<HTML>";print "<HEAD><TITLE>Output from CGI script ©2004 Fabio Bersan Rocha</TITLE></HEAD>";print "<BODY><CENTER><H1>";print "Extrato LESTEWEB</H1>";$request_method = $ENV{'REQUEST_METHOD'};if ($request_method eq "GET") { $query_string = $ENV{'QUERY_STRING'};} else { read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});} @key_value_pairs = split (/&/, $query_string);foreach $key_value (@key_value_pairs) { ($key, $value) = split (/=/, $key_value); $value =~ tr/+/ /; $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;}($field_name, $user) = split (/=/, @key_value_pairs[0]);($field_name, $pass) = split (/=/, @key_value_pairs[1]);($field_name, $mes) = split (/=/, @key_value_pairs[2]);print "<H2><HR>";print "Extrato de $user";print "<HR>";open (FILE0, "/usr/bin/verifica $user $pass |");read (FILE0, $result, 1);close (FILE0);$a = $user . " ";if ($result) { print"Senha incorreta ou usuario inexistente.";} else { if (length($mes) < 1) { print "Mes nao informado."; } else { print "</H2><H3><CENTER>"; $user = substr($a,0,8); open (FILE, "grep \"$user \" /var/extrato/$mes | cut -b 39-72 | cat -nb |"); while (<FILE>) { print; print "<BR>"; } close (FILE); print "<HR>"; open (FILE, "grep \"$user \" /var/extrato/$mes | cut -b 67-71 |"); $tot_h=0; $tot_m=0; read (FILE, $hora, 5); while (<FILE>) { ($hor, $min) = split (/:/, $hora); $tot_m = $tot_m + $min; $tot_h = $tot_h + $hor; read (FILE, $hora, 5); } ($hor, $min) = split (/:/, $hora); $tot_m = $tot_m + $min; $tot_h = $tot_h + $hor; $tot_h = $tot_h + int ($tot_m / 60); $tot_m = $tot_m % 60; print "<H1> Total: $tot_h horas e $tot_m minutos.</H1>"; }}print "</CENTER>";print "</BODY></HTML>";Discussão (7)
Carregando comentários...