#!/usr/bin/perl
### All code is copyright active-scripts.net 2006. # Bookmarks: 39,325 0,2173 0,4161
### Unauthorised use, editing or copying for ANY reason is
### an infringement. Anti-spam code can not be edited
### and/or used in any way outside of the code in this script.
$var = time;
use CGI qw(:all);
use CGI::Carp qw/fatalsToBrowser/; # working on refer
for (param()) { $NEWFORM{$_} = param($_); }
for (param()) {
$FORM{$_} = param($_);
$FORM{$_} =~ s/\|/-/gi unless param(action) eq "delete_ips";
}
$query = new CGI;
@todel = $query->param('todel');
$cookiedata = $ENV{'HTTP_COOKIE'};
@cookies = split(/;/,$cookiedata );
foreach $i (@cookies){
($name,$cid) = split(/=/,$i);
$name =~ s/\s+//gi;
$COOK{$name} = $cid;
}
@var1 = split(//,$var);
$lastnotvar = $var1[-1];
$lastnotvar++;
$lastnotvar = 2 if $lastnotvar ==1;
$lastnotvar2 = $lastnotvar -1;
$use_absolute_reference = "no";
$urladdress = "http://www.domainhereifallelsefails.net/cgi-bin/gb/guestbook.cgi";
$font = "";
$guestbookroot = "$ENV{'HTTP_HOST'}";
if ($use_absolute_reference eq "no"){
$guesturl = "$ENV{'SCRIPT_NAME'}";
}
else{
$guesturl = $urladdress;
}
$allurl = "$guestbookroot" . "$guesturl ";
$allurl2 = "$guestbookroot" . "$guesturl";
$allurl3 = "$guestbookroot" . "$guesturl" . "?action=control_panel ";
$| = 1;
$demo="off";
$previewline = "
";
$version = "1400003";
$bversion = "14.3";
&subdirectory;
$grace = 604800;
$salt = "active"; # to help crypt
$enc = crypt(active, $salt); # set default password
$location_of_lock_file = "./active_guestbook_files/guestbook.lock"; ## thanks to extropia.com
$cookie_control = "off";
unless (-e "$guestbook_data_name"){
@months = ("January","February","March","April","May","June","July","August","September","October","November","December");
&GetDate;
$now = &amqdate($messagedate);
}
$alignment_default = "center";
@active_default_alignment = split (//, $alignment_default);
$cookie_default = join ("", reverse @active_default_alignment);
$algo = "";
&startup;
&open_prefs;
&GetDate;
&open_prefst;
&check_values;
$now = &amqdate($messagedate);
&check_update;
&check_new_files;
$alignment_default = "center";
$alignment = "center" if ($alignment eq "");
$action = $FORM{'action'};
$direct = $FORM{'direct'};
$search_words = $FORM{'search_words'};
$search_fields = $FORM{'search_fields'};
$search_english= $FORM{'reload'};
@old_words = split (/\,/, $bad_words);
# $added_words = "skcuf daehtihs etihs tihs stihs tawt reggin rekcufrehtom rekcuf tnuc rekcus kcoc dratsab kcuf gnikcuf sknaw knaw stnuc sdratsab sreknaw reknaw elohesra selohesra esra sesra";
@letters = split (//, $added_words) ;
$reverse = join ("", reverse @letters);
@new_words = split (/ /, $reverse);
$rett = "jguiekjhhd";
@words = (@new_words, @old_words);
$host = ".rorre noitartsigeR";
@backhost = split (//, $host) ;
$valid_ip = join ("", reverse @backhost);
@anti_ips = split (/\,/, $anti_ips);
@anti_emails = split (/\,/, $anti_emails);
&ip_test;
$ipoops = "no";
$RemoteHost = $ENV{'REMOTE_HOST'};
if ((!$RemoteHost) || ($RemoteHost =~ m!^\d+\.\d+\.\d+\.\d+$!)) {
if ($ENV{'REMOTE_ADDR'} =~ m!^(\d+)\.(\d+)\.(\d+)\.(\d+)$!) {
$RemoteHost = (gethostbyaddr(pack('C4',$1,$2,$3,$4),2))[0] || $ENV{'REMOTE_ADDR'};
}
$RemoteHost =~ tr[A-Z][a-z];
}
foreach (@anti_ips) {
next unless $_;
$ipoops = "yes" if ($RemoteHost =~ m!$_!);
$ipoops = "yes" if ($ENV{'REMOTE_ADDR'} =~ m!$_!);
}
sub end {
&content;;
print qq~
~;
&active_header if $active_header eq "on";
&user_image if $user_image eq "yes";
&title if $use_title eq "on";
&user_html if $use_user_html eq "yes";
&menu;
&no_of_messages_display if $show_no_of_messages eq "yes";
$count = 1;
$grouped = 0;
$no_displayed = int($no_displayed);
if ($no_displayed <1){
$no_displayed = 1;
}
$start_number = $FORM{'start_number'};
$new_start_number = ($start_number + $no_displayed);
$old_start_number = ($start_number - $no_displayed);
$startplus = $start_number +1;
unless ($old_start_number < 0){print qq~ $left_bracket$TXT_previous$right_bracket ~;
}
&show_number_menu unless ($number_of_messages <($no_displayed+1));
unless ($new_start_number > ($number_of_messages -1 )){
print qq~ $left_bracket$TXT_next$right_bracket ~; } if (($new_start_number > ($number_of_messages -1 )) && ($number_of_messages >($no_displayed))){ print qq~ ~; } print qq~ ~; $rev_startplus = $number_of_messages - $startplus +1; $rev_new_start_number = $number_of_messages - $new_start_number +1; $rev_number_of_messages = $number_of_messages - $number_of_messages +1; if ($order_of_message_numbers eq "reverse"){ $overall_startplus =$rev_startplus; $overall_new_start_number =$rev_new_start_number; $overall_number_of_messages =$rev_number_of_messages; } else{ $overall_startplus =$startplus; $overall_new_start_number =$new_start_number; $overall_number_of_messages =$number_of_messages; } if ($new_start_number < $number_of_messages){ print qq~ $TXT_viewing_messages$overall_startplus$TXT_to$overall_new_start_number$TXT_after_last_number ~; } else{ if ($startplus == $number_of_messages){ print qq~ $TXT_viewing_message$overall_startplus$TXT_after_last_number1 ~; } else{ print qq~ $TXT_viewing_messages$overall_startplus$TXT_to$overall_number_of_messages$TXT_after_last_number ~; } } if ($lock_gb ne "yes"){ &add2 if $add_page_appears ==1; } $message_number = $start_number+1; foreach $row (@data_ordered){ @fields = split (/\|/, $row); $grouped++; if (($grouped > ($start_number)) && ($grouped < ($start_number + $no_displayed + 1))){ &main_table_results; $message_number++; } # end if number is right } # end for each row if ($use_hr_image eq "yes"){ print " "; } unless ($old_start_number < 0){ print qq~ $left_bracket$TXT_previous$right_bracket ~; } &show_number_menu unless ($number_of_messages <($no_displayed+1)); unless ($new_start_number > ($number_of_messages -1 )){ print qq~ $left_bracket$TXT_next$right_bracket ~; } if ($lock_gb ne "yes"){ &add2 if $add_page_appears ==2; } &search_form if $includesearch ne "no"; &user_html_footer if $use_user_html_footer eq "yes"; print qq~ ~; print qq~ |
$font Spam limit
$font $TXT_code_not_correct
$font $TXT_code_not_correct
$font $TXT_code_not_correct
$font $TXT_multiple_not_allowed
~; &user_image if $user_image eq "yes"; &title if $use_title eq "on"; if ($use_user_html eq "yes"){ &user_html if $disable_user_html_add ne "yes"; } &menu; if ($table_width =~ /\%/){ $table_width_per = $table_width; $table_width_per =~ s/\%//gi; $table_width_per = $table_width_per/3; $table_width_per = ($table_width_per . "%"); $col1 = $table_width_per; } else{ $col1 = ($table_width/3); } &add2; if ($use_user_html_footer eq "yes"){ &user_html_footer if $disable_user_html_footer_add ne "yes"; } print qq~ |
$TOT{$one} | ~;
}
print "
$one | ~; } print qq~
Message | |
$fields[5] |
Delete ALL Messages - Delete All Messages WAITING APPROVAL - Delete All PRIVATE Messages