New server, FileBin instead of $ENV{BFConfDir}, and custom Captcha
[buildfarm-server.git] / cgi-bin / register-form.pl
index cf4621a6bedaeeca619b13b709c63b9863221276..415277642d0919b208765903d3db1867dcf242d1 100755 (executable)
@@ -1,26 +1,30 @@
 #!/usr/bin/perl
 
-use strict;
-use Template;
-use Captcha::reCAPTCHA;
+=comment
+
+Copyright (c) 2003-2010, Andrew Dunstan
 
-use vars qw( $template_dir $captcha_pubkey );
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+See accompanying License file for license details
 
+=cut 
+
+use strict;
+use Template;
 
-my $c = Captcha::reCAPTCHA->new;
+use vars qw( $template_dir );
 
-my $captcha = $c->get_html($captcha_pubkey);
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
 
 my $template_opts = { INCLUDE_PATH => $template_dir };
 my $template = new Template($template_opts);
 
 print "Content-Type: text/html\n\n";
 
+my $argop = '+';
+$argop = '-' if time % 2;
+my $arg1 = int(rand(100));
+$arg1 += 11 if $arg1 < 12;
+my $arg2 = int(rand(10) + 1);
 
-$template->process('register-form.tt',{captcha => $captcha});
-
-
-
-
-
+$template->process('register-form.tt', {arg1 => $arg1, arg2 => $arg2, argop => $argop});