HP Fehler

06/05/2015 22:29 Nesiiiator#1
Moin,
Habe ein problem mit meiner HP :D
Wenn ich mich nun registrieren will kommt
Habe schon gegooglet aber nichts davon hat geklappt
So wie es aussieht liegt es an recaptcha :D
Ist aber erst seit heute warum ist das so?!
06/06/2015 10:41 Nesiiiator#2
Quote:
<div id="content_box_top"></div>
<div id="content_box_middle">

<?PHP

if(empty($_SESSION['user_id'])) {

require_once('./includes/recaptcha.include.php');
$publickey = "6LfmQugSAAAAAOoh561YRS4GuqaQhOG4RxK32FD-";
$privatekey = "6LfmQugSAAAAACRgV2EoF4HPVTARoRPrwOd9pbTu";
$resp = null;
$error = null;

//Ermittlung der Dauer der Dauerbonis
$calcLZ = (60*60*24)*365*3; //Bonis auf 2 Jahre gesetzt
$expireStamp = time()+$calcLZ;
$expireDate = date("Y-m-d H:i:s",$expireStamp);
$start_coins = 0;

if(isset($_POST['submit']) && $_POST['submit']=="Registrieren") {

$resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);

if ($resp->is_valid) {

if(checkAnum($_POST['account']) && strlen($_POST['account'])>=6 && strlen($_POST['account'])<=16) {
if (checkAnum($_POST['password']) && strlen($_POST['password'])>=6 && strlen($_POST['password'])<=16 && !empty($_POST['password2']) && $_POST['password']==$_POST['password2']) {
if(checkMail($_POST['email']) && strlen($_POST['email'])<=60) {
if(checkName($_POST['name']) && strlen($_POST['name'])>=3 && strlen($_POST['name'])<=50) {
if(checkAnum($_POST['loeschcode']) && strlen($_POST['loeschcode'])==7) {
if(checkAnum($_POST['sicherheitsantwort']) && strlen($_POST['sicherheitsantwort'])>=3 && strlen($_POST['sicherheitsantwort'])<=16 && checkInt($_POST['sicherheitsfrage'])) {
if(isset($_POST['rules'])) {

$hashsf = md5($_POST['sicherheitsantwort']);
$sfnum = $_POST['sicherheitsfrage'];
$lcode = $_POST['loeschcode'];
$userpass = $_POST['password'];
$account = $_POST['account'];
$name = $_POST['name'];
$email = $_POST['email'];

$sqlCmd = "INSERT INTO account.account
(login,password,real_name,email,social_id,question 1,answer1,create_time,status,coins,web_ip)
VALUES
(:account,PASSWORD(:pwd),:name,:email,:lcode,:sfnu m,:hashsf,NOW(),'OK',:coins,'".$_SERVER['REMOTE_ADDR']."')";
$stmt = $db->prepare($sqlCmd);
$stmt->bindValue(':account', $account);
$stmt->bindValue(':pwd', $userpass);
$stmt->bindValue(':name', $name);
$stmt->bindValue(':email', $email);
$stmt->bindValue(':lcode', $lcode);
$stmt->bindValue(':sfnum', $sfnum);
$stmt->bindValue(':hashsf', $hashsf);
$stmt->bindValue(':coins', $start_coins);
$stmt->execute();

if($stmt) {

$mail_body = "Sehr geehrter ".$_POST['name'].",

deine Registration auf Yuna2 war erfolgreich!
Wir danken dir für dein Vertrauen und wünschen dir sehr viel Spaß auf dem Server!

Um einem Verlust deiner Daten zu verhindern, bewahre diese E-Mail auf!
Andernfalls kannst du dir die Daten fest notieren.
Bei Verlust der Daten oder Weitergabe bzw. ungewollter Weitergabe durch Hacken oder ähnliches,
erstatten wir nichts vom Equipment wieder!


Deine Account-Daten lauten:
Benutzername (ID): ".$_POST['account']."
Passwort: ".$_POST['password']."

Löschcode: ".$_POST['loeschcode']."
Sicherheitsfrage: ".$sFrage[$_POST['sicherheitsfrage']]."
Antwort: ".$_POST['sicherheitsantwort']."


Wir wünschen dir auf Yuna2 sehr viel Spaß!

Nützliche Links:
Homepage:
Forum:

Bei Fragen oder Problemen wende dich bitte an das Forum oder ingame an meinen GameMaster!
Diesen kann man an dem [GM] vor dem Namen erkennen.


Mit freundlichen Grüßen,

Dein Yuna2-Team.



Diese E-Mail wurde automatisch generiert. Bitte keine Antworten an diese Adresse schicken.";

$header = "X-Priority: 3\n";
$header .= "X-Mailer: Yuna2 Homepage Mailer\n";
$header .= "MIME-Version: 1.0\n";
$header .= "From: Yuna2 <[Only registered and activated users can see links. Click Here To Register...]>\n";
$header .= "Reply-To: [Only registered and activated users can see links. Click Here To Register...]\n";
$header .= "Content-Type: text/plain; charset=uft-8\n";

mail($_POST['email'], "Registrierung auf Yuna2", $mail_body, $header);

$message_ok = 'Dein Account wurde erfolgreich angelegt!<br />Du hast zusätzlich eine E-Mail mit deinen Account-Daten erhalten.';

}
else {
$message_error = 'Der Account existiert bereits!';
}

}
else {
$message_error = 'Du musst die Yuna2 Regeln akzeptieren!';
}
}
else {
$message_error = 'Die Sicherheitsfrage oder Antwort ist ungültig!';
}
}
else {
$message_error = 'Du hast keine gültigen Löschcode eingetragen!';
}
}
else {
$message_error = 'Du hast keine gültigen Namen eingetragen!';
}
}
else {
$message_error = 'Du hast keine gültige E-Mail-Adresse eingetragen!';
}
}
else {
$message_error = 'Du hast kein gültiges Passwort angegeben oder dein Passwort stimmt nicht mit der Wiederholung überein!';
}
}
else {
$message_error = 'Du hast keinen gültigen Account-Namen (ID) eingegeben!';
}

}
else {
$error = $resp->error;
$message_error = 'Der Captcha - Code war falsch!';
}

}
?>

<script type="text/javascript">
$(function() {
$( document ).tooltip({
position: {
my: "center bottom-20",
at: "center top",
using: function( position, feedback ) {
$( this ).css( position );
$( "<div>" )
.addClass( "arrow" )
.addClass( feedback.vertical )
.addClass( feedback.horizontal )
.appendTo( this );
}
}
});
});
function CheckInput(This) {
if(This.value.length >= 6 && This.value.length <= 16) {
with (This) {
style.backgroundColor = "rgba(124,252,0,0.7)";
style.color = "#000";
}
}
else {
with (This) {
style.backgroundColor = "rgba(255,0,0,0.7)";
style.color = "#fff";
}
}
}

function CheckMail() {
var eMail = document.getElementById( "email" );
var PosEt = eMail.value.indexOf("@");

if ((PosEt == -1) || (PosEt == 0) || (eMail.value.indexOf("@", PosEt + 1) > PosEt)) {
with ( document.getElementById( "email" ) ) {
style.backgroundColor = "rgba(255,0,0,0.7)";
style.color = "#fff";
}
}
else {
with ( document.getElementById( "email" ) ) {
style.backgroundColor = "rgba(124,252,0,0.7)";
style.color = "#000";
}
}
}

function CheckPW(This) {
if(This.value.length == document.getElementById("password").value.length) {
with (This) {
style.backgroundColor = "rgba(124,252,0,0.7)";
style.color = "#000";
}
}
else {
with (This) {
style.backgroundColor = "rgba(255,0,0,0.7)";
style.color = "#fff";
}
}
}

function CheckDelete(This) {
if(This.value.length == 7) {
with (This) {
style.backgroundColor = "rgba(124,252,0,0.7)";
style.color = "#000";
}
}
else {
with (This) {
style.backgroundColor = "rgba(255,0,0,0.7)";
style.color = "#fff";
}
}
}

function CheckAnswer(This) {
if(This.value.length >= 3 && This.value.length <= 16) {
with (This) {
style.backgroundColor = "rgba(124,252,0,0.7)";
style.color = "#000";
}
}
else {
with (This) {
style.backgroundColor = "rgba(255,0,0,0.7)";
style.color = "#fff";
}
}
}

function ResetAll() {
with(document.getElementById("account")) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
with(document.getElementById("password")) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
with(document.getElementById("password2")) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
with(document.getElementById("email")) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
with(document.getElementById("name")) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
with(document.getElementById("loeschcode")) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
with(document.getElementById("sicherheitsantwort") ) {
style.backgroundColor = "rgba(0,0,0,0.4)";
style.color = "#fff";
}
}

</script>

<?php
if ($message_ok != null) {
echo '<div id="message_ok">'.$message_ok.'</div>';
}
if ($message_error != null) {
echo '<div id="message_error">'.$message_error.'</div>';
}
?>

<form id="register" method="POST">
<table border="0" cellspacing="6" cellpadding="0">
<colgroup>
<col width="35%">
<col width="65%">
</colgroup>
<tr>
<td>Benutzername (ID)</td>
<td><input type="text" name="account" id="account" maxlength="16" size="40" title="6-16 Zeichen (Buchstaben + Zahlen)" onblur="CheckInput(this)" /></td>
</tr>
<tr>
<td>Passwort</td>
<td><input type="password" name="password" id="password" maxlength="16" size="40" title="6-16 Zeichen (Buchstaben + Zahlen)" onblur="CheckInput(this)"/></td>
</tr>
<tr>
<td>Passwort wiederholen</td>
<td><input type="password" name="password2" id="password2" maxlength="16" size="40" onblur="CheckPW(this)"/></td>
</tr>
<tr>
<td style="padding-top:15px;">E-Mail-Adresse</td>
<td style="padding-top:15px;"><input type="text" name="email" id="email" maxlength="60" size="40" title="Gültige Adresse verwenden!" onblur="CheckMail()" /></td>
</tr>
<tr>
<td>Vollständiger Name</td>
<td><input type="text" name="name" id="name" maxlength="16" size="40" title="Gebe deinen Vor und Nachnamen an!" onblur="CheckInput(this)"/></td>
</tr>
<tr>
<td>Löschcode</td>
<td><input type="text" name="loeschcode" id="loeschcode" maxlength="7" size="40" title="7 Zeichen (Buchstaben + Zahlen)" onblur="CheckDelete(this)"/></td>
</tr>
<tr>
<td colspan="2" style="padding-top:15px;">Sicherheitsfrage</td>
</tr>
<tr>
<td>Frage</td>
<td>
<select name="sicherheitsfrage" style="width:270px;">
<?PHP
foreach($sFrage AS $fragew => $frage) {
echo'<option value="'.$fragew.'">'.$frage.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td>Antwort</td>
<td><input type="text" name="sicherheitsantwort" name="sicherheitsantwort" maxlength="16" size="40" title="3-16 Zeichen (Buchstaben + Zahlen)" onblur="CheckAnswer(this)"/></td>
</tr>
<tr>
<td style="padding-top:15px;">Captcha</td>
<td style="padding-top:15px;"><?php echo recaptcha_get_html($publickey, $error); ?></td>
</tr>
<tr>
<td>Bedingungen</td>
<td><input type="checkbox" name="rules" value="1" />&nbsp;Hiermit akzeptiere ich die Yuna2 Regeln und versichere, dass ich mich jederzeit daran halten werde. Bei Zuwiderhandlung werde ich die Konsequenzen bedingungslos hinnehmen.</td>
</tr>
<tr>
<td style="padding-top:15px;">&nbsp;</td>
<td style="padding-top:15px;"><input type="submit" name="submit" value="Registrieren"/><input type="reset" value="Zurücksetzen" onclick="ResetAll()"/></td>
</tr>
</table>
</form>

<?PHP
}
else {
echo '<div id="message_error"><center>Du bist schon eingeloggt!<br />Logge dich aus, um einen neuen Account erstellen zu können.</center></div>';
}
?>

</div>
<div id="content_box_bottom"></div>
Bittesehr
06/06/2015 13:59 .PolluX#3
Benutz doch bitte den PHP-Code Button, so ohne Formatierung is das ja schrecklich!