Thanks!
Code: Select all
if ($print_mode) {
$output .= <<<EOD
<html>
<head>
<style type="text/css">
* {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #333399;
}
</style>
</head>
<body>
EOD;
}
//working uid select statement, to test echo uid
$uid1= db_result(db_query("SELECT uid FROM ec_transaction WHERE txnid = $txn->txnid"));
//builds off of previous query this select statement will show all of the necessary info for the fields.
$firstname = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 1"));
$lastname = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 4"));
$address1 = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 6"));
$address2 = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 7"));
$city = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 8"));
$state = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 9"));
$zip = db_result(db_query("SELECT value, fid FROM profile_values where uid= $uid1 and fid = 10"));
$gross = db_result(db_query("SELECT gross FROM ec_transaction WHERE txnid = $txn->txnid"));
//begins to build the node descriptioin query
$noder = db_result(db_query("SELECT nid FROM ec_transaction_product WHERE txnid = $txn->txnid"));
$desc = db_result(db_query("SELECT body FROM node_revisions WHERE nid = $noder"));
$prod = db_result(db_query("SELECT title FROM node_revisions WHERE nid = $noder"));
$email = db_result(db_query("SELECT mail from users WHERE uid= $uid1"));
$paybill = "https://www.trumpetconsulting.com/clientcenter/?q=store/payment/authorize_net/".$txn->txnid;
$test = db_result(db_query("SELECT title from ec_transaction_product where txnid = $txn->txnid"));
$output .= <<<EOD
echo $row[test];
}
<h2 style="margin-bottom:2px;">INVOICE DETAILS</h2>
<hr style="background-color:#ccc;color:#ccc;"><br />
<!-- BEGIN INVOICE WRAP-->
<div style="position:relative;padding:10px;border:1px solid #ccc;">
<img src="http://www.trumpetconsulting.com/images/invoice.png" width="171" height"48" alt="Invoice" style="float:right;" />
$payment_info<br><br>
<br />
<div style="position:relative;width:350px;border:1px solid #ccc;padding:10px;">
<div style="position:absolute;top:-15px;left:5px;padding:5px;font-weight:bold;background-color:#fff;">Invoice To:</div>
$firstname $lastname<br />
$address1 $address2 <br />
$city $state $zip <br />
$email
</div>
<br />
<br />
<table cellpadding="5" style="width:635px;border:1px solid #ccc;">
<tr>
<td width="500" style="border-bottom:1px solid #ccc;background-color:#cecece;"><strong>Service Description</strong></td>
<td width="135" style="border-bottom:1px solid #ccc;background-color:#cecece;"><strong>Price</strong></td>
</tr>
<tr>
<td width="500" style="border-bottom:1px solid #ccc;">$prod<br /><div style="font-size:10px;line-height:13px;margin-top:5px;"><em>$desc</em></div></td>
<td width="135" style="border-bottom:1px solid #ccc;border-left:1px solid #ccc;">$ $price</td>
</tr>
</table>
<br />
<div style="position:relative;height:25px;">
<div style="position:absolute;right:155px;top:2px;"><strong>TOTAL</strong></div>
<div style="position:absolute;right:4px;top:0;width:140px;height:20px;border:1px solid #ccc;"> $ $gross</div><br />
</div><br />
<div style="position:relative;height:25px;">
<div style="position:absolute;right:4px;top:0;width:140px;height:20px;text-align:center;"><span style="font-size:14px;"><a href="$paybill">PAY MY BILL</a></span></div><br />
</div>
<br /><br />
</div><!--END INVOICE WRAP-->
<br />
<br />
<div style="position:relative;height:50px;">
<img src="http://www.trumpetconsulting.com/images/lock3.png" width="50" height="50" style="float:left;margin:0px 10px 30px 0px;" />
<p style="font-size:11px;line-height:16px;margin:0px 0px 0px 10px;text-align:justify;"><a href="$paybill">Click here to pay this bill</a> using our secure payment portal. All information is secured with 128-bit encription. The client center is verified with an SSL Certificate, and payments are processed using Authorize.net. </p>
</div><br />
EOD;
if ($print_mode) {
$output .= <<<EOD
</body>
</html>
EOD;