#!/usr/bin/perl use CGI; use CGI::Carp qw(fatalsToBrowser); require daten; $ipAdresse = $ENV{'REMOTE_ADDR'}; $form = $ENV{'QUERY_STRING'}; #538 / for($tt=2;$tt<$anza;$tt++) if($form eq '') { print "content-Type:text/html\n\n"; print "\n"; print" PORT ROYAL Setliste+Kalender <body> <p>Diese Seite verwendet Frames. Frames werden von Ihrem Browser aber nicht unterstützt.</p> </body> \n"; }; ($form, $linknummer, $comentnummer, $speichernr, $setlistname) = split /\?/ ,$form; if($linknummer eq ""){$linknummer = 0;}; $browser = $ENV{'HTTP_USER_AGENT'}; $suchwort[1]="Firefox"; $such_browser[1]="FX"; $suchwort[2]="Netscape"; $such_browser[2]="NS"; $suchwort[3]="MSIE"; $such_browser[3]="IE"; $suchwort[4]="Opera"; $such_browser[4]="OP"; $browser_ak = ""; for($uu=0; $uu<@suchwort; $uu++){if($browser =~ /$suchwort[$uu]/gi){$browser_ak = $such_browser[$uu];};}; #------------------------------------------------ Tabellendaten --------------------------------------------------------- #------------------------------------------------ Tabellendaten --------------------------------------------------------- #------------------------------------------------ Tabellendaten --------------------------------------------------------- #if($form ne "fehler.htm") #{ @celle=""; use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; #my $parser = Spreadsheet::ParseExcel->new(); my $parser = new Spreadsheet::ParseExcel::SaveParser; my $workbook = $parser->Parse('Mappe1.xls'); my $adminbook = $parser->Parse('Mappe2.xls'); $worksheet = $workbook->Worksheet(0); $row = 0; $ze[0] = 1; $ze[1] = 2; $ze[2] = 3; $ze[3] = 4; $ze[4] = 5; $ze[5] = 6; if($browser_ak eq "IE") { $width[0] = "10"; $width[1] = "130"; $width[2] = "113"; $width[3] = "40"; $width[4] = "50"; $width[5] = "110"; $width[6] = "50"; $width[7] = "30"; $width[8] = "1100"; $width[8] = $width[8]-$width[7]-$width[6]-$width[5]-$width[4]-$width[3]-$width[2]-$width[1]-$width[0]; } else { $width[0] = "10"; $width[1] = "130"; $width[2] = "150"; $width[3] = "40"; $width[4] = "50"; $width[5] = "130"; $width[6] = "43"; $width[7] = "30"; $width[8] = "750"; $width[8] = $width[8]-$width[7]-$width[6]-$width[5]-$width[4]-$width[3]-$width[2]-$width[1]-$width[0]; }; #}; #------------------------------------------------ Tabellendaten --------------------------------------------------------- #------------------------------------------------ Tabellendaten --------------------------------------------------------- #------------------------------------------------ Tabellendaten --------------------------------------------------------- if($form ne '') { header(); }; if($form eq 'menue.htm') { print" \n"; $leerz = "        "; print " LogIn
   
\n"; print" \n"; }; #-------------------------------------------------------------------------------------------------------------------- #------- MAIN -------- MAIN -------- MAIN -------- MAIN ------ MAIN -------- MAIN -------- MAIN -------- MAIN ------- #-------------------------------------------------------------------------------------------------------------------- if($form eq 'main.htm') { print" \n"; #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # ----------------------------------------------- Tabelle auslesen ---------------------------------------------------- for my $worksheet ( $workbook->Worksheet(0) ) # ---------- for my $worksheet ( $workbook->worksheets() ) --------- { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); $row1=1; for my $row ( $row_min+1 .. $row_max ) { my $celltitel = $worksheet->get_cell( $row, 0 ); if($celltitel != '') { $row1++; for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); next unless $cell; if($col eq 0){ $mo3_nr[$row1] = $cell->value(); } if($col eq 1){ $mo3_titel[$row1] = $cell->value(); } if($col eq 2){ $mo3_style[$row1] = $cell->value(); } if($col eq 3){ $mo3_jahr[$row1] = $cell->value(); } if($col eq 4){ $mo3_laenge[$row1] = $cell->value(); } if($col eq 5){ $mo3_author[$row1] = $cell->value(); } if($col eq 6){ $mo3_bewertung[$row1]= $cell->value(); } if($col eq 7){ $mo3_link1[$row1] = $cell->value(); } if($col eq 8){ $mo3_link2[$row1] = $cell->value(); } } }; } } # ------------------------------------------------------ for my $worksheet ( $workbook->worksheets() ) --------- # ----------------------------------------------- Tabelle auslesen ---------------------------------------------------- # ----------------------------------------------- Regie auslesen ------------------------------------------------------ for my $worksheet2 ( $workbook->Worksheet(2) ) # ---------- for my $worksheet ( $workbook->worksheets() ) --------- { my ( $row_min, $row_max ) = $worksheet2->row_range(); my ( $col_min, $col_max ) = $worksheet2->col_range(); for my $row ( $row_min+1 .. $row_max ) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet2->get_cell( $row, $col ); next unless $cell; if($col eq 0){ $genre_nr[$row] = $cell->value(); } if($col eq 1){ $genre_name[$row] = $cell->value(); } } } } # ------------------------------------------------------ for my $worksheet ( $workbook->worksheets() ) --------- # ----------------------------------------------- Regieauslesen ------------------------------------------------------ print "




  

Öffne Setlist

Moment bitte...




 
 
 
 
 




  

Öffne Kalender

Moment bitte...




 
 
 
 
 
\n"; if($browser_ak eq "OP") { #$vontop = "450px"; # bei 26Songs $faktvt = "17.30769"; $sganza = $anza-2; $vttmp = $faktvt*$sganza; $vontop = int($vttmp); if($vontop<$vttmp) { $vontop++; } $vontop = "$vontop"."px"; $slnwidth = "375px"; # // 371px"; $btwidth = "47px"; #// 28 $abstvl = "575px"; $abstvlueb = "921px"; $abstanzge = "547px"; $abstefvl = "573px"; $absteftop = "0px"; } else { if($browser_ak eq "IE") { #$vontop = "450px"; # bei 26Songs $faktvt = "16.6"; $sganza = $anza-2; $vttmp = $faktvt*$sganza; $vontop = int($vttmp); if($vontop<$vttmp) { $vontop++; } $vontop = "$vontop"."px"; $slnwidth = "375px"; # // 371px"; $btwidth = "47px"; #// 28 $abstvl = "528px"; $abstvlueb = "874px"; $abstanzge = "500px"; #"550px"; $abstefvl = "527px"; $absteftop = "1px"; } else { #$vontop="438px"; $faktvt = "19.0"; $sganza = $anza-2; $vttmp = $faktvt*$sganza; $vontop = int($vttmp); if($vontop<$vttmp) { $vontop++; } $vontop = "$vontop"."px"; $slnwidth = "375px"; # // 371px"; $btwidth = "49px"; #// 30 $abstvl = "575px"; $abstvlueb = "921px"; $abstanzge = "547px"; $abstefvl = "573px"; $absteftop = "0px"; }; }; if($browser_ak eq "IE") { $zbtth = "50px"; } else { if($browser_ak eq "FX") { $zbtth = "185px"; } else { if($browser_ak eq "OP") { $zbtth = "75px"; } else { $zbtth = "55px"; }; }; }; $ffl = "20"; # print " "; # ---------------------------------------------- Tabelle ----------------------------------------- # ---------------------------------------------- Tabelle ----------------------------------------- if($browser_ak eq "IE") { $htabbreite=1100; } else { $htabbreite=950; }; print "\n"; print " \n"; for my $worksheet ( $workbook->Worksheet(0) ) # $workbook->worksheets() { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); for my $row ( $row_min .. $row_max ) { if($row eq 0) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); next unless $cell; if($col eq 1 || $col eq 2 || $col eq 3 || $col eq 4 || $col eq 5|| $col eq 6) { print"\n"; }; $anza2=$anza; $anza2 = $anza2+2; print" \n"; print" \n"; }; } } print " \n"; #print " \n"; #print""; #print " \n"; print " \n"; for($tt=1;$tt<$anza-1;$tt++) { @dateneintrag = split /--/ ,$mo3_tab[$tt]; for($colz=0;$colz<=10;$colz++) { if($colz eq 1){$ii = $dateneintrag[$colz];} $p="p"; $z="ze"; $s="sp"; $colz1=$colz-1; if($colz eq 2 || $colz eq 3 || $colz eq 4 || $colz eq 5 || $colz eq 6 || $colz eq 7) { if($colz eq 4 || $colz eq 5 || $colz eq 7) { $align = "align = 'center'"; } else { $align = ""; }; print"\n"; } else { print " \n"; }; }; }; print"\n"; print " \n"; }; print " \n"; print "
"; $celle[$col] = $cell->value(); $thid = "id = \'us$col\'"; if($col eq 1 || $col eq 4) { print"$celle[$col]\n"; } else { print "   \n"; }; }; print " 
"; if($colz eq 2 || $colz eq 5) { print "$dateneintrag[$colz]
alle markieren    
\n"; # ---------------------------------------------- Tabelle ----------------------------------------- # ---------------------------------------------- Tabelle ----------------------------------------- # --------------------------------------------- JavaScript ----------------------------------------------------------- # --------------------------------------------- JavaScript ----------------------------------------------------------- print " \n"; # # --------------------------------------------------- JavaScript ----------------------------------------------------- # --------------------------------------------------- JavaScript ----------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- print" \n"; }; #-------------------------------------------------------------------------------------------------------------------- #------- MAIN -------- MAIN -------- MAIN -------- MAIN ------ MAIN -------- MAIN -------- MAIN -------- MAIN ------- #-------------------------------------------------------------------------------------------------------------------- if($form eq 'banner.htm') { #-------------------------------------------------------------------------------------------------------------------- #------ START ------- START ------- START ------- START ----- START ------- START ------- START ------- START ------- #-------------------------------------------------------------------------------------------------------------------- print "
\n"; }; #-------------------------------------------------------------------------------------------------------------------- #------ START ------- START ------- START ------- START ----- START ------- START ------- START ------- START ------- #--- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE -- ENDE --- #-------------------------------------------------------------------------------------------------------------------- # # # # # if($form eq 'pruefen.htm') { $form=new CGI; $name=CGI::escapeHTML($form->param("Benutzer")); $pass=CGI::escapeHTML($form->param("Passwort")); print" \n"; # $pass =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; # $name = ucfirst $name; $ard=""; for($x=2; $x<@qnummer; $x++) { if ($name eq $qnummer[$x] && $pass eq $passw[$x] && $passw[$x] ne '' && $qnummer[$x] ne '') { $log_first = $log_time; $log_last = $log_time; $logname = $qnummer[$x]; $sicherheit = &zufallzahl(20); $crypt_ip = crypt($ipAdresse,$sicherheit); $crypt_name = crypt($logname,$sicherheit); $session = "$crypt_ip&$crypt_name&$sicherheit~"; $log_in = "$ipAdresse;$log_first;$log_last;$logname;$session"; open Handle,">>login.txt"; print Handle "$log_in\n"; close Handle; print" \n"; #print "\n"; $ard="1"; }; }; if($ard eq "1"){}else { print" \n"; }; }; # # # # # #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- if($form eq "erstellen.htm") { $setlistnamedatei = $setlistname; $setlistnamedatei =~ s/%20/_/g; $setlistnamedatei =~ s/ /_/g; $setlistnamedatei =~ s/\\//g; $setlistnamedatei =~ s/\.//g; $setlistnamedatei =~ s/\?//g; $setlistnamedatei =~ s/\(//g; $setlistnamedatei =~ s/\)//g; $setlistnamedatei =~ s/\*//g; $setlistnamedatei =~ s/\"//g; $setlistnamedatei =~ s/,//g; $setlistnamedatei =~ s/!//g; $setlistnamedatei =~ s/-//g; $setlistnamedatei =~ s/://g; $setlistnamedatei =~ s/;//g; $setlistnamedatei =~ s/\?//g; $setlistnamedatei =~ s/ä/ae/g; $setlistnamedatei =~ s/ö/oe/g; $setlistnamedatei =~ s/ü/ue/g; $setlistnamedatei =~ s/ß/ss/g; $setlistnamedatei =~ s/Ä/AE/g; $setlistnamedatei =~ s/Ö/OE/g; $setlistnamedatei =~ s/Ü/UE/g; $linke = "$log_time-$setlistnamedatei".".pdf"; # #$linke = "setlist.pdf"; print"




  

Setliste wird erstellt...

Moment bitte...













\n"; if($linknummer ne 1) { use PDF::API3; use PDF::API3::Compat::API2; my $pdf = PDF::API3::Compat::API2->new(-file => "$linke"); #$pdf = PDF::API3::Compat::API2->new; $fnt = $pdf->corefont('Arial'); $fnt1 = $pdf->corefont('Arial'); $fntb = $pdf->corefont('Arial-Bold'); $page[0] = $pdf->page; $t[0] = $page[0]->gfx(); $aktseitenzahl = 0; %h = $pdf->info ( 'Author' => " setlist24.de.vu ", 'CreationDate' => "D:20020911000000+01'00'", 'ModDate' => "D:YYYYMMDDhhmmssOHH'mm'", 'Creator' => "setlist24.de.vu", 'Producer' => "$nutzer / Port Royal", 'Title' => "Port Royal Setlist", 'Subject' => "Port Royal Setlist", 'Keywords' => "Port Royal Setlist" ); $pdf->preferences ( #-outlines => 1, #-hidemenubar => 0, #-displaytitle => 1, #-thumbs => 1, #-afterfullscreenthumbs => 1, #-afterfullscreenoutlines => 1, ); $page[0]->mediabox('A4'); $page[0]->bleedbox('A4'); $page[0]->cropbox('A4'); $page[0]->trimbox('A4'); $otls = $pdf->outlines; $otl[0] = $otls->outline; $otl[0]->title("Setlist"); $otl[0]->dest($page[0]); if($setlistname eq "" || $setlistname eq "Neue%20SetListe"){$setlistname = "Setlist"}; $setlistname =~ s/%20/ /g; $t[0]->textlabel(80,750,$fntb,30,"$setlistname"); # zb. my $jpeg = $pdf->image_jpeg("$portroyal"); my $img = $t[0]->image($jpeg, 410, 650, 0.6); $alternativen = 0; $vb=700; $shoeh = 30; $shoeh2 = 30; $ldt2 = 0; $ldt3 = 0; @listendetails = split(/;/,$comentnummer); for($ldt=0; $ldt<@listendetails; $ldt++) { $tmp = $listendetails[$ldt]; while($tmp =~ /\-\-\-\-\-\-/gi) { $alternativen = 0 }; while($tmp =~ /alternativ/gi) { $alternativen = 1; $alternativena = 1; }; # - string to html / &str_to_htm() / äüöß#- # ---------------------------------------#- $tmp = &str_to_htm($tmp); #- # ---------------------------------------#- # - Umwandlung in HTML -> Fkt.v.daten.cgi#- @vtmp = split(/]/,$tmp); if(@vtmp > 1) { $tmp = $vtmp[1]; $tmp = substr($tmp,5,length($tmp)); $ldt2++; if($ldt2 < 10){$ldt2 = $tmp = " "." "."$ldt2. $tmp";}else{$tmp = "$ldt2. $tmp";}; } else { @tmp2 = split(/Zugabe/,$tmp); if(@tmp2 > 1) { $tmp = substr($tmp,14,length($tmp)); } else { $tmp = substr($tmp,13,length($tmp)); }; }; if($alternativen ne 1) { $zeitsrt[$ldt] = $vtmp[0]; $zeitsrt[$ldt] = substr($zeitsrt[$ldt],1,length($zeitsrt[$ldt])); } else { $zeitsrt[$ldt] = ""; $altzeitsrt[$ldt3] = "$vtmp[0]"; $altzeitsrt[$ldt3] = substr($altzeitsrt[$ldt3],1,length($altzeitsrt[$ldt3])); $ldt3++; }; $listendetails_z = @listendetails; for($ee=20;$ee<$listendetails_z;$ee++) { if($listendetails_z > $ee) { $shoeh2 = $shoeh-($ee-21); if($listendetails_z > 21) { $shoeh2--; } if($listendetails_z > 29) { $shoeh2++; }; if($listendetails_z > 32) { $shoeh2++; }; if($listendetails_z > 34) { #$shoeh2++; }; if($listendetails_z > 36) { $shoeh2++; }; if($listendetails_z > 38) { $shoeh2++; }; if($listendetails_z > 40) { $shoeh2++; }; } }; $cfont = $pdf->corefont('Arial'); $t[0]->textlabel(80,$vb,$cfont,$shoeh2,"$tmp"); # zb. $vb = $vb - $shoeh2; }; if($alternativena == 1) { $playlistzeit = 0; $a1min = 0; $a1sek = 0; for($rr=0;$rr<@zeitsrt;$rr++) { @test1 = split /\:/ ,$zeitsrt[$rr]; if(@test1 > 0) { ($t1min, $t1sek) = split /\:/ ,$zeitsrt[$rr]; $a1min = $t1min + $a1min; $a1sek = $t1sek + $a1sek; }; }; if($a1sek<60) { } else { $a1sek1 = $a1sek/60; ($t1sek1, $t1sek2) = split /\./ ,$a1sek1; $a1min = $a1min + $t1sek1; $a1sek1 = "0.$t1sek2"; $a1sek2 = $a1sek1*60; $a1sek = sprintf ("%.0f", $a1sek2); }; if($a1sek > -1 && $a1sek <10) { $a1sek = "0$a1sek" }; $playlistzeit = "$a1min:$a1sek"; $alternativzeit = 0; $a2min = 0; $a2sek = 0; for($rr=0;$rr<@altzeitsrt;$rr++) { @test2 = split /\:/ ,$altzeitsrt[$rr]; if(@test2 > 0) { ($t2min, $t2sek) = split /\:/ ,$altzeitsrt[$rr]; $a2min = $t2min + $a2min; $a2sek = $t2sek + $a2sek; }; }; if($a2sek<60) { } else { $a2sek1 = $a2sek/60; ($t2sek1, $t2sek2) = split /\./ ,$a2sek1; $a2min = $a2min + $t2sek1; $a2sek1 = "0.$t2sek2"; $a2sek2 = $a2sek1*60; $a2sek = sprintf ("%.0f", $a2sek2); }; if($a2sek > -1 && $a2sek <10) { $a2sek = "0$a2sek" }; $alternativzeit = "$a2min:$a2sek"; #$textzeile = "$playlistzeit"." / m:s (+$alternativzeit"." alternativ)";# ==> [$speichernr] gesamt $textzeile = "$playlistzeit"." / (+$alternativzeit".")";# ==> [$speichernr] gesamt $t[0]->textlabel(255,45,$fnt,15,"$textzeile"); # } else { $t[0]->textlabel(255,45,$fnt1,15,"$speichernr".""); # }; ############################################################ # RAHMEN ############################################################ $rahmenverschrechts = 20; $rvsr = $rahmenverschrechts; ############################## $rabstr = 0 + 550 + $rvsr; ####### 550 ###### $rabstl = 50; $rabsto = 800; $rabstou = 770; $rabstu = 60; $rabstuu = 40; $teilovr = 0 + 345 + $rvsr; ############################## sub rahmen { $aktseite = $_[0]; my $gfx = $aktseite->gfx(); $gfx->strokecolor('black'); $gfx->move($rabstl,$rabsto); # links - move(50,800) $gfx->vline($rabstuu); # vline(40); $gfx->move($rabstr,$rabsto); # rechts - move(570,800) $gfx->vline($rabstuu); # vline(40); $gfx->move($teilovr,$rabsto); # teiler - move(345,800) $gfx->vline($rabstou); # vline(770) $gfx->move($rabstr,$rabsto); # oben - move(570,800) $gfx->hline($rabstl); # hline(50); $gfx->move($rabstr,$rabstou); # oben unter - move(570,770); $gfx->hline($rabstl); # hline(50); $gfx->move($rabstr,$rabstu); # unten - move(570,60); $gfx->hline($rabstl); # hline(50); $gfx->move($rabstr,$rabstuu); # unten unter - move(570,40); $gfx->hline($rabstl); # hline(50); $gfx->close; $gfx->stroke; }; ############################################################ my $gfx = $page[0]->gfx(); $gfx->strokecolor('black'); $gfx->move(50,800); # links $gfx->vline(40); $gfx->move(550,800); # rechts $gfx->vline(40); $gfx->move(550,800); # oben $gfx->hline(50); #$gfx->move(550,50); # unten #$gfx->hline(50); $gfx->move(550,60); # unten $gfx->hline(50); $gfx->move(550,40); # unten unter $gfx->hline(50); $gfx->close; $gfx->stroke; $pdf->saveas("$linke"); $pdf->end; ################################################################################################################# use File::Copy; $Dateiaktuell = "$linke"; #$Dateidownload = "setlisten/$linke"; #?$log_time $Dateidownload = "../setlist24/setlisten/$linke"; #?$log_time copy($Dateiaktuell,$Dateidownload); chmod(0777, "$Dateidownload"); unlink($linke); print" \n"; }; print" \n"; }; #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm ----------------------------------------------------------- #------------------------------------------------ erstellen.htm -----------------------------------------------------------