示例#1
0
文件: add.php 项目: yanghxstone/php
    if ($gbBadWordsKey == 1) {
        $yourmessage = swapBadWords($yourmessage);
    }
    // Give Confirmation that the Guestbook Entry was written -----------------------------------------
    echo "<p>{$result1} ";
    echo $date;
    echo "<br><br>";
    $temp1 = stripslashes($yourname);
    $temp2 = stripslashes($youremail);
    $temp3 = stripslashes($yourmessage);
    echo "<table bgcolor=#EFEFEF bordercolor=#C0C0C0 border=1 width=500 cellspacing=0 cellpadding=10><tr><td background=\"images/toolbar.jpg\" height=\"20\"></td></tr><tr><td>";
    echo "<b>{$yournametxt}</b> {$temp1} <br>";
    echo "<b>{$youremailtxt}</b> {$temp2} <br>";
    echo "<b>{$yourMessagetxt}</b> " . smiley_face($temp3) . " <br>";
    echo "</td></tr></table>";
    // Write the verified guestbook entry to file ----------------------------------------------------
    $a = new gbClass();
    $a->setGBVars($date, $yourname, $youremail, $yourmessage);
    @($fp = fopen("data/list" . $gbNameId . ".txt", "a"));
    flock($fp, 2);
    if (!$fp) {
        echo "<p><strong> {$error7}.  " . "{$error8}.</strong></p></body></html>";
        exit;
    }
    $data = serialize($a) . "<!-- E -->";
    fwrite($fp, $data);
    flock($fp, 3);
    fclose($fp);
    echo "<center><p><b>{$result2}.</b></p></center>";
}
include "footer.php";
示例#2
0
    $tmpFrom = $msgArray[2];
    $tmpEmail = $msgArray[3];
    $tmpMessage = $msgArray[4];
    $tmpEmail = str_replace('"', '"', $tmpEmail);
    $tmpEmail = str_replace("'", "'", $tmpEmail);
    $tmpFrom = strip_tags($tmpFrom);
    $tmpFrom = str_replace('"', '"', $tmpFrom);
    $tmpFrom = str_replace("'", "'", $tmpFrom);
    $tmpMessage = strip_tags($tmpMessage);
    $tmpMessage = str_replace('"', '"', $tmpMessage);
    $tmpMessage = str_replace("'", "'", $tmpMessage);
    if ($tmpDate != "" && $tmpFrom != "" && $tmpEmail != "" && $tmpMessage != "") {
        //echo "DATE: ".$tmpDate."<br>";
        //echo "FROM: ".$tmpFrom."<br>";
        //echo "EMAIL: ".$tmpEmail."<br>";
        //echo "MESSAGE: ".$tmpMessage."<br>";
        $a = new gbClass();
        $a->setGBVars($tmpDate, $tmpFrom, $tmpEmail, $tmpMessage);
        @($fp = fopen("list_converted.txt", "a"));
        flock($fp, 2);
        $data = serialize($a) . "<!-- E -->";
        fwrite($fp, $data);
        flock($fp, 3);
        fclose($fp);
    }
}
echo "<b>Guestbook Entry Conversion Completed!</b>";
?>