This commit is contained in:
2024-10-14 00:08:40 +02:00
parent dbfba56f66
commit 1462d52e13
4572 changed files with 2658864 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/perl
#create_hash.pl > hash.txt
$start ="../bilder/";
opendir DH, "$start";
foreach $file (readdir DH) {
print '#' if ($file =~ /Neldel/);
print '$dirs{"' . $file . '"} = "' . $start . $file . '";' . "\n" unless ($file=~/\./);
}

View File

@@ -0,0 +1 @@
perl create_hash.pl > created_hash.txt

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
#!/bin/perl
# pics.pl
use strict;
use Archive::Zip;
use CGI qw(:standard);
use myHTML;
ins_dirs;
#print header();
my $act = param('act');
my $temp = my_tmp_path();
my $data = my_dat_path();
my $archiv = "$temp$act.zip";
my $directory = $dirs{"$act"};
my $files = $directory . '/*.jpg';
p "<html>";
p "<head>";
p "<title>Download $act.zip</title>";
#p "<script language='JavaScript' type='text/javascript'>";
p "</head>";
p "<body>";
p2 "Das Archiv kann jetzt heruntergeladen werden.<br><br>",
"Falls ihr eine Fehlermeldung bekommt, was besonders bei einem grossen<br>",
"Archiv passieren kann, versucht es einfach noch einmal.<br><br>";
unless (-e $archiv) {
# write_log("download","new $act");
#`cd \"$directory/\" ; zip -z -r -D \"../$archiv\" * -x content < ../$data/zip_comment`;
chdir("../bilder");
my @filesjpg=glob("\"$act/*.jpg\"");
my @filesjpeg=glob("\"$act/*.jpeg\"");
my @filesbmp=glob("\"$act/*.bmp\"");
my @filesgif=glob("\"$act/*.gif\"");
my @allfiles=(@filesjpg,@filesjpeg,@filesbmp,@filesgif);
my $zip = Archive::Zip->new();
foreach (@allfiles) {
$zip->addFile($_);
}
$zip->writeToFileNamed($archiv);
chdir("../scripts");
}
else {
# write_log("download","existing $act");
}
p2 "Download <a href='$archiv'>$act.zip<br></a>";
p "</body>";
p "</html>";

View File

@@ -0,0 +1,22 @@
#!/bin/perl
$file = "../data/count";
open FILE, "<$file";
$count = <FILE>;
close FILE;
chomp $count;
$sum = 0;
$file = "../data/voting";
open VOTING, "<$file";
while (<VOTING>) {
($votecount) = $_ =~ /,([0-9]*),/;
$sum = $sum + $votecount;
}
($ss,$mm,$hh,$dd,$mon,$yy,$we,$doy,$st)=localtime;
$date = sprintf "%02d.%02d.%d %02d:%02d",$dd,$mon+1,$yy+1900,$hh,$mm;
open OUT, ">>../data/count_vote_hist";
print OUT "$date,$count,$sum\n";
close OUT;

View File

@@ -0,0 +1,23 @@
#!/bin/perl
# google.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
my $q = param('q');
p2 "<html>",
"<head>",
"<title>Google</title>",
"</head>",
"<body onLoad=\"javascript:window.open('http://www.google.de/search?q=$q','_top','');\">";
# write_log("google","$q");
p2 "</body>",
"</html>";

View File

@@ -0,0 +1,51 @@
#!/bin/perl
# pics.pl
use CGI qw(:standard);
use myHTML;
use strict;
#print header();
start_html("<title>Hilfeseite Bildergallerie.de</title>");
my $folder = my_button_folder;
my $back = my_button_back;
my $next = my_button_next;
my $first = my_button_first;
my $last = my_button_last;
my $next_off = my_button_next_off;
my $home = my_button_home;
my $help = my_button_help;
my $noin = my_button_no_info;
my $info = my_button_info;
my $goog = my_button_google;
my $save = my_button_save;
my $vote = my_button_voting;
my $empf = my_button_empfehlung;
my $slide = my_button_slide;
# write_log ("hilfe","zeigen");
p2 "<table border='0'>",
"<tr><td></td><td valign='middle'>In der Titelleiste einen Buchstaben wählen</td></tr>",
"<tr><td align='center' valign='middle'><img width='25' src='$folder'></td><td>Bilder anzeigen</td></tr>",
"<tr><td valign='middle'><img width='55' src='$back'></td><td>Bild zurück blättern</td></tr>",
"<tr><td valign='middle'><img width='55' src='$next'></td><td>Bild weiter blättern</td></tr>",
"<tr><td valign='middle'><img width='55' src='$first'></td><td>Zum ersten Bild blättern</td></tr>",
"<tr><td valign='middle'><img width='55' src='$last'></td><td>Zum letzten Bild blättern</td></tr>",
"<tr><td valign='middle'><img width='55' src='$next_off'></td><td>links vom Bild: Anfang erreicht</td></tr>",
"<tr><td valign='middle'><img width='55' src='$next_off'></td><td>rechts vom Bild: Ende erreicht</td></tr>",
"<tr><td valign='middle'><img width='55' src='$home'></td><td>Startseite anzeigen</td></tr>",
"<tr><td valign='middle'><img width='55' src='$help'></td><td>Hilfeseite anzeigen</td></tr>",
"<tr><td valign='middle'><img width='55' src='$empf'></td><td>Diese Seite weiterempfehlen</td></tr>",
"<tr><td valign='middle'><img width='55' src='$noin'></td><td>Infos zum Model/Schauspieler einschicken</td></tr>",
"<tr><td valign='middle'><img width='55' src='$info'></td><td>Infos zum Model/Schauspieler...</td></tr>",
"<tr><td valign='middle'><img width='55' src='$goog'></td><td>In Google nach Model/Schauspieler suchen</td></tr>",
"<tr><td valign='middle'><img width='55' src='$save'></td><td>Archiv von Model/Schauspieler erstellen lassen und downloaden</td></tr>",
"<tr><td valign='middle'><img width='55' src='$vote'></td><td>Ergebnisse des Votings einsehen</td></tr>",
"<tr><td valign='middle'><img width='55' src='$slide'></td><td>Slideshow starten</td></tr>",
"</table>",
"<br>Zum voten klicke einfach auf eine Zahl. Je höher, desto besser.",
end_html;

View File

@@ -0,0 +1,21 @@
#!/bin/perl
# ichsuche.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
p2 "<html>",
" <head>",
" <meta http-equiv='refresh' content='5; URL=pics_e.pl'>",
" </head",
" <body>",
" <center>",
" Diese Seite hat noch keinen Inhalt.<br>",
" Sie werden in 5 Sekunden weitergeleitet.",
" </body>",
"</html>";
end_html;

View File

@@ -0,0 +1,37 @@
#!/bin/perl
# pics.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
my $act = param('act');
my $info = param('info');
p "<html>";
p "<head>";
p "</head>";
p "<body>";
if ($info eq "n") {
# write_log("info","$act leer");
p2 "Leider stehen keine Infos über <b>$act</b> zur Verfügung!<br><br>",
"Ihr könnt helfen diese Webseite weiter auszubauen. Habt ihr Infos zu $act?<br>",
"Dann schickt diese einfach an den <a href='mailto:webmaster\@bildergallerie.de'>webmaster</a><br>";
}
else {
# write_log("info","$act zeige");
p "<b>$act</b><br><br>";
open HTML, "<../infos/$act.html";
my @BODY=<HTML>;
close HTML;
print @BODY;
}
p "</body>";
p "</html>";
end_html;

View File

@@ -0,0 +1,3 @@
echo "" | mailx -s "`cat /kunden/homepages/35/d17630910/htdocs/bildergallerie/data/count` Visitors @ `date "+%d.%m.%Y %R"`" andre.wisniewski@gmx.de
echo 0

View File

@@ -0,0 +1,3 @@
mailx -s "Votings @ `date "+%d.%m.%Y %R"`" andre.wisniewski@gmx.de < /kunden/homepages/35/d17630910/htdocs/bildergallerie/data/voting
echo 0

View File

@@ -0,0 +1,3 @@
/kunden/homepages/35/d17630910/htdocs/bildergallerie/scripts/sh_voting_sum.sh | mailx -s "Anzahl Votings @ `date "+%d.%m.%Y %R"`" andre.wisniewski@gmx.de
echo 0

View File

@@ -0,0 +1,500 @@
#!/bin/perl
package myHTML;
use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT);
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(&p &p2 &ins_dirs &random_pic &my_button_home &my_button_help &my_checked &my_button_folder &my_button_back
&my_button_back_off &my_button_first &my_button_next &my_button_next_off &my_random_pic &my_button_last &my_always_create
&my_pic_of_day &my_create_content &my_pic_breite &my_tmp_path &my_pic_path &my_bilder_path &my_dat_path &my_log_path
&my_inf_path &my_wer_path %dirs &add_value &get_top_ten &votings &my_button_info &my_button_no_info &my_button_google &my_button_save
&my_button_mail &my_button_voting &my_button_slide &write_log &my_button_empfehlung &my_button_werist &my_button_ichsuche);
our ($home_pic, $help_pic, $checked, $folder, $button_back, $button_back_off, $button_save, $button_mail, $button_empfehlung);
our ($button_first, $button_next, $button_next_off, $button_last, $button_no_info, $button_info, $button_google, $button_voting);
our ($always_create_content, $picture_of_day, $pic_breite, %dirs, $button_werist, $button_ichsuche, $button_slide);
our $pic_path = "../pics/";
our $tmp_path = "../temp/";
our $dat_path = "../data/";
our $log_path = "../logs/";
our $inf_path = "../infos/";
our $bil_path = "../bilder/";
our $wer_path = "../werist/";
$home_pic = $pic_path . "home.gif";
$help_pic = $pic_path . "help.gif";
$checked = $pic_path . "check.gif";
$folder = $pic_path . "open_icon.gif";
$button_back = $pic_path . "back.gif";#arrow.gif";
$button_back_off = $pic_path . "inactive.gif";
$button_first = $pic_path . "first.gif";#arrow.gif";
$button_next = $pic_path . "next.gif";#goarrow.gif";
$button_next_off = $pic_path . "inactive.gif";
$button_last = $pic_path . "last.gif";#arrow.gif";
$button_no_info = $pic_path . "no_info.gif";
$button_info = $pic_path . "info.gif";
$button_google = $pic_path . "google.gif";
$button_save = $pic_path . "save.gif";
$button_mail = $pic_path . "email.gif";
$button_voting = $pic_path . "voting.gif";
$button_empfehlung = $pic_path . "empfehlung.gif";
$button_werist = $pic_path . "werist.gif";
$button_ichsuche = $pic_path . "ichsuche.gif";
$button_slide = $pic_path . "slide.gif";
$always_create_content = 0;
# 1: bei jedem lesen eines Bilderverzeichnisses content neu erstellen
# Bei anderen Werten erfolgt keine neuerstellung wenn content datei vorhanden ist
# Das kann zu Problemen führen wenn sich dateinamen ändern sollten, da ansonsten nur
# wenn keine content-datei vorhanden ist eine neuerstellung erfolgt.
$picture_of_day = 1;
# 1: einmal pro tag ein neues bild
# 0: bei jedem seitenzugriff ein neues bild
$pic_breite="400";
# die funktionen bis einschließlich my_button_slide
# geben nur die werte div. variablen zurück über die
# die gesamte webseite gesteuert wird.
# bspw. bildbreite, div. pfade,
# picture_of_day (wann soll neues bild auf begrüssungsseite erstellt werden?)
# always_create_content (wann soll neue content-datei erstellt werden?)
sub my_tmp_path {
return $tmp_path;
}
sub my_pic_path {
return $pic_path;
}
sub my_bilder_path {
return $bil_path;
}
sub my_dat_path {
return $dat_path;
}
sub my_log_path {
return $log_path;
}
sub my_inf_path {
return $inf_path;
}
sub my_wer_path {
return $wer_path;
}
sub my_pic_breite {
return $pic_breite;
}
sub my_pic_of_day {
return $picture_of_day;
}
sub my_always_create {
return $always_create_content;
}
sub my_button_last {
return $button_last;
}
sub my_button_next_off {
return $button_next_off;
}
sub my_button_next {
return $button_next;
}
sub my_button_first {
return $button_first;
}
sub my_button_back_off {
return $button_back_off;
}
sub my_button_back {
return $button_back;
}
sub my_button_folder {
return $folder;
}
sub my_checked {
return $checked;
}
sub my_button_help {
return $help_pic;
}
sub my_button_home {
return $home_pic;
}
sub my_button_no_info {
return $button_no_info;
}
sub my_button_info {
return $button_info;
}
sub my_button_google {
return $button_google;
}
sub my_button_save {
return $button_save;
}
sub my_button_mail {
return $button_mail;
}
sub my_button_voting {
return $button_voting;
}
sub my_button_empfehlung {
return $button_empfehlung;
}
sub my_button_werist {
return $button_werist;
}
sub my_button_ichsuche {
return $button_ichsuche;
}
sub my_button_slide {
return $button_slide;
}
######################################################################
sub add_value {
my ($act,$value,$pic)=@_;
my $dat=my_dat_path;
open VOTE, "<$dat/voting";
my @voting=<VOTE>;
close VOTE;
write_log("voting","$act $value $pic");
my $new=1;
open VOTE, ">$dat/voting";
foreach my $line (@voting) {
chomp $line;
my ($name,$count,$sum)=split/,/,$line;
if ($name eq $act) {
$count++;
$sum = $sum + $value;
$new=0;
}
print VOTE "$name,$count,$sum\n";
}
if ($new==1) {
print VOTE "$act,1,$value\n";
}
close VOTE;
}
sub get_top_ten {
#write_log("voting","zeige");
my $data=my_dat_path;
open VOTE, "<$data/voting";
my @voting=<VOTE>;
close VOTE;
my %votes;
foreach (@voting) {
chomp;
my ($name,$count,$value)=split/,/,$_;
$votes{$name}=$value / $count;
}
my %orig_votes=%votes;
my @topten;
for (my $i=0;$i<10;$i++) {
my $j=1;
foreach my $name (keys %votes) {
$topten[$i]=$name if ($j==1);
$j=0;
if ($votes{$name} > $votes{$topten[$i]}) {
$topten[$i]=$name;
}
}
delete $votes{$topten[$i]};
}
my %res;
for (my $i=0;$i<10;$i++) {
$res{$i+1}=[$orig_votes{$topten[$i]},$topten[$i]];
}
return %res;
}
sub votings {
my $data=my_dat_path;
open VOTE, "<$data/voting";
my @voting=<VOTE>;
close VOTE;
my $votes;
foreach (@voting) {
chomp;
my ($name,$count,$value)=split/,/,$_;
$votes = $votes + $count;
}
return $votes;
}
sub p2 {
# kurzform für print.
# als parameter können mehrere zeichenfolgen angegeben werdenn
# \n wird angehängt => strukturierte html-datei wird erstellt.
my (@txt) = @_;
foreach (@txt) { p ("$_"); }
print "";
}
sub p {
# kurzform für print.
# als parameter kann nur eine zeichenfolge angegeben werden
# \n wird angehängt => strukturierte html-datei wird erstellt.
my ($txt) = @_;
print "$txt\n";
}
sub td {
# gibt übergebenen parameter als table-definition aus!
my (@txt) = @_;
foreach (@txt) { p ("<td>$_</td>"); }
}
sub tdc {
# gibt übergebenen parameter als zentrierte table-definition aus!
my (@txt) = @_;
foreach (@txt) { p ("<td align='center'>$_</td>"); }
}
sub start_html {
# gibt start einer html-datei aus, übergebene Parameter
# werden in head eingefügt
my (@head) = @_;
p2 ("<html>","<head>",@head,"</head>","<body>");
}
sub end_html {
p2 ("</body>","</html>");
}
sub db_ins_del {
# fügt einen eintrag zur datenbank hinzu .
# insert wird als parameter übergeben!
my ($cs,$usr,$pwd,$sta) = @_;
my $dbh = DBI->connect("$cs","$usr","$pwd", {RaiseError => 1});
$dbh->do("$sta");
$dbh->disconnect;
}
sub selec {
# führt datenbank-select auss
# benutzen um einen einzelnen wert zu selektieren
my ($dbc,$dbu,$dbp,$sel) = @_;
my $ret;
my $dbh = DBI->connect("$dbc","$dbu","$dbp", {RaiseError => 1});
my $sth = $dbh->prepare("$sel");
$sth->execute;
#$ret = $sth;
#$dbh->disconnect;
return $sth;
}
sub selec2 {
# führt db-select aus
# benutzen um mehrere werte zu selektieren
my ($dbc,$dbu,$dbp,$sel) = @_;
my $dbh = DBI->connect("$dbc","$dbu","$dbp", {RaiseError => 1});
my $sth = $dbh->prepare("$sel");
my @erg;
$sth->execute;
while (my $ref = $sth->fetchrow_arrayref()) {
#print @{$ref};
@erg=(@erg,@{$ref});
}
return @erg;
}
sub my_random_pic {
# gibt den hash-key (namen) und den datei-namen zurück
# der name wird aus pic-of-day-datei gelesen wenn in flag-datei
# richtiges datum steht und nicht bei jedem zugriff ein neues bild
# zufällig ausgewählt werden soll. ($picture_of_day)
my ($t1,$t2,$t3,$dd,$mm,$yy,$t4)=localtime;
my ($f_dd,$f_mm,$f_yy);
my ($pic_of_day,@pictures,$girl);
my $picture_of_day = my_pic_of_day;
my $dir_of_day;
my $data=my_dat_path;
open FLAG, "<${data}flag";
while (<FLAG>) {
($f_dd,$f_mm,$f_yy)=split/-/;
}
close FLAG;
if ($f_dd == $dd and $f_mm == $mm and $f_yy == $yy and $picture_of_day==1) {
open IMG, "<${data}pic_of_day";
while (<IMG>) {
$pic_of_day = $_;
}
close IMG;
}
else {
my @direcs;
foreach my $directory (values %dirs) {
@direcs = (@direcs,$directory);
}
do {
my $random1 = int(rand(@direcs));
$dir_of_day = $direcs[$random1];
} while (! (-e "$dir_of_day/content"));
# Liest content Datei aus ausgewähltem Verzeichnis
# in @pictures ein
open CONTENT, "<$dir_of_day/content";
@pictures = <CONTENT>;
close CONTENT;
# Wähle ein Bild aus @pictures aus
my $random2 = int(rand(@pictures));
$pic_of_day = $pictures[$random2];
chomp $pic_of_day;
$pic_of_day = "$dir_of_day" . "/" . (split /,/,$pic_of_day)[1];
open IMG, ">${data}pic_of_day";
print IMG $pic_of_day;
close IMG;
open FLAG, ">${data}flag";
print FLAG "$dd-$mm-$yy";
close FLAG;
}
my $value = $pic_of_day;
$value =~ s/\/[a-z0-9-'´_()]*\.[a-z]{3}$//i;
foreach my $key (keys %dirs) {
if ($dirs{$key} eq $value) {
$girl = $key;
}
}
return ($girl,$pic_of_day);
#return ($dir_of_day,$pic_of_day);
}
sub ins_dirs {
$dirs{""} = "../bilder/";
open HASH, "<created_hash.txt";
my @HASH = <HASH>;
close HASH;
foreach my $line (@HASH) {
eval $line;
}
delete $dirs{''};
}
sub my_create_content {
# erstellt content-datei, sofern nicht vorhanden oder wenn vorhanden
# UND my_always_create == 1
my ($directory) = @_;
my $always_ne = my_always_create;
my $create_cont=0;
if (-e "$directory/content") { # content existiert im verzeichnis $dir
if ($always_ne) { # aber immer neu erstellen!
$create_cont=1; # content wird überschrieben
}
else { # nicht immer neu erstellen und da content vorhanden
$create_cont=0; # nicht neu erstellen
}
}
else { # content existiert nicht > neu erstellen
$create_cont=1;
}
if ($create_cont) { # erfolgt evtl. bei jedem aufruf dieses skripts !!!
# Verzeichnis lesen und content erstellen!
# für leere content-datei sorgen!
open CONTENT, ">$directory/content";
close CONTENT;
if (opendir DH, $directory) {
my $count = -1;
foreach my $file (readdir DH) {
if ( $file =~ /\.jpg$/ or
$file =~ /\.bmp$/ or
$file =~ /\.jpeg$/ or
$file =~ /\.gif$/) {
# nimmt nur jpg, bmp, gif und jpeg dateien in
# index-datei content auf!
#unless ($file=~/['()]/) {
# überspringt dateienn die ein ', (, oder )
# enthalten
$count++;
open CONTENT, ">>$directory/content" or die "Cannot open file:\n$directory/content:\n$!\n\n";
print CONTENT "$count,$file\n";
close CONTENT;
#}
}
}
closedir DH;
}
}
}
sub write_log {
my ($action,$txt)=@_;
my ($t1,$mi,$hh,$dd,$mo,$yy,$t2)=localtime;
my $path=my_log_path;
$mo++;
$yy+=1900;
$action =~ tr/[a-z]/[A-Z]/;
my $logfile = "$path/$action"."_actions.log";
open LOGF, ">>$logfile";
printf LOGF "%02d.%02d.%04d %02d:%02d %10s %s\n",$dd,$mo,$yy,$hh,$mi,$action,$txt;
close LOGF;
}
END {}
1;

View File

@@ -0,0 +1,364 @@
#!/bin/perl
# overview.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
my ($t1,$mi,$hh,$dd,$mo,$yy,$t2)=localtime;
$mo++;
$mo = '0' . $mo if ($mo <10);
$dd = '0' . $dd if ($dd <10);
$yy+=1900;
my $show = param('show');
p2 "<html>",
" <head>",
" <title>Übersicht</title>",
" </head>",
" <body>",
" <table border='1'>",
" <tr>",
" <td>count</td>",
" <td>flag</td>",
" <td>pic of day</td>",
" </tr>",
" <tr>",
" <td>";
print_count();
p2 " </td>",
" <td>";
print_flag();
p2 " </td>",
" <td>";
print_pic_of_day();
p2 " </td>",
" </tr>",
" </table>",
" <br>";
p2 " <table border='1'>",
" <tr>";
my @act = ("votings","count_vote_hist","zip_comment","bild_log","download_log","google_log","hilfe_log","info_log","tellafriend_log","voting_log");
foreach my $act (@act) {
print "<td>";
if ($show ne "$act") {
print "<a href='overview.pl?show=$act'>$act</a> ";
}
else {
print "$act ";
}
print " (" . log_count_today("$act") . ")" if ($act ne "votings" and $act ne "zip_comment" and $act ne "count_vote_hist");
print "</td>\n";
}
p2 " </tr>",
" </table>",
" <br>";
print_voting() if ($show eq "votings");
print_count_vote_hist() if ($show eq "count_vote_hist");
print_zip_comment() if ($show eq "zip_comment");
print_bild_log() if ($show eq "bild_log");
print_download_log() if ($show eq "download_log");
print_google_log() if ($show eq "google_log");
print_hilfe_log() if ($show eq "hilfe_log");
print_info_log() if ($show eq "info_log");
print_tellafriend_log() if ($show eq "tellafriend_log");
print_voting_log() if ($show eq "voting_log");
p2 " </body>",
"</html>";
sub print_count {
my $dp = my_dat_path();
my $file = $dp . "count";
open FILE, "<$file";
my $content=<FILE>;
close FILE;
p2 " $content";
}
sub print_flag {
my $dp = my_dat_path();
my $file = $dp . "flag";
open FILE, "<$file";
my $content =<FILE>;
close FILE;
my ($d, $m, $y) = split /-/,$content;
$m++;
$y+=1900;
p2 "$d.$m.$y";
}
sub print_pic_of_day {
my $dp = my_dat_path();
my $file = $dp . "pic_of_day";
open FILE, "<$file";
my $content =<FILE>;
close FILE;
my ($link) = $content =~ /..\/(.*)/;
p2 "<a href='http://www.bildergallerie.de/$link' target='bild'>$content</a>";
}
sub print_voting {
my $dp1 = my_dat_path();
my $file1 = $dp1 . "voting";
open FILE, "<$file1";
my @content =<FILE>;
close FILE;
##### Welche Girls wurden heute gevoted?
my $dp2 = my_log_path();
my $file2 = $dp2 . "VOTING_actions.log";
open FILE, "<$file2";
my @vot_log =<FILE>;
close FILE;
my @voted;
foreach (@vot_log) {
@voted = (@voted, $_) if ($_ =~ /$dd\.$mo\.$yy/);
}
# 23.04.2006 17:19 VOTING Gabrielle Reece 2 gabrielle-reece-00001.jpg
################
my @girls;
p2 "<table border='1'>",
"<tr><td>pos</td><td>name</td><td>avg</td><td>clicks</td><td>summe</td></tr>";
my $all_count = 0;
my $all_votings = 0;
foreach (@content) {
chomp;
my ($n,$c,$v) = split /,/,$_;
my $r = $v/$c;
$all_count = $all_count + $c;
$all_votings = $all_votings + $v;
my $todayvoted = 0;
foreach (@voted) {
$todayvoted = 1 if ($_ =~ /$n/);
}
push @girls, $r . ',' . $n . ',' . $c . ',' . $v . ',' . $todayvoted;
}
my $all_ranks = $all_votings / $all_count;
printf "<tr><td></td><td>&sum;</td><td>";
printf "%3.2f", $all_ranks;
printf "</td><td>$all_count</td><td>$all_votings</td></tr>\n";
my @sorted = sort {$b <=> $a} @girls;
my $pos=1;
my $printed_avg_line=0;
foreach (@sorted) {
my ($r,$n,$c,$v,$t) = split /,/,$_;
if ($r < $all_ranks and $printed_avg_line == 0) {
print "<tr><td>-</td><td>&sum;</td>";
printf "<td>%3.2f</td>",$all_ranks;
print "<td>$all_count</td><td>$all_votings</td></tr>";
$printed_avg_line=1;
}
printf "<tr><td>";
printf "$pos";
$pos++;
printf "</td><td>";
printf "<b>" if ($t == 1);
printf "%s", $n;
printf "</b>" if ($t == 1);
printf "</td><td>";
printf "<b>" if ($t == 1);
printf "%3.2f", $r;
printf "</b>" if ($t == 1);
printf "</td><td>";
printf "<b>" if ($t == 1);
printf "%d", $c;
printf "</b>" if ($t == 1);
printf "</td><td>";
printf "<b>" if ($t == 1);
printf "%d", $v;
printf "</b>" if ($t == 1);
printf "</td></tr>\n";
}
p2 "</table>";
}
sub print_count_vote_hist {
my $dp = my_dat_path();
my $file = $dp . "count_vote_hist";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
p2 "<table border='1'><tr><td>Datum</td><td>Besucher</td><td>Votings</td><td>d Besucher</td><td>d Votings</td></tr>";
my ($oldcount, $oldvote);
my @table;
foreach (@content) {
chomp;
my ($date, $count, $vote) = split /,/,$_;
my $diffcount = $count - $oldcount;
my $diffvote = $vote - $oldvote;
@table = (@table, "<tr><td>$date</td><td>$count</td><td>$vote</td><td>$diffcount</td><td>$diffvote</td></tr>");
$oldcount = $count;
$oldvote = $vote;
}
foreach (reverse @table) {
p "$_";
}
p2 "</table>";
}
sub print_zip_comment {
my $dp = my_dat_path();
my $file = $dp . "zip_comment";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
foreach (@content) {
print "$_<br>";
}
}
sub print_bild_log {
my $dp = my_log_path();
my $file = $dp . "BILD_actions.log";
my @content;
@content = `tail -n 30 $file`;
foreach (reverse @content) {
chomp;
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>\n";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
}
}
sub print_download_log {
my $dp = my_log_path();
my $file = $dp . "DOWNLOAD_actions.log";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
my $i=0;
foreach (reverse @content) {
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
$i++;
last if ($i == 30);
}
}
sub print_google_log {
my $dp = my_log_path();
my $file = $dp . "GOOGLE_actions.log";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
my $i=0;
foreach (reverse @content) {
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
$i++;
last if ($i == 30);
}
}
sub print_hilfe_log {
my $dp = my_log_path();
my $file = $dp . "HILFE_actions.log";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
my $i=0;
foreach (reverse @content) {
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
$i++;
last if ($i == 30);
}
}
sub print_info_log {
my $dp = my_log_path();
my $file = $dp . "INFO_actions.log";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
my $i=0;
foreach (reverse @content) {
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
$i++;
last if ($i == 30);
}
}
sub print_tellafriend_log {
my $dp = my_log_path();
my $file = $dp . "TELLAFRIEND_actions.log";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
my $i=0;
foreach (reverse @content) {
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
$i++;
last if ($i == 30);
}
}
sub print_voting_log {
my $dp = my_log_path();
my $file = $dp . "VOTING_actions.log";
open FILE, "<$file";
my @content=<FILE>;
close FILE;
my $i=0;
foreach (reverse @content) {
p2 "<b>" if ($_ =~ /$dd\.$mo\.$yy/);
print "$_<br>";
p2 "</b>" if ($_ =~ /$dd\.$mo\.$yy/);
$i++;
last if ($i == 30);
}
}
sub log_count_today {
my ($f) = @_;
my $dp = my_log_path();
$f=~ s/_log//;
$f=~ tr/[a-z]/[A-Z]/;
$f=$f."_actions.log";
my $file = $dp . $f;
open FILE, "<$file";
my @content = <FILE>;
close FILE;
my $count=0;
foreach (@content) {
$count++ if $_ =~ /$dd\.$mo\.$yy/;
}
return $count;
}

View File

@@ -0,0 +1,3 @@
cd /kunden/homepages/35/d17630910/htdocs/bildergalleriecom/log
zip -z -r -D "`date "+%Y.%m.%d"`.zip" * -i actions.log < ../data/zip_comment
rm actions.log

View File

@@ -0,0 +1,274 @@
#!/bin/perl
# pics.pl
use strict;
use CGI qw(:standard);
use myHTML;
my $b_folder = my_button_folder;
my $b_back = my_button_back;
my $b_next = my_button_next;
my $b_home = my_button_home;
my $b_help = my_button_help;
my $b_checked = my_checked;
my $b_first = my_button_first;
my $b_last = my_button_last;
my $b_back_off = my_button_back_off;
my $b_next_off = my_button_next_off;
my $b_info = my_button_info;
my $b_noinfo = my_button_no_info;
my $b_google = my_button_google;
my $b_save = my_button_save;
my $b_slide = my_button_slide;
my $pic_breite = my_pic_breite;
my $infop = my_inf_path;
my $ind = param('ind');
my $act = param('act');
my $let = param('let');
my $target = param('target');
my $url="pics.pl?ind=$ind&act=$act&let=$let";
my $border=0;
#print header();
if ($let ne "" and $ind eq "") {
# $let
# Leere Seite für Letter
}
p2 "<html>",
"<head>";
p2 "<title>Bildergallerie</title>",
"<style type='text/css'>",
"select { font-size:10pt }",
"td { font-size:10pt }",
"input { font:10pt }",
"a { font-size:10pt }",
"zz { font-size:14pt }",
"</style>",
"</head>",
"<body marginwidth='5' marginheight='0' topmargin='0' leftmargin='5'>";
ins_dirs;
p2 "<table border='$border' cellspacing='0' cellpadding='0' width='100%'>",
"<tr>",
"<td width='200' valign='top'>";
# Liste der Girls anzeigen
p "<table border='$border'>";
foreach my $girl (sort keys %dirs) { # Durchlaufe alle angegebenen Verzeichnisse
my $directory = "$dirs{$girl}";
if (opendir DH, $directory) { # Wenn nicht vorhanden, überspringen
unless (-e "$directory/content") { # Wird nur aktiv wenn zw. letztem aufruf von top.pl und
# anklicken eines speziellen namens die content-datei zu diesem namen
# gelöscht wurde. Dadurch bekommen alle Namensverzeichnisse die keine
# content datei haben wieder eine.
my_create_content ("$directory");
}
if ($girl =~ /^$let/ or ($let eq "all")) { # wenn vorhanden und Anfangsbuchstabe der
# beschreibung mit parameter let übereinstimmt, dann Symbol "Ordner" anzeigen!
# Anfangsbuchstabe ist gewählt!!
p2 "<tr>",
"<td>",
"<a target='$target' href='pics.pl?act=$girl&ind=0&let=$let'><img alt='Open' border='0' width='16' src='$b_folder'>$girl</a>",
"</td>",
"<td>";
if ($act eq $girl) { p "<img border='0' src='$b_checked'>"; }
else { ; }
p2 "</td>",
"</tr>";
}
}
closedir DH;
}
p "</table>";
p2 "</td>",
"<td valign='top' align='center'>";
my $breite = 120 + $pic_breite;
p2 "<table border='$border' width='$breite' cellspacing='0' cellpadding='0'>",
"<tr align='center'>",
"<td>",
#"1a",
"</td>",
"<td>";
if ($act ne "") { # Wenn $act angegeben, dann Bilder anzeigen
my $found = 0;
# in $act steht Beschreibung! Name!
# in $dirs{$act} steht verzeichnis!
my $directory = $dirs{"$act"};
if (my_always_create() == 1) {
# Bei jedem Klick auf vor, zurück, anfang, ende wird
# content neu erstellt! Ebenso wenn name ausgewählt wurde
my_create_content("$directory");
}
open CONTENT, "<$directory/content";
my @tmp=<CONTENT>;
my $max=@tmp - 1;
close CONTENT;
my $sind=$ind+1;
my $smax=$max+1;
p2 "<b><font size='+1'>$act Bild $sind / $smax</font></b><br>",
"</td>",
"<td>",
#"1c",
"</td>",
"</tr>",
"<tr>",
"<td>",
#"2a",
"</td>",
"<td>",
#"2b",
"</td>",
"<td>",
#"2c",
"</td>",
"</tr>",
"<tr>",
"<td>",
#"3a",
"</td>",
"<td align='center'>";
if (-e "$infop/$act.html") {
# href='pics.pl?act=$act&let=$let&target=$target&ind=$ind'
p2 "<a href='info.pl?act=$act&info=j' onclick=\"window.open(this.href,'_target','width=700,height=400,left=0,top=0'); return false\">",
"<img border='0' alt='Infos über $act' src='$b_info'>",
"</a>";
}
else {
p2 "<a href='info.pl?act=$act&info=n' onclick=\"window.open(this.href,'_target','width=700,height=300,left=0,top=0'); return false\"><img border='0' alt='So kannst du Infos +ber $act einschicken' src='$b_noinfo'></a>";
}
p2 "<a href='google.pl?q=$act' onclick=\"window.open(this.href,'_google',''); return false\"><img border='0' alt='Durchsuche Google nach $act' src='$b_google'></a>",
"<a href='download.pl?act=$act' onclick=\"window.open(this.href,'new','width=500,height=200,left=0,top=0'); return false\"><img border='0' alt='Speichere $act Archiv' src='$b_save'></a>",
"</td>",
"<td>",
#"3c",
"</td>",
"<td>",
"</tr>",
"<tr>",
"<td>",
#"4a",
"</td>",
"<td>",
"<table border='$border' width='100%'>",
"<tr>",
"<td bgcolor='#ffff00' width='60' align='center'>",
"Vote",
"</td>";
open CONTENT, "<$directory/content";
my @cont_t=<CONTENT>;
close CONTENT;
$found=0;
my $voted_pic;
foreach (@cont_t) {
chomp;
my ($nr,$file) = split /,/,$_;
if ($ind == $nr) { # wenn gefunden anzeigen
$voted_pic=$file;
$found = 1;
}
last if($found == 1);
}
for(my $i=1;$i<=10;$i++) {
my $color = 0xff - $i * 10;
my $hex = sprintf("%X", $color);
$color="#00"."$hex"."00";
chomp $voted_pic;
p2 "<td bgcolor='$color' align='center' width='20'><a href='voting.pl?act=$act&pic=$voted_pic&value=$i' onclick=\"window.open(this.href,'new','width=400,height=400,left=0,top=0'); return false\">$i</a></td>";
}
p2 "<td bgcolor='#ffff00' width='60' align='center'><a href='voting.pl?act=$act&value=0' onclick=\"window.open(this.href,'new','width=400,height=400,left=0,top=0'); return false\">Ergebnis</a>",
"</td>",
"</tr>",
"</table>",
"</td>",
"<td>",
#"4c",
"</td>",
"</tr>",
"<tr valign='top'>",
"<td width='60' align='center'>";
if ($ind == 0) { # wenn erstes bild in der anzeige, dann geht nicht zurück
p "<p><img border='0' width='50' src='$b_back_off'></p>";
p "<p><img border='0' width='50' src='$b_back_off'></p>";
}
if ($ind > 0) { # wenn nicht erstes bild, dann zurück anzeigen
my $lower = $ind - 1;
p2 "<p><a target='$target' href='pics.pl?act=$act&ind=$lower&let=$let'><img alt='Vorheriges' border='0' width='50' src='$b_back'></a></p>",
"<p><a target='$target' href='pics.pl?act=$act&ind=0&let=$let'><img alt='Erstes' border='0' width='50' src='$b_first'></a></p>";
}###########
p2 "</td>",
"<td>";
open CONTENT, "<$directory/content";
my @cont=<CONTENT>;
close CONTENT;
$found=0;
foreach (@cont) {
chomp;
my ($nr,$file) = split /,/,$_;
if ($ind == $nr) { # wenn gefunden anzeigen
# write_log("bild","$directory/$file");
p2 "<p align='center'>",
"<a href='show_big_pic.pl?pic=$directory/$file' onclick=\"window.open(this.href,'bigpic','left=0,top=0,resizeable=yes,scrollbars=yes,status=no'); return false\">",
"<img alt='$act' width='$pic_breite' src='$directory/$file'>",
"</a>",
"</p>";
$found = 1;
}
last if($found == 1);
}
p2 "</td>",
"<td width='60' align='center'>";
if ($ind == $max) { # wenn letztes bild angezeigt wird, dann geht nicht weiter
p "<p><img border='0' width='50' src='$b_next_off'></p>";
p "<p><img border='0' width='50' src='$b_next_off'></p>";
}
if ($ind < $max) { # wenn nicht letztes bild, dann geht weiter
my $higher = $ind + 1;
p2 "<p><a target='$target' href='pics.pl?act=$act&ind=$higher&let=$let'><img alt='N&auml;chstes' border='0' width='50' src='$b_next'></a></p>",
"<p><a target='$target' href='pics.pl?act=$act&ind=$max&let=$let'><img alt='Letztes' border='0' width='50' src='$b_last'></a></p>";
}
#p2 "<p><a href='slide.pl?act=$act&num=0' onclick=\"window.open(this.href,'_slide','height=600,width=800'); return false\"><img alt='Slideshow' border='0' width='50' src='$b_slide'></a></p>";
p2 "<p><a href='slide.pl?act=$act&num=$ind&target=$target' target='$target'><img alt='Slideshow' border='0' width='50' src='$b_slide'></a></p>";
}
p2 "</td>",
"</tr>",
"</table>";
p2 "</td>",
"<td width='200' valign='top'>",
"<table width='100%' border='$border'>",
"<tr>",
"<td>",
# "r",
"</td>",
"</tr>",
"</table>",
"</td>",
"</tr>",
"</table>";
myHTML::end_html;

View File

@@ -0,0 +1,98 @@
#!/bin/perl
# pics.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
ins_dirs();
my ($girl,$bgfile) = my_random_pic();
my $werist = my_button_werist();
my $ichsuche = my_button_ichsuche();
my $data_dir = my_dat_path();
p "<html>";
p2 "<head>",
"<title>Home - What's new?</title>",
"<script type='text/javascript'>",
"<!--",
"function ZweiFrames(URI1,F1,URI2,F2) {",
" Frame1=eval('parent.'+F1);",
" Frame2=eval('parent.'+F2);",
" Frame1.location.href = URI1;",
" Frame2.location.href = URI2;",
"}",
"//-->",
"</script>",
"<style type='text/css'>",
"select { font-size:10pt }",
"td { font-size:9pt }",
"input { font:10pt }",
"a { font-size:12pt }",
"b { font-size:12pt }",
"</style>";
p "</head>";
p "<body>";
open NEWS, "$data_dir/newscorner";
my @news=<NEWS>;
close NEWS;
foreach (@news) {
chomp;
$_=$_ . "<br>";
p "$_\n";
}
my $let;
($let) = $girl =~ /([a-z]{1})/i;
# Index des Bildes ermitteln um über den Link direkt auf dieses Bild in der Galerie springen zu können
my $ppath = my_bilder_path();
$ppath = $ppath . "$girl" . "/content";
my $index;
my $filename;
open CONT, "<$ppath";
foreach my $controw (<CONT>) {
($index,$filename) = $controw =~ /([0-9]*),(.*)/;
last if ($bgfile =~ /$filename/);
}
close CONT;
p2 "<center>",
"<table border='0'>",
" <tr>",
" <td align='center' width='300'>",
" <a href='werist.pl'><img alt='Wer ist ... ?' border='0' src='$werist' width='160'></a>",
"<br><font color='#0000ff' size='-1'>jetzt online!</font>",
" </td>",
" <td align='center' width='0'>",
" <a target='pics' href='pics.pl?act=$girl&ind=$index&let=$let'>",
" <img alt='Bild des Tages\n$girl\nKlicke um alle zu sehen' border='0' height='250' src='$bgfile'>",
" </a>",
" </td>",
" <td align='center' width='300'>",
" <a href='ichsuche.pl'>",
" <img alt='Ich suche ...' border='0' src='$ichsuche' width='160'>",
" </a>",
" </td>",
" </tr>",
"</table>",
"</center>";
p "<center>";
p "<table border='0'><tr><td>";
p "<a target='clustrmaps' href='http://www2.clustrmaps.com/counter/maps.php?url=http://www.bildergallerie.de' id='clustrMapsLink'> <img src='http://www2.clustrmaps.com/counter/index2.php?url=http://www.bildergallerie.de' style='border:1px solid;' alt='Locations of visitors to this page' title='Locations of visitors to this page' id='clustrMapsImg' onError='this.onError=null'; this.src='http://clustrmaps.com/images/clustrmaps-back-soon.jpg'; document.getElementById('clustrMapsLink').href='http://clustrmaps.com'' /> </a>";
p "</td><td>";
p "<table cellspacing='1' cellpadding='0' border='0' bgcolor='#042C50' width='122'><tr><td align='center' style='background-color : #042C50;'><a href='http://www.meteo24.de/wetter/49X2900.html' style='text-decoration: none;' target='_blank'><font face='Verdana' size='1' color='#FFCC00' style='text-decoration: none; font-weight: bold;'>Wetter Frankfurt</font></a></td></tr><tr><td align='center'><iframe width='120' height='98' scrolling='no' frameborder='0' src='http://www.meteo24.de/hptool/v1?cid=49X2900&l=de&style=9'> </iframe></td></tr><tr><td align='center' height='15' style='background-color : #042C50;'><a href='http://www.meteo24.de/' style='text-decoration: none;' target='_blank'><font face='Verdana' size='1' color='#FFCC00'>&copy; meteo24.de</font></a></td></tr></table>";
p "</td></tr></table>";
p "</center>";
p "</body>";
p "</html>";
end_html;

View File

@@ -0,0 +1 @@
awk -F, '{sum+=$2;} END {print sum}' /kunden/homepages/35/d17630910/htdocs/bildergallerie/data/voting

View File

@@ -0,0 +1,24 @@
#!/bin/perl
# show_big_pic.pl?pic=$directory/$file
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
my $pic = param('pic');
p "<html>";
p "<head>";
p "</head>";
p "<body>";
p "<center>Zum schließen aufs Bild klicken<br>";
p "<a href='' onclick='window.close()'><img src='$pic'></a></center>";
p "</body>";
p "</html>";
end_html;

View File

@@ -0,0 +1,54 @@
# slide.pl
use strict;
use CGI qw(:standard);
use myHTML;
my $bilderp = my_bilder_path();
my $act = param('act');
my $num = param('num');
my $target = param('target');
open CONTENT, "<$bilderp$act/content";
my @content_lines=<CONTENT>;
close CONTENT;
my @bilder;
my $nnum=$num+1;
foreach (@content_lines) {
chomp;
my ($tmp,$bild) = split /,/,$_;
@bilder=(@bilder,$bild);
}
my $anz = @bilder;
if ($nnum > $anz-1) {
$nnum=0;
}
my $pic="$bilderp$act/$bilder[$num]";
#print header();
p2 "<html>",
"<head>",
"<meta http-equiv='refresh' content='5; URL=slide.pl?act=$act&num=$nnum'>",
"</head>",
"<body>",
"<center>";
my $snum=$num+1;
p2 "<b><font size='+1'>$act Bild $snum / $anz</font></b><br>",
"<br>";
my ($let) = $act =~ /(.{1})/;
p2 "<a href=\"pics.pl?act=$act&ind=$num&let=$let\" target=$target><img height='700' src='$pic'></a>",
"<br>",
"<font size='-1'>Bild anklicken um Slideshow zu beenden</font>",
"</center>";
myHTML::end_html;

View File

@@ -0,0 +1,42 @@
# slide_werist.pl
use strict;
use CGI qw(:standard);
use myHTML;
my $bilderp = my_wer_path();
my $num = param('num');
my @bilder;
my $nnum=$num+1;
opendir WERDIR, $bilderp;
@bilder=grep {/^[^.]/} readdir WERDIR;
closedir WERDIR;
my $anz = @bilder;
if ($nnum > $anz-1) {
$nnum=0;
}
my $pic="$bilderp$bilder[$num]";
#print header();
p2 "<html>",
"<head>",
"<meta http-equiv='refresh' content='5; URL=slide_werist.pl?num=$nnum'>",
"</head>",
"<body>",
"<center>";
p2 "Gesucht...<br>",
"<br>";
p "<img height='600' src='$pic' alt='$pic'>";
p "</center>";
myHTML::end_html;

View File

@@ -0,0 +1,50 @@
#!/bin/perl
# tellfriend.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
my $action = param('action');
my $mailad = param('mail');
my $from = param('from');
p "<html>";
p "<head>";
p "<title>Weiterempfehlen</title>";
p "</head>";
p "<body>";
if ($action eq "form") {
# Formular anzeigen
p2 "<form action='./tellfriend.pl?action=send' method='post'>",
" <table>",
" <tr>",
" <td>An</td>",
" <td><input type='text' name='mail'></td>",
" <td>eMail Adresse angeben!</td>",
" </tr>",
" <tr>",
" <td>Von</td>",
" <td><input type='text' name='from'></td>",
" <td>Name angeben!</td>",
" </tr>",
" </table>",
"<input type='submit' name='action' value='Senden'>",
"</form>";
}
if ($action eq "Senden") {
# write_log ("tellafriend","von $from an $mailad");
`echo "Hallo,\n\nSchau dir mal die Webseite http://www.bildergallerie.de an.\n\nGruß $from" | mailx -s "Website Empfehlung" $mailad`;
p2 "E-Mail an $mailad gesendet!<br>",
"<input type='submit' name='action' value='Schließen' onclick=\"window.close();\">";
}
p2 "</body>",
"</html>";

View File

@@ -0,0 +1,128 @@
#!/bin/perl
# pics.pl
use strict;
use CGI qw(:standard);
use myHTML;
my $b_home = my_button_home;
my $b_help = my_button_help;
my $b_mail = my_button_mail;
my $b_voting = my_button_voting;
my $b_empfehl = my_button_empfehlung;
my $temp = my_tmp_path;
my @abc = ('A','B','C','D','E','F','G','H','I','J','K','L','M',
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
#print header();
my $data = my_dat_path;
my $cno=param('cno');
# Zaehler lesen ...
my $count;
open COUNTER, "<${data}count";
while (<COUNTER>) {
$count=$_;
}
close COUNTER;
# ... um eins erhöhen ...
$count++ unless($cno);
# ... und neuen Stand schreiben
open COUNTER, ">${data}count";
print COUNTER "$count";
close COUNTER;
ins_dirs;
p2 "<html>",
"<head>",
"<title>Bildergallerie</title>",
"<style type='text/css'>",
"select { font-size:10pt }",
"td { font-size:10pt }",
"input { font:10pt }",
"a { font-size:14pt }",
"visit { font-size:8pt }",
"</style>",
"<script type='text/javascript'>",
"<!--",
"function ZweiFrames(URI1,F1,URI2,F2) {",
" Frame1=eval('parent.'+F1);",
" Frame2=eval('parent.'+F2);",
" Frame1.location.href = URI1;",
" Frame2.location.href = URI2;",
"}",
"function bildtausch(BUCHST,FILE) {",
" bild = new Image();",
" bild.src = FILE;",
" //document.images[BUCHST].src = bild.src; //pic ist der Name des IMG-Tag im oben Frame",
"}",
"//-->",
"</script>",
"</head>",
"<body marginwidth='5' marginheight='0' topmargin='3' leftmargin='5'>";
#p " <p align='center'>";
p2 " <table border='0' cellspacing='0' cellpadding='0' width='100%'>",
" <tr>",
" <td width='120' align='left'>",
" <a href='pics_e.pl' target='pics'><img alt='Home' border='0' width='50' src='$b_home'></a>",
" </td>",
" <td align='center'>";
foreach my $buchst (sort @abc) {
my $found=0;
foreach my $girl (sort keys %dirs) {
if ($girl =~ /^$buchst/) {
my $directory = $dirs{"$girl"};
if (opendir DH, $directory) {
unless (-e "$directory/content") { # Bei jedem ersten Ordner eines Anfangsbuchstaben
# wird eine content datei erstellt. so kann das pic
# of day aus wenigstens einer kleinen anzahl verzeichnissen
# ausgewählt werden
my_create_content ("$directory");
}
if ($found==0) {
my $buchst2="../pics/" . $buchst . "_sel.jpg";
p2 " <a href='pics.pl?let=$buchst' onclick=\"bildtausch('$buchst','$buchst2')\" target='pics'><img name='$buchst' border='0' src='../pics/$buchst.gif'></a>";
}
$found=1;
}
closedir DH;
}
}
}
p2 " </td>",
" <td width='120' align='right'>",
" <a href='helpme.pl' target='helpme'><img alt='Hilfe' border='0' width='50' alt='Home' src='$b_help'></a>",
" </td>",
" </tr>",
" <tr>",
" <td align='center'>";
p " <font size=2pt>$count visits</font>";
p2 " </td>",
" <td align='center'>",
" <a href='mailto:webmaster\@bildergallerie.de'><img alt='Schreib mir' border='0' src='$b_mail'></a>",
" <a href='voting.pl?value=0' onclick=\"window.open(this.href,'new','width=400,height=400,left=0,top=0'); return false\"><img alt='Voting' border='0' src='$b_voting'></a>",
" <a href='tellfriend.pl?action=form' onclick=\"window.open(this.href,'tell','width=500,height=200,left=0,top=0'); return false\"><img alt='Weitersagen' border='0' src='$b_empfehl'></a>",
" </td>",
" </tr>",
" </table>";
#p2 " </p>",
p2 "</body>",
"</html>";

View File

@@ -0,0 +1,69 @@
#!/bin/perl
# pics.pl
use strict;
use CGI qw(:standard);
use myHTML;
#print header();
my $act = param('act');
my $value = param('value');
my $pic = param('pic');
p "<html>";
p "<head>";
p "<title>Voting</title>";
p "</head>";
p2 "<body>",
#"<a href='' onclick='window.close()'>",
"<table><tr><td align='center'>";
add_value($act,$value,$pic) if ($value != 0);
my %topten = get_top_ten();
my $votings=votings();
p2 "Vielen Dank für deine Beteiligung<br><br>" if ($value != 0);
p2 "Aktueller Punktestand<br><br>",
"<table>",
" <tr bgcolor='#aaaaaa'>",
" <td align='center'>",
" Platz",
" </td>",
" <td width='250' align='center'>",
" Name",
" </td>",
" <td align='center'>",
" Punkte",
" </td>",
"</tr>";
my $color;
for (my $i=1;$i<=10;$i++) {
$color='#009900';
$color='#00ff00' if ($i % 2);
p2 "<tr bgcolor=$color>",
" <td align='center'>",
" $i",
" </td>",
" <td align='center'>";
my $let;
my $girl=$topten{$i}[1];
($let) = $girl =~ /([a-z]{1})/i;
p2 " <a target='pics' href='pics.pl?act=$girl&ind=0&let=$let'>",
" $girl",
" </a>",
" </td>",
" <td align='center'>";
printf " %2.2f\n",$topten{$i}[0];
p2 " </td>",
"</tr>";
}
p2 "</table>",
"<br>$votings abgegebene Stimmen",
"</td></tr></table>",
#"</a>",
"</body>",
"</html>";

View File

@@ -0,0 +1,66 @@
#!/bin/perl
# werist.pl
use strict;
use CGI qw(:standard);
use myHTML;
my $path = my_wer_path();
#print header();
p2 "<html>",
" <head>",
" </head",
" <body>";
opendir WERDIR, $path;
my @pic_files = grep { /^[^.]/ } readdir WERDIR;
closedir WERDIR;
p2 "<p>Hi. Ich brauche eure Hilfe ...<br><br>",
"Unten findet ihr einige Bilder aus verschiedensten Quellen. Leider weiß ich nicht wer auf diesen Bildern zu sehen ist.<br>",
"Vielleicht könnt ihr mir ja helfen.<br><br>Schaut sie euch einfach mal an. Einige dürften bekannt sein ;-)</p>";
my $count=2;
my $slide = my_button_slide();
p "<a href='slide_werist.pl?num=0' target='slide_werist'><img src='$slide' width='50' border='0'></a>";
foreach (@pic_files) {
$count = 1 if ($count == 6);
p2 "<table align='left' border='0'>" if ($count != 1);
p2 "<table border='0'>" if ($count == 1);
$count ++;
p2 " <tr>",
" <td colspan='2' align='center'>",
" <font size='-1' color='#ff0000'>$_</font>",
" </td>",
" <td>",
" </td>",
" </tr>",
" <tr>",
" <td colspan='2' align='center'>",
" <img src='$path$_' height='100'>",
" </td>",
" <td width='10'>",
" </td>",
" </tr>",
" <tr>",
" <td align='center'>",
" <a href='$path$_' target='zeigewer'>zeigen</a>",
" </td>",
" <td align='center'>",
" <a href='mailto:webmaster\@bildergallerie.de?subject=bildergallerie.de%20Wer%20ist...&body=Hallo%20Webmaster%0D%0A%0D%0AAuf%20dem Bild%20$_%20sieht man%0D%0A%0D%0A%0D%0A'>helfen</a>",
" </td>",
" <td>",
" </td>",
" </tr>",
"</table>";
}
p "</div>";
p2 " </body>",
"</html>";
end_html;