| Server IP : 3.96.16.70 / Your IP : 216.73.216.15 Web Server : Apache System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/registration.mining4life.org/wp-content/plugins/m4l_plugin/incl/ |
Upload File : |
<div class="wrap hefl-wrap">
<div class="hefl-header">
<a href="admin.php?page=hefl_manager"><img src="<?php echo (plugins_url('img/logo.png', dirname(__FILE__))); ?>" /></a>
<h1>Mining4Life Admin</h1>
</div>
<?php
/*
global $wpdb;
// Get the sum for each post_id
//$transactions = $wpdb->get_results("SELECT post_id, SUM(amount) as total FROM wp_hefl_cctrans WHERE result_authorizationresult LIKE '%OK%' GROUP BY post_id ORDER BY total DESC", ARRAY_A);
// Get every transaction
$transactions = $wpdb->get_results("SELECT post_id, description, amount, result_authorizationresult, result_settlementbatchdate, result_settlementdate, result_transactionid FROM wp_hefl_cctrans WHERE result_authorizationresult LIKE '%OK%'", ARRAY_A);
$csvoutput = array();
$csvoutput[] = array(
"description",
"amount",
"guest_cc_type",
"result_authorizationresult",
"result_settlementbatchdate",
"result_settlementdate",
"result_transactionid",
"guest_firstname",
"guest_lastname",
"guest_email",
"guest_phonenumber",
"guest_company",
"guest_address1",
"guest_address2",
"guest_city",
"guest_province",
"guest_postalcode"
);
foreach ($transactions as $tran) {
$post = get_post($tran['post_id'], ARRAY_A);
//echo ('<pre>');
//print_r ($tran);
//echo ('</pre>');
$custom_fields = get_post_custom($tran['post_id']);
//echo ('<pre>');
//print_r ($custom_fields);
//echo ('</pre>');
if (isset($custom_fields['guest_address1'])) {
$address1 = $custom_fields['guest_address1'][0];
} else {
$address1 = "";
}
if (isset($custom_fields['guest_address2'])) {
$address2 = $custom_fields['guest_address2'][0];
} else {
$address2 = "";
}
if (isset($custom_fields['guest_city'])) {
$city = $custom_fields['guest_city'][0];
} else {
$city = "";
}
if (isset($custom_fields['guest_province'])) {
$prov = $custom_fields['guest_province'][0];
} else {
$prov = "";
}
if (isset($custom_fields['guest_postalcode'])) {
$postal = $custom_fields['guest_postalcode'][0];
} else {
$postal = "";
}
$csvoutput[] = array(
$tran['description'],
money_format($tran['amount'], 2),
$custom_fields['guest_cc_type'][0],
trim($tran['result_authorizationresult']),
trim($tran['result_settlementbatchdate']),
trim($tran['result_settlementdate']),
trim($tran['result_transactionid']),
$custom_fields['guest_firstname'][0],
$custom_fields['guest_lastname'][0],
$custom_fields['guest_email'][0],
$custom_fields['guest_phonenumber'][0],
$custom_fields['guest_company'][0],
$address1,
$address2,
$city,
$prov,
$postal
);
}
//echo ('<pre>');
//print_r ($csvoutput);
//echo ('<pre>');
$outputfilename = '/var/www/sites/remote.wondermakr.com/sinai/wp-content/plugins/holdemforlife/output/trans_report.csv';
$f = fopen($outputfilename, "w");
foreach ($csvoutput as $fields) {
echo ('<pre>');
print_r ($fields);
echo ('<pre>');
fputcsv($f, $fields);
}
fclose($f);
*/
?>
</div>