Script follows... |
line num | code |
1 | print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
' . "\n" . ' "http://www.w3.org/TR/html4/loose.dtd">
' . "\n" . '
' . "\n" . '
' . "\n"; |
2 |
|
3 | use YAML;
|
4 | use CGI;
|
5 | use wed_message qw(storeMessage showThank showThread followThread createNewThread showTitles findOrSet);
|
6 |
|
7 | my $dataFile = "../wedding/messages.yaml";
|
8 |
|
9 | my $q = new CGI;
|
10 |
|
11 | my $d = YAML::LoadFile($dataFile);
|
12 |
|
13 | my $c = {};
|
14 |
|
15 | findOrSet("threadshow", $c, $q, 0, "param");
|
16 | findOrSet("followup", $c, $q, 0, "param");
|
17 | findOrSet("newthread", $c, $q, 0, "param");
|
18 | findOrSet("subject", $c, $q, "", "param");
|
19 | findOrSet("author", $c, $q, "", "prioritize_param");
|
20 | findOrSet("body", $c, $q, "", "param");
|
21 | findOrSet("storeID", $c, $q, 0, "param");
|
22 | findOrSet("email", $c, $q, "", "prioritize_param");
|
23 | findOrSet("ajax", $c, $q, 0, "param");
|
24 |
|
25 | # my $c1 = $q->cookie(-name => 'email', -value => $c->{email});
|
26 | # my $c2 = $q->cookie(-name => 'name', -value => $c->{name});
|
27 | #print $q->header(-cookie => [$c1, $c2]);
|
28 |
|
29 | print '
' . "\n" . '<html>
' . "\n" . ' <head>
' . "\n" . ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
' . "\n" . ' <link rel="stylesheet" type="text/css" href="http://www.kellobowitz.net/wedding/wedding.css">
' . "\n" . ' <title>Ann & David Wedding Message Board</title>
' . "\n" . ' <base target="_blank">
' . "\n" . '</head>
' . "\n" . '<body>
' . "\n" . ' <h2>Message Board</h2>
' . "\n" . ' <h3 style="text-decoration: underline; text-style: italic">New messages have been disabled because of vandalism.</h3>
' . "\n" . '
' . "\n"; |
30 |
|
31 | if (0) {
|
32 | # if ($c->{storeID}) {
|
33 | print storeMessage($d,$c,$dataFile);
|
34 | print showThank();
|
35 | } elsif ($c->{threadshow}) {
|
36 | print showThread($d,$c);
|
37 | } elsif ($c->{followup}) {
|
38 | print followThread($d,$c);
|
39 | } elsif (0) {
|
40 | # } elsif ($c->{newthread}) {
|
41 | print createNewThread($d,$c)
|
42 | } else {
|
43 | print showTitles($d,$c);
|
44 | }
|
45 |
|
46 | print '
' . "\n" . '
' . "\n" . '
' . "\n" . '</body>
' . "\n" . '</html>
' . "\n"; |