This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/
failed.html
77 lines (70 loc) · 1.87 KB
/
failed.html
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
<HTML><HEAD>
[value name=mv_submit set=""]
[value name=agree set=""]
<TITLE>Something is wrong</TITLE>
</HEAD>
<BODY BGCOLOR="#C0C0C0">
[comment]<XMP>[scratch name=wizard interpolate=1]</XMP>[/comment]
<FORM METHOD="POST" ACTION="[process-target]">
<INPUT TYPE=hidden NAME="mv_doit" VALUE="return">
<INPUT TYPE=hidden NAME="mv_nextpage" VALUE="[value from_page]">
<INPUT TYPE=hidden NAME="mv_order_profile" VALUE="wizard">
<TABLE WIDTH=580>
<TR VALIGN=TOP><TD ALIGN=CENTER VALIGN=CENTER>
<FONT FACE="arial,helvetica" SIZE=7>
MiniVend<BR>Configuration<BR>Wizard
</FONT>
</TD>
<TD><FONT SIZE="-1" FACE="arial, helvetica"><BR></FONT>
<TABLE BORDER=2 CELLPADDING=10 CELLSPACING=0 WIDTH=390>
<TR><TD>
[scratch name=fail_message interpolate=1]
<P>
[perl values]
my $msg = q{};
for(%{$Safe{'values'}}) {
next unless /^mv_error_(.*)/;
my $name = $1;
#my $value = delete $Safe{'values'}->{$_};
my $value = $Safe{'values'}->{$_};
next unless $value;
$msg .= "\n$name: $value\n";
}
sub redo_message {
my($param,$word) = @_;
if ($word =~ /diretory_write/i) {
return "<LI>The directory you specify needs to be writable.\n";
}
elsif ($word =~ /phone/i) {
return "<LI>Is that really a phone number?\n";
}
elsif ($word =~ /Mv_result/) {
return "<LI> Check failed: $param";
}
else { return "<LI>$param: $word\n" }
}
@msg = grep /\S/, split /\n/, $msg;
$msg = '<UL>';
for(@msg) {
($var, $val) = split /:\s*/, $_;
$msg .= redo_message($var, $val);
}
$msg .= '</UL>';
return $msg;
[/perl]
<P>
</TD></TR></TABLE></TD></TR></TABLE>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=550>
<TR ALIGN="RIGHT"><TD>
<INPUT TYPE=submit VALUE="Return">
<INPUT TYPE=submit NAME=mv_submit VALUE=" Cancel ">
<P>
<A HREF="[area menu]">Return to main menu</A>
</TD>
</TR>
</TABLE>
</table>
</FORM>
</BODY>
</HTML>