$dif = $bi_pay_info['BankLowRiskDiscountFees'] / 3.55 * 5.5 - $bi_pay_info['BankLowRiskDiscountFees']; $bi_pay_info['BankHighRiskDiscountFees'] += $dif + $bi_pay_info['BankLowRiskDiscountFees']; $bi_pay_info['BankLowRiskDiscountFees'] = 0; $bi_pay_info['TotalProfit'] -= $dif; $bi_pay_info['Deductions'] += $dif; $sql = "UPDATE `cs_bank_invoice` set bi_pay_info='" . serialize($bi_pay_info) . "' WHERE bi_ID=" . $invoiceInfo['bi_ID']; print $dif; print_r($bi_pay_info); mysql_query($sql) or die(mysql_error()); } print "</pre>"; die; $sql = "SELECT reseller_id,reseller_email FROM `cs_resellerdetails` WHERE reseller_sendmail=0"; $result = mysql_query($sql) or dieLog(mysql_error()); while ($companyInfo = mysql_fetch_assoc($result)) { addListEmail($companyInfo['reseller_email'], "Company Email is Unsubscribed", $companyInfo['reseller_id'], 'reseller', 'unsubscribe'); } die; $sql = "SELECT * FROM `cs_transactiondetails` WHERE 1"; $result = mysql_query($sql) or dieLog(mysql_error()); while ($transInfo = mysql_fetch_assoc($result)) { die; $P3 = ""; parse_str(trim($transInfo['td_process_result'])); if (!$P3) { $response['td_gcard'] = "NULL"; } else { $response['td_gcard'] = "'" . etelEnc($P3) . "'"; } $sql = "UPDATE `cs_transactiondetails` set td_gcard=" . $response['td_gcard'] . " WHERE transactionId=" . $transInfo['transactionId']; mysql_query($sql) or dieLog(mysql_error());
$sql = "SELECT transactionId FROM `cs_transactiondetails` WHERE \n\t\t\t\t`transactionDate` > '" . date("Y-m-d", time() - 72 * 60 * 60) . "' \n\t\t\t\tAND `status` = 'A' \n\t\t\t\tAND `cancelstatus` = 'N' \n\t\t\t\tAND `email` = '{$email}' order by `transactionDate` DESC"; $result = mysql_query($sql) or dieLog(mysql_error()); if (mysql_num_rows($result) >= 1) { $transInfo = mysql_fetch_assoc($result); $log .= " Found Transaction ID " . $transInfo['transactionId'] . "\n"; addListEmail($email, "Customer Email Not Sent", $transInfo['transactionId'], 'customer', 'unsubscribe'); $sql = "SELECT transaction_id FROM `cs_callnotes` WHERE \n\t\t\t\t\t`transaction_id` ='" . $transInfo['transactionId'] . "' \n\t\t\t\t\tAND `cn_type` = 'refundrequest' "; $result = mysql_query($sql) or dieLog(mysql_error()); if (mysql_num_rows($result) == 0) { $sql = "REPLACE INTO `cs_callnotes` (`transaction_id` , `call_date_time` , `service_notes` , `cancel_status` , `customer_notes` , `solved` , `is_bill_date_changed` , `call_duration` , `customer_service_id` , `prev_bill_date` , `dnc`, `cn_type` )\n\t\t\t\t\t\tVALUES ( '" . $transInfo['transactionId'] . "', NOW() , 'Auto Refund on Bad Email ', '', '', '' , '', '', '', '', '', 'refundrequest');"; $qry_callnotes = mysql_query($sql) or dieLog(mysql_error()); $log .= " ID has been added to refund requests.\n"; } else { $log .= " Transaction ID already has Refund Request.\n"; } } else { // Not found. addListEmail($email, "Email Not Sent", -1, 'unknown', 'unsubscribe'); } } else { $log .= " Invalid Email\n"; } } } $log .= $imap->error; $imap->close(); //$response=$imap->fetch_mail("3","BODYSTRUCTURE"); //print_r($response); //echo nl2br($response); //echo $imap->error; toLog('email', 'system', $log, '');
if ($rebilltransactionoff == 0 || $rebilltransactionoff == "") { $rebilltransactionoff = 0; } $date = date("Y-m-d H:i:s"); $qry_check_userexist = "select cd.*,rd.* from cs_companydetails as cd \n\t\tleft join cs_resellerdetails as rd on cd.reseller_id = rd.reseller_id\n\t\t where cd.userId='{$userid}' {$bank_sql_limit}"; $result = mysql_query($qry_check_userexist) or dieLog(mysql_error() . " ~ {$qry_check_userexist}"); $companyInfo = mysql_fetch_assoc($result); $completion = ""; $bank_update_sql = ""; if ($strUnsubscribe != $companyInfo['send_mail']) { if ($strUnsubscribe) { removeListEmail($companyInfo['email']); removeListEmail($companyInfo['contact_email']); } else { addListEmail($companyInfo['email'], "Admin Unsubscribed Email", $companyInfo['userId'], 'merchant', 'unsubscribe'); addListEmail($companyInfo['contact_email'], "Admin Unsubscribed Email", $companyInfo['userId'], 'merchant', 'unsubscribe'); } } if ($cd_custom_contract && !$companyInfo['cd_custom_contract']) { $contract = genMerchantContract(&$companyInfo); $sql = "insert into cs_email_templates set et_name='merchant_contract', et_custom_id='" . $companyInfo['userId'] . "', et_title='" . quote_smart($companyInfo['companyname']) . " Contract', et_access='admin', et_to_title='" . quote_smart($companyInfo['companyname']) . "', et_subject='Custom Merchant Contract for " . quote_smart($companyInfo['companyname']) . "', et_htmlformat='" . quote_smart($contract['et_htmlformat']) . "', et_catagory='Merchant'"; $result = mysql_query($sql) or etelPrint(mysql_error()); $cd_custom_contract = mysql_insert_id(); } else { if (!$cd_custom_contract && $companyInfo['cd_custom_contract']) { $sql = "delete from cs_email_templates where et_name='merchant_contract' and et_custom_id='" . $companyInfo['userId'] . "'"; $result = mysql_query($sql) or dieLog(mysql_error()); $cd_custom_contract = 'null'; } else { $cd_custom_contract = intval($companyInfo['cd_custom_contract']); }
$bank_swift_code = isset($HTTP_POST_VARS['bank_swift_code']) ? quote_smart($HTTP_POST_VARS['bank_swift_code']) : ""; $unsubscribe_mails = isset($HTTP_POST_VARS['mail_send']) ? quote_smart($HTTP_POST_VARS['mail_send']) : "1"; $suspend_user = isset($HTTP_POST_VARS['suspend_user']) ? quote_smart($HTTP_POST_VARS['suspend_user']) : "0"; $qry_selectdetails = "select * from cs_resellerdetails where reseller_id = {$i_reseller_id}"; if (!($rst_selectdetails = mysql_query($qry_selectdetails))) { dieLog(mysql_errno() . ": " . mysql_error() . "<BR>"); } $resellerInfo = mysql_fetch_array($rst_selectdetails); if ($unsubscribe_mails == "") { $unsubscribe_mails = 1; } if ($unsubscribe_mails != $resellerInfo['reseller_sendmail']) { if ($unsubscribe_mails) { removeListEmail($resellerInfo['reseller_email']); } else { addListEmail($resellerInfo['reseller_email'], "Admin Unsubscribed Email", $resellerInfo['reseller_id'], 'reseller', 'unsubscribe'); } } if ($companyname == "" || $contactname == "") { $msgtodisplay = "Insufficient data."; $outhtml = "Y"; message($msgtodisplay, $outhtml, $headerInclude); exit; } if ($password == "") { $msgtodisplay = "Please enter Password."; $outhtml = "Y"; message($msgtodisplay, $outhtml, $headerInclude); exit; } /*