\n\n"; return $body; } // mit és mire cseréljen fájl neveknél $badletters= array("!"," ","ő","ö","ü","ó","o","ú","ű","é","á","u","í","Ö","Ő","Ü","Ű","Ó","O","Ú","É","Á","U","Í","&"); $goodletters = array("","_","o","o","u","o","o","u","u","e","a","u","i","O","O","U","U","O","O","U","E","A","U","I","_n_"); // MAIN MENU ARRAY $menu_array = array('label'=> array ('cégismertető', 'szolgáltatások', 'áraink', 'referenciáink', 'törvények, rendeletek', 'elérhetőségek', 'jelentkezési lap', 'csoport oldal', 'fórum'), 'url'=> array ('cegismerteto.php','szolgaltatas.php', 'araink.php','referenciak.php', 'rendeletek.php', 'elerhetoseg.php', 'jelentkezes.php', 'csoport.php', 'forum.php'), 'show_when'=> array ('', '', '', '', '', '', 'out', 'in', 'in') ); //br2nl function br2nl($text) { return str_replace('
', "", $text); } //group selection in admin mode if ($_GET['gid']&&$_SESSION['is_teacher']) { $_SESSION['selected_gid']=$_GET['gid']; } if (!isset($_SESSION['selected_gid'])) $_SESSION['selected_gid']='all'; //debugging if ($_GET['debug']=="on") $_SESSION['debug']=true; if ($_GET['debug']=="off") $_SESSION['debug']=false; //change easyStyles into proper HTML tags $easyStylesArray=array("KIEMEL","NAGYBETU","ALAHUZ","BULLET"); function easyStylesReplace($text) { global $easyStylesArray; $text=nl2br($text); foreach ($easyStylesArray as $value) { $text=preg_replace("!<$value START>!i","",$text); $text=preg_replace("!<$value END>!i","",$text); } return($text); } function confirmUser($username, $password){ /* Add slashes if necessary (for query) */ if(!get_magic_quotes_gpc()) { $username = addslashes($username); } /* Verify that user is in database */ $q = "SELECT * FROM t_users where username = '$username'"; $result = mysql_query($q); if(!$result || (mysql_numrows($result) < 1)){ return 0; //Indicates username failure } /* Retrieve password from result, strip slashes */ $dbarray = mysql_fetch_assoc($result); //$dbarray['password'] = stripslashes($dbarray['password']); /* Validate that password is correct */ if(md5($password) == $dbarray['password']&&$dbarray['active']==1){ // $_SESSION['user']=$dbarray; foreach($dbarray as $key => $value) { $_SESSION[$key]=$value; } $groupdata=mysql_fetch_assoc(mysql_query("SELECT * FROM t_group WHERE gid='".$_SESSION['gid']."'")); $_SESSION['groupname']=$groupdata['name']; $_SESSION['grouplocation']=$groupdata['location']; $result=mysql_query("UPDATE t_users SET last_login='".time()."' WHERE uid='".$_SESSION['uid']."'"); if ($dbarray['is_teacher']) { return 2; } else { return 1; //Success! Username and password confirmed, activated } } else{ return 0; //Indicates password failure } } function mailToSelf($toEmail, $emailsubject, $body, $fromEmail, $fromName) { # Is the OS Windows or Mac or Linux if (strtoupper(substr(PHP_OS,0,3)=='WIN')): $eol="\r\n"; elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')): $eol="\r"; else: $eol="\n"; endif; global $sitemail; if ($fromEmail=='') $fromEmail="noreply@khp.hu"; # To Email Address //$emailaddress=$_POST['email']; # Message Subject //$emailsubject="Art-Area Hírlevél igénylés"; # Message Body //$message="Feliratkoztál az Art-Area hírlevelére!

Kérlek erosítsd meg igényedet a következo linkre klikkelve http://www.art-area.hu/index.php?email=".$_POST['email']."&actcode=".$activation."

Amennyiben nem szeretnél feliratkozni, nem kell semmit tenned!


Üdvözlettel,
Art-Area"; // ob_start(); // require("../gaussadmin/mailmessage.php"); // page for showing in the email // $body=ob_get_contents(); ob_end_clean(); # Common Headers $headers = 'From: '.$fromName.'< '.$fromEmail.' >'.$eol; $headers .= 'Reply-To: '.$fromName.' < '.$fromEmail.' >'.$eol; $headers .= 'Return-Path: '.$fromName.' < '.$fromEmail.' >'.$eol; // these two to set reply address $headers .= "Message-ID: <".time()." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters # Boundry for marking the split & Multitype Headers $mime_boundary=md5(time()); $headers .= 'MIME-Version: 1.0'.$eol; $headers .= "Content-Type: multipart/related; boundary=\"".$mime_boundary."\"".$eol; $msg = ""; # Setup for text OR html $msg .= "Content-Type: multipart/alternative".$eol; # HTML Version $msg .= "--".$mime_boundary.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-2".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol; $msg .= $body.$eol.$eol; # SEND THE EMAIL //ini_set(sendmail_from,'from@me.com'); // the INI lines are to force the From Address to be used ! ini_set(SMTP,"localhost"); return mail($toEmail, $emailsubject, $msg, $headers); //ini_restore(sendmail_from); } ?>