use strict; BEGIN { require 'wakautils.pl' } # # Interface strings # use constant S_HOME => 'Accueil'; # Forwards to home page use constant S_RETURN => 'Retour'; # Returns to image board use constant S_POSTING => 'Mode reponse'; # Prints message in red bar atop the reply screen use constant S_NAME => 'Nom'; # Describes name field use constant S_EMAIL => 'Lien'; # Describes e-mail field use constant S_SUBJECT => 'Sujet'; # Describes subject field use constant S_SUBMIT => 'Envoi'; # Describes submit button use constant S_COMMENT => 'Commentaire'; # Describes comment field use constant S_UPLOADFILE => 'Fichier'; # Describes file field use constant S_CAPTCHA => 'Verification'; # Describes captcha field use constant S_DELPASS => 'Mot de passe'; # Describes password field use constant S_DELEXPL => '(pour effacer le post et le fichier)'; # Prints explanation for password box (to the right) use constant S_THUMB => 'Previsualisation affichee, cliquez pour taille reele.'; # Prints instructions for viewing real source use constant S_HIDDEN => 'Previsualisation masquee, cliquez pour taille reele.'; # Prints instructions for viewing hidden image reply use constant S_NOTHUMB => 'Pas de
previsualisation'; # Printed when there's no thumbnail use constant S_PICNAME => 'Fichier: '; # Prints text before upload name/link use constant S_REPLY => 'Reponse'; # Prints text for reply link use constant S_ABBR => '%d posts omitted. Click Reply to view.'; # Prints text to be shown when replies are hidden use constant S_ABBRIMG => '%d posts and %d images omitted. Click Reply to view.'; # Prints text to be shown when replies and images are hidden use constant S_ABBRTEXT => 'Commentaire trop long. Cliquez ici pour texte complet.'; use constant S_REPDEL => 'Effacer Post '; # Prints text next to S_DELPICONLY (left) use constant S_DELPICONLY => 'Seulement le fichier'; # Prints text next to checkbox for file deletion (right) use constant S_DELKEY => 'Mot de passe '; # Prints text next to password field for deletion (left) use constant S_DELETE => 'Effacer'; # Defines deletion button's name use constant S_PREV => 'Precedent'; # Defines previous button use constant S_FIRSTPG => 'Precedent'; # Defines previous button use constant S_NEXT => 'Suivant'; # Defines next button use constant S_LASTPG => 'Suivant'; # Defines next button use constant S_FRONT => '1ere page'; # Title of the front page in page list # # Error strings # use constant S_BADCAPTCHA => 'Wrong verification code entered.'; # Error message when the captcha is wrong use constant S_UNJUST => 'Posting must be done through a POST request.'; # Error message on an unjust POST - prevents floodbots or ways not using POST method? use constant S_NOTEXT => 'No text entered.'; # Error message for no text entered in to title/comment use constant S_NOTITLE => 'No title entered.'; # Error message for no title entered use constant S_NOTALLOWED => 'Posting not allowed.'; # Error message when the posting type is forbidden for non-admins use constant S_TOOLONG => 'The %s field is too long, by %d characters.'; # Error message for too many characters in a given field use constant S_UNUSUAL => 'Abnormal reply.'; # Error message for abnormal reply? (this is a mystery!) use constant S_SPAM => 'Spammers are not welcome here!'; # Error message when detecting spam use constant S_THREADCOLL => 'Somebody else tried to post a thread at the same time. Please try again.'; # If two people create threads during the same second use constant S_NOTHREADERR => 'Thread specified does not exist.'; # Error message when a non-existant thread is accessed use constant S_BADDELPASS => 'Password incorrect.'; # Error message for wrong password (when user tries to delete file) use constant S_NOTWRITE => 'Cannot write to directory.'; # Error message when the script cannot write to the directory, the chmod (777) is wrong use constant S_NOTASK => 'Script error; no valid task specified.'; # Error message when calling the script incorrectly use constant S_NOLOG => 'Couldn\'t write to log.txt.'; # Error message when log.txt is not writeable or similar use constant S_TOOBIG => 'The file you tried to upload is too large.'; # Error message when the image file is larger than MAX_KB use constant S_EMPTY => 'The file you tried to upload is empty.'; # Error message when the image file is 0 bytes use constant S_BADFORMAT => 'File format not allowed.'; # Error message when the file is not in a supported format. use constant S_DUPE => 'This file has already been posted here.'; # Error message when an md5 checksum already exists. use constant S_DUPENAME => 'A file with the same name already exists.'; # Error message when an filename already exists. use constant S_THREADCLOSED => 'This thread is closed.'; # Error message when posting in a legen^H^H^H^H^H closed thread use constant S_SPAMTRAP => 'Leave empty (spam trap): '; # # Templates # use constant NORMAL_HEAD_INCLUDE => q{ <if $title><var $title> - </if><const TITLE> }.include(INCLUDE_DIR."header.html").q{
[] - [" target="_top">]

}; use constant NORMAL_FOOT_INCLUDE => include(INCLUDE_DIR."footer.html").q{ }; use constant MAIN_PAGE_TEMPLATE => compile_template(NORMAL_HEAD_INCLUDE.q{
}.include(INCLUDE_DIR."rules.html").q{



[]
[] []

}.NORMAL_FOOT_INCLUDE,KEEP_MAINPAGE_NEWLINES); use constant THREAD_HEAD_TEMPLATE => compile_template(NORMAL_HEAD_INCLUDE.q{ []
}.include(INCLUDE_DIR."rules.html").q{

}); use constant THREAD_FOOT_TEMPLATE => compile_template(q{

[]
}.NORMAL_FOOT_INCLUDE); use constant REPLY_TEMPLATE => compile_template( q{ -( B, x)
<var $size>
No.   []
>> No.  
-( B, x)
<var $size>
}); use constant DELETED_TEMPLATE => compile_template( q{ }); use constant BACKLOG_PAGE_TEMPLATE => compile_template( NORMAL_HEAD_INCLUDE.q{ }.NORMAL_FOOT_INCLUDE); use constant RSS_TEMPLATE => compile_template( q{ }); use constant ERROR_TEMPLATE => compile_template(NORMAL_HEAD_INCLUDE.q{





}.NORMAL_FOOT_INCLUDE); sub get_filename($) { my $path=shift; $path=~m!([^/]+)$!; clean_string($1) } 1;