bug fix felder

git-svn-id: svn://svn.cccv.de/engel-system@42 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
cookie 2005-11-10 23:29:07 +00:00
parent 17e1ea3fd5
commit 9394eda112
2 changed files with 39 additions and 24 deletions

View File

@ -22,11 +22,14 @@ if( $_POST)
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]); $_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
unset($_POST["Passwort2"]); unset($_POST["Passwort2"]);
function mysqlinsert($table, $con, $array){ function mysqlinsert($table, $con, $array)
foreach($array as $key => $value){ {
$keys = "";
$values = "";
foreach($array as $key => $value)
{
$value = strtr($value, get_html_translation_table(HTML_ENTITIES)); $value = strtr($value, get_html_translation_table(HTML_ENTITIES));
$keys .= "'$key', "; $keys .= "´$key´, ";
$values .= "'".$value."', "; $values .= "'".$value."', ";
} }
$keys = substr($keys, 0, -2); $keys = substr($keys, 0, -2);
@ -38,13 +41,15 @@ if( $_POST)
mysqlinsert('User', $con, $_POST); mysqlinsert('User', $con, $_POST);
$Erg = mysql_affected_rows(); $Erg = mysql_affected_rows();
if ($Erg != 1) { if ($Erg != 1)
{
echo "Fehler: Kann die eingegebenen Daten nicht sichern?!?<br>"; echo "Fehler: Kann die eingegebenen Daten nicht sichern?!?<br>";
echo "\n<h6>(Fehler: ".mysql_error($con).")</h6>"; echo "\n<h6>(Fehler: ".mysql_error($con).")</h6>";
} else { }
echo "<p class=\"important\">Die Anmeldung war erfolgreich. Vielen Dank f&uuml;r deine Anmeldung.</p><p></p>\n<br><br>"; else
{
echo "<p class=\"important\">Die Anmeldung war erfolgreich.";
$SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["Nick"]. "';"; $SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["Nick"]. "';";
$Erg2 = mysql_query($SQL2, $con); $Erg2 = mysql_query($SQL2, $con);
$Data = mysql_fetch_array($Erg2); $Data = mysql_fetch_array($Erg2);
@ -53,14 +58,14 @@ if( $_POST)
$Erg3 = mysql_query($SQL3, $con); $Erg3 = mysql_query($SQL3, $con);
if ($Erg3 != 1) if ($Erg3 != 1)
{ {
echo "error: can't save userright... <br><h6>(".mysql_error($con).")</h6>"; echo "<h1>error: can't save userright... <br><h6>(".mysql_error($con).")</h6></h1>";
} }
else else
{ {
echo "userright was saved...<br>"; echo "userright was saved...<br>";
echo "<br><br> Your acount was sucsessfull creat, hafe al lot of fun."; echo "<h1> Your acount was sucsessfull creat, hafe al lot of fun.</h1>";
} }
echo "Vielen Dank f&uuml;r deine Anmeldung.</p><p></p>\n<br><br>";
} }
} }
if( !isset($error) ){ if( !isset($error) ){
@ -82,6 +87,7 @@ else
$_POST["email"] = ""; $_POST["email"] = "";
$_POST["Size"] = ""; $_POST["Size"] = "";
$_POST["Art"] = ""; $_POST["Art"] = "";
$_POST["kommentar"] = "";
} }
?> ?>
@ -127,7 +133,7 @@ Mit dieser Maske meldet Ihr euch im Engelsystem an. Durch das Engelsystem findet
Congress mitgeholfen? <br /> Congress mitgeholfen? <br />
Wenn ja, in welchem/<br /> Wenn ja, in welchem/<br />
welchen Aufgabengebiet(en)?</td> welchen Aufgabengebiet(en)?</td>
<td><textarea rows="5" cols="40" name="qualifikationen"></textarea></td> <td><textarea rows="5" cols="40" name="kommentar"><?php echo $_POST["kommentar"]; ?></textarea></td>
</tr> </tr>
<tr><td>Passwort*</td><td><input type="password" size="40" name="Passwort"/></td></tr> <tr><td>Passwort*</td><td><input type="password" size="40" name="Passwort"/></td></tr>
<tr><td>Passwort Best&auml;tigung*</td><td><input type="password" size="40" name="Passwort2"/></td></tr> <tr><td>Passwort Best&auml;tigung*</td><td><input type="password" size="40" name="Passwort2"/></td></tr>

View File

@ -21,11 +21,14 @@ if( $_POST)
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]); $_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
unset($_POST["Passwort2"]); unset($_POST["Passwort2"]);
function mysqlinsert($table, $con, $array){ function mysqlinsert($table, $con, $array)
foreach($array as $key => $value){ {
$keys = "";
$values = "";
foreach($array as $key => $value)
{
$value = strtr($value, get_html_translation_table(HTML_ENTITIES)); $value = strtr($value, get_html_translation_table(HTML_ENTITIES));
$keys .= "'$key', "; $keys .= "`$key`, ";
$values .= "'".$value."', "; $values .= "'".$value."', ";
} }
$keys = substr($keys, 0, -2); $keys = substr($keys, 0, -2);
@ -37,10 +40,14 @@ if( $_POST)
mysqlinsert('User', $con, $_POST); mysqlinsert('User', $con, $_POST);
$Erg = mysql_affected_rows(); $Erg = mysql_affected_rows();
if ($Erg != 1) { if ($Erg != 1)
echo "error: can't save your data...<br><h6>(error: ".mysql_error($con).")</h6>"; {
} else { echo "error: can't save your data...<br>";
echo "<p class=\"important\">transmitted. Thank you for your participation..</p><p></p>\n<br><br>"; echo "<h6>(error: ".mysql_error($con).")</h6>";
}
else
{
echo "<p class=\"important\">transmitted. ";
$SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["Nick"]. "';"; $SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["Nick"]. "';";
$Erg2 = mysql_query($SQL2, $con); $Erg2 = mysql_query($SQL2, $con);
@ -50,14 +57,14 @@ if( $_POST)
$Erg3 = mysql_query($SQL3, $con); $Erg3 = mysql_query($SQL3, $con);
if ($Erg3 != 1) if ($Erg3 != 1)
{ {
echo "error: can't save userright... <br><h6>(".mysql_error($con).")</h6>"; echo "<h1>error: can't save userright... <br><h6>(".mysql_error($con).")</h6></h1>";
} }
else else
{ {
echo "userright was saved...<br>"; echo "userright was saved...<br>";
echo "<br><br> Your acount was sucsessfull creat, hafe al lot of fun."; echo "<h1>Your acount was sucsessfull creat, hafe al lot of fun.</h1>";
} }
echo "Thank you for your participation..</p><p></p>\n<br><br>";
} }
} }
if( !isset($error) ){ if( !isset($error) ){
@ -79,8 +86,10 @@ else
$_POST["email"] = ""; $_POST["email"] = "";
$_POST["Size"] = ""; $_POST["Size"] = "";
$_POST["Art"] = ""; $_POST["Art"] = "";
$_POST["kommentar"] = "";
} }
?> ?>
<h1>Chaos-Angel registration</h1> <h1>Chaos-Angel registration</h1>
By completing this form you're registering as a Chaos-Angel. This script will create you an account in the congress angel task system. By completing this form you're registering as a Chaos-Angel. This script will create you an account in the congress angel task system.
@ -122,7 +131,7 @@ By completing this form you're registering as a Chaos-Angel. This script will cr
congresses and which tasks <br /> congresses and which tasks <br />
have you performed then? <br /> have you performed then? <br />
</td> </td>
<td><textarea rows="5" cols="40" name="qualifikationen"></textarea> <td><textarea rows="5" cols="40" name="kommentar"><?php echo $_POST["kommentar"]; ?></textarea>
</td> </td>
</tr> </tr>
<tr><td>password*</td><td><input type="password" size="40" name="Passwort"/></td></tr> <tr><td>password*</td><td><input type="password" size="40" name="Passwort"/></td></tr>