Parse error: syntax error, unexpected 'orders' (T_STRING) in payments.php on line 70
=====================================================
Code:
<?php
require_once('../includes/tge.php');
require_once('transfer.php');
require('includes/application_top.php');
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
$action = (isset($_GET['action']) ? $_GET['action'] : '');
if(zen_not_null($action)) {
switch($action) {
case 'setflag':
break;
} /* switch($action) */
} /* if(zen_not... */
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<script language="javascript" src="includes/menu.js"></script>
<script language="javascript" src="includes/general.js"></script>
<script type="text/javascript">
<!--
function init()
{
cssjsmenu('navbar');
if (document.getElementById)
{
var kill = document.getElementById('hoverJS');
kill.disabled = true;
}
}
// ?
</script>
</head>
<body onload="init()">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<div id='member_hierarcy'>
<?php##
global $db;
global $filehandl;
global $filehandle;
global $validation_time;
global $distribution_time;
$validation_time = date('Y-m-d H:i:s', mktime(23, 59, 59, date('n') - 1, 0, date('Y')));
$distribution_time = date('Y-m-d H:i:s');
/**************************************************************/
$query = ”SELECT * FROM orders WHERE orders_status = 3
AND (prod_profit_distributed IS NULL OR
prod_profit_distributed = '0000-00-00 00:00:00')
AND (reg_profit_distributed IS NULL OR
reg_profit_distributed = '0000-00-00 00:00:00')”;
/***************************************************************/
$result = $db->Execute($query); // or die(" Err19");
while(!$result->EOF){
$time = $result->fields['date_purchased'];
$oid = $result->fields['orders_id'];
$cid = $result->fields['customers_id'];
$cft = $result->fields['order_total'];
$trans1 = ”INSERT INTO transactions (transactions_time,
transactions_orders_id,
transactions_customers_id,
transactions_type,##
transactions_amount,
transactions_handle_time,
transactions_valid)
VALUES ('”.$time.”', '”.$oid.”', '”.$cid.”', '20', '”.$ctt.”', now(), '1')”;
$trans2 = $db->Execute($trans1); // or die(" Err20");
$query_s = "SELECT * FROM customers WHERE customers_nick =##
(SELECT customers_referral FROM customers##
WHERE customers_id = '" . $cid . "')";
$query_sponsor = $db->Execute($query_s); // or die(" Err2");
$padre = $query_sponsor->fields['customers_id'];
$trans3 = ”INSERT INTO transactions (transactions_time
transactions_orders_id,
transactions_customers_id,
transactions_type,##
transactions_amount,
transactions_handle_time,
transactions_valid)
VALUES ('”.$time.”', '”.$oid.”', '”.$padre.”', '21', '”.$ctt/5.”', now(), '1')”;
$trans4 = $db->Execute($trans3); // or die(" Err21");
$result->MoveNext();
} //while(!$result->EOF)
$query2 = ”SELECT * FROM customers WHERE customers_shares > 0”;
$result2 = $db->Execute($query2); // or die(" Err22");
while(!$result2->EOF){
$order = $result2->fields['customers_share_order'];
$cid = $result2->fields['customers_id'];
$cft = $result2->fields['customers_shares'];
$query_multiple = "SELECT * FROM transactions##
WHERE transactions_orders_id = ”.$order.”
AND transactions_amount = ”.$cft;
$query_double = $db->Execute($query_multiple); // or die(" Err2");
if(!$query_double->recordCount()) {
$trans5 = ”INSERT INTO transactions SET transactions_time = '2019-04-01 00:00:00',
transactions_orders_id = ”.$order.”,
transactions_customers_id = ”.$cid.”,
transactions_type = 25,
transactions_amount = ”.$cft.”,
transactions_handle_time = now(),
transactions_valid = 1”;
$trans6 = $db->Execute($trans5); // or die(" Err23");
} //if(!$query_double->recordCount())
$result2->MoveNext();
} //while(!$result2->EOF)
?>
</div>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Bookmarks