Boardunity & Video Forum

Boardunity & Video Forum (https://boardunity.de/)
-   Programmierung und Datenbanken (https://boardunity.de/programmierung-datenbanken-f23.html)
-   -   eval()'d code Fehler (https://boardunity.de/eval-d-code-fehler-t4986.html)

andi2007 27.07.2007 21:22

eval()'d code Fehler
 
Hai folks,

ich bin php newbie und komme dem Fehler nicht auf die Schliche:
Das is de quellecode:

PHP-Code:

if ($_REQUEST['action'] == "logout") {
    setcookie("userInfo");
    header("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['PHP_SELF']);
    }
# If the they haevn't logged in yet...let's tell them to do so
elseif (!isset($HTTP_COOKIE_VARS["userInfo"]) || $HTTP_COOKIE_VARS["userInfo"] == "") {
    include("include/lib.login.php");
    }
# If they are logged in, let them in...
else {
include("include/lib.abook.php");
#include the header template
include("include/inc.header.php");
    if (isset($HTTP_COOKIE_VARS["userInfo"]) && $HTTP_COOKIE_VARS["userInfo"] != "") {
HIER MOTZT ER        echo "$message[1] <span class=\"bold\">". ucfirst($userName)."</span>!";
        ?>
<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <td class="menuTD" align="right"><?
        
if ($is_admin == true) {
            print(
"<a href=\"".$HTTP_SERVER_VARS['PHP_SELF']."?action=add\" title=\"$message[13]\">$message[13]</a> | <a href=\"".$HTTP_SERVER_VARS['PHP_SELF']."?action=admin\" title=\"$message[26]\">$message[26]</a> | ");
            }
            print(
"<a href=\"".$HTTP_SERVER_VARS['PHP_SELF']."\" title=\"$message[55]\">$message[55]</a> | <a href=\"".$HTTP_SERVER_VARS['PHP_SELF']."?action=logout\" title=\"$message[44]\">$message[44]</a>");
?></td>
    </tr>
</table>
<? }
if (isset(
$HTTP_COOKIE_VARS["userInfo"]) && $HTTP_COOKIE_VARS["userInfo"] != "") {
    if (!
$_REQUEST['action'] || $_REQUEST['action'] == "(list|search)") {
?>
<center>
<form action="<? echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="get" name="search">
<table border="0" width="90%" cellspacing="0" cellpadding="4" align="center" bgcolor="#CCFF99" class="viewTable">
    <tr>
        <td class="label"><? echo $message[38]; ?></td>
        <td><select name="field"><option label="Last Name" value="LastName" selected>Last Name</option><option label="First Name" value="FirstName">First Name</option><option label="Address" value="Address1">Address</option><option label="Email Address" value="Email1">Email Address</option></select></td>
        <td><select name="how"><option label="<? echo $message[39]; ?>" value="contain" selected><? echo $message[39]; ?></option><option label="<? echo $message[40]; ?>" value="begin"><? echo $message[40]; ?></option><option label="<? echo $message[42]; ?>" value="is"><? echo $message[42]; ?></option><option label="<? echo $message[41]; ?>" value="end"><? echo $message[41]; ?></option></select></td>
        <td><input type="text" name="str" value="Search..." size="20" maxlength="100" onfocus="javascript:document.search.str.value='';"></td>
        <td><input type="hidden" name="action" value="search"><input type="submit" class="buttons" value="<? echo $message[53]; ?>"></td>
    </tr>
</table>
</form>
</center>
<? }
}

Sorry für den grossen Code, aber ich wusste nicht ob ihr alles oder nur die Zeile benötigt.

Vielleicht hat jemand eine Idee?

Danke!
Andi. :-)

Jan Stöver 27.07.2007 21:34

Off-Topic:
Ich habe deinen Code mal in den php BB Code gesteckt. Schaue mal bitte, ob er noch so ist wie du ihn eingefügt hattest. Wenn nicht, editiere bitte deinen Beitrag.

MaMo 27.07.2007 22:53

Wie ist denn die Fehlermeldung? In welcher Zeile ist der Fehler? Der im Titel vermerkte Fehler kann eigentlich nicht von dem geposteten Code sein, denn die eval-Funktion fehlt.


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:24 Uhr.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25