gollum1990
Neues Mitglied
<?php
switch ($action)
{
case '2': echo '<h1>Registrieren</h1>
<?php
if (!isset($_REQUEST['stufe'])) {
$_REQUEST['stufe'] = "1";
}
if ($_REQUEST['stufe'] == "1") {
if ($_REQUEST['name'] == "") {
$_REQUEST['name'] = "Username";
}
if ($_REQUEST['pwd'] == "") {
$_REQUEST['pwd'] = "Passwort";
}
if ($_REQUEST['bemerkung'] == "") {
$_REQUEST['bemerkung'] = "Bemerkung";
}
if ($_REQUEST['planet'] == "") {
$_REQUEST['planet'] = "Planetenname";
}
if ($_REQUEST['mail'] == "") {
$_REQUEST['mail'] = "e-mail";
}
if ($_REQUEST['icq'] == "") {
$_REQUEST['icq'] = "ICQ#";
}
?>
<form action="" method="post">
<input type="hidden" name="PHPSESSID" value="<?= $PHPSESSID ?>">
<input type="hidden" name="stufe" value="2">
<h3>User</h3>
<input type="text" name="name" value="<?= $_REQUEST['name'] ?>">
<input type="password" name="pwd" value="<?= $_REQUEST['pwd'] ?>">
<textarea name="bemerkung"><?= $_REQUEST['bemerkung'] ?></textarea>
<input type="text" name="planet" value="<?= $_REQUEST['planet'] ?>">
<h3>Optional</h3>
<input type="text" name="email" value="<?= $_REQUEST['email'] ?>">
<select name="show_email">
<option value="ja">anzeigen</option>
<option value="nein" selected>verstecken</option>
</select>
<input type="text" name="icq" value="<?= $_REQUEST['icq'] ?>">
<select name="show_icq">
<option value="ja">anzeigen</option>
<option value="nein" selected>verstecken</option>
</select>
<h3>Weiter</h3>
<input type="checkbox" name="richtig" value="ja" /> Ich bestätige, dass diese Angaben richtig und vollständig sind.
<input type="submit" value="Registrieren">
</form>
<?php
}
if ($_REQUEST['stufe'] == "2") {
?>
<form action="" method="POST">
<input type="hidden" name="PHPSESSID" value="<?= $PHPSESSID ?>">
<input type="hidden" name="stufe" value="3">
<input type="hidden" name="name" value="<?= $_REQUEST['name'] ?>" />
<input type="hidden" name="pwd" value="<?= $_REQUEST['pwd'] ?>" />
<input type="hidden" name="bemerkung" value="<?= $_REQUEST['bemerkung'] ?>" />
<input type="hidden" name="planet" value="<?= $_REQUEST['planet'] ?>" />
<input type="hidden" name="email" value="<?= $_REQUEST['email'] ?>" />
<input type="hidden" name="show_email" value="<?= $_REQUEST['show_email'] ?>" />
<input type="hidden" name="icq" value="<?= $_REQUEST['icq'] ?>" />
<input type="hidden" name="show_icq" value="<?= $_REQUEST['show_icq'] ?>" />
<input type="hidden" name="richtig" value="<?= $_REQUEST['richtig'] ?>" />
<h3>Weiter</h3>
<input type="checkbox" name="agb" value="ja" /> Ich bestätige, dass ich die Regeln gelesen habe und ich stimme ihr zu.
<input type="submit" value="Registrieren">
</form>
<?php
}
if ($_REQUEST['stufe'] == "3") {
$table = sendSQL("SELECT * FROM `user` WHERE `user` = '".$_REQUEST['name']."'");
$row = mysql_fetch_array($table);
if (is_array($row)) {
?>
<div class="kasten-fehler">
Der Username existiert bereits.
</div>
<?php
$fehler = true;
}elseif ($_REQUEST['name'] == "") {
?>
<div class="kasten-fehler">
Der Username ist ungültig
</div>
<?php
$fehler = true;
}elseif ($_REQUEST['pwd'] == "") {
?>
<div class="kasten-fehler">
Das Passwort muss mindestends 1 Buchstaben enthalten
</div>
<?php
$fehler = true;
}elseif ($_REQUEST['richtig'] != "ja") {
?>
<div class="kasten-fehler">
Sie müssen ihre Angaben bestätigen!
</div>
<?php
$fehler = true;
}else {
$name = stripslashes(htmlentities($_REQUEST['name']));
$pwd = stripslashes(htmlentities($_REQUEST['pwd']));
$bemerkung = stripslashes(nl2br($_REQUEST['bemerkung']));
$planet = stripslashes(htmlentities($_REQUEST['planet']));
$email = $_REQUEST['email'];
$icq = str_replace("-", "", $_REQUEST['icq']);
$table = sendSQL("SELECT * FROM `user` ORDER BY `id` DESC LIMIT 0,1");
$row = mysql_fetch_array($table);
$id = $row['id'] + 1;
$table = sendSQL("SELECT * FROM `planeten` ORDER BY `id` DESC LIMIT 0,1");
$row = mysql_fetch_array($table);
$id_planet = $row['id'] + 1;
sendSQL("INSERT INTO `user` VALUES ('".$id."', '".$name."', '".$pwd."', '".$bemerkung."', 'nein', '0', '0', '0')");
sendSQL("INSERT INTO `user-personal` VALUES ('".$id."', '".$mail."', '".$show_mail."', '".$icq."', '".$show_icq."')");
sendSQL("INSERT INTO `planeten` VALUES ('".$id_planet."', '".$id."', '".$planet."', '0', '".time()."')");
sendSQL("INSERT INTO `res` VALUES ('".$id."', '100000', '50000', '0')");
sendSQL("INSERT INTO `produktion` VALUES ('".$id_planet."', '33', '33', '33')");
sendSQL("INSERT INTO `lager` VALUES ('".$id."', '5000', '5000', '5000')");
$table = sendSQL("SELECT * FROM `gebaude-shop`");
while ($row = mysql_fetch_array($table)) {
sendSQL("INSERT INTO `gebaude` VALUES ('', '".$id_planet."', '".$row['id']."', '0', '0')");
}
$table = sendSQL("SELECT * FROM `verteidigung-shop`");
while ($row = mysql_fetch_array($table)) {
sendSQL("INSERT INTO `verteidigung` VALUES ('', '".$id_planet."', '".$row['id']."', '0', '0', '0')");
}
$table = sendSQL("SELECT * FROM `forschung-shop`");
while ($row = mysql_fetch_array($table)) {
sendSQL("INSERT INTO `forschung` VALUES ('', '".$id."', '".$row['id']."', '0', '0')");
}
?>
<div class="kasten-hinweis">
Registrierung fertiggestellt
</div>
<table>
<tr>
<td>Name</td>
<td><?= $name ?></td>
</tr>
<tr>
<td>Passwort</td>
<td><?= $pwd ?></td>
</tr>
<tr>
<td>Bemerkung</td>
<td><?= $bemerkung ?></td>
</tr>
<tr>
<td>Planet</td>
<td><?= $planet ?></td>
</tr>
</table>
<table>
<tr>
<td>e-mail</td>
<td><?= $email ?> (Sichtbar: <?= $show_mail ?>)</td>
</tr>
<tr>
<td>ICQ#</td>
<td><?= $icq ?> (Sichtbar: <?= $show_icq ?>)</td>
</tr>
</table>
Zum Login
<?php
}
if ($fehler == true) {
?>
Zurück zur Registrierung
<?php
}
}
?>'; break;
default: echo 'Registrieren
'; break;
}
?>
Wo ist der Fehler wenn ich die seite aufrufe kommt das dann: "
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /usr/export/www/vhosts/funnetwork/hosting/gollum1990/index.php on line 71"
switch ($action)
{
case '2': echo '<h1>Registrieren</h1>
<?php
if (!isset($_REQUEST['stufe'])) {
$_REQUEST['stufe'] = "1";
}
if ($_REQUEST['stufe'] == "1") {
if ($_REQUEST['name'] == "") {
$_REQUEST['name'] = "Username";
}
if ($_REQUEST['pwd'] == "") {
$_REQUEST['pwd'] = "Passwort";
}
if ($_REQUEST['bemerkung'] == "") {
$_REQUEST['bemerkung'] = "Bemerkung";
}
if ($_REQUEST['planet'] == "") {
$_REQUEST['planet'] = "Planetenname";
}
if ($_REQUEST['mail'] == "") {
$_REQUEST['mail'] = "e-mail";
}
if ($_REQUEST['icq'] == "") {
$_REQUEST['icq'] = "ICQ#";
}
?>
<form action="" method="post">
<input type="hidden" name="PHPSESSID" value="<?= $PHPSESSID ?>">
<input type="hidden" name="stufe" value="2">
<h3>User</h3>
<input type="text" name="name" value="<?= $_REQUEST['name'] ?>">
<input type="password" name="pwd" value="<?= $_REQUEST['pwd'] ?>">
<textarea name="bemerkung"><?= $_REQUEST['bemerkung'] ?></textarea>
<input type="text" name="planet" value="<?= $_REQUEST['planet'] ?>">
<h3>Optional</h3>
<input type="text" name="email" value="<?= $_REQUEST['email'] ?>">
<select name="show_email">
<option value="ja">anzeigen</option>
<option value="nein" selected>verstecken</option>
</select>
<input type="text" name="icq" value="<?= $_REQUEST['icq'] ?>">
<select name="show_icq">
<option value="ja">anzeigen</option>
<option value="nein" selected>verstecken</option>
</select>
<h3>Weiter</h3>
<input type="checkbox" name="richtig" value="ja" /> Ich bestätige, dass diese Angaben richtig und vollständig sind.
<input type="submit" value="Registrieren">
</form>
<?php
}
if ($_REQUEST['stufe'] == "2") {
?>
<form action="" method="POST">
<input type="hidden" name="PHPSESSID" value="<?= $PHPSESSID ?>">
<input type="hidden" name="stufe" value="3">
<input type="hidden" name="name" value="<?= $_REQUEST['name'] ?>" />
<input type="hidden" name="pwd" value="<?= $_REQUEST['pwd'] ?>" />
<input type="hidden" name="bemerkung" value="<?= $_REQUEST['bemerkung'] ?>" />
<input type="hidden" name="planet" value="<?= $_REQUEST['planet'] ?>" />
<input type="hidden" name="email" value="<?= $_REQUEST['email'] ?>" />
<input type="hidden" name="show_email" value="<?= $_REQUEST['show_email'] ?>" />
<input type="hidden" name="icq" value="<?= $_REQUEST['icq'] ?>" />
<input type="hidden" name="show_icq" value="<?= $_REQUEST['show_icq'] ?>" />
<input type="hidden" name="richtig" value="<?= $_REQUEST['richtig'] ?>" />
<h3>Weiter</h3>
<input type="checkbox" name="agb" value="ja" /> Ich bestätige, dass ich die Regeln gelesen habe und ich stimme ihr zu.
<input type="submit" value="Registrieren">
</form>
<?php
}
if ($_REQUEST['stufe'] == "3") {
$table = sendSQL("SELECT * FROM `user` WHERE `user` = '".$_REQUEST['name']."'");
$row = mysql_fetch_array($table);
if (is_array($row)) {
?>
<div class="kasten-fehler">
Der Username existiert bereits.
</div>
<?php
$fehler = true;
}elseif ($_REQUEST['name'] == "") {
?>
<div class="kasten-fehler">
Der Username ist ungültig
</div>
<?php
$fehler = true;
}elseif ($_REQUEST['pwd'] == "") {
?>
<div class="kasten-fehler">
Das Passwort muss mindestends 1 Buchstaben enthalten
</div>
<?php
$fehler = true;
}elseif ($_REQUEST['richtig'] != "ja") {
?>
<div class="kasten-fehler">
Sie müssen ihre Angaben bestätigen!
</div>
<?php
$fehler = true;
}else {
$name = stripslashes(htmlentities($_REQUEST['name']));
$pwd = stripslashes(htmlentities($_REQUEST['pwd']));
$bemerkung = stripslashes(nl2br($_REQUEST['bemerkung']));
$planet = stripslashes(htmlentities($_REQUEST['planet']));
$email = $_REQUEST['email'];
$icq = str_replace("-", "", $_REQUEST['icq']);
$table = sendSQL("SELECT * FROM `user` ORDER BY `id` DESC LIMIT 0,1");
$row = mysql_fetch_array($table);
$id = $row['id'] + 1;
$table = sendSQL("SELECT * FROM `planeten` ORDER BY `id` DESC LIMIT 0,1");
$row = mysql_fetch_array($table);
$id_planet = $row['id'] + 1;
sendSQL("INSERT INTO `user` VALUES ('".$id."', '".$name."', '".$pwd."', '".$bemerkung."', 'nein', '0', '0', '0')");
sendSQL("INSERT INTO `user-personal` VALUES ('".$id."', '".$mail."', '".$show_mail."', '".$icq."', '".$show_icq."')");
sendSQL("INSERT INTO `planeten` VALUES ('".$id_planet."', '".$id."', '".$planet."', '0', '".time()."')");
sendSQL("INSERT INTO `res` VALUES ('".$id."', '100000', '50000', '0')");
sendSQL("INSERT INTO `produktion` VALUES ('".$id_planet."', '33', '33', '33')");
sendSQL("INSERT INTO `lager` VALUES ('".$id."', '5000', '5000', '5000')");
$table = sendSQL("SELECT * FROM `gebaude-shop`");
while ($row = mysql_fetch_array($table)) {
sendSQL("INSERT INTO `gebaude` VALUES ('', '".$id_planet."', '".$row['id']."', '0', '0')");
}
$table = sendSQL("SELECT * FROM `verteidigung-shop`");
while ($row = mysql_fetch_array($table)) {
sendSQL("INSERT INTO `verteidigung` VALUES ('', '".$id_planet."', '".$row['id']."', '0', '0', '0')");
}
$table = sendSQL("SELECT * FROM `forschung-shop`");
while ($row = mysql_fetch_array($table)) {
sendSQL("INSERT INTO `forschung` VALUES ('', '".$id."', '".$row['id']."', '0', '0')");
}
?>
<div class="kasten-hinweis">
Registrierung fertiggestellt
</div>
<table>
<tr>
<td>Name</td>
<td><?= $name ?></td>
</tr>
<tr>
<td>Passwort</td>
<td><?= $pwd ?></td>
</tr>
<tr>
<td>Bemerkung</td>
<td><?= $bemerkung ?></td>
</tr>
<tr>
<td>Planet</td>
<td><?= $planet ?></td>
</tr>
</table>
<table>
<tr>
<td>e-mail</td>
<td><?= $email ?> (Sichtbar: <?= $show_mail ?>)</td>
</tr>
<tr>
<td>ICQ#</td>
<td><?= $icq ?> (Sichtbar: <?= $show_icq ?>)</td>
</tr>
</table>
Zum Login
<?php
}
if ($fehler == true) {
?>
Zurück zur Registrierung
<?php
}
}
?>'; break;
default: echo 'Registrieren
'; break;
}
?>
Wo ist der Fehler wenn ich die seite aufrufe kommt das dann: "
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /usr/export/www/vhosts/funnetwork/hosting/gollum1990/index.php on line 71"