<?php 
##############################################################################
##############################################################################
###________________________________________________________________________###
###                                                                        ###
##############################################################################
##############################################################################
###________________________________________________________________________###
###                                                                        ###
###             vionlink anicapt by vision impress webdesign               ###
###              written 20006 by vision impress webdesign                 ###
###________________________________________________________________________###
###                                                                        ###
###      (c) 	Berthold Krayer, 2006   |   info@vision-impress.de           ###
###         vision impress webdesign  |   http://www.vision-impress.de     ###
###           Tel. +49(0)6838-981074  |   Fax. +49(0)6838-981073           ###
###                                                                        ###
###________________________________________________________________________###
###________________________________________________________________________###
##############################################################################
##############################################################################
##                                                                            
##  This Software is the property of Berthold Krayer, vision-impress          
##  webdesign and is protected by copyright law - it is NOT Freeware.         
##  Any unauthorized use of this software without a valid license is a        
##  violation of the license agreement and will be prosecuted by civil and    
##  criminal law.                                                             
##                                                                            
##  It is not allowed to remove the copyright and copyrightlinks on all the   
##  pages of this script. You have to keep all information lines and          
##  comments in the scripts.                                                  
##                                                                            
##  The code is to be used entirely at the user's own risk. No warranty is    
##  given or implied by vision-impress webdesign. The user is responsible     
##  for ensuring that the code is suitable for the environment in which it    
##  is intended to be used and accepts full responsibility for any            
##  consequences arising from its use.                                        
##                                                                            
##  A redistribution of this script, also in modified form, is not allowed    
##  without prior written consent.                                            
##                                                                            
##                                                                            
##  Diese Software ist das Eigentum von Berthold Krayer und nach dem          
##  Urheberrecht geschützt - es  handelt sich NICHT um Freeware. Jede         
##  Nutzung der Software ohne eine gültige Lizenzvereinbarung, wird zivil-    
##  und strafrechtlich verfolgt.                                              
##                                                                            
##  Die Copyright-Verweise, die Link bei der Ausgabe und die restlichen       
##  Kommentare erhalten  bleiben. Mit dem Einsatz dieses Skripts              
##  akzeptieren Sie, daß Berthold Krayer, vision-impress webdesign von        
##  jeglicher Haftung und Gewährleistung hinsichtlich des Einsatzes befreit   
##  ist.                                                                      
##  Der Verkauf dieses Skripts, auch in modifizierter Form, ist ohne          
##  vorherige Absprache ausdrücklich untersagt.                               
##                                                                            
##  Lesen Sie auch die Nutzungs- und Linzenzbedingungen, die dieser           
##  Software beiliegen.                                                       
##                                                                            
##############################################################################
##############################################################################
## vionlink anicapt
##############################################################################
##############################################################################
session_name(siteid);
@session_start();
$SIDi=session_id();
@include("scripts/options.php");
############################################################################
############################################################################
if(!isset($sendmailto)){die();}
if(!isset($anim_gif)){$anim_gif='jalousie.gif';}
if(!isset($scriptname)){$scriptname="capmaker";}
if(!isset($needed)){$needed =array();}
if(!isset($check_ml_synthax)){$check_ml_synthax=array();}
if(!isset($check_tel_synthax)){$check_tel_synthax=array();}
if(!isset($use_depot)){$use_depot='0';}
if(!isset($depot_foldername)){$depot_foldername='0';}
if(!isset($thx_use)){$thx_use='0';}
if(!isset($dankeseite)){$dankeseite='0';}
if(!isset($ttf)){$ttf='font/font.ttf';}
############################################################################
if(!isset($mail_subject)){$mail_subject='Kontaktformular';}
if(!isset($mail_copysubject)){$mail_copysubject = 'Kopie Ihrer Nachricht';}
if(!isset($vielendank)){$vielendank='Vielen Dank fuer Ihre Mitteilung!';}
if(!isset($codenichtkorrekt)){$codenichtkorrekt='Sicherheitstext ist nicht korrekt!<br>';}
if(!isset($f_synthax_email)){$f_synthax_email=' keine g&uuml;ltige Emailadresse!<br> ';}
if(!isset($f_synthax_tel)){$f_synthax_tel=' keine g&uuml;ltige Telefonnummer!<br> ';}
if(!isset($f_ehi_check)){$f_ehi_check=' Ihre Eingabe enth&auml;lt kritische Zeichen!<br> ';}
############################################################################
############################################################################
if($use_depot=="1"){/* checken ob Ordner exitiert und schreibrechte hat */
if(file_exists($depot_foldername) && is_writable($depot_foldername))
{$saveit=1;}else{$saveit=0;}}else{$saveit=0;}
############################################################################
############################################################################

if(!isset($_SESSION['f'])){
$zufalll = rand(1,10000); $zufall2 = rand(1,100000);
$nlid_f="$zufalll$SIDi$zufall2"; $_SESSION['f']=$nlid_f;}
else{$nlid_f=$_SESSION['f'];}

if(!isset($_SESSION['s'])){
$zufalll = rand(1,10000); $zufall2 = rand(1,100000);
$nlid_s="$zufalll$SIDi$zufall2"; $_SESSION['s']=$nlid_s;}
else{$nlid_s=$_SESSION['s'];}

if(!isset($_SESSION['t'])){
$zufalll = rand(1,10000); $zufall2 = rand(1,100000);
$nlid_t="$zufalll$SIDi$zufall2"; $_SESSION['t']=$nlid_t;}
else{$nlid_t=$_SESSION['t'];}

if(!isset($_SESSION['dr'])){
$zufalll = rand(1,10000); $zufall2 = rand(1,100000);
$nlid_dr="$zufalll$SIDi$zufall2"; $_SESSION['dr']=$nlid_dr;}
else{$nlid_dr=$_SESSION['dr'];}

################################################################
################################################################
if(isset($_GET['s']) && $_SESSION['s']==$_GET['s']){
if(isset($_POST['submitto']) OR isset($_POST['scd'])){ 


@include("scripts/formchecker.php");


###############################
## AUSGABE DER EHI PRUEFUNG
if($achtung!="0"){$err=1; $needed_err.=$f_ehi_check;}


if($err=="0"){
$sitie=$_POST['scd']; 
if($sitie!="" && $_SESSION['co']==$sitie){


@include("scripts/mailing.php");

############################################################################
## ALLES OKAY AUSGABE
############################################################################
session_destroy();
##zur eigenen Dankeseite?
if($thx_use=="1" && $dankeseite!="0")
{header("Location: $dankeseite"); exit();}

##doch nicht? gib Template mit Meldung aus
$s2="";
$s3="";
$s1="";
$s4="<br>$vielendank<br>";
$s5=" style=\"display:none;\" ";
$template = join('', file("tmp/template.htm"));
//... ersetzen
$inhalt = preg_replace("=\[C_SCRIPT\]=", $s2, $template);
$inhalt = preg_replace("=\[MELDUNG\]=", $s4, $inhalt);
if(!preg_match("=visi=", $inhalt)) {$inhalt = "";}
$inhalt = preg_replace("=\[FORMACTION\]=", $s3, $inhalt);
$inhalt = preg_replace("=\[FORMDISPLAY\]=", $s5, $inhalt);
$inhalt = preg_replace("=\[IMAGE\]=", $s1, $inhalt);
//... ausgeben
echo $inhalt;}
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
else{
############################################################################
##|Sicherheitscode fehlt oder ist falsch
############################################################################
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|

$s2="$scriptname.php?f=$nlid_f";
$s3="$scriptname.php?s=$nlid_s";
$s1="<img id=\"dru\" src=\"$scriptname.php?t=$nlid_t\" alt=\"\">";
$s4="<span class=\"meldung\"><br>$codenichtkorrekt<br></span>";
$s5="";
$template = join('', file("tmp/template.htm"));
//... ersetzen
$inhalt = preg_replace("=\[C_SCRIPT\]=", $s2, $template);
$inhalt = preg_replace("=\[MELDUNG\]=", $s4, $inhalt);
if(!preg_match("=visi=", $inhalt)) {$inhalt = "";}
$inhalt = preg_replace("=\[FORMACTION\]=", $s3, $inhalt);
$inhalt = preg_replace("=\[FORMDISPLAY\]=", $s5, $inhalt);
$inhalt = preg_replace("=\[IMAGE\]=", $s1, $inhalt);

foreach($informback_arr as $unit){$unit=explode("###",$unit);
$inhalt = preg_replace("=\<$unit[0]\>=", $unit[1], $inhalt);} 

//... ausgeben
echo $inhalt;
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
}
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
}else{
############################################################################
##|Fehler im Formular
############################################################################
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|

$s2="$scriptname.php?f=$nlid_f";
$s3="$scriptname.php?s=$nlid_s";
$s1="<img id=\"dru\" src=\"$scriptname.php?t=$nlid_t\" alt=\"\">";
$s4="<br><span class=\"meldung\">$needed_err<br></span>";
$s5="";
$template = join('', file("tmp/template.htm"));
$inhalt = preg_replace("=\[C_SCRIPT\]=", $s2, $template);
$inhalt = preg_replace("=\[MELDUNG\]=", $s4, $inhalt);
if(!preg_match("=visi=", $inhalt)) {$inhalt = "";}
$inhalt = preg_replace("=\[FORMACTION\]=", $s3, $inhalt);
$inhalt = preg_replace("=\[FORMDISPLAY\]=", $s5, $inhalt);
$inhalt = preg_replace("=\[IMAGE\]=", $s1, $inhalt);

foreach($informback_arr as $unit){$unit=explode("###",$unit);
$inhalt = preg_replace("=\<$unit[0]\>=", $unit[1], $inhalt);} 

echo $inhalt;}
##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|##|
}}
################################################################
################################################################
##  AUSGABE
################################################################
################################################################

if(isset($_GET['dr']) && $_SESSION['dr']==$_GET['dr']){

srand ((double)microtime()*1000000);
$zzahl = rand(10000, 99999);

#|#|#|
$stext=$zzahl; 
$text=$zzahl;
$bg_imga="bg/bg_1.png";
$col_r=0;
$col_g=0;
$col_b=0;

$ttfsize = 26; 
$text_x = 22;
$text_y = 54;
$angle = rand(0,5);

$_SESSION['co']=$stext;
header('Content-type: image/png');
$img = ImageCreateFromPNG($bg_imga);
$color = ImageColorAllocate($img, $col_r, $col_g, $col_b);
imagettftext($img, $ttfsize, $angle, $text_x, $text_y, $color, $ttf, $text);
imagepng($img); imagedestroy($img);
}
###############################################################
###############################################################
if(isset($_GET['f']) && $_SESSION['f']==$_GET['f']){

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Content-type: text/css");

echo "
div, img{margin:0;padding:0;}
img {border:0;}
#dru{background:url($scriptname.php?t=$nlid_t) no-repeat;}
#ani{background:url($scriptname.php?dr=$nlid_dr) no-repeat;}
"; 
}
################################################################
################################################################
if(isset($_GET['t']) && $_SESSION['t']==$_GET['t']){

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Content-type: image/gif");
readfile("ani/$anim_gif");
}
################################################################
################################################################
if(!isset($_GET['f']) && !isset($_GET['s']) && !isset($_GET['t']) && !isset($_GET['dr'])){


$s2="$scriptname.php?f=$nlid_f";
$s3="$scriptname.php?s=$nlid_s";
$s1="<img id=\"dru\" src=\"$scriptname.php?t=$nlid_t\" alt=\"\">";
$s4="";

$template = join('', file("tmp/template.htm"));
//... Platzhalter
$inhalt = preg_replace("=\[C_SCRIPT\]=", $s2, $template);
if(!preg_match("=visi=", $inhalt)) {$inhalt = "";}
$inhalt = preg_replace("=\[MELDUNG\]=", $s4, $inhalt);
$inhalt = preg_replace("=\[FORMACTION\]=", $s3, $inhalt);
$inhalt = preg_replace("=\[IMAGE\]=", $s1, $inhalt);


//... ausgeben
echo $inhalt;
}
###############################################################
# ENDE
###############################################################
?>