getVar( "get" ); $page->getVar( "post" ); //$page->parseLanguagePage($page->lang["header"]); /************************************************************ * Operating with model files ************************************************************/ $page->parseCategoriesAndProducts(); $users = $page->getClassOf("users"); if (isset($page->submit)) { $validateCaptcha = new validateCaptcha(); $code = $_REQUEST["code"]; $md5 = $_REQUEST["captcha"]; $val_capt = $validateCaptcha->validate_captcha($md5, $code); if($val_capt<>1) { $page->tpl->assign("error2", $page->lang["login"]["L_ENTER_CAPTCHA"]); } $reg = $users->registerUser(@$page->first_name, @$page->last_name, @$page->company_name, @$page->company_city, @$page->company_street, @$page->company_zip, @$page->company_phone, @$page->company_fax, @$page->company_email, @$page->password1, $val_capt); if (($reg == 0)&&($val_capt==1)) $page->tpl->assign("page", "register_success"); elseif (($reg == 1)||($val_capt<>1)) { if($reg == 1) $page->tpl->assign("error", $page->lang["login"]["L_USER_ALREADY_EXISTS"]); $page->tpl->assign("page", "register_form"); } } else $page->tpl->assign("page", "register_form"); /************************************************************ * Rendering ************************************************************/ $page->tpl->display( "index.tpl.html" ); ?>