From e44fb2a41de2b6f03efe12c5a19a6cf7fa631ae0 Mon Sep 17 00:00:00 2001 From: Kilian Saffran Date: Fri, 1 Mar 2019 11:21:29 +0100 Subject: [PATCH] Set to postgresql --- .htaccess | 1 + db/hha.sqlite | Bin 0 -> 12288 bytes index.cgi | 13 +- lib/MIME/changes.pod | 508 ------- lib/Template/FAQ.pod | 329 ----- lib/Template/Manual.pod | 91 -- lib/Template/Manual/Config.pod | 1918 --------------------------- lib/Template/Manual/Credits.pod | 107 -- lib/Template/Manual/Directives.pod | 1970 ---------------------------- lib/Template/Manual/Filters.pod | 504 ------- lib/Template/Manual/Internals.pod | 452 ------- lib/Template/Manual/Intro.pod | 242 ---- lib/Template/Manual/Plugins.pod | 313 ----- lib/Template/Manual/Syntax.pod | 327 ----- lib/Template/Manual/VMethods.pod | 721 ---------- lib/Template/Manual/Variables.pod | 838 ------------ lib/Template/Manual/Views.pod | 586 --------- lib/Template/Modules.pod | 176 --- lib/Template/Plugin/DBI.pm | 1139 ++++++++++++++++ lib/Template/Tools.pod | 65 - lib/Template/Tools/tpage.pod | 64 - lib/Template/Tools/ttree.pod | 314 ----- lib/Template/Tutorial.pod | 43 - lib/Template/Tutorial/Datafile.pod | 437 ------ lib/Template/Tutorial/Web.pod | 749 ----------- tmpl/section/01welcome.tt | 26 +- tmpl/section/07events.tt | 32 +- tmpl/skeleton/index.tt | 1 + 28 files changed, 1170 insertions(+), 10796 deletions(-) create mode 100644 db/hha.sqlite delete mode 100644 lib/MIME/changes.pod delete mode 100644 lib/Template/FAQ.pod delete mode 100644 lib/Template/Manual.pod delete mode 100644 lib/Template/Manual/Config.pod delete mode 100644 lib/Template/Manual/Credits.pod delete mode 100644 lib/Template/Manual/Directives.pod delete mode 100644 lib/Template/Manual/Filters.pod delete mode 100644 lib/Template/Manual/Internals.pod delete mode 100644 lib/Template/Manual/Intro.pod delete mode 100644 lib/Template/Manual/Plugins.pod delete mode 100644 lib/Template/Manual/Syntax.pod delete mode 100644 lib/Template/Manual/VMethods.pod delete mode 100644 lib/Template/Manual/Variables.pod delete mode 100644 lib/Template/Manual/Views.pod delete mode 100644 lib/Template/Modules.pod create mode 100644 lib/Template/Plugin/DBI.pm delete mode 100644 lib/Template/Tools.pod delete mode 100644 lib/Template/Tools/tpage.pod delete mode 100644 lib/Template/Tools/ttree.pod delete mode 100644 lib/Template/Tutorial.pod delete mode 100644 lib/Template/Tutorial/Datafile.pod delete mode 100644 lib/Template/Tutorial/Web.pod diff --git a/.htaccess b/.htaccess index b768ef7..2f2d785 100644 --- a/.htaccess +++ b/.htaccess @@ -8,6 +8,7 @@ Header set Expires "Wed, 1 Jan 2000 00:00:00 GMT" +Options +ExecCGI RewriteEngine on DirectoryIndex index.cgi diff --git a/db/hha.sqlite b/db/hha.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..fdc1a062513c3190e1ab34c86ca584c9ff00b0fc GIT binary patch literal 12288 zcmeI0y^qvJ6u`ZA9B{tl) zeS9QEK#`&pDH5d#U0RePb)_kBiN?0bUDyxo!;L-PwwX8HBCb!EkGTql-kGHGwWPN?=%ym3{)_wiqnro-?z16m#SiP@$Z+Cy} zI-S2eUi+{1cWtupaA9OW(XY&92p9r}fFWQA7y^cXAz%o+`2@0#-9K%K6DPDQetcEd`21(upGGUy1W7DZuXCpTP1sE`)9x^xyH7t#MJM>)h?g+}EPZ5PI!UW=wDyWbzFcU!( zczk6LZ*HX}*!cxyyLW#M)2zWkNPBkKw)@bUkh5Ga0^j8vhC;g#aqL2-w8RjR)N`n- zBK~n)4&nmv?Gmo)W@+oQaW>Q_7v<6v5Q2zanz#GMt+NwAzH~z#;s^%5Hq2Q-AytGz zLR}dtpJA+`Xy?~*a3jgDBnsS@ZY61!6cdw(Y5G?W*AYHG`JPI0KXCmJ3ak_) zIsi~Ijvx;NbEr=-qh6?cr9m++OR#b!T>0c&l4Wr|N~Q(_h@9sVSv^#L+Y=Mhp65B- zlN@3aaTo=zwn|(Hr5~aYqtI85%ZpfhoF*?N3GyJOQ>$9?bZ)HdF^Duush;h(NYt%1aTY) zU5HBPfFVcMl_SFda-R`|F=H-b_zbwPeS2DYyLa!Gx)93>$RfR&6eW=HooAIQwzIl{ z&a%3E_QzJ&hC7XdmdI%4MHz(@hd!4C223Zmhcqpp3k4%W9D=0Ok?{7H(fvkcgj}7U z_hwple{7wexXP#-xyWZa8d5@`g8>;15Trz65(ZABFkVi}vK}<3Y(2@>k~H7g`J>cR zg_GeZPuJ3H=fOrX25}C~*Yk%gKKYX3)JF{QvrN`MQNG<{abspath} = ""; for (my $i=0;$i<$absnum;$i++){ $vars->{abspath} .= "../"; } - - +$vars->{dbconn} = 'DBI:PgPP:dbname=handhandlu_db;host=sql629.your-server.de'; +$vars->{dbuser} = 'handhandlu'; +$vars->{dbpass} = 'htUF9jn487fCAJB6'; $vars->{basepath} = $basepath; $vars->{page} = 'page/'.$page; $vars->{pagename} = basename($page); diff --git a/lib/MIME/changes.pod b/lib/MIME/changes.pod deleted file mode 100644 index 2b8f76c..0000000 --- a/lib/MIME/changes.pod +++ /dev/null @@ -1,508 +0,0 @@ -=head1 CHANGE LOG - -=over 4 - -=item Version 3.030 - -Make send_by_sendmail set sender like documentation says it does (thanks, -Michael Schout!) - -=item Version 3.029 - -Allow the MIME-Version header to be replaced (thanks, Florian!) - -=item Version 3.028 - -Various documentation fixes - -=item Version 3.027 - -Add send_to_testfile method (Thanks, AlexanderBecker) - -=item Version 3.026 - -Fix tests to pass with MIME::Types 1.28 - -=item Version 3.025 - -Added back support for providing a non-default SMTP port (#21156, -#48783, thanks John Bokma!). - -=item Version 3.024 - -add git repo link to metadata - -=item Version 3.023 - -Correct erroneous changelog entry - -Fix typo in perldoc: utf-8, not utf8 - -=item Version 3.022 - -Behave on Cygwin as on Win32 with regard to defaulting to SMTP sending. - -Respect crazy people who put multiple Cc or Bcc headers in message (#30574, -thanks Pavel V. Rochnyack!) - -We no longer rewrite array and hash refs in the send_by_sendmail args so -aggressively. - -Cope with missing local sendmail (thanks to Debian for patching for this, and -for putting up with me (rjbs) being an insufferable jerk!) - -Fix weird unicode-in-$1 bug (thanks SREZIC!) - -Other minor bug fixes. - -=item Version 3.021 - -Replace Email::Date with Email::Date::Format to limit prereqs -(Email::Date::Format produced just for this!) - -Begin the process of removing use of ExtUtils::TBone for testing - -=item Version 3.020 - -Optimized code for speedup of creation of two-part messages. The internal -structure of the object has changes, but that won't matter if you were -using the published interface. (Sam Tregar) - -Removed the "advanced features", ie auto-fallback delivery, from -send_by_smtp. They didn't belong there in the first place. - -=item Version 3.01_06 (2007/07/29) - -First release from Perl Email Project. Updated packaging. - -=item Version 3.01_04 (2004/05/05) - -Reworked the new send_by_smtp stuff. Documentation modifications. - -=item Version 3.01_02 (2003/08/28) - -Well, it seems 3.01_01 failed tests on Win32 due to me accidentally -changing the line ending format to DOSish. Also the way that email -extraction for SMTP with or without Mail::Address was different (from -2.117 even). So ive fixed that. - -Anybody depending on the undocumented extract_addrs() is in for a suprise. -I suggest you look at using Mail::Address. - -=item Version 3.01_01 (2003/04/25 - 2003/08/21) - -(This version is a test release, if its ok then I'll re-release it as -3.02) - -Patched the pod to use correct entities Thanks to Ed Avis for the patch. -Added better support for funky names in the from field when sending via SMTP, thanks to -prodding by Darren Hemphill and Ollie Gallardo. (Actually I kind of messed this up orginally -and no doubt Darren wasn't impressed. I ended up using something pretty close to his solution. -My bad for not paying more attention. Sorry mate.) - -08/21: Apparently I never uploaded my changes for this version to CPAN. Sigh. - -*** Win32 CHANGES *** - -Up until this release the default send() method for all OS'es has been to invoke sendmail -and pipe the mail to it. This behaviour has now changed on Win32 to default to using SMTP. -This means that if your /site/lib/Net/libnet.cfg file is properly configured then you can -use SMTP without specifying a send method explicitly. This seemed a rational decision as -most Win32 users who send mails are using an SMTP server and not a tool like sendmail. - -*** SMTP CHANGES *** - -Jonathan Eunice pointed out an interesting bug in the -interaction between MIME::Lite and Net::SMTP/Net::CMD. This was that sending a mail -ending in "\n\n" without additional encoding would cause Net::CMD to send an incorrect -end of mail signal to the SMTP server which would result in A) The mail failing to be sent due -to a timeout, and B) MIME::Lite to report that all was well. - -This has been fixed by checking to make sure that if the last character sent was \n, but the -last two chars were not \r\n then the \n is turned into an \r, which Net::CMD then adds an \n -to and then sends the normal ".\r\n" to terminate the message. Weird error, that im not -entirely sure has been resolved properly. Please inform me if this screws anything up that it -shouldn't. - -As stated earlier send_by_smtp wasnt extracting the _real_ email address from the overall fancy -once specified in the From: field. This is resolved now, fancy display names are now possible -while using SMTP. - -*** Content-Id *** - -It was pointed out by alex via CPAN RT that Content-Id needs to have angle brackets around -it or HTML mails dont show up properly in many mail clients, furthermore the RFC mandates it -(to be honest im taking his word on this, please feel free to yell at me if this causes trouble), -so as he suggested I am automatically adding them in they arent provided. - -*** sendmail path *** - -Dom pointed out via CPAN RT that despite some effort going in to trying to discover the correct -location of sendmail, that it was still using a bad default. Fixed. - -*** Date Stamping *** - -Kurt reported via RT that datestamps were not being correctly formatted. His patch has been incorporated -with only one change, a comment where Perl was spelled PERL :-) - -*** Quoted printable fix *** - -Klaus Rusch noted a bug in how quoted-printable handled weird \r\n combinations. Fixed now. - -=item Version 3.01 (2003/04/25) - -Eryq has reappeared long enough to graciously hand over the maintaince of the -module to me. Thanks. - -=item Version 3.00 (2003/04/24) - -Eryq has disappeared. His web site remains but he doesnt answer emails. - -I have taken it onto myself to take over maintenance until he returns to -reclaim his excellent work. - -I don't intend to develop this in an serious way. I'll patch it if people -have a patch and generally keep it ticking over, but dont expect new features. - -This release has code that actually works with MIME::Lite now. As well as a few -other minor additions (like a test for this functionailty) - -For stuff that could be done, a first place would be to rewrite and extend the -test suite. It should use Test::More or Test::Builder at the very least. - -I also might rip out the preformatted doc pages. It makes the distro way fatter -than it needs to be. I reckon the package contains the POD in at least three forms. -A wee tad overkill I think. :-) - -=item Version 2.117 (2001/08/20) - -The terms-of-use have been placed in the distribution file "COPYING". -Also, small documentation tweaks were made. - - -=item Version 2.116 (2001/08/17) - -Added long-overdue patch which makes the instance method form -of send() do the right thing when given HOW... arguments. -I - -=item Version 2.114 (2001/08/16) - -New special 'AUTO' content type in new()/build() tells MIME::Lite to -try and guess the type from file extension. To make use of -this, you'll want to install B. -The "AUTO" setting can be made the default default (instead of "TEXT") -if you set C<$AUTO_CONTENT_TYPE = 1, $PARANOID = 0>. -I Ville SkyttE<228> I - -File::Basename is used if it is available. -I Ville SkyttE<228> I - -SMTP failures (in send_by_smtp) now add the $smtp-Emessage to the -croak'ed exception, so if things go wrong, you get a better -idea of what and why. -I - -Made a subtle change to C which supposedly fixes a -failed MIME data.t test with Perl 5.004_04 on NT 4 sp6. -The problem might only exist in this old perl, but as the patch -author says, not everyone has climbed higher on the Perl ladder. -I - -Added C directory, with F. -I - -Improved HTML documentation (notice the links to -the individual methods in the top menu). - -Corrected some mis-docs. - - -=item Version 2.111 (2001/04/03) - -Added long-overdue C and C methods. - - No instance method - For accessing the subparts? - That can't be right. D'OH! - -Added long-overdue auto-verify logic to C method. - -Added long-overdue C method for getting/setting -the preamble text. -I - - -=item Version 2.108 (2001/03/30) - -New C allows you to set the header order, both on a -per-message basis, and package-wide. -I - -Added code to try and divine "sendmail" path more intelligently. -I - - -=item Version 2.107 (2001/03/27) - -Fixed serious bug where tainted data with quoted-printable encoding -was causing infinite loops. The "fix" untaints the data in question, -which is not optimal, but it's probably benign in this case. -I -I - - "Doctor, O doctor: - it's painful when I do *this* --" - "Simple: don't *do* that." - -Fixed bugs where a non-local C<$_> was being modified... again! -Will I never learn? -I - - Dollar-underscore - can poison distant waters; - 'local' must it be. - -Fixed buglet in C where all value references were being treated -as arrayrefs, instead of as possibly-self-stringifying object refs. -Now you can send in an object ref as the 2nd argument. -I - - That ref is a string? - Operator overload - has ruined my day. - -Added "Approved" as an acceptable header field for C, as per RFC1036. -I - -Small improvements to docs to make different uses of attach() -and various arguments clearer. -I - - -=item Version 2.106 (2000/11/21) - -Added Alpha version of scrub() to make it easy for people to suppress -the printing of unwanted MIME attributes (like Content-length). -I - -Headers with empty-strings for their values are no longer -printed. This seems sensible, and helps us implement scrub(). - - -=item Version 2.105 (2000/10/14) - -The regression-test failure was identified, and it was my fault. -Apparently some of the \-quoting in my "autoloaded" code was -making Perl 5.6 unhappy. For this nesting-related idiocy, -a nesting kaiku. -I - - In a pattern, my - backslash-s dwells peacefully, - unambiguous -- - - but I embed it - in a double-quoted string - doubling the backslash -- - - interpolating - that same double-quoted string - in other patterns -- - - and, worlds within worlds, - I single-quote the function - to autoload it -- - - changing the meaning - of the backslash and the 's'; - and Five-Point-Six growls. - - -=item Version 2.104 (2000/09/28) - -Now attempts to load and use Mail::Address for parsing email -addresses I falling back to our own method. -I - - Parsing addresses - is too damn hard. One last hope: - Let Graham Barr do it! - -For the curious, the version of Mail::Address appears -as the "A" number in the X-Mailer: - - X-Mailer: MIME::Lite 2.104 (A1.15; B2.09; Q2.03) - -Added B option to send_by_sendmail(). -I - - -=item Version 2.101 (2000/06/06) - -Major revision to print_body() and body_as_string() so that -"body" really means "the part after the header", which is what most -people would want in this context. This is B how it was used -1.x, where "body" only meant "the body of a simple singlepart". -Hopefully, this change will solve many problems and create very few ones. - -Added support for attaching a part to a "message/rfc822", treating -the "message" type as a multipart-like container. - -Now takes care not to include "Bcc:" in header when using send_by_smtp, -as a safety precaution against qmail's behavior. -I - -Improved efficiency of many stringifying operations by using -string-arrays which are joined, instead of doing multiple appends -to a scalar. - -Cleaned up the "examples" directory. - - -=item Version 1.147 (2000/06/02) - -Fixed buglet where lack of Cc:/Bcc: was causing extract_addrs -to emit "undefined variable" warnings. Also, lack of a "To:" field -now causes a croak. -I - - -=item Version 1.146 (2000/05/18) - -Fixed bug in parsing of addresses; please read the WARNINGS section -which describes recommended address formats for "To:", "Cc:", etc. -Also added automatic inclusion of a UT "Date:" at top level unless -explicitly told not to. -I - -=item Version 1.145 (2000/05/06) - -Fixed bug in encode_7bit(): a lingering C modifier was removed. -I - - -=item Version 1.142 (2000/05/02) - -Added new, taint-safe invocation of "sendmail", one which also -sets up the C<-f> option. Unfortunately, I couldn't make this automatic: -the change could have broken a lot of code out there which used -send_by_sendmail() with unusual "sendmail" variants. -So you'll have to configure "send" to use the new mechanism: - - MIME::Lite->send('sendmail'); ### no args! - -I - - -=item Version 1.140 (2000/04/27) - -Fixed bug in support for "To", "Cc", and "Bcc" in send_by_smtp(): -multiple (comma-separated) addresses should now work fine. -We try real hard to extract addresses from the flat text strings. -I - -Added automatic verification that attached data files exist, -done immediately before the "send" action is invoked. -To turn this off, set $MIME::Lite::AUTO_VERIFY to false. - -=item Version 1.137 (2000/03/22) - -Added support for "Cc" and "Bcc" in send_by_smtp(). -To turn this off, set $MIME::Lite::AUTO_CC to false. -I - -Chooses a better default content-transfer-encoding if the content-type -is "image/*", "audio/*", etc. -To turn this off, set $MIME::Lite::AUTO_ENCODE to false. -I - -Fixed bug in QP-encoding where a non-local C<$_> was being modified. -I - -Removed references to C<$`>, C<$'>, and C<$&> (bad variables -which slow things down). - -Added an example of how to send HTML files with enclosed in-line -images, per popular demand. - - -=item Version 1.133 (1999/04/17) - -Fixed bug in "Data" handling: arrayrefs were not being handled -properly. - - -=item Version 1.130 (1998/12/14) - -Added much larger and more-flexible send() facility. -I - -Added get() method for extracting basic attributes. - -New... "t" tests! - - -=item Version 1.124 (1998/11/13) - -Folded in filehandle (FH) support in build/attach. -I - - -=item Version 1.122 (1998/01/19) - -MIME::Base64 and MIME::QuotedPrint are used if available. - -The 7bit encoding no longer does "escapes"; it merely strips 8-bit characters. - - -=item Version 1.121 (1997/04/08) - -Filename attribute is now no longer ignored by build(). -I - - -=item Version 1.120 (1997/03/29) - -Efficiency hack to speed up MIME::Lite::IO_Scalar. -I - - -=item Version 1.116 (1997/03/19) - -Small bug in our private copy of encode_base64() was patched. -I - -New, prettier way of specifying mail message headers in C. - -New quiet method to turn off warnings. - -Changed "stringify" methods to more-standard "as_string" methods. - - -=item Version 1.112 (1997/03/06) - -Added C, and C method for our non-Unix-using brethren: -file data is now read using binmode() if appropriate. -I - - -=item Version 1.110 (1997/03/06) - -Fixed bug in opening the data filehandle. - - -=item Version 1.102 (1997/03/01) - -Initial release. - - -=item Version 1.101 (1997/03/01) - -Baseline code. -Originally created: 11 December 1996. Ho ho ho. - -=back diff --git a/lib/Template/FAQ.pod b/lib/Template/FAQ.pod deleted file mode 100644 index 9584350..0000000 --- a/lib/Template/FAQ.pod +++ /dev/null @@ -1,329 +0,0 @@ -#============================================================= -*-perl-*- -# -# Template::FAQ -# -# DESCRIPTION - -# -# AUTHOR -# Andy Wardley -# -# COPYRIGHT -# Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -#======================================================================== - -=head1 NAME - -Template::FAQ - Frequently Asked Questions about the Template Toolkit - -=head1 Template Toolkit Language - -=head2 Why doesn't [% a = b IF c %] work as expected? - -There's a limitation in the TT2 parser which means that the following code -doesn't work as you might expect: - - [% a = b IF c %] - -The parser interprets it as an attempt to set C to the result of -C, like this: - - [% a = (b IF c) %] - -If you want to set C only if C is true, then do this instead: - - [% SET a = b IF c %] - -The explicit C keyword gives the parser the clue it needs to do the -right thing. - -NOTE: this will be fixed in TT3 - -=head2 If I'm using TT to write out a TT template, is there a good way to escape [% and %]? - -You can do something like this: - - [% stag = "[\%" - etag = "%\]" - %] - -and then: - - [% stag; 'hello'; etag %] - -Or you can use the C directive, like so: - - [% TAGS [- -] %] - [- INCLUDE foo -] # is a directive - [% INCLUDE foo %] # not a directive - -=head2 How do I iterate over a hash? - -This is covered in the L section of the -manual. A list of all the keys that are in the hash can be obtained with the -C virtual method. You can then iterate over that list and by looking up -each key in turn get the value. - - [% FOREACH key = product.keys %] - [% key %] => [% product.$key %] - [% END %] - -=head1 Plugins - -=head2 How do I get the Table plugin to order data across rather than down? - -Order the data into rows: - - Steve Karen Jeff - Brooklyn Nantucket Fairfax - NY MA VA - - [% USE table(data, rows=3) %] - -Then ask for each column - - [% FOREACH column = table.cols %] - -And then print each item in the column going across the output rows - - [% FOREACH item = column %] - [% item %] - [% END %] - -=head2 Accessing Cookies - -Jeff Boes Ejboes@nexcerpt.comE asks: - - Does anyone have a quick-n-dirty approach to accessing - cookies from templates? - -Jonas Liljegren answers: - - [% USE CGI %] - -

The value is [% CGI.cookie('cookie_name') | html %] - - -=head1 Extending the Template Toolkit - -=head2 Can I serve templates from a database? - -Short answer: yes, Chris Nandor has done this for Slash. You need to -subclass L. See the mailing list archives for further -info. - -=head2 Can I fetch templates via http? - -To do the job properly, you should subclass L to -C and use a C option to bind the C -template prefix to that particular provider (you may want to go digging around -in the F file around version 2.01 for more info on C - it -may not be properly documented anywhere else...yet!). e.g. - - use Template::Provider::HTTP; - - my $file = Template::Provider( INCLUDE_PATH => [...] ); - my $http = Template::Provider::HTTP->new(...); - my $tt2 = Template->new({ - LOAD_TEMPLATES => [ $file, $http ], - PREFIX_MAP => { - file => '0', # file:foo.html - http => '1', # http:foo.html - default => '0', # foo.html => file:foo.html - } - }); - -Now a template specified as: - - [% INCLUDE foo %] - -will be served by the 'file' provider (the default). Otherwise you -can explicitly add a prefix: - - [% INCLUDE file:foo.html %] - [% INCLUDE http:foo.html %] - [% INCLUDE http://www.xyz.com/tt2/header.tt2 %] - -This same principal can be used to create a DBI template provider. e.g. - - [% INCLUDE dbi:foo.html %] - -Alas, we don't yet have a DBI provider as part of the Template Toolkit. There -has been some talk on the mailing list about efforts to develop DBI and/or -HTTP providers but as yet no-one has stepped forward to take up the -challenge... - -In the mean time, Craig Barrat's post from the mailing list has some useful -pointers on how to achieve this using existing modules. See -L - -=head1 Miscellaneous - -=head2 How can I find out the name of the main template being processed? - -The C