$includesajax = TRUE; require_once("base.php"); require_once("classes/webform.class.php"); function ValidateItem($sender) { global $db; if ($sender->name=='email') { $emailcheck = &$db->Execute("select id, pstamp, pass from felhasznalo where email=?", Array($sender->value)); if ($emailcheck->RecordCount()>0) { $pass = $sender->Page()->itemByName('pass')->value; $phash = md5($emailcheck->fields['pstamp'].$pass); if ($phash!=$emailcheck->fields['pass']) { return "Mr regisztrltak ezzel az e-mail cmmel, krjk, a korbbi regisztrcinl hasznlt jelszt adja meg!"; } } } if ($sender->name=='email2') { $email = $sender->Page()->itemByName('email'); if ($email->value!=$sender->value) { return "A kt e-mail cm nem egyezik!"; } } if ($sender->name=='captcha') { if ($_SESSION['regcaptcha']!=$sender->value) { return "Hibs eredmnyt adott meg!"; } } if ($sender->name=='nnev') { $nnev = htmlentities($sender->value); $emailcheck = &$db->Execute("select email, nnev, pstamp, pass from felhasznalo where nnev=?", Array($nnev)); if ($emailcheck->RecordCount()>0) { $pass = $sender->Page()->itemByName('pass')->value; $email = $sender->Page()->itemByName('email')->value; $phash = md5($emailcheck->fields['pstamp'].$pass); if ($email!=$emailcheck->fields['email'] || $phash!=$emailcheck->fields['pass']) { return "Mr regisztrltak ezzel a nvvel!"; } } } if ($sender->name=='pass2') { $pass = $sender->Page()->itemByName('pass')->value; $pass2 = $sender->value; if ($pass=="" || $pass!=$pass2) { return "A kt jelsz nem egyezik!"; } } return TRUE; } function OriginToPath($rorigin, $oparams, $full = FALSE) { global $domain; $op = ""; foreach ($oparams as $param) { if ($param!='') { if ($op=='') { $op = $param; } else { $op.='&'.$param; } } } if ($op!='') $op = '?'.$op; switch ($rorigin) { case 1: //felmeres $aurl = 'felmeres.php'; break; case 2: //mutasdmeg $aurl = 'mutasdmeg.php'; break; case 3: //szokincs $aurl = "szokincskereso.php"; break; case 4: //megrendeles $aurl = "megrendeles.php"; break; case 5: //megrendeles_t $aurl = "megrendeles_t.php"; break; default: $aurl = "index.php"; } if ($full) { $aurl = "http://".$domain."/".$aurl; } $aurl = $aurl.$op; return $aurl; } $hidelogin = true; $pagetitle = "Regisztrci"; $showinfoside = true; $localheader .= ''; $localscript = debug = TRUE; $out = ""; $rtype = NULL; if (isset($_REQUEST['rtype'])) { $rtype = $_REQUEST['rtype']; } if (is_null($rtype)) { $rorigin = $_REQUEST['rorigin']; $oparams = urldecode($_REQUEST['oparams']); $rdesc = $_REQUEST['rdesc']; $out .= "

"; $loginurl = OriginToPath($rorigin, Array($oparams)); if ($rdesc=='') { $out.="

A tovbblpshez szksges, hogy regisztrlja magt oldalunkon.

"; } else { include("include/".$rdesc.".inc"); } $out.="
"; $out.="

Ha mr korbban regisztrlt, akkor jelentkezzen be az akkor kivlasztott

"; $out.=""; $out.=""; $out.= ""; $out.= ""; $out.= "
felhasznli nvvel:
(iskola esetn a rvid nv)
s jelszval:
"; $out .= "

Ha mg nem regisztrlt, akkor vlassza ki, milyen regisztrcival kvn tovbblpni!

"; $rparams = "rorigin=".$rorigin."&oparams=".urlencode($oparams); $out .= "

"; } elseif ($rtype==1) { function outputErrs($v) { if (count($v)>0) { echo '

'; foreach ($v as $err) { echo "
$err
"; } echo '

'; } } if ($cmd=='confirm') { include("footer.php"); die; } $db->debug = FALSE; echo "

\n"; $tegezes = FALSE; unset($r); unset($return); if (isset($_GET['r'])) { $r=$_GET['r']; } elseif (isset($_POST['r'])) { $r=$_POST['r']; } $rdesc = ''; if ($rorigin!='') { $loginreturn = OriginToPath($rorigin, Array($oparams)); } elseif (isset($r)) { $return = $_SESSION['return'][$r]['link']; $rdesc = $_SESSION['return'][$r]['desc']; $loginreturn = $_SESSION['return'][$r]['link']; } else { $loginreturn = 'index.php'; } $includepcode = FALSE; $rdesctext = ''; if ($rdesc!='') { include "include/$rdesc.inc"; } if ($tegezes) { $lang = $lang_t; } else { $lang = $lang_m; } $email=$_POST['email']; $email2=$_POST['email2']; $vnev = $_POST['vnev']; $knev = $_POST['knev']; $nnev = $_POST['nnev']; $pass=$_POST['pass']; $pass2=$_POST['pass2']; $pcode = $_POST['pcode']; $iammature = $_POST['iammature']; $rorigin = $_REQUEST['rorigin']; $oparams = urldecode($_REQUEST['oparams']); $captcha = $_POST['captcha']; $reg=$_POST['reg']; if (isset($_POST['hirlevel'])) { $hirlevel = $_POST['hirlevel']; } else { $hirlevel = array('program'); } $evnev = htmlentities($vnev); $eknev = htmlentities($knev); $ennev = htmlentities(strtolower($nnev)); $hiba = Array(); if ($reg) { $rs=&$db->Execute("select * from felhasznalo where (email='$email')"); if ($rs->RecordCount()>0) { $hiba['email'][] = $lang['emailused']; } if ($email=='') { $hiba['email'][] = $lang['emailmissing']; } elseif ($email!=$email2) { $hiba['email'][] = $lang['emailnoeq']; } $rs=&$db->Execute("select * from felhasznalo where (nnev='$ennev')"); if ($rs->RecordCount()>0) { $hiba['nnev'][] = $lang['nickused']; } if ($nnev=='') { $hiba['nnev'][] = $lang['nickmissing']; } if ($pass=='') { $hiba['pass'][] = $lang['passmissing']; } elseif ($pass!=$pass2) { $hiba['pass'][] = $lang['passmiss']; } if (!$iammature) { $hiba['iammature'][] = $lang['missmature']; } if ($captcha!=$_SESSION['regcaptcha']) { $hiba['captcha'][]=$lang['captcha']; } } if (count($hiba)>0 or !$reg) { if ($rdesctext!="") { echo "
$rdesctext
\n"; } $captcha1 = rand(1, 8); $captcha2 = rand(1, 9-$captcha1); $_SESSION['regcaptcha'] = $captcha1+$captcha2; $captchatext = str_replace(Array('%X', '%Y'), Array($captcha1, $captcha2), $lang['captchatext']); ?>

Regisztrci


A vastagon szedett mezk kitltse ktelez!

if ($includepcode) { ?> } else { ?> } ?>