PageTitle = "Trading Card Central - Transaction Manager"; ?> <?=$template->PageTitle?> Start(); ?> is_loggedin()) { // Look up the member name for the logged in user. $member_data = $SDK->get_advinfo(); $member_group = $member_data['g_id']; $member_name = $member_data['name']; $member_restrictions = $member_data['field_9']; // Set the name of the member that this member is creating a transaction with. $transaction_partner = $_GET['member']; // Hack for name with ampersands. if ($transaction_partner == "Life") { $transaction_partner = "Life&Def"; } // Hack for name with ampersands. if ($transaction_partner == "pats") { $transaction_partner = "pats&rsoxfan"; } // Hack for name with ampersands. if ($transaction_partner == "Silver") { $transaction_partner = "Silver&Blue"; } // Hack for name with ampersands. if ($transaction_partner == "skins30") { $transaction_partner = "skins30&steelers43"; } // Hack for name with ampersands. // Should check about this one since there is a member named alex. if ($transaction_partner == "Alex") { $transaction_partner = "Alex&Brenda_\'08"; } // Determine the member ID. $transaction_partner_id = $SDK->name2id($transaction_partner); //Look up the member's restrictions data. $transaction_partner_data = $SDK->get_advinfo($transaction_partner_id); $transaction_partner_group = $transaction_partner_data['g_id']; $transaction_partner_restrictions = $transaction_partner_data['field_9']; if ($_SERVER['REQUEST_METHOD'] == "POST") { // Determine what type of transaction is being posted. $transaction_type = $_POST['trans_type']; // Set up the proper forum for the post. if ($transaction_type == "Trade") { // Set to the Trade Agreements forum. $forumid = 75; $title = "Trade: "; $trans_phrase = "and"; $title = $title . $member_name ." ". $trans_phrase ." ". $_POST['trans_partner']; } else { // Set to the Sale Agreements forum. $forumid = 76; $title = "Sale: "; $trans_phrase = "to"; if ($_POST['sale_type'] == "Seller") { $title = $title . $member_name ." ". $trans_phrase ." ". $_POST['trans_partner']; } else { $title = $title . $_POST['trans_partner'] ." ". $trans_phrase ." ". $member_name; } } // Make sure that the Additional Details section has some text. if ($_POST['trans_notes'] == "") { $_POST['trans_notes'] = "None Specified."; } // Set up details for transaction agreement. $post = "The TCC Collector Zone Transaction Manager generated the following agreement:\n\n[B]".$member_name."[/B] receives:\n\n".$_POST['receiving']."\n\n[B]".$_POST['trans_partner']."[/B] receives:\n\n".$_POST['sending']."\n\n[B]Additional notes:[/B]\n\n".$_POST['trans_notes']; // Create the transaction agreement post and get the new topic ID. $topic_id = $SDK->new_topic($forumid, $title, "", $post, FALSE, FALSE, TRUE); if ($topic_id !== 0) { echo 'Transaction has been posted.

Click here to view your agreement or click here to return to the main Collector Zone index.'; // Send an e-mail to the other member about the new agreement. $mail_subject = "New " . $transaction_type." Agreement Posted"; $mail_message = $member_name ." has just posted a new " . $transaction_type." agreement with you.\n\nHere are the details:\n\nThe TCC Collector Zone Transaction Manager generated the following agreement:\n\n" .$member_name ." receives:\n\n" .$_POST['receiving'] ."\n\n" .$_POST['trans_partner'] ." receives:\n\n" .$_POST['sending'] ."\n\nAdditional notes:\n\n" .$_POST['trans_notes'] ."\n\nPlease review this agreement. If the details are accurate, then please post a reply to confirm the agreement by visiting this topic:\n\n" . $SDK->board_url ."/index.php?showtopic=" . $topic_id; $mail = $SDK->mail_member($SDK->name2id($_POST['trans_partner']), $mail_subject, $mail_message); // Makes a string safe for usage. Should correct intermittent error when posting transactions. - RSW 4/16/08 $mail_message = $SDK->makesafe($mail_message); // Also send a PM to the other member about the new agreement and save a copy in the sender's box. $pm = $SDK->write_pm($SDK->name2id($_POST['trans_partner']), $mail_subject, $mail_message, array(), "1"); } } else { // Display Form ?> Your member group is not permitted to be involved in any new transactions. This request has been cancelled.
'; $template->End(); exit; } if ($member_name == $transaction_partner) { echo '
You are not permitted to create a transaction with yourself. This request has been cancelled.
'; $template->End(); exit; } if ($member_restrictions) { echo 'Your restrictions: '.$member_restrictions.'
'; if (($member_restrictions == "Current Transactions Only") || ($member_restrictions == "Current Transactions Only and No Posting") || ($member_restrictions == "Account Banned")) { echo '
Based on your restriction, you are not permitted to create any new transactions. This request has been cancelled.
'; $template->End(); exit; } } if (($transaction_partner_group == 1) || ($transaction_partner_group == 2) || ($transaction_partner_group == 5)) { echo '
Your transaction partner is in a member group that is not permitted to be involved in any new transactions. This request has been cancelled.
'; $template->End(); exit; } if ($transaction_partner_restrictions) { echo 'Transaction Partner restrictions: '.$transaction_partner_restrictions.'
'; if (($transaction_partner_restrictions == "Current Transactions Only") || ($transaction_partner_restrictions == "Current Transactions Only and No Posting") || ($transaction_partner_restrictions == "Account Banned")) { echo '
Based on the restriction placed on ' .$transaction_partner .', ' .$transaction_partner.' is not permitted to be involved in any new transactions. This request has been cancelled.
'; $template->End(); exit; } } ?>
Transaction type:Trade
Sale
Transaction partner:
You receive:
They receive:
Additional notes:
End(); ?>