comparison cgi-bin/comments.cgi @ 219:52326e71a41e

Ran through perltidy
author Steve Kemp <steve@steve.org.uk>
date Wed, 16 Apr 2008 19:04:45 +0100
parents e0ef0f218600
children 053c52c4516f
comparison
equal deleted inserted replaced
218:62fd800e7777 219:52326e71a41e
40 # NOTE: This should be writeable to the www-data user, and shouldn't 40 # NOTE: This should be writeable to the www-data user, and shouldn't
41 # be inside your web-root - or you open up a security hole. 41 # be inside your web-root - or you open up a security hole.
42 # 42 #
43 # my $COMMENT = "/home/www/comments/"; 43 # my $COMMENT = "/home/www/comments/";
44 # 44 #
45 my $COMMENT = $ENV{'DOCUMENT_ROOT'} . "../comments/"; 45 my $COMMENT = $ENV{ 'DOCUMENT_ROOT' } . "../comments/";
46 46
47 # 47 #
48 # The notification addresses - leave blank to disable 48 # The notification addresses - leave blank to disable
49 # 49 #
50 my $TO = 'weblog@steve.org.uk'; 50 my $TO = 'weblog@steve.org.uk';
54 54
55 # 55 #
56 # Get the parameters from the request. 56 # Get the parameters from the request.
57 # 57 #
58 my $cgi = new CGI(); 58 my $cgi = new CGI();
59 my $name = $cgi->param('name') || undef; 59 my $name = $cgi->param('name') || undef;
60 my $mail = $cgi->param('mail') || undef; 60 my $mail = $cgi->param('mail') || undef;
61 my $body = $cgi->param('body') || undef; 61 my $body = $cgi->param('body') || undef;
62 my $id = $cgi->param('id') || undef; 62 my $id = $cgi->param('id') || undef;
63 my $cap = $cgi->param('captcha') || undef; 63 my $cap = $cgi->param('captcha') || undef;
64 my $ajax = $cgi->param("ajax") || 0; 64 my $ajax = $cgi->param("ajax") || 0;
65 65
66 66
67 # 67 #
68 # If any are missing just redirect back to the blog homepage. 68 # If any are missing just redirect back to the blog homepage.
69 # 69 #
81 print "Content-type: text/html\n\n"; 81 print "Content-type: text/html\n\n";
82 print "Missing fields.\n"; 82 print "Missing fields.\n";
83 } 83 }
84 else 84 else
85 { 85 {
86 print "Location: http://" . $ENV{'HTTP_HOST'} . "/\n\n"; 86 print "Location: http://" . $ENV{ 'HTTP_HOST' } . "/\n\n";
87 } 87 }
88 exit; 88 exit;
89 } 89 }
90 90
91 # 91 #
98 print "Content-type: text/html\n\n"; 98 print "Content-type: text/html\n\n";
99 print "Missing fields.\n"; 99 print "Missing fields.\n";
100 } 100 }
101 else 101 else
102 { 102 {
103 print "Location: http://" . $ENV{'HTTP_HOST'} . "/\n\n"; 103 print "Location: http://" . $ENV{ 'HTTP_HOST' } . "/\n\n";
104 } 104 }
105 exit; 105 exit;
106 } 106 }
107 107
108 108