safe_query("INSERT INTO tickets (userID, date, category, subject, severity, lastPost) VALUES (%i, NOW(), %i, '%s', %i, %i)", array($_SESSION['support_id'], $_POST['category'], $_POST['subject'], $_POST['severity'], $_SESSION['support_id']), __FILE__, __LINE__); $ticket_id = $database->get_insert_id(); // Insert the message // NOTE: The actual ticket and the message are stored seperately, so don't get confused here $database->safe_query("INSERT INTO ticket_messages (date, message, ticketID, userID) VALUES (NOW(), '%s', %i, %i)", array(nl2br(htmlentities($_POST['message'])), $ticket_id, $_SESSION['support_id']), __FILE__, __LINE__); // Get the body of the email $message = newTicketMail($_SESSION['support_id'], stripslashes($_POST['subject']), $_POST['severity'], stripslashes($_POST['message'])); // Send the actual email mail($SETTINGS['adminEmail'], "New support ticket (ID #{$ticket_id})", $message, "From: {$SETTINGS['fromEmail']}"); pageHeader("Ticket Received"); echo "Your RFQ was received by our support team and we will reply as soon as possible.

back"; } // If the form hasn't been submitted yet } else { pageHeader("Request For Quote"); // Get the category list $cat_list = showTicketCategories(false, "name ASC", 0); // Get the severity list $severities = showTicketSeverities(false); //VALIDATE FORM // Show the input form echo <<
Subject:
Category:
Severity: {$severities}
Account Manager ID: *


Account Manager Email: *
  •  
    Sales Rep's Manager *
    Select your manager from the list

    Customer Name: *

     
    Customer Account #:
    Enter the AP number

     
    Customer Company Name:

     
    Customer Phone #:

     
    Customer Email: *

  •  
    Web site type (Description): *
    Describe the general type of website

     
    How will the customer get revenue from the site? *
    How are they planning on making money?

     
    Features the customer wants: *
     
    Special requirements (Unique features):
     
    Does the customer want a Member Area? *
     
    How many products is he/she going to sell? *
     
    Who is going to input the data? *
     
    Will the customer add more categories / products *
     
    Similar web sites: *
    Enter any sites that the customer feels are similar to the one they want

     
    Which features does he/she like/dislike?
    Of the features on the similar sites, which ones does he like or dislike?

     
    Number of Static HTML Pages: *
     
    Design Plan: *
    Select the design plan you feel is appropriate

     
    Flash Template
     
    Add-Ons:
     
    Comments/Concerns/Clarifications:
    Any additional information that may need to be added

    EOT; outputBBCEditor("message", "Type your message here"); echo "
     
    "; } ?>