| pr_Bewerbungsscript v2.00 | Author: PrugnatoR | URL: http://www.prugnator.de +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../../../../maincore.php"; require_once THEMES . "templates/admin_header.php"; require_once INFUSIONS . "pr_bewerbung/includes/form_creator.inc.php"; $num = "new_" . num_generate(10); //Locale includieren if (file_exists(INFUSIONS . "pr_bewerbung/locale/" . $settings['locale'] . ".php")) { include INFUSIONS . "pr_bewerbung/locale/" . $settings['locale'] . ".php"; } else { include INFUSIONS . "pr_bewerbung/locale/German.php"; } if (!iSUPERADMIN || !defined("iAUTH") || $_GET['aid'] != iAUTH) { die("Access denied"); } $result = dbquery("UPDATE " . DB_PREFIX . "users SET user_lastvisit='" . time() . "', user_ip='" . USER_IP . "' WHERE user_id='" . $userdata['user_id'] . "'"); opentable("Status"); if ($_POST['type'] == "itext") { $name = "pr_" . $num; $form = "<input type=\"text\" name=\"" . $num . "\" class=\"textbox\" value=\"" . $_POST['value'] . "\" size=\"24\" />\n"; $result1 = dbquery("INSERT INTO " . DB_PREFIX . "form_fields (pr_name, pr_desc, pr_value, pr_pflicht, pr_toform, pr_form, pr_type) VALUES('" . $num . "', '" . $_POST['desc'] . "','" . $_POST['value'] . "' , '" . $_POST['pflicht'] . "', '1', '" . $form . "', 'itext')");
} function num_generate($length) { $chars_for_pw = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $chars_for_pw .= "abcdefghijklmnopqrstuvwxyz"; $chars_for_pw .= "0123456789"; $char_control = ""; srand((double) microtime() * 1000000); for ($i = 0; $i < 50; $i++) { $number = rand(2, strlen($chars_for_pw) - 2); $char_control .= $chars_for_pw[$number]; } $char_control = substr($char_control, 0, $length); return $char_control; } $num = num_generate(10); // OnChange Function ?> <script type="text/javascript"> <!-- function switch_form(goto){ if(goto != ""){ document.getElementById("inputfull").innerHTML = waitText;; } //erstellen des requests var req = null; try{ req = new XMLHttpRequest(); // Mozilla, Opera und Co