getVar( "get" ); $page->getVar( "post" ); //$page->parseLanguagePage($page->lang["header"]); /************************************************************ * Operating with model files ************************************************************/ $page->parseCategoriesAndProducts(); $page->tpl->assign('h1', "Kontakt" ); $page->tpl->assign('title', "Kontakt" ); $page->tpl->assign('keywords', "" ); $page->tpl->assign('description', "" ); if(isset($_REQUEST["code"])){ $code = $_REQUEST["code"]; $res = md5($code . 'CAPTCHA_SALT' . 'some salt' . $code .'CAPTCHA_SALT' . 'extra salt'); } if (isset($page->submit)) { #$validateCaptcha = new validateCaptcha(); #$code = $_REQUEST["code"]; $md5 = $_REQUEST["captcha"]; #$val_capt = $validateCaptcha->validate_captcha($md5, $code); #$salted = md5($code . CAPTCHA_SALT . 'some salt' . $code .CAPTCHA_SALT . 'extra salt'); #echo $salted . "
"; #echo $md5 . "
"; if($res != $md5){ $page->tpl->assign("error2", $page->lang["login"]["L_ENTER_CAPTCHA"]); $page->tpl->assign("page", "contact_content"); }else{ $contacts = $page->getClassOf("contacts"); $contacts->addNewContact(@$page->anrede, @$page->name, @$page->firma, @$page->abteilung, @$page->strasse, @$page->hausnummer, @$page->postleitzahl, @$page->ort, @$page->telefon, @$page->fax, @$page->email, @$page->antwort1, @$page->antwort2, @$page->antwort3, @$page->anfrage); $page->tpl->assign("page", "contact_saved"); } } else $page->tpl->assign("page", "contact_content"); /************************************************************ * Rendering ************************************************************/ $page->tpl->display( "index.tpl.html" ); ?>