コード例 #1
0
ファイル: converter.php プロジェクト: yanghxstone/php
    $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>";
?>
 

コード例 #2
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";
コード例 #3
0
ファイル: add.php プロジェクト: yanghxstone/php
 }
 // Notify administrator of new email if option is selected ----------------------------------------
 if ($notify_admin == 1) {
     mail("{$notify_admin_email}", "{$notify_subject}", "{$notify_message}");
 }
 // Smiley face insertion into the message ---------------------------------------------------------
 $yourname = clean_message(stripslashes($yourname));
 $yourmessage = clean_message(stripslashes($yourmessage));
 $yourcountry = clean_message(stripslashes($yourcountry));
 // Call for filtering bad words -------------------------------------------------------------------
 if ($gbBadWordsKey == 1) {
     $yourmessage = swapBadWords($yourmessage);
 }
 // Write the verified guestbook entry to file ----------------------------------------------------
 $a = new gbClass();
 $a->setGBVars($date, $yourname, $youremail, $yourmessage, $yourcountry);
 @($fp = fopen("data/list.txt", "a"));
 flock($fp, 2);
 if (!$fp) {
     $tpl->assign("error_msg", $error7 . " - " . $error8);
     $html = $tpl->draw('error', $return_string = true);
     echo $html;
     exit;
 }
 $data = serialize($a) . "<!-- E -->";
 fwrite($fp, $data);
 flock($fp, 3);
 fclose($fp);
 // Give Confirmation that the Guestbook Entry was written -----------------------------------------
 $tpl->assign("yournametxt", $yournametxt);
 $tpl->assign("youremailtxt", $youremailtxt);