Author: dom Date: 2007-09-17 22:44:15 +0100 (Mon, 17 Sep 2007) New Revision: 1123
Removed: website-new/preview/events/talks/notcon-2004/index.cgi website-new/preview/events/talks/yapc-eu-2003/index.cgi website-new/preview/events/talks/yapc-na-2005/index.cgi Log: no more CGIs
Deleted: website-new/preview/events/talks/notcon-2004/index.cgi =================================================================== --- website-new/preview/events/talks/notcon-2004/index.cgi 2007-09-17 21:41:48 UTC (rev 1122) +++ website-new/preview/events/talks/notcon-2004/index.cgi 2007-09-17 21:44:15 UTC (rev 1123) @@ -1,33 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use strict; - -use CGI; -use Template; - -my $q = CGI->new; -my $template = Template->new({ INCLUDE_PATH => 'templates' }); -my $page = $q->param('page') || ''; - -print "Content-Type: text/html\n\n"; - -eval -{ - # If a page was specified, put it in the template variable 'page'. - # If no page was specified, use the default page "contents". - my $selected_page = 'contents'; - - $selected_page = $page if $page; - - my $vars = { page => $selected_page }; - - # Process the wrapper template with the page variable. - $template->process('wrapper', $vars); -}; - -if ($template->error) -{ - my $vars = { error => $template->error }; - $template->process('error', $vars); -}; \ No newline at end of file
Deleted: website-new/preview/events/talks/yapc-eu-2003/index.cgi =================================================================== --- website-new/preview/events/talks/yapc-eu-2003/index.cgi 2007-09-17 21:41:48 UTC (rev 1122) +++ website-new/preview/events/talks/yapc-eu-2003/index.cgi 2007-09-17 21:44:15 UTC (rev 1123) @@ -1,64 +0,0 @@ -#!/usr/bin/perl -w - -use strict; - -use CGI; -use Template; - -my $q = CGI->new(); - -my $template = Template->new({ - INCLUDE_PATH => '/home/earle/openguides.org/talks/yapc-eu-2003/templates/', -}); - -# Initialise variables. - -my $vars = {}; - -# Get what page we're looking at from the CGI parameter "page". - -my $page = $q->param('page') || ''; - -print "Content-Type: text/html\n\n"; - -# Eval for catching TT errors. - -eval { - - # If a page was specified, put it in the template variable 'page'. - - if ($page) { - $vars = { - page => $page - }; - - } - - # If no page was specified, use the default page "contents". - - else { - - $vars = { - page => 'contents' - }; - } - - # Process the wrapper template with the page variable. - - $template->process('wrapper', $vars); - -}; - -# If TT threw an error: - -if ($template->error()) { - - # Put the TT error message into a template variable. - - $vars = { error => $template->error }; - - # Process a special error template with the error variable. - - $template->process('error',$vars); - -};
Deleted: website-new/preview/events/talks/yapc-na-2005/index.cgi =================================================================== --- website-new/preview/events/talks/yapc-na-2005/index.cgi 2007-09-17 21:41:48 UTC (rev 1122) +++ website-new/preview/events/talks/yapc-na-2005/index.cgi 2007-09-17 21:44:15 UTC (rev 1123) @@ -1,52 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use strict; - -use CGI 'param'; -use Template; - -run(); - -sub run -{ - my $template = Template->new({ - EVAL_PERL => 1, - INCLUDE_PATH => 'templates' - }); - my $vars = {}; - my $page = CGI->new->param('keywords') || ''; - - print "Content-Type: text/html\n\n"; - - # Eval for catching TT errors. - - eval - { - if ($page) { $vars = { page => $page }; } - else { $vars = { page => 'contents' }; } - - $template->process('wrapper', $vars); - }; - - - error($template->error) if $template->error; -} - -sub error -{ - my $error = shift || "No error given, something went wrong!"; - - print <<HTMLSTOP; -<html> -<head> -<title>Error</title> -</head> -<body> -<h1>Error</h1> -<h2>$error</h2> -</body> -</html> -HTMLSTOP - -};
openguides-commits@lists.openguides.org