<?php

#####################################################################
##                                                                 ##
##                       Easy Banner Free                          ##
##                 http://www.phpwebscripts.com/                   ##
##                 e-mail: info@phpwebscripts.com                  ##
##                                                                 ##
##                                                                 ##
##                       copyright (c) 2003                        ##
##                                                                 ##
##                    This script is freeware                      ##
##                                                                 ##
##                You may distribute it by any way                 ##
##                   BUT! You may not modify it!                   ##
## Removing the link to PHPWebScripts.com is a copyright violation.##
##   Altering or removing any of the code that is responsible, in  ##
##   any way, for generating that link is strictly forbidden.      ##
##   Anyone violating the above policy will have their license     ##
##   terminated on the spot.  Do not remove that link - ever.      ##
##                                                                 ##
#####################################################################

error_reporting  (E_ERROR | E_PARSE); if (ini_get("magic_quotes_sybase")) ini_set("magic_quotes_sybase",0); if (!get_magic_quotes_gpc()) ini_set("magic_quotes_gpc",1); if (!get_magic_quotes_runtime()) set_magic_quotes_runtime(1); if ($s[kun]='UG93ZXJlZCBieSBFYXN5IEJhbm5lcg==') $x = 1; else $x = 0; $r = $s[phprath].$s[phpruth].$s[kun].'PC9hPjxicj4='; if ((strlen($r))!=104) exit; if (ini_get("register_globals")) ini_set("register_globals","Off"); $linkid = db_connect(); if (!$linkid) problem(sql_error());
function parsedata($template,$value) { global $s; $value[adminemail] = $s[adminemail];
$fh = @fopen($template,'r') or problem ("Can not open $template for reading"); $line1=base64_decode($s[phprath]).base64_decode($s[phpruth]).base64_decode($s[kun]).base64_decode('PC9hPjxicj4='); while(!feof($fh)) $line .= fgets( $fh, 4096 ); fclose($fh);
reset ($value); while(list($key,$val) = each ($value)) $line = str_replace("#%$key%#",$val,$line); echo StripSlashes($line).$line1; }
function parsehtml($template,$value) { global $s; $value[adminemail] = $s[adminemail]; $fh = @fopen($template,'r') or problem ("Can not open $template for reading"); while(!feof($fh)) $line .= fgets( $fh, 4096 ); fclose($fh);
reset ($value); while(list($key,$val) = each($value)) $line = str_replace("#%$key%#",$val,$line); return StripSlashes($line); }
function sendemail($template,$value) {
global $s; $fd = @fopen($template, 'r') or problem ("Can not open $template for reading"); while ($line = fgets($fd, 4096)) $emailtext .= $line; fclose($fd);
$to = $value[email]; eregi("Subject: +([^\n\r]+)", $emailtext, $regs); $sub = $regs[1]; $emailtext = eregi_replace("Subject: +([^\n\r]+)[\r\n]+",'',$emailtext);
while (list($key, $val) = each ($value)) { $val  = stripslashes($val); $emailtext = str_replace("#%$key%#",$val,$emailtext); }
reset ($value); mail($to, $sub, $emailtext, "From: $s[adminemail]"); }
function db_connect() { global $s; global $MYSQL_ERRNO, $MYSQL_ERROR; if ($s[nodbpass]) $link_id = mysql_connect($s[dbhost], $s[dbusername]); else $link_id = mysql_connect($s[dbhost], $s[dbusername], $s[dbpassword]);
if(!$link_id) { $MYSQL_ERRNO = 0; $MYSQL_ERROR = "$m[dbconnecterror] $s[dbhost]."; return 0; }
if(empty($s[dbname]) && !mysql_select_db($s[dbname])) { $MYSQL_ERRNO = mysql_errno(); $MYSQL_ERROR = mysql_error(); return 0; }
if(!empty($s[dbname]) && !mysql_select_db($s[dbname])) { $MYSQL_ERRNO = mysql_errno(); $MYSQL_ERROR = mysql_error(); return 0; } return $link_id; }
function sql_error() { global $MYSQL_ERRNO, $MYSQL_ERROR,$m; if(empty($MYSQL_ERROR)) { $MYSQL_ERRNO = mysql_errno(); $MYSQL_ERROR = mysql_error(); } return "$MYSQL_ERRNO: $MYSQL_ERROR"; }
function problem ($error) { global $s; $pole[errortext] = $error; parsedata("$s[phppath]/data/templates/error.html", $pole); exit; }

?>