6 entries, 1 page |
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
use CGI(qw(:standard));
use strict;
use XML::Writer;
use IO::File;
#Übergabeparameter
my $user=(param('user')||"");
my $query=(param('query')||"");
my $type = (param('type')||"");
my $filename = param('filename')||"";
User_config($user);
$filename .= ".wsdl";
my $output = new IO::File(">$filename");
my $writer = new XML::Writer(OUTPUT => $output);
$writer->startTag("wsdlitem");
$writer->startTag("id");
$writer->characters($type);
$writer->endTag("id");
$writer->startTag("query");
$writer->characters($query);
$writer->endTag("query");
$writer->endTag("wsdlitem");
$writer->end();
$output->close();
#öffnet html Code und weist ihn einer Variable zu
open (WSDL, "$html_path/addWSDL.html");
my $content=join ('',<WSDL>);
close WSDL;
$content=~s/\$img_URL/$img_URL/g;
$content=~s/\$user/$user/g;
$content=~s/\$l_title/$l_title/g;
$content=~s/\$l_store/$l_store/g;
$content=~s/\$l_cancel/$l_cancel/g;
$content=~s/\$query/$query/g;
$content=~s/\$type/$type/g;
$content=~s/\$filename/$filename/g;
print header();
print $content;
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
use CGI(qw(:standard)); use strict; ... if (param) { ### HIER! #Übergabeparameter my $user=(param('user')||""); ... $filename .= ".wsdl"; my $output = new IO::File(">$filename"); my $writer = new XML::Writer(OUTPUT => $output); ... $writer->end(); ... $output->close(); } else { #### UND HIER DANN #öffnet html Code und weist ihn einer Variable zu open (WSDL, "$html_path/addWSDL.html"); my $content=join ('',<WSDL>); close WSDL; ... print header(); print $content; }
6 entries, 1 page |