Ejemplo n.º 1
0
 function setGBVars($a, $b, $c, $d)
 {
     $this->gbDate = $a;
     $this->gbFrom = stripslashes($b);
     $this->gbEmail = $c;
     $this->gbMessage = smiley_face(stripslashes($d));
 }
Ejemplo n.º 2
0
// Exit Program if there is an error --------------------
if ($error) {
    $z = "1";
    echo $error;
    echo "<center><br><a href=\"javascript:history.go(-1)\" class=\"text\">{$goback}</a></center>";
    include "footer.inc";
    exit;
}
if ($error == "") {
    // 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 = smiley_face($yourname);
    $yourmessage = smiley_face($yourmessage);
    // Call for filtering bad words -------------------------------------------------------------------
    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 "<b>{$yournametxt}</b> {$temp1} <br>";
    echo "<b>{$youremailtxt}</b> {$temp2} <br>";
    echo "<b>{$yourMessagetxt}</b> {$temp3} <br>";
    // Write the verified guestbook entry to file ----------------------------------------------------
Ejemplo n.º 3
0
 $yourmessage = clean_message(stripslashes($yourmessage));
 // Call for filtering bad words -------------------------------------------------------------------
 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>";
Ejemplo n.º 4
0
    // Write the verified guestbook entry to file ----------------------------------------------------
    $a = new gbClass();
    $a->setGBVars($date, $yourname, $youremail, $yourmessage);
    @($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);
    $tpl->assign("yourMessagetxt", $yourMessagetxt);
    $temp1 = stripslashes($yourname);
    $temp2 = stripslashes($youremail);
    $temp3 = stripslashes($yourmessage);
    $tpl->assign("temp1", $temp1);
    $tpl->assign("temp2", $temp2);
    $tpl->assign("temp3", smiley_face($temp3));
    $tpl->assign("result1", $result1);
    $tpl->assign("entryDate", $date);
    $tpl->assign("result2", $result2);
    $html = $tpl->draw('add', $return_string = true);
    echo $html;
}
Ejemplo n.º 5
0
 function showMessage()
 {
     echo utf8_decode(smiley_face(stripslashes($this->gbMessage)));
 }
Ejemplo n.º 6
0
 function showMessage()
 {
     return smiley_face(stripslashes($this->gbMessage));
 }
Ejemplo n.º 7
0
if (!@($_POST['yourname'] && $_POST['youremail'] && $_POST['yourmessage'])) {
    echo <<<HTML
    <p class="error">You tried to save an edited guestbook entry while leaving all the fields blank. Please go back and fill out at least once field.</p>
    <p><a href="javascript: history.go(-1)" title="Go back">Go back</a></p>

HTML;
    include '../includes/admin_footer.php';
    exit;
}
// Assign, clean, add smiley faces and UBB encode user input
// Note, we do not check input for bad words: if administrator wants to swear in their guestbook that's up the him/her.
$id = $_POST['id'];
$date = date("D m/j/y g:iA");
$yourname = @stripslashes($_POST['yourname']);
$youremail = @stripslashes($_POST['youremail']);
$yourmessage = smiley_face($_POST['yourmessage']);
$myUBB = new UBBCodeN();
$yourmessage = $myUBB->encode($yourmessage);
$yourmessage = stripslashes($yourmessage);
//instantiate an instance of gbXML for working with the data file
$data_type = 'messages';
$record_delim = 'message';
$filename = '../data/data.xml';
$mygbXML = new gbXML($data_type, $record_delim, $filename);
//get our record ready to append
$tmp_array = array('id' => $id, 'name' => $yourname, 'date' => $date, 'email' => $youremail, 'msg' => $yourmessage);
//try to replace the existing record with the new one and display confirmation
if ($mygbXML->replace_record_in_file($id, $tmp_array)) {
    echo <<<HTML
     <center><h2>Record Saved</h2>