"._t("_affiliate_system_was_disabled").")"; } $logged['admin'] = member_auth( 1, true, true ); $tr = array(); $tr_query = ""; $order_num_disabled = 'disabled="disabled"'; $last_disabled = 'disabled="disabled"'; $date_disabled = 'disabled="disabled"'; $between_disabled = 'disabled="disabled"'; switch ( $_POST['calculation_type'] ) { case 'total': $tr_query = "SELECT * FROM `Transactions` WHERE `Status` = 'approved' ORDER BY `Date` DESC"; break; case 'order_num': $order_id = process_db_input( $_POST['tr_order_num'] ); $tr['order_num'] = process_pass_data( $_POST['tr_order_num'] ); $tr_query = "SELECT * FROM `Transactions` WHERE `gtwTransactionID` = '$order_id' AND `Status` = 'approved' ORDER BY `Date` DESC"; $order_num_disabled = ""; break; case 'last': $last_days = (int)$_POST['tr_last_days']; $tr['last_days'] = process_pass_data( $_POST['tr_last_days'] ); $tr_query = "SELECT * FROM `Transactions` WHERE ( TO_DAYS( NOW() ) - TO_DAYS( `Date` ) <= $last_days ) AND `Status` = 'approved' ORDER BY `Date` DESC"; $last_disabled = ""; break; case 'date': $exact_date = strtotime( $_POST['tr_exact_date'] ); $tr['exact_date'] = process_pass_data( $_POST['tr_exact_date'] ); if ( $exact_date != -1 ) { $tr_query = "SELECT * FROM `Transactions` WHERE TO_DAYS( FROM_UNIXTIME($exact_date) ) = TO_DAYS( `Date` ) AND `Status` = 'approved' ORDER BY `Date` DESC"; } else { $tr_query = ""; $tr['error_text'] = "Please specify correct dates"; } $date_disabled = ""; break; case 'between': // First date parse if ( $_POST['tr_between_date1'] == 'start' ) $between_date1 = 0; elseif ( $_POST['tr_between_date1'] == 'now' ) $between_date1 = time(); else $between_date1 = strtotime( $_POST['tr_between_date1'] ); // Second date parse if ( $_POST['tr_between_date2'] == 'start' ) $between_date2 = 0; elseif ( $_POST['tr_between_date2'] == 'now' ) $between_date2 = time(); else $between_date2 = strtotime( $_POST['tr_between_date2'] ); $tr['between_date1'] = process_pass_data( $_POST['tr_between_date1'] ); $tr['between_date2'] = process_pass_data( $_POST['tr_between_date2'] ); if ( $between_date1 != -1 && $between_date2 != -1 ) { $tr_query = "SELECT * FROM `Transactions` WHERE ( TO_DAYS( FROM_UNIXTIME($between_date1) ) <= TO_DAYS( `Date` ) AND TO_DAYS( FROM_UNIXTIME($between_date2) ) >= TO_DAYS( `Date` ) ) AND `Status` = 'approved' ORDER BY `Date` DESC"; } else { $tr_query = ""; $tr['error_text'] = "Please specify correct dates"; } $between_disabled = ""; break; } // Calculations if ( strlen($tr_query) ) { $fin = getFinanceStat( $tr ); } // Transactions if ( strlen($tr_query) ) { $tr_res = db_res( $tr_query ); $tr_num = mysql_num_rows( $tr_res ); } else { $tr_num = 0; } $_page['header'] = "Finance"; $_page['header_text'] = "Calculations and transactions"; ob_start(); ?>
{$tr['error_text']}

"; ?>
 Show transactions and calculate sums 
/>
/> />
/> />  days (type 0 for today's transactions)
/> />   />   />
/> />   />   />
  and />   />   />
 
The earlier date must be set first, the later one - second. Also you can use words "start" and "now" to indicate the beginning of your work and the present date. Do not use queries like "between start and now" because it can display a huge amount of transactions.

NOTE: Only transactions with your current currency will be shown here.
 Calculations for the query
 Membership subscriptions    
 Contact sales    
 Events tickets    
 Total    

"; } else { $paymentProviders = getPaymentProviders( false ); ?> Type: ' . $tranDataArray['action']; $tranDataString = 'Description: ' . returnDescByAction( $tranDataArray['action'], $tranDataArray['data'], false ); $tranNoteString = strlen($tr_arr['Note']) ? 'Note: ' . $tr_arr['Note'] : ''; ?>
Transactions
No transactions available
Order number Date Member Provider Info Sum paid,
{$tr_arr['IDMember']}" ?> Info