Example #1
0
?>
?popup=1" method="post" name="form">
  <div class="row">
<?php 
echo '    <input type="hidden" name="body_text" value="' . htmlspecialchars(stripslashes($_POST['body_text'])) . '" />';
echo '    <input type="hidden" name="_cid" value="' . $cid . '" />';
if (!$cid) {
    $msg->printInfos('SAVE_CONTENT');
    echo '  </div>';
    return;
}
$msg->printInfos();
if ($_POST['body_text'] != '') {
    //save temp file
    $_POST['content_path'] = $content_row['content_path'];
    write_temp_file();
    $pg_url = TR_BASE_HREF . 'get_acheck.php/' . $cid . '.html';
    $checker_url = TR_ACHECKER_URL . 'checkacc.php?uri=' . urlencode($pg_url) . '&id=' . TR_ACHECKER_WEB_SERVICE_ID . '&guide=WCAG2-L2&output=html';
    $report = @file_get_contents($checker_url);
    if (stristr($report, '<div id="error">')) {
        $msg->printErrors('INVALID_URL');
    } else {
        if ($report === false) {
            $msg->printInfos('SERVICE_UNAVAILABLE');
        } else {
            echo '    <input type="hidden" name="pg_url" value="' . $pg_url . '" />';
            echo $report;
            echo '    <p>' . _AT('access_credit') . '</p>';
        }
    }
    //delete file
//  this is for tickets
//--------------------------------------------------------------
if (isset($_REQUEST['txn_type']) and $_REQUEST['txn_type'] == 'cart') {
    $_REQUEST['IPN_TYPE'] = 'TICKETS';
    do_tickets();
} else {
    if (isset($_REQUEST['txn_type']) and $_REQUEST['txn_type'] == 'web_accept') {
        $_REQUEST['IPN_TYPE'] = 'DONATIONS';
        do_donations();
    } else {
        $_REQUEST['IPN_TYPE'] = 'REDIRECT';
        header('Location: ' . REDIRECT_PAGE);
    }
}
// write temp file for our records
write_temp_file($temp_file_name);
exit(1);
//--------------------------------------------------------------
function do_tickets()
{
    $count = $_REQUEST['num_cart_items'];
    $total_amt = $_REQUEST['mc_gross'] . " " . $_REQUEST['mc_currency'];
    $payment_status = $_REQUEST['payment_status'];
    $payment_date = $_REQUEST['payment_date'];
    $buyer_name = $_REQUEST['first_name'] . ' ' . $_REQUEST['last_name'];
    $email_addr = $_REQUEST['option_selection1_1'];
    $guest_list = $_REQUEST['option_selection2_1'];
    $shipping_address = $_REQUEST['address_name'] . '<br>' . $_REQUEST['address_street'] . '<br>' . $_REQUEST['address_city'] . '<br>' . $_REQUEST['address_state'] . '<br>' . $_REQUEST['address_zip'] . '<br>' . $_REQUEST['address_country'];
    $body = "<html><body>";
    $body .= "<p>Thank you for purchasing tickets for the IBS event. Below are the details of your purchase.</p>";
    $body .= "<table>";