document.form2.owners.value = email_str; document.form2.submit(); } } } --> </script> </head> <body> <?php require_once dirname(__FILE__) . "/../classes/class_administration.php"; $admin = new administration(); $error_msg = ''; //if mail form has been filled in and sent if ($_POST["mail"]) { if (!$admin->isValidEmail($_POST["replyto"])) { $error_msg .= "The reply-to address is not valid! Please correct it."; } else { $toAddr = array(); $toName = array(); $namesAndAddresses = explode(":::", $_POST["owners"]); for ($i = 0; $i < count($namesAndAddresses) - 1; $i++) { $nameAndAddress = explode(";;;", $namesAndAddresses[$i]); $toAddr[$i] = $nameAndAddress[0]; $toName[$i] = $nameAndAddress[1]; } $error = ''; for ($i = 0; $i < count($toAddr); $i++) { if (!$admin->sendEmail($_POST["replyto"], $_POST["from"], $toAddr[$i], $toName[$i], "[Mapbender] A user has suggested a WMS for deletion", $_POST["comment"], $error)) { if ($error) { $error_msg .= $error . " ";
$registerAsGuest = false; if ($mb_user_name == 'guest') { $registerAsGuest = true; } //// �berpr�fen ob User und oder Mail bereits existieren $sql = "SELECT * FROM mb_user WHERE mb_user_name = \$1 AND mb_user_email = \$2"; $v = array($mb_user_name, $mb_user_email); // wird in unserer L�sung immer md5 genutzt? $t = array('s', 's'); $res = db_prep_query($sql, $v, $t); //$row = db_fetch_array($res); $emailValid = 1; if (db_numrows($res) == 0 and !$registerAsGuest) { $userAlreadyExists = 0; /// pr�fen auf email und richtigkeit if ($adm->isValidEmail($mb_user_email)) { $emailValid = 1; /////INSERT if (!isset($mb_user_postal_code) || $mb_user_postal_code == '') { $mb_user_postal_code = 0; } $sql = "INSERT INTO mb_user (mb_user_name,mb_user_password,mb_user_digest,mb_user_owner,mb_user_description,mb_user_email,mb_user_phone,mb_user_department,mb_user_organisation_name,mb_user_position_name,mb_user_city,mb_user_postal_code, mb_user_textsize, mb_user_glossar) VALUES (\$1, \$2,\$13, '1', \$3, \$4, \$5, \$6, \$7, \$8, \$9, \$10,\$11,\$12)"; $v = array($mb_user_name, md5($mb_user_password), $mb_user_description, $mb_user_email, $mb_user_phone, $mb_user_department, $mb_user_organisation_name, $mb_user_position_name, $mb_user_city, $mb_user_postal_code, 'textsize1', 'ja', md5($mb_user_name . ";" . $mb_user_email . ":" . REALM . ":" . $mb_user_password)); $t = array('s', 's', 's', 's', 's', 's', 's', 's', 's', 'i', 's', 's', 's'); $res = db_prep_query($sql, $v, $t); $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = 'guest' LIMIT 1"; $res = db_prep_query($sql, array(), array()); $row = db_fetch_array($res); $group_id = $row['mb_group_id']; $sql = "INSERT INTO mb_user_mb_group (fkey_mb_user_id, fkey_mb_group_id) VALUES (\$1, \$2)"; $v = array($adm->getUserIdByUserName($mb_user_name), $group_id);