Example #1
0
$db = new MySQL_Access('pxm');
if ($_POST['submitted'] == 'reply') {
    $subject = trim($_POST['subject']);
    $message = trim($_POST['message']);
    $number = trim($_POST['n']);
    $email = urldecode(trim($_POST['e']));
    if ($message == '') {
        $notValid = 'ERROR: Missing Required Fields.';
    } else {
        if (strlen($message) > $max_chars) {
            $notValid = 'ERROR: Message Exceeds ' . $max_chars . ' Characters.';
        } else {
            if (!ctype_alnum($number)) {
                $notValid = "ERROR: Ticket Number is Invalid.";
            } else {
                $message = $db->EscStr($message);
                $db->Query("INSERT INTO tickets VALUES('','{$number}','{$email}','{$subject}','{$message}','1',NOW())");
                $date = date('F j, Y, g:i a');
                $host = get_ticket_host($subject);
                $headers = "From: {$host} <*****@*****.**>";
                $subject = "{$host} request received.";
                $message = "We received your request for support on: {$date}\n\n";
                $message .= "Your Ticket history: http://planetxmail.com/clientreply.php?n={$number}\n\n";
                $message .= "We will respond to your question as soon as we can.\n\n";
                $message .= "Thank you,\n";
                $message .= "{$host} Team";
                @mail($email, $subject, $message, $headers);
                $html = rawurlencode('<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
Example #2
0
 if (strlen($message) > $max_chars) {
     $notValid = "ERROR: Message exceeds {$max_chars} Characters.";
 } else {
     if (!$turingkey->validate()) {
         $notValid = 'ERROR: You have ' . $turingkey->time_limit . ' seconds before Turing Key Expires.';
     } else {
         if ($banned) {
             $notValid = $banned;
         } else {
             if ($notValid = EmailFormat($email)) {
             } else {
                 if (strlen($summary) > 40) {
                     $summary = substr($summary, 0, 40);
                 }
                 $subject = "{$site} {$username} {$summary}";
                 $subject = $db->EscStr($subject);
                 $message = $db->EscStr($message);
                 $number = substr(sha1(microtime(1) . $email), 0, 8);
                 $db->Query("INSERT INTO tickets VALUES('','{$number}','{$email}','{$subject}','{$message}','1',NOW())");
                 $date = date('F j, Y, g:i a');
                 $host = get_ticket_host($site);
                 $headers = "From: {$host} <*****@*****.**>";
                 $subject = "{$host} Ticket Request Received.";
                 $message = "We received your request for support on: {$date}\n\n";
                 $message .= "Your Ticket history: http://planetxmail.com/clientreply.php?n={$number}\n\n";
                 $message .= "We will respond to your question as soon as we can.\n\n";
                 $message .= "Thank you,\n";
                 $message .= "{$host} Team";
                 $ticketlink = "http://planetxmail.com/clientreply.php?n={$number}";
                 @mail($email, $subject, $message, $headers);
                 @mail('*****@*****.**', $subject, $message, $headers);