mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Sa 27.04.2024 07:11 Benutzername: Passwort: Auto-Login

Thema: Parse error: parse error, unexpected... vom 10.09.2005


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Programmierung -> Parse error: parse error, unexpected...
Seite: Zurück  1, 2, 3  Weiter
Autor Nachricht
caZpa
Account gelöscht


Ort: -

Verfasst Mo 12.09.2005 12:32
Titel

Antworten mit Zitat Zum Seitenanfang

hellsehen kann ich nicht
musst mir schon was zu analysieren geben
 
lechuza
Threadersteller

Dabei seit: 23.09.2003
Ort: Höchberg
Alter: 45
Geschlecht: Männlich
Verfasst Mo 12.09.2005 12:36
Titel

Antworten mit Zitat Zum Seitenanfang

gut, hier der code:

Code:
<?php

    /*
    myPHP Guestbook
    Copyright (C) 2003 - 2005  Claudio Pose
    myPHP Guestbook is a open source guestbook project of Networkarea.ch
    20041229 - Harald Weigel - Word wrap in preview
    */

    include("config.inc.php");
    include("functions.inc.php");
    db_connect();
    $count_entries = "";
    include("lang.inc.php");

    $sql_properties = mysql_query("SELECT
                                       admin_email,
                                       antiflood_ban,
                                       bbcode,
                                       check_email,
                                       check_homepage,
                                       check_icq,
                                       deactivate_html,
                                       default_style,
                                       default_template,
                                       entry_length_limit,
                                       entry_length_maximum,
                                       entry_length_minimum,
                                       guestbook_status,
                                       guestbook_title,
                                       max_word_length,
                                       notification_entries,
                                       release_entries,
                                       show_ip,
                                       smilies,
                                       statistic,
                                       statistic_ban
                                   FROM
                                       ".$table."_properties");

    $properties    = mysql_fetch_array($sql_properties);
    $default_style = $properties['default_style'];

    if ($properties['statistic']) {
        include("stats.inc.php");
    }

    $sql_template = mysql_query("SELECT
                                     bgcolor,
                                     bgimage,
                                     border,
                                     cellpadding,
                                     cellspacing,
                                     html,
                                     image_email,
                                     image_homepage,
                                     tablealign,
                                     tablewidth,
                                     tdcolor,
                                     td2color
                                 FROM
                                     ".$table."_template
                                 WHERE
                                     id='".$properties['default_template']."'");

    $template = mysql_fetch_array($sql_template);

    if (isset($_POST['send']) OR isset($_POST['preview'])) {
        if (isset($_POST['save_settings']) AND $_POST['save_settings'] == 1) {
            $life_time = time() + 3600;
            setcookie("name", $_POST['name'], $life_time);
            setcookie("email", $_POST['email'], $life_time);
            setcookie("homepage", $_POST['homepage'], $life_time);
            setcookie("icq", $_POST['icq'], $life_time);
            setcookie("save_settings", 1, $life_time);
        } else {
            setcookie("name");
            setcookie("email");
            setcookie("homepage");
            setcookie("icq");
            setcookie("save_settings");
        }
    }

    echo "<?xml version=\"1.0\" encoding=\"".$encoding."\" ?>
    <!DOCTYPE html
    PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"".$lang_short."\" lang=\"".$lang_short."\">
    <head>
    <style type=\"text/css\">
    <!-- ";

    get_style();

    echo " //-->
    </style>
    <script type=\"text/javascript\" src=\"functions.js\"></script>
    <title>".$properties['guestbook_title']."</title>
    </head>";

    if ($template['bgimage'] == "") {
        echo "<body bgcolor=\"".$template['bgcolor']."\" onLoad><div>";
    }

    if ($template['bgimage'] != "") {
        echo "<body background=\"".$template['bgimage']."\" onLoad><div>";
    }

    if ($properties['guestbook_status']) {
        if (isset($_POST['send']) OR isset($_POST['preview'])) {
            $error_msg         = "";

            if ($_POST['name'] == "") {
                $error_msg .= "<b>- ".$ms[3]."</b><br />";
            }

            if ($_POST['text'] == "") {
                $error_msg .= "<b>- ".$ms[4]."</b><br />";
            }

            if ($properties['check_email']) {
                if (!eregi("^[_\\.0-9A-Za-zÄÖÜÀÉÈäöüàéè-]+@([0-9A-Za-zÄÖÜÀÉÈäöüàéè][0-9A-Za-zÄÖÜÀÉÈäöüàéè-]+\\.)+[a-z]{2,5}\$", $_POST['email'])) {
                    $error_msg .= "<b>- ".$ms[5]."</b><br />";
                }
            }

            if ($properties['check_homepage']) {
                if ($_POST['homepage'] == "" OR $_POST['homepage'] == "http://") {
                    $error_msg .= "<b>- ".$ms[24]."</b><br />";
                }
            }

            if ($properties['check_icq']) {
                if (!preg_match("/^[0-9]*$/is", $_POST['icq']) OR $_POST['icq'] == "" OR strlen($_POST['icq']) < 9) {
                    $error_msg .= "<b>- ".$ms[208]."</b><br />";
                }
            }

            if (isset($properties['check_icq']) AND $_POST['icq'] != "") {
                if (!preg_match("/^[0-9]*$/is", $_POST['icq']) OR strlen($_POST['icq']) < 9) {
                    $error_msg .= "<b>- ".$ms[208]."</b><br />";
                }
            }

            if ($properties['entry_length_limit']) {
                $text_length = strlen($_POST['text']);

                if ($text_length > $properties['entry_length_maximum']) {
                    $error_msg .= "<b>- ".$ms[187]." ".$properties['entry_length_maximum']."</b><br />";
                }

                if ($text_length < $properties['entry_length_minimum']) {
                    $error_msg .= "<b>- ".$ms[188]." ".$properties['entry_length_minimum']."</b><br />";
                }
            }

            if (!$error_msg == "") {
                echo "".$error_msg."<br />";
            } else {
                if (isset($_POST['send'])) {
                    $_POST['email']    = mysql_escape_string($_POST['email']);
                    $_POST['homepage'] = mysql_escape_string($_POST['homepage']);
                    $_POST['icq']      = mysql_escape_string($_POST['icq']);
                    $_POST['name']     = mysql_escape_string($_POST['name']);
                    $_POST['text']     = mysql_escape_string($_POST['text']);

                    $time     = time();
                    $old_time = $time-$properties['antiflood_ban'];

                    mysql_query("DELETE FROM
                                     ".$table."_ip_ban
                                 WHERE
                                     time <= '$old_time' AND type='entry'");

                    $sql_select_ip = mysql_query("SELECT
                                                      ip
                                                  FROM
                                                      ".$table."_ip_ban
                                                  WHERE
                                                      ip='".$_SERVER['REMOTE_ADDR']."' AND type='entry'");

                    $select_ip = mysql_num_rows($sql_select_ip);

                    if ($select_ip > 0) {
                        echo "<b>".$ms[15]."</b>";
                    } else {
                        mysql_query("INSERT INTO
                                         ".$table."_ip_ban (ip, time, type)
                                     VALUES
                                         ('".$_SERVER['REMOTE_ADDR']."',
                                          '$time',
                                          'entry')");

                        if ($properties['notification_entries']) {
                            $header  = "MIME-Version: 1.0\r\n";
                            $header .= "X-Mailer: PHP\r\n";
                            $header .= "Content-type: text/plain; charset=iso-8859-1\r\n";
                            $header .= "Content-Transfer-Encoding: 8bit\r\n";
                            $header .= "From: \"myPHP Guestbook ".$version."\" <".$properties['admin_email'].">\r\n";
                            $header .= "Reply-To: ".$properties['admin_email']."\r\n";

                            mail("".$properties['admin_email']."", "".$ms[7]."", "".$ms[8]."\n\n".$ms[9]." ".$_POST['name']."\n".$ms[10]." ".$_POST['email']."\n".$ms[11]." ".$_POST['homepage']."\nICQ: ".$_POST['icq']."\n\n".$ms[12]."\n".$_POST['text']."", "$header");
                        }

                        $sql_insert_entry = mysql_query("INSERT INTO
                                                             ".$table."_entries (date, email, homepage, icq, id, ip, name, status, text, time)
                                                         VALUES
                                                             ('".date("d.m.Y")."',
                                                              '".$_POST['email']."',
                                                              '".$_POST['homepage']."',
                                                              '".$_POST['icq']."',
                                                              '',
                                                              '".$_SERVER['REMOTE_ADDR']."',
                                                              '".$_POST['name']."',
                                                              '0',
                                                              '".$_POST['text']."',
                                                              '".date("H:i")."')");
                        if ($sql_insert_entry) {
                            echo "<meta http-equiv=\"Refresh\" content=\"1; url=".$url."/index.php\"><b>".$ms[13]."</b>";
                        } else {
                            echo "<b>".$ms[14]."</b>";
                        }
                    }
                }

                if (isset($_POST['preview'])) {
                    $text = $_POST['text'];

                    if ($properties['deactivate_html']) {
                        $text = htmlentities($text);
                    }

                    $_POST['email']    = stripslashes($_POST['email']);
                    $_POST['homepage'] = stripslashes($_POST['homepage']);
                    $_POST['icq']      = stripslashes($_POST['icq']);
                    $_POST['name']     = stripslashes($_POST['name']);
                    $text              = short_words($text, $properties['max_word_length']);
                    $text              = nl2br($text);
                    $text              = badwords($text);
                    $text              = stripslashes($text);

                    if ($properties['bbcode']) {
                        $text = bbcode($text);
                    }

                    if ($properties['smilies']) {
                        $text = smilies($text);
                    }

                    if (isset($properties['release_entries']) AND $properties['release_entries'] == 1) {
                        $sql_count_entries = mysql_query("SELECT
                                                              id
                                                          FROM
                                                              ".$table."_entries
                                                          WHERE
                                                              status='1'");
                                                         } else {
                                                             $sql_count_entries = mysql_query("SELECT
                                                                                                   id
                                                                                               FROM
                                                                                                   ".$table."_entries");
                                                         }

                    $count_entries = mysql_num_rows($sql_count_entries);
                    $count_entries = $count_entries+1;
                    $template_data = $template['html'];
                    $template_data = str_replace("<\$border\$>", $template['border'], $template_data);
                    $template_data = str_replace("<\$cellpadding\$>", $template['cellpadding'], $template_data);
                    $template_data = str_replace("<\$cellspacing\$>", $template['cellspacing'], $template_data);
                    $template_data = str_replace("<\$comment\$>", "", $template_data);
                    $template_data = str_replace("<\$date\$>", date("d.m.Y"), $template_data);
                    $template_data = str_replace("<\$id\$>", $count_entries, $template_data);
                    $template_data = str_replace("<\$name\$>", $_POST['name'], $template_data);
                    $template_data = str_replace("<\$tablealign\$>", $template['tablealign'], $template_data);
                    $template_data = str_replace("<\$tablewidth\$>", $template['tablewidth'], $template_data);
                    $template_data = str_replace("<\$tdcolor\$>", $template['tdcolor'], $template_data);
                    $template_data = str_replace("<\$td2color\$>", $template['td2color'], $template_data);
                    $template_data = str_replace("<\$text\$>", $text, $template_data);
                    $template_data = str_replace("<\$time\$>", date("H:i"), $template_data);

                    if ($properties['show_ip']) {
                        $template_data = str_replace("<\$ip\$>", "IP: ".$_SERVER['REMOTE_ADDR']."<br />", $template_data);
                    } else {
                        $template_data = str_replace("<\$ip\$>", "", $template_data);
                    }

                    if ($_POST['email'] != "") {
                        $template_data = str_replace("<\$email\$>", "<a href=\"mailto:".$_POST['email']."\"><img src=\"".$url."/images/icons/email/".$template['image_email']."\" border=\"0\" alt=\"".$_POST['email']."\" /></a>", $template_data);
                    } else {
                        $template_data = str_replace("<\$email\$>", "", $template_data);
                    }

                    if ($_POST['homepage'] == "" OR $_POST['homepage'] == "http://") {
                        $template_data = str_replace("<\$homepage\$>", "", $template_data);
                    } else {
                        $template_data = str_replace("<\$homepage\$>", "<a href=\"".$_POST['homepage']."\" target=\"_blank\"><img src=\"".$url."/images/icons/homepage/".$template['image_homepage']."\" border=\"0\" alt=\"".$_POST['homepage']."\" /></a>", $template_data);
                    }

                    if ($_POST['icq'] == "") {
                        $template_data = str_replace("<\$icq\$>", "", $template_data);
                    } else {
                        $template_data = str_replace("<\$icq\$>", "<a href=\"http://web.icq.com/whitepages/about_me?Uin=".$_POST['icq']."\" target=\"_blank\"><img src=\"http://wwp.icq.com/scripts/online.dll?icq=".$_POST['icq']."&img=5\" border=\"0\" alt=\"".$_POST['icq']."\" /></a>", $template_data);
                    }

                    echo "<div align=\"".$template['tablealign']."\">
                    <br /><br /><br /><br />
                    ".$template_data."
                    </div>";
                }
            }
        }

        echo "<br /><br /><br /> <br /><br />
        <form action=\"".$url."/insert.php\" method=\"post\">
        <table width=\"490\" align=\"".$template['tablealign']."\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" class=\"guestbook_table2\">
        <tr>
        <td width=\"69\" align=\"left\">".$ms[9]."*</td><td width=\"200\" align=\"left\"><input type=\"text\" name=\"name\" size=\"28\" maxlength=\"20\" value=\"";

        if (isset($_COOKIE['name']) AND $_COOKIE['name'] != "") {
            echo "".$_COOKIE['name']."";
        } elseif (isset($_POST['name']) AND $_POST['name'] != "") {
            echo "".$_POST['name']."";
        }

        echo "\" tabindex=\"1\" /></td>
        <td width=\"150\" rowspan=\"5\"><table width=\"109\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" class=\"guestbook_table2\">";

        if ($properties['bbcode']) {
            echo "<tr>
            <td colspan=\"6\" align=\"center\">BBCodes:</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><b>Text</b> = [b]Text[/b]</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><i>Text</i> = [i]Text[/i]</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><u>Text</u> = [u]Text[/u]</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><b><a href=\"javascript:NewWindow('".$url."/bbcodes.php','BBCodes','250','480','custom','front');\">".$ms[19]."</a></b></td>
            </tr>
            <tr>
            <td colspan=\"6\">&nbsp;</td>
            </tr>";
        }

        if ($properties['smilies']) {
            $sql_smilies_count = mysql_query("SELECT
                                                  id
                                              FROM
                                                  ".$table."_smilies");

            $count_smilies = mysql_num_rows($sql_smilies_count);

            if ($count_smilies > 0) {
                echo "<tr>
                <td colspan=\"6\" align=\"center\">".$ms[46].":</td>
                </tr>
                <tr>";
            }

            $sql_smilies = mysql_query("SELECT
                                            bbcode,
                                            filename,
                                            height,
                                            name,
                                            width
                                        FROM
                                            ".$table."_smilies
                                        LIMIT
                                            0,5");

            while ($smilies = mysql_fetch_array($sql_smilies)) {
                echo "<td align=\"center\"><img src=\"".$url."/images/smilies/".$smilies['filename']."\" width=\"".$smilies['width']."\" height=\"".$smilies['height']."\" alt=\"".$smilies['name']."\" onclick=\"document.getElementById('text').value += '".$smilies['bbcode']."'\" /></td>";
            }

            if ($count_smilies > 0) {
                echo "</tr><tr>";
            }

            $sql_smilies = mysql_query("SELECT
                                            bbcode,
                                            filename,
                                            height,
                                            name,
                                            width
                                        FROM
                                            ".$table."_smilies
                                        LIMIT
                                            5,5");

            while ($smilies = mysql_fetch_array($sql_smilies)) {
                echo "<td align=\"center\"><img src=\"".$url."/images/smilies/".$smilies['filename']."\" width=\"".$smilies['width']."\" height=\"".$smilies['height']."\" alt=\"".$smilies['name']."\" onclick=\"document.getElementById('text').value += '".$smilies['bbcode']."'\" /></td>";
            }

            if ($count_smilies > 0) {
                echo "</tr><tr>";
            }


            $sql_smilies = mysql_query("SELECT
                                            bbcode,
                                            filename,
                                            height,
                                            name,
                                            width
                                        FROM
                                            ".$table."_smilies
                                        LIMIT
                                            10,5");

            while ($smilies = mysql_fetch_array($sql_smilies)) {
                echo "<td align=\"center\"><img src=\"".$url."/images/smilies/".$smilies['filename']."\" width=\"".$smilies['width']."\" height=\"".$smilies['height']."\" alt=\"".$smilies['name']."\" onclick=\"document.getElementById('text').value += '".$smilies['bbcode']."'\" /></td>";
            }

            if ($count_smilies >= 10) {
                echo "</tr><tr>";
            }

            if ($count_smilies > 15) {
                echo "<tr>
                <td colspan=\"6\" align=\"center\"><b><a href=\"javascript:NewWindow('".$url."/smilies.php','Smilies','215','200','custom','front');\">".$ms[19]."</a></b></td>
                </tr>";
            }
        }

        echo "</table>
        </td>
        </tr>
        <tr>
        <td align=\"left\">".$ms[10]."";

        if (isset($properties['check_email']) AND $properties['check_email'] == 1) {
            echo "*";
        }

        echo "</td><td align=\"left\"><input type=\"text\" name=\"email\" size=\"28\" maxlength=\"40\" value=\"";

        if (isset($_COOKIE['email']) AND $_COOKIE['email'] != "") {
            echo "".$_COOKIE['email']."";
        } elseif (isset($_POST['email']) AND $_POST['email'] != "") {
            echo "".$_POST['email']."";
        }

        echo"\" tabindex=\"2\" /></td>
        </tr>
        <tr>
        <td align=\"left\">".$ms[11]."";

        if (isset($properties['check_homepage']) AND $properties['check_homepage'] == 1) {
            echo "*";
        }

        echo "</td><td align=\"left\"><input type=\"text\" name=\"homepage\" size=\"28\" maxlength=\"80\" value=\"";

        if (isset($_COOKIE['homepage']) AND $_COOKIE['homepage'] != "") {
            echo "".$_COOKIE['homepage']."";
        } elseif (isset($_POST['homepage']) AND $_POST['homepage'] != "") {
            echo "".$_POST['homepage']."";
        } else {
            echo "http://";
        }

        echo "\" tabindex=\"3\" /></td>
        </tr>
        <tr>
        <td align=\"left\">ICQ:";

        if (isset($properties['check_icq']) AND $properties['check_icq'] == 1) {
            echo "*";
        }

        echo "</td><td align=\"left\"><input type=\"text\" name=\"icq\" size=\"28\" maxlength=\"9\" value=\"";

        if (isset($_COOKIE['icq']) AND $_COOKIE['icq'] != "") {
            echo "".$_COOKIE['icq']."";
        } elseif (isset($_POST['icq']) AND $_POST['icq'] != "") {
            echo "".$_POST['icq']."";
        }

        echo "\" tabindex=\"4\" /></td>
        </tr>
        <tr>
        <td colspan=\"2\" align=\"left\"><textarea rows=\"13\" id=\"text\" name=\"text\" cols=\"44\" tabindex=\"4\" >";

        if (isset($_POST['text'])) {
            echo stripslashes($_POST['text']);
        }

        echo "</textarea></td>
        </tr>
        <tr>
        <td colspan=\"2\" align=\"left\"><input type=\"checkbox\" name=\"save_settings\"";

        if (isset($_COOKIE['save_settings']) AND $_COOKIE['save_settings'] ']']']']']== 1) {
            echo " checked=\"checked\"";
        }

        echo " value=\"1\" /> ".$ms[205]."</td>
        </tr>
        <tr>
        <td colspan=\"2\" align=\"left\"><input type=\"submit\" name=\"send\" value=\"".$ms[20]."\" tabindex=\"5\" /> <input type=\"submit\" name=\"preview\" value=\"".$ms[189]."\" tabindex=\"6\" /></td>
        </tr>
        </table>
        </form>";
    } else {
        echo "<b>".$ms[34]."</b>";
    }

    echo "</div>
    </body>
    </html>";
?>


aber wie soll das denn daran liegen, wenn ich daran nix verändert hab!?


Zuletzt bearbeitet von lechuza am Mo 12.09.2005 12:44, insgesamt 1-mal bearbeitet
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
Anzeige
Anzeige
caZpa
Account gelöscht


Ort: -

Verfasst Mo 12.09.2005 12:50
Titel

Antworten mit Zitat Zum Seitenanfang

auch so wird man den fehler nicht finden, weil du keine zeilen/datei-angabe gemacht hast wo der fehler ist

check pn
 
lechuza
Threadersteller

Dabei seit: 23.09.2003
Ort: Höchberg
Alter: 45
Geschlecht: Männlich
Verfasst Mo 12.09.2005 12:55
Titel

Antworten mit Zitat Zum Seitenanfang

die fehlermeldung seht ihr hier, aber in der zeile hab ich nix geändert...und es hatten scheinbar schon eingige andere user mit dem script das gleiche problem...aber keiner hat ne lösung gefunden.
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
Pixelpole

Dabei seit: 25.10.2004
Ort: Trier
Alter: 37
Geschlecht: Männlich
Verfasst Mo 12.09.2005 13:11
Titel

Antworten mit Zitat Zum Seitenanfang

Teste bitte mal das:
Code:

<?php

    /*
    myPHP Guestbook
    Copyright (C) 2003 - 2005  Claudio Pose
    myPHP Guestbook is a open source guestbook project of Networkarea.ch
    20041229 - Harald Weigel - Word wrap in preview
    */

    include("config.inc.php");
    include("functions.inc.php");
    db_connect();
    $count_entries = "";
    include("lang.inc.php");

    $sql_properties = mysql_query("SELECT
                                       admin_email,
                                       antiflood_ban,
                                       bbcode,
                                       check_email,
                                       check_homepage,
                                       check_icq,
                                       deactivate_html,
                                       default_style,
                                       default_template,
                                       entry_length_limit,
                                       entry_length_maximum,
                                       entry_length_minimum,
                                       guestbook_status,
                                       guestbook_title,
                                       max_word_length,
                                       notification_entries,
                                       release_entries,
                                       show_ip,
                                       smilies,
                                       statistic,
                                       statistic_ban
                                   FROM
                                       ".$table."_properties");

    $properties    = mysql_fetch_array($sql_properties);
    $default_style = $properties['default_style'];

    if ($properties['statistic']) {
        include("stats.inc.php");
    }

    $sql_template = mysql_query("SELECT
                                     bgcolor,
                                     bgimage,
                                     border,
                                     cellpadding,
                                     cellspacing,
                                     html,
                                     image_email,
                                     image_homepage,
                                     tablealign,
                                     tablewidth,
                                     tdcolor,
                                     td2color
                                 FROM
                                     ".$table."_template
                                 WHERE
                                     id='".$properties['default_template']."'");

    $template = mysql_fetch_array($sql_template);

    if (isset($_POST['send']) OR isset($_POST['preview'])) {
        if (isset($_POST['save_settings']) AND $_POST['save_settings'] == 1) {
            $life_time = time() + 3600;
            setcookie("name", $_POST['name'], $life_time);
            setcookie("email", $_POST['email'], $life_time);
            setcookie("homepage", $_POST['homepage'], $life_time);
            setcookie("icq", $_POST['icq'], $life_time);
            setcookie("save_settings", 1, $life_time);
        } else {
            setcookie("name");
            setcookie("email");
            setcookie("homepage");
            setcookie("icq");
            setcookie("save_settings");
        }
    }

    echo "<?xml version=\"1.0\" encoding=\"".$encoding."\" ?>
    <!DOCTYPE html
    PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"".$lang_short."\" lang=\"".$lang_short."\">
    <head>
    <style type=\"text/css\">
    <!-- ";

    get_style();

    echo " //-->
    </style>
    <script type=\"text/javascript\" src=\"functions.js\"></script>
    <title>".$properties['guestbook_title']."</title>
    </head>";

    if ($template['bgimage'] == "") {
        echo "<body bgcolor=\"".$template['bgcolor']."\" onLoad><div>";
    }

    if ($template['bgimage'] != "") {
        echo "<body background=\"".$template['bgimage']."\" onLoad><div>";
    }

    if ($properties['guestbook_status']) {
        if (isset($_POST['send']) OR isset($_POST['preview'])) {
            $error_msg         = "";

            if ($_POST['name'] == "") {
                $error_msg .= "<b>- ".$ms[3]."</b><br />";
            }

            if ($_POST['text'] == "") {
                $error_msg .= "<b>- ".$ms[4]."</b><br />";
            }

            if ($properties['check_email']) {
                if (!eregi("^[_\\.0-9A-Za-zÄÖÜÀÉÈäöüàéè-]+@([0-9A-Za-zÄÖÜÀÉÈäöüàéè][0-9A-Za-zÄÖÜÀÉÈäöüàéè-]+\\.)+[a-z]{2,5}\$", $_POST['email'])) {
                    $error_msg .= "<b>- ".$ms[5]."</b><br />";
                }
            }

            if ($properties['check_homepage']) {
                if ($_POST['homepage'] == "" OR $_POST['homepage'] == "http://") {
                    $error_msg .= "<b>- ".$ms[24]."</b><br />";
                }
            }

            if ($properties['check_icq']) {
                if (!preg_match("/^[0-9]*$/is", $_POST['icq']) OR $_POST['icq'] == "" OR strlen($_POST['icq']) < 9) {
                    $error_msg .= "<b>- ".$ms[208]."</b><br />";
                }
            }

            if (isset($properties['check_icq']) AND $_POST['icq'] != "") {
                if (!preg_match("/^[0-9]*$/is", $_POST['icq']) OR strlen($_POST['icq']) < 9) {
                    $error_msg .= "<b>- ".$ms[208]."</b><br />";
                }
            }

            if ($properties['entry_length_limit']) {
                $text_length = strlen($_POST['text']);

                if ($text_length > $properties['entry_length_maximum']) {
                    $error_msg .= "<b>- ".$ms[187]." ".$properties['entry_length_maximum']."</b><br />";
                }

                if ($text_length < $properties['entry_length_minimum']) {
                    $error_msg .= "<b>- ".$ms[188]." ".$properties['entry_length_minimum']."</b><br />";
                }
            }

            if (!$error_msg == "") {
                echo "".$error_msg."<br />";
            } else {
                if (isset($_POST['send'])) {
                    $_POST['email']    = mysql_escape_string($_POST['email']);
                    $_POST['homepage'] = mysql_escape_string($_POST['homepage']);
                    $_POST['icq']      = mysql_escape_string($_POST['icq']);
                    $_POST['name']     = mysql_escape_string($_POST['name']);
                    $_POST['text']     = mysql_escape_string($_POST['text']);

                    $time     = time();
                    $old_time = $time-$properties['antiflood_ban'];

                    mysql_query("DELETE FROM
                                     ".$table."_ip_ban
                                 WHERE
                                     time <= '$old_time' AND type='entry'");

                    $sql_select_ip = mysql_query("SELECT
                                                      ip
                                                  FROM
                                                      ".$table."_ip_ban
                                                  WHERE
                                                      ip='".$_SERVER['REMOTE_ADDR']."' AND type='entry'");

                    $select_ip = mysql_num_rows($sql_select_ip);

                    if ($select_ip > 0) {
                        echo "<b>".$ms[15]."</b>";
                    } else {
                        mysql_query("INSERT INTO
                                         ".$table."_ip_ban (ip, time, type)
                                     VALUES
                                         ('".$_SERVER['REMOTE_ADDR']."',
                                          '$time',
                                          'entry')");

                        if ($properties['notification_entries']) {
                            $header  = "MIME-Version: 1.0\r\n";
                            $header .= "X-Mailer: PHP\r\n";
                            $header .= "Content-type: text/plain; charset=iso-8859-1\r\n";
                            $header .= "Content-Transfer-Encoding: 8bit\r\n";
                            $header .= "From: \"myPHP Guestbook ".$version."\" <".$properties['admin_email'].">\r\n";
                            $header .= "Reply-To: ".$properties['admin_email']."\r\n";

                            mail("".$properties['admin_email']."", "".$ms[7]."", "".$ms[8]."\n\n".$ms[9]." ".$_POST['name']."\n".$ms[10]." ".$_POST['email']."\n".$ms[11]." ".$_POST['homepage']."\nICQ: ".$_POST['icq']."\n\n".$ms[12]."\n".$_POST['text']."", "$header");
                        }

                        $sql_insert_entry = mysql_query("INSERT INTO
                                                             ".$table."_entries (date, email, homepage, icq, id, ip, name, status, text, time)
                                                         VALUES
                                                             ('".date("d.m.Y")."',
                                                              '".$_POST['email']."',
                                                              '".$_POST['homepage']."',
                                                              '".$_POST['icq']."',
                                                              '',
                                                              '".$_SERVER['REMOTE_ADDR']."',
                                                              '".$_POST['name']."',
                                                              '0',
                                                              '".$_POST['text']."',
                                                              '".date("H:i")."')");
                        if ($sql_insert_entry) {
                            echo "<meta http-equiv=\"Refresh\" content=\"1; url=".$url."/index.php\"><b>".$ms[13]."</b>";
                        } else {
                            echo "<b>".$ms[14]."</b>";
                        }
                    }
                }

                if (isset($_POST['preview'])) {
                    $text = $_POST['text'];

                    if ($properties['deactivate_html']) {
                        $text = htmlentities($text);
                    }

                    $_POST['email']    = stripslashes($_POST['email']);
                    $_POST['homepage'] = stripslashes($_POST['homepage']);
                    $_POST['icq']      = stripslashes($_POST['icq']);
                    $_POST['name']     = stripslashes($_POST['name']);
                    $text              = short_words($text, $properties['max_word_length']);
                    $text              = nl2br($text);
                    $text              = badwords($text);
                    $text              = stripslashes($text);

                    if ($properties['bbcode']) {
                        $text = bbcode($text);
                    }

                    if ($properties['smilies']) {
                        $text = smilies($text);
                    }

                    if (isset($properties['release_entries']) AND $properties['release_entries'] == 1) {
                        $sql_count_entries = mysql_query("SELECT
                                                              id
                                                          FROM
                                                              ".$table."_entries
                                                          WHERE
                                                              status='1'");
                                                         } else {
                                                             $sql_count_entries = mysql_query("SELECT
                                                                                                   id
                                                                                               FROM
                                                                                                   ".$table."_entries");
                                                         }

                    $count_entries = mysql_num_rows($sql_count_entries);
                    $count_entries = $count_entries+1;
                    $template_data = $template['html'];
                    $template_data = str_replace("<\$border\$>", $template['border'], $template_data);
                    $template_data = str_replace("<\$cellpadding\$>", $template['cellpadding'], $template_data);
                    $template_data = str_replace("<\$cellspacing\$>", $template['cellspacing'], $template_data);
                    $template_data = str_replace("<\$comment\$>", "", $template_data);
                    $template_data = str_replace("<\$date\$>", date("d.m.Y"), $template_data);
                    $template_data = str_replace("<\$id\$>", $count_entries, $template_data);
                    $template_data = str_replace("<\$name\$>", $_POST['name'], $template_data);
                    $template_data = str_replace("<\$tablealign\$>", $template['tablealign'], $template_data);
                    $template_data = str_replace("<\$tablewidth\$>", $template['tablewidth'], $template_data);
                    $template_data = str_replace("<\$tdcolor\$>", $template['tdcolor'], $template_data);
                    $template_data = str_replace("<\$td2color\$>", $template['td2color'], $template_data);
                    $template_data = str_replace("<\$text\$>", $text, $template_data);
                    $template_data = str_replace("<\$time\$>", date("H:i"), $template_data);

                    if ($properties['show_ip']) {
                        $template_data = str_replace("<\$ip\$>", "IP: ".$_SERVER['REMOTE_ADDR']."<br />", $template_data);
                    } else {
                        $template_data = str_replace("<\$ip\$>", "", $template_data);
                    }

                    if ($_POST['email'] != "") {
                        $template_data = str_replace("<\$email\$>", "<a href=\"mailto:".$_POST['email']."\"><img src=\"".$url."/images/icons/email/".$template['image_email']."\" border=\"0\" alt=\"".$_POST['email']."\" /></a>", $template_data);
                    } else {
                        $template_data = str_replace("<\$email\$>", "", $template_data);
                    }

                    if ($_POST['homepage'] == "" OR $_POST['homepage'] == "http://") {
                        $template_data = str_replace("<\$homepage\$>", "", $template_data);
                    } else {
                        $template_data = str_replace("<\$homepage\$>", "<a href=\"".$_POST['homepage']."\" target=\"_blank\"><img src=\"".$url."/images/icons/homepage/".$template['image_homepage']."\" border=\"0\" alt=\"".$_POST['homepage']."\" /></a>", $template_data);
                    }

                    if ($_POST['icq'] == "") {
                        $template_data = str_replace("<\$icq\$>", "", $template_data);
                    } else {
                        $template_data = str_replace("<\$icq\$>", "<a href=\"http://web.icq.com/whitepages/about_me?Uin=".$_POST['icq']."\" target=\"_blank\"><img src=\"http://wwp.icq.com/scripts/online.dll?icq=".$_POST['icq']."&img=5\" border=\"0\" alt=\"".$_POST['icq']."\" /></a>", $template_data);
                    }

                    echo "<div align=\"".$template['tablealign']."\">
                    <br /><br /><br /><br />
                    ".$template_data."
                    </div>";
                }
            }
        }

        echo "<br /><br /><br /> <br /><br />
        <form action=\"".$url."/insert.php\" method=\"post\">
        <table width=\"490\" align=\"".$template['tablealign']."\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" class=\"guestbook_table2\">
        <tr>
        <td width=\"69\" align=\"left\">".$ms[9]."*</td><td width=\"200\" align=\"left\"><input type=\"text\" name=\"name\" size=\"28\" maxlength=\"20\" value=\"";

        if (isset($_COOKIE['name']) AND $_COOKIE['name'] != "") {
            echo "".$_COOKIE['name']."";
        } elseif (isset($_POST['name']) AND $_POST['name'] != "") {
            echo "".$_POST['name']."";
        }

        echo "\" tabindex=\"1\" /></td>
        <td width=\"150\" rowspan=\"5\"><table width=\"109\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" class=\"guestbook_table2\">";

        if ($properties['bbcode']) {
            echo "<tr>
            <td colspan=\"6\" align=\"center\">BBCodes:</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><b>Text</b> = [b]Text[/b]</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><i>Text</i> = [i]Text[/i]</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><u>Text</u> = [u]Text[/u]</td>
            </tr>
            <tr>
            <td colspan=\"6\" align=\"center\"><b><a href=\"javascript:NewWindow('".$url."/bbcodes.php','BBCodes','250','480','custom','front');\">".$ms[19]."</a></b></td>
            </tr>
            <tr>
            <td colspan=\"6\">&nbsp;</td>
            </tr>";
        }

        if ($properties['smilies']) {
            $sql_smilies_count = mysql_query("SELECT
                                                  id
                                              FROM
                                                  ".$table."_smilies");

            $count_smilies = mysql_num_rows($sql_smilies_count);

            if ($count_smilies > 0) {
                echo "<tr>
                <td colspan=\"6\" align=\"center\">".$ms[46].":</td>
                </tr>
                <tr>";
            }

            $sql_smilies = mysql_query("SELECT
                                            bbcode,
                                            filename,
                                            height,
                                            name,
                                            width
                                        FROM
                                            ".$table."_smilies
                                        LIMIT
                                            0,5");

            while ($smilies = mysql_fetch_array($sql_smilies)) {
                echo "<td align=\"center\"><img src=\"".$url."/images/smilies/".$smilies['filename']."\" width=\"".$smilies['width']."\" height=\"".$smilies['height']."\" alt=\"".$smilies['name']."\" onclick=\"document.getElementById('text').value += '".$smilies['bbcode']."'\" /></td>";
            }

            if ($count_smilies > 0) {
                echo "</tr><tr>";
            }

            $sql_smilies = mysql_query("SELECT
                                            bbcode,
                                            filename,
                                            height,
                                            name,
                                            width
                                        FROM
                                            ".$table."_smilies
                                        LIMIT
                                            5,5");

            while ($smilies = mysql_fetch_array($sql_smilies)) {
                echo "<td align=\"center\"><img src=\"".$url."/images/smilies/".$smilies['filename']."\" width=\"".$smilies['width']."\" height=\"".$smilies['height']."\" alt=\"".$smilies['name']."\" onclick=\"document.getElementById('text').value += '".$smilies['bbcode']."'\" /></td>";
            }

            if ($count_smilies > 0) {
                echo "</tr><tr>";
            }


            $sql_smilies = mysql_query("SELECT
                                            bbcode,
                                            filename,
                                            height,
                                            name,
                                            width
                                        FROM
                                            ".$table."_smilies
                                        LIMIT
                                            10,5");

            while ($smilies = mysql_fetch_array($sql_smilies)) {
                echo "<td align=\"center\"><img src=\"".$url."/images/smilies/".$smilies['filename']."\" width=\"".$smilies['width']."\" height=\"".$smilies['height']."\" alt=\"".$smilies['name']."\" onclick=\"document.getElementById('text').value += '".$smilies['bbcode']."'\" /></td>";
            }

            if ($count_smilies >= 10) {
                echo "</tr><tr>";
            }

            if ($count_smilies > 15) {
                echo "<tr>
                <td colspan=\"6\" align=\"center\"><b><a href=\"javascript:NewWindow('".$url."/smilies.php','Smilies','215','200','custom','front');\">".$ms[19]."</a></b></td>
                </tr>";
            }
        }

        echo "</table>
        </td>
        </tr>
        <tr>
        <td align=\"left\">".$ms[10]."";

        if (isset($properties['check_email']) AND $properties['check_email'] == 1) {
            echo "*";
        }

        echo "</td><td align=\"left\"><input type=\"text\" name=\"email\" size=\"28\" maxlength=\"40\" value=\"";

        if (isset($_COOKIE['email']) AND $_COOKIE['email'] != "") {
            echo "".$_COOKIE['email']."";
        } elseif (isset($_POST['email']) AND $_POST['email'] != "") {
            echo "".$_POST['email']."";
        }

        echo"\" tabindex=\"2\" /></td>
        </tr>
        <tr>
        <td align=\"left\">".$ms[11]."";

        if (isset($properties['check_homepage']) AND $properties['check_homepage'] == 1) {
            echo "*";
        }

        echo "</td><td align=\"left\"><input type=\"text\" name=\"homepage\" size=\"28\" maxlength=\"80\" value=\"";

        if (isset($_COOKIE['homepage']) AND $_COOKIE['homepage'] != "") {
            echo "".$_COOKIE['homepage']."";
        } elseif (isset($_POST['homepage']) AND $_POST['homepage'] != "") {
            echo "".$_POST['homepage']."";
        } else {
            echo "http://";
        }

        echo "\" tabindex=\"3\" /></td>
        </tr>
        <tr>
        <td align=\"left\">ICQ:";

        if (isset($properties['check_icq']) AND $properties['check_icq'] == 1) {
            echo "*";
        }

        echo "</td><td align=\"left\"><input type=\"text\" name=\"icq\" size=\"28\" maxlength=\"9\" value=\"";

        if (isset($_COOKIE['icq']) AND $_COOKIE['icq'] != "") {
            echo "".$_COOKIE['icq']."";
        } elseif (isset($_POST['icq']) AND $_POST['icq'] != "") {
            echo "".$_POST['icq']."";
        }

        echo "\" tabindex=\"4\" /></td>
        </tr>
        <tr>
        <td colspan=\"2\" align=\"left\"><textarea rows=\"13\" id=\"text\" name=\"text\" cols=\"44\" tabindex=\"4\" >";

        if (isset($_POST['text'])) {
            echo stripslashes($_POST['text']);
        }

        echo "</textarea></td>
        </tr>
        <tr>
        <td colspan=\"2\" align=\"left\"><input type=\"checkbox\" name=\"save_settings\"";

        if (isset($_COOKIE['save_settings']) AND $_COOKIE['save_settings'] == 1) {
            echo " checked=\"checked\"";
        }

        echo " value=\"1\" /> ".$ms[205]."</td>
        </tr>
        <tr>
        <td colspan=\"2\" align=\"left\"><input type=\"submit\" name=\"send\" value=\"".$ms[20]."\" tabindex=\"5\" /> <input type=\"submit\" name=\"preview\" value=\"".$ms[189]."\" tabindex=\"6\" /></td>
        </tr>
        </table>
        </form>";
    } else {
        echo "<b>".$ms[34]."</b>";
    }

    echo "</div>
    </body>
    </html>";
?>
  View user's profile Private Nachricht senden
lechuza
Threadersteller

Dabei seit: 23.09.2003
Ort: Höchberg
Alter: 45
Geschlecht: Männlich
Verfasst Mo 12.09.2005 13:15
Titel

Antworten mit Zitat Zum Seitenanfang

gleicher fehler, gleiche zeile...was hast du geändert?
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
Pixelpole

Dabei seit: 25.10.2004
Ort: Trier
Alter: 37
Geschlecht: Männlich
Verfasst Mo 12.09.2005 13:26
Titel

Antworten mit Zitat Zum Seitenanfang

da warn ein paar ]' überflüssig. SCheint aber nix gebracht zu haben
  View user's profile Private Nachricht senden
caZpa
Account gelöscht


Ort: -

Verfasst Mo 12.09.2005 13:28
Titel

Antworten mit Zitat Zum Seitenanfang

ja da ist einiges ueberfluessig

kommentier mal zeile 494 aus
 
 
Ähnliche Themen Parse error: syntax error, unexpected '<' in /homepages/23/
Parse error: syntax error, unexpected '>' [solved]
Parse error: syntax error, unexpected '{'
Parse error - in php
Parse error:
Ich bekomme dieses Parse error: nicht weg
Neues Thema eröffnen   Neue Antwort erstellen Seite: Zurück  1, 2, 3  Weiter
MGi Foren-Übersicht -> Programmierung


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.