function captcha_register(&$vars) { if (captcha_reg_enabled == true) { global $main_smarty, $the_template; $captcha = get_misc_data('captcha_method'); if ($captcha == '') { $captcha = 'recaptcha'; } include_once captcha_captchas_path . '/' . $captcha . '/main.php'; captcha_create('', 0); } }
$form_values = $HTTP_POST_VARS; #} // form options holen $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]); // form elememte bauen $element = form_elements($cfg["kontakt"]["db"]["entries"], $form_values); $hidedata["form"] = array(); // +++ // page basics // funktions bereich fuer erweiterungen // *** if (is_array($cfg["kontakt"]["captcha"])) { // zufaellige zeichen erzeugen $captcha_text = captcha_randomize($cfg["kontakt"]["captcha"]["length"], $cfg["kontakt"]["captcha"]); // bild erzeugen captcha_create($captcha_text, $cfg["kontakt"]["captcha"]); // captcha-info erzeugen $captcha_crc = crc32($captcha_text . $cfg["kontakt"]["captcha"]["randomize"]); $captcha_name = "captcha-" . $captcha_crc . ".png"; $captcha_path_web = $cfg["file"]["base"]["webdir"] . $cfg["file"]["base"]["new"]; $captcha_path_srv = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"]; // ausgeben $hidedata["captcha"]["url"] = $captcha_path_web . $captcha_name; $hidedata["captcha"]["proof"] = $captcha_crc; // alte, unnuetze bilder entfernen foreach (glob($captcha_path_srv . "captcha-*.png") as $captcha_file) { if (mktime() - filemtime($captcha_file) > 600) { unlink($captcha_file); } } }
$specialvars["editlock"] = -1; } // form options holen $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]); // form elememte bauen $element = form_elements($cfg["autoform"]["location"][$environment["ebene"]]["db"], $_POST); // +++ // page basics // funktions bereich // *** // captcha - bild erzeugen if ($cfg["autoform"]["location"][$environment["ebene"]]["captcha"]) { // zufaellige zeichen erzeugen $captcha_text = captcha_randomize($cfg["autoform"]["captcha"]["length"], $cfg["autoform"]["captcha"]); // bild erzeugen captcha_create($captcha_text, $cfg["autoform"]["captcha"]); // captcha-info erzeugen $captcha_crc = crc32($captcha_text . $cfg["autoform"]["captcha"]["randomize"]); $captcha_name = "captcha-" . $captcha_crc . ".png"; $captcha_path_web = $cfg["file"]["base"]["webdir"] . $cfg["file"]["base"]["new"]; $captcha_path_srv = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"]; // ausgeben $hidedata["captcha"]["url"] = $captcha_path_web . $captcha_name; $hidedata["captcha"]["proof"] = $captcha_crc; // alte, unnuetze bilder entfernen foreach (glob($captcha_path_srv . "captcha-*.png") as $captcha_file) { if (mktime() - filemtime($captcha_file) > 600) { unlink($captcha_file); } } }
$form_values = $HTTP_POST_VARS; } // form options holen $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]); // form elememte bauen $element = form_elements($cfg["register"]["db"][$environment["kategorie"]]["entries"], $form_values); $hidedata["form"] = array(); // +++ // page basics // funktions bereich // *** if (is_array($cfg["register"]["captcha"])) { // zufaellige zeichen erzeugen $captcha_text = captcha_randomize($cfg["register"]["captcha"]["length"], $cfg["register"]["captcha"]); // bild erzeugen captcha_create($captcha_text, $cfg["register"]["captcha"]); // captcha-info erzeugen $captcha_crc = crc32($captcha_text . $cfg["register"]["captcha"]["randomize"]); $captcha_name = "captcha-" . $captcha_crc . ".png"; $captcha_path_web = $cfg["file"]["base"]["webdir"] . $cfg["file"]["base"]["new"]; $captcha_path_srv = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"]; // ausgeben $hidedata["captcha"]["url"] = $captcha_path_web . $captcha_name; $hidedata["captcha"]["proof"] = $captcha_crc; // alte, unnuetze bilder entfernen foreach (glob($captcha_path_srv . "captcha-*.png") as $captcha_file) { if (mktime() - filemtime($captcha_file) > 600) { unlink($captcha_file); } } }