
| Current Path : /var/www/web-klick.de/dsh/90_akt/appserv/scripts/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/90_akt/appserv/scripts/test.cgi |
#!/usr/bin/perl
@INC = ("/u","/u/appserv","/akt","/akt/appserv","/usr/local/bin/utility",@main::INC);
use CGI;
eval("use _CalParam"); print ($@); _CalParam->new();
eval("use Utility::GUIdb"); print ($@);
eval("use DivBasicF::FileCom"); print ($@);
my $url = "http://localhost/cgi-bin/test.cgi";
my $gui = "GUIAutoTest";
my $channel = 650000;
my $query = CGI->new();
my @parnames = $query->param();
my $o;
my $text = [];
my $session = "";
foreach $o (sort @parnames) {
if ($o eq "session") {
$session = $query->param($o);
} else {
push(@$text,$query->param($o));
}
}
if (@ARGV) {
if ($ARGV[0] =~ /^session\=(.*)$/) {
$session = $1;
shift(@ARGV);
}
$text =[@ARGV];
}
my $param = _CalParam->new();
my $client = Utility::GUIdb->new($url);
my $com = DivBasicF::FileCom->new("/tmp/com/",$channel,$PAR::serializer);
if (!$session) {
$com->connect($channel);
$session = $com->set_msg() . "." . $com->set_get();
} else {
$session =~ /^(.*)\.(.*)$/;
$com->set_msg($1);
$com->set_get($2);
}
$text = $com->query($text);
if ($text->[0] =~ /^___ENDE___/) {
shift(@$text);
$com->disconnect();
}
$text = $client->query($text)->[0];
$text =~ s/---SESSION---/$session/g;
print "Content-type: text/html\n\n\n" . $text;