本文整理汇总了PHP中toLog函数的典型用法代码示例。如果您正苦于以下问题:PHP toLog函数的具体用法?PHP toLog怎么用?PHP toLog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了toLog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: eLog
function eLog($str)
{
global $erasedebug_enabled;
if ($erasedebug_enabled) {
toLog("erasedata: " . $str);
}
}
开发者ID:RobbieL811,项目名称:rutorrent_stuff,代码行数:7,代码来源:update.php
示例2: checkFromTo
function checkFromTo($from, $to)
{
if ($from < 0 or $from > $to or $to > 1024 * 1024 * 50) {
toLog("Invalid Value for From/to: From {$from} To {$to}");
return False;
}
return True;
}
开发者ID:zeroleo12345,项目名称:freeIBS,代码行数:8,代码来源:report.php
示例3: rtDbg
function rtDbg($prefix, $str)
{
if (!$str) {
toLog("");
} elseif ($prefix && strlen($prefix) > 0) {
toLog($prefix . ": " . $str);
} else {
toLog($str);
}
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:10,代码来源:util_rt.php
示例4: run
public function run()
{
$ret = false;
$this->i8s = array();
$this->strings = array();
$this->val = array();
if ($this->makeCall()) {
$answer = self::send($this->content);
if (!empty($answer)) {
if ($this->parseByTypes) {
if (preg_match_all("|<value><string>(.*)</string></value>|Us", $answer, $this->strings) !== false && count($this->strings) > 1 && preg_match_all("|<value><i.>(.*)</i.></value>|Us", $answer, $this->i8s) !== false && count($this->i8s) > 1) {
$this->strings = str_replace("\\", "\\\\", $this->strings[1]);
$this->strings = str_replace("\"", "\\\"", $this->strings);
foreach ($this->strings as &$string) {
$string = html_entity_decode($string, ENT_COMPAT, "UTF-8");
}
$this->i8s = $this->i8s[1];
$ret = true;
}
} else {
if (preg_match_all("/<value>(<string>|<i.>)(.*)(<\\/string>|<\\/i.>)<\\/value>/s", $answer, $this->val) !== false && count($this->val) > 2) {
$this->val = str_replace("\\", "\\\\", $this->val[2]);
$this->val = str_replace("\"", "\\\"", $this->val);
foreach ($this->val as &$string) {
$string = html_entity_decode($string, ENT_COMPAT, "UTF-8");
}
$ret = true;
}
}
if ($ret) {
if (strstr($answer, "faultCode") !== false) {
$this->fault = true;
if (LOG_RPC_FAULTS && $this->important) {
toLog($this->content);
toLog($answer);
}
}
}
}
}
$this->content = "";
$this->commands = array();
return $ret;
}
开发者ID:RobbieL811,项目名称:rutorrent_stuff,代码行数:44,代码来源:xmlfix.php
示例5: canDo
function canDo($perm_name, $admin_username = null)
{
/*check if authenticated admin can do a job needed permission with $perm_name
perm_name(string) name of permission
admin_username(string) if not null check canDo for this username, else use current logged on username
other parameters of this function will be passed to core canDo function as optional arguments of permission
*/
if (is_null($admin_username)) {
$admin_username = getAuthUsername();
}
$arg_list = func_get_args();
$params = array();
for ($i = 2; $i < func_num_args(); $i++) {
$params[] = $arg_list[$i];
}
$can_do_request = new AdminCanDo($perm_name, $admin_username, $params);
list($success, $ret_val) = $can_do_request->send();
if (!$success) {
toLog("canDo Error:" . $ret_val->getErrorMsg());
return FALSE;
}
return $ret_val == TRUE ? TRUE : FALSE;
}
开发者ID:zeroleo12345,项目名称:freeIBS,代码行数:23,代码来源:perm.php
示例6: post_passwordmgmt_query
function post_passwordmgmt_query($url, $fields, $id)
{
if ($url != "") {
$parseurl = parse_url($url);
$postmet = $parseurl['scheme'];
$postser = $parseurl['host'];
$postport = stristr($postmet, "https") !== FALSE ? "443" : "80";
$postser = (stristr($postmet, "https") !== FALSE ? "ssl://" : "") . $postser;
$postdata = NULL;
foreach ($fields as $key => $data) {
$postdata .= ($postdata ? "&" : "") . "{$key}={$data}";
}
$done = 0;
$succ['query'] = $url . "?" . $postdata;
$succ['body'] = http_post2($postser, $postport, $url . "?" . $postdata, $postdata);
if (!$succ['body']) {
$done = 0;
} else {
//if(stristr($succ['head'],"HTTP/1.1") === FALSE || stristr($succ['head'],"HTTP/1.0") === FALSE || stristr($succ['head'],"HTTP/1.1 200 OK")!==FALSE || stristr($succ['head'],"HTTP/1.0 200 OK")!==FALSE)
$done = 1;
}
//successfully posted data
//else
// $done = 0; //problem with destination
if ($done != 1) {
toLog("notify", "system", "Notify Error: " . $succ['body'] . " Query: " . $succ['query'], $id);
} else {
toLog("notify", "system", "Notify Success: " . $succ['body'] . " Query: " . $succ['query'], $id);
}
return array("succeeded" => $done, "response" => $succ);
}
return array("succeeded" => "0", "response" => array("url" => $posturl, "head" => "no url specified", "body" => "no url specified"));
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:33,代码来源:post.php
示例7: array_keys
<?php
/***************************************************************
* HTTP HANDLER LAYER For PHP *
* *
***************************************************************/
global $DBGFileName, $DBFile;
$DBGFileName = "HTTPHandlerDebug.txt";
// MAIN LOGIC
echo "<HTML><BODY>";
$keys = array_keys($_POST);
foreach ($keys as $key) {
toLog("\n" . $key . " => " . $_POST[$key]);
}
echo "</BODY></HTML>";
// FUNCTIONS
/***
* Function: To Log
*/
function toLog($msg)
{
if (!($DBFile = fopen("PortalDebug.txt", "a"))) {
echo "Cannot open file ({$DBGFileName})";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($DBFile, $msg, strlen($msg)) === FALSE) {
echo "Cannot write to file ({$DBGFileName})";
exit;
}
echo "<BR> --> " . $msg;
fclose($DBFile);
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:31,代码来源:HTTPHandler.php
示例8: chdir
<?php
chdir('..');
include "includes/dbconnection.php";
require_once "includes/function.php";
$td_username = addslashes($_REQUEST['td_username']);
$td_password = addslashes($_REQUEST['td_password']);
$td_reference_number = addslashes($_REQUEST['td_reference_number']);
$mt_reference_id = addslashes($_REQUEST['mt_reference_id']);
$allow_any_site = $_REQUEST['allow_any_site'];
$testmode = $_REQUEST['testmode'];
$req = '';
foreach (array_merge($_POST, $_GET) as $key => $data) {
$req .= ($req ? "&" : "") . $key . "=" . $data;
}
$lg_id = toLog('login', 'customer', "Customer Querys Access Info: {$req}");
if (!$td_username) {
die("UNF");
}
if (!$td_password) {
die("PNF");
}
$sql = "SELECT cs_ID,cs_company_id FROM `cs_company_sites` as s WHERE `cs_gatewayId` = " . $_SESSION["gw_id"] . " AND `cs_reference_id` = '{$mt_reference_id}' ";
$result = mysql_query($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<br>Cannot execute query");
$num = mysql_num_rows($result);
if ($num < 1) {
die("SNF");
}
$siteInfo = mysql_fetch_assoc($result);
$cs_ID = $siteInfo['cs_ID'];
$cs_company_id = $siteInfo['cs_company_id'];
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:UserActivity.php
示例9: fraud_scrub
function fraud_scrub(&$transInfo, &$bankInfo, &$companyInfo)
{
if ($transInfo['cardtype'] != 'Visa' && $transInfo['cardtype'] != 'Mastercard') {
return 0;
}
global $etel_fraud_response;
require_once 'fraud/CreditCardFraudDetection.php';
$ccfs = new CreditCardFraudDetection();
// Set inputs and store them in a hash
// See http://www.maxmind.com/app/ccv for more details on the input fields
// Enter your license key here (non registered users limited to 20 lookups per day)
$h["license_key"] = "UHccvlc5aVqk";
// Required fields
$h["i"] = $transInfo['ipaddress'];
// set the client ip address
$h["city"] = $transInfo['city'];
// set the billing city
$h["region"] = $transInfo['state'];
// set the billing state
$h["postal"] = $transInfo['zipcode'];
// set the billing zip code
$h["country"] = $transInfo['country'];
// set the billing country
// Recommended fields
$h["domain"] = substr(strstr($transInfo['email'], '@'), 1);
// Email domain
$h["bin"] = substr($transInfo['CCnumber'], 0, 6);
// bank identification number
$h["forwardedIP"] = $transInfo['ipaddress'];
// X-Forwarded-For or Client-IP HTTP Header
$h["custPhone"] = substr($transInfo['phonenumber'], 0, 3) . "-" . substr($transInfo['phonenumber'], 4, 6);
// Area-code and local prefix of customer phone number
// Optional fields
//$h["binName"] = "MBNA America Bank"; // bank name
$h["binPhone"] = $transInfo['td_bank_number'];
// bank customer service phone number on back of credit card
$h["requested_type"] = "premium";
// Which level (free, city, premium) of CCFD to use
$h["emailMD5"] = md5(strtolower($transInfo['email']));
// CreditCardFraudDetection.php will take
// MD5 hash of e-mail address passed to emailMD5 if it detects '@' in the string
$h["shipAddr"] = $transInfo['address'];
// Shipping Address
//$h["txnID"] = "1234"; // Transaction ID
$h["sessionID"] = session_id();
// Session ID
// If you want to disable Secure HTTPS or don't have Curl and OpenSSL installed
// uncomment the next line
// $ccfs->isSecure = 0;
//set the time out to be five seconds
$ccfs->timeout = 5;
//uncomment to turn on debugging
$ccfs->debug = 0;
//next we pass the input hash to the server
$ccfs->input($h);
//then we query the server
$ccfs->query();
//then we get the result from the server
$ho = $ccfs->output();
//then finally we print out the result
$outputkeys = array_keys($ho);
$numoutputkeys = count($ho);
$noCity = 0;
for ($i = 0; $i < $numoutputkeys; $i++) {
$key = $outputkeys[$i];
$value = $ho[$key];
$tolog .= $key . " = " . $value . "\n";
if ($key == 'err' && $value == 'CITY_NOT_FOUND') {
//toLog('erroralert','customer', "Fraud Scrubbing Can't find City '".$h["city"]."' ".serialize($h)." ".$tolog);
$noCity = 1;
}
}
toLog('order', 'customer', "Fraud Scrubbing Result for " . $transInfo['reference_number'] . ": " . $tolog, $transInfo['transactionId']);
$etel_fraud_response = $tolog;
return floatval($ho['score'] - $noCity * 2.6);
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:76,代码来源:fraud.class.php
示例10: ssh2_sftp
$sftp = ssh2_sftp($conn_id);
$dirlist = opendir("ssh2.sftp://" . $ftp_full . "/");
while (($file = readdir($dirlist)) !== false) {
$file_list[] = $file;
}
foreach ($file_list as $filename) {
$log .= " Found " . $filename . ".\n";
if ($filename != '..' && $filename != '.') {
$filenamepath = "{$batch_path}/inc/" . $ftp['folder'] . "/" . $filename;
if (!is_dir("{$batch_path}/inc/" . $ftp['folder'] . "/")) {
mkdir("{$batch_path}/inc/" . $ftp['folder'] . "/", 0700);
}
if (!file_exists($filenamepath)) {
if (!file_exists($filenamepath . '.done')) {
copy("ssh2.sftp://" . $ftp_full . "/" . $filename, $filenamepath);
$log .= " Wrote " . $filenamepath . ".\n";
} else {
$log .= " File Already Processed: " . $filenamepath . ".done.\n";
}
} else {
$log .= " File Exists: " . $filenamepath . ".\n";
}
} else {
$log .= " Ignored " . $filename . ".\n";
}
}
} else {
$log .= " Failed to Connect.\n";
}
toLog('misc', 'system', $log);
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:processFtp.php
示例11: mysql_insert_id
$ca_ID = mysql_insert_id();
}
if ($errormsg) {
$smarty->assign("accountCreated", 0);
$smarty->assign("accountMsg", "Error: {$errormsg}<BR>Please go back and fix your entry");
$smarty->assign("POST", $_POST);
} else {
$_SESSION['ca_ID'] = $ca_ID;
$_SESSION['ca_email'] = $email;
$smarty->assign("accountMsg", "Your Account {$email} has been Created/Updated Successfully.<BR> If you are placing an order at this time, please return to the order page and enter your new Etelegate Account Information.<BR><a href='https://www.etelegate.biz'><img border='0' src='/images/back.jpg'></a>");
toLog('misc', 'customer', "Customer Account {$ca_ID} created with email {$email}");
$smarty->assign("accountCreated", 1);
$smarty->assign("ShowSubmitButton", 0);
$success = 1;
}
}
if ($_SESSION['ca_ID'] && !$success && !$edit_mode) {
$email = $_SESSION['ca_email'];
$smarty->assign("accountMsg", "Your Account {$email} has already been Created.");
toLog('misc', 'customer', "Customer Account {$ca_ID} created with email {$email}");
$smarty->assign("accountCreated", 1);
$smarty->assign("ShowSubmitButton", 0);
}
$smarty->assign("edit_mode", $edit_mode);
etel_smarty_display('int_create_account.tpl');
etel_smarty_display('int_footer.tpl');
?>
开发者ID:juliogallardo1326,项目名称:proc,代码行数:27,代码来源:CreateUserAccount.php
示例12: execute_transaction
$transInfo['from_url'] = $from_url;
$transInfo['bank_id'] = $bank_CreditcardId;
$transInfo['td_rebillingID'] = $rd_subaccount;
$transInfo['td_is_a_rebill'] = '0';
$transInfo['td_enable_rebill'] = $td_enable_rebill;
$transInfo['td_voided_check'] = '0';
$transInfo['td_returned_checks'] = '0';
$transInfo['td_site_ID'] = $site_id;
$transInfo['payment_schedule'] = $_SESSION['payment_schedule'];
$transInfo['nextDateInfo'] = $_SESSION['nextDateInfo'];
$transInfo['td_is_affiliate'] = '0';
$transInfo['td_is_pending_check'] = '0';
$transInfo['td_is_chargeback'] = '0';
$transInfo['td_recur_processed'] = '0';
$transInfo['td_recur_next_date'] = $td_recur_next_date;
$transInfo['td_username'] = $td_username;
$transInfo['td_password'] = $td_password;
$transInfo['td_product_id'] = $td_product_id;
include "includes/integration.php";
$etel_fraud_limit = 8.5;
$response = execute_transaction(&$transInfo, $testmode);
$postback = "";
if ($response['status'] == 'A') {
$return_message = "SUC";
} else {
foreach ($HTTP_POST_VARS as $k => $c) {
$postback .= "<input type='hidden' name='{$k}' value='{$c}' >";
}
toLog('error', 'customer', "Customer Recieves error " . $response['errormsg'], $companyid);
}
message($response['errormsg'] . $postback, "", "Response", "creditcard.php");
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:creditcardfb.php
示例13: ActivateTempUserConfirm
function ActivateTempUserConfirm($user_id, $username, $viewmode = "", $sortorder = "", $start = "")
{
global $admin_file, $bgcolor2, $db, $prefix, $user_prefix, $nukeurl;
include "header.php";
GraphicAdmin();
OpenTable();
echo "<center><b>" . _USERADMIN . "</b></center>";
CloseTable();
echo "<br />";
OpenTable();
ListInactivatedReg();
menu();
echo "<br>";
$result = $db->sql_query("SELECT * FROM " . $prefix . "_users_temp WHERE user_id='{$user_id}'");
$row = $db->sql_fetchrow($result);
$user_email = $row['user_email'];
$user_password = $row['user_password'];
$user_regdate = $row['user_regdate'];
$check_num = $row['check_num'];
$time = intval($row['time']);
$result = $db->sql_query("SELECT * FROM " . $user_prefix . "_users_temp WHERE username='{$username}' AND check_num='{$check_num}'");
if ($db->sql_numrows($result) == 1) {
$row = $db->sql_fetchrow($result);
if ($check_num == $row[check_num]) {
//$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', '$row[user_regdate]', '$language')");
$query = "INSERT INTO " . $user_prefix . "_users (user_id, username, user_email, user_password, user_avatar, user_avatar_type, user_regdate, user_lang,usertype,gradyear,company,designation,name,specialization) VALUES (NULL, '{$row['username']}', '{$row['user_email']}', '{$row['user_password']}', 'gallery/blank.gif', 3, '{$row['user_regdate']}', '{$language}','{$row['usertype']}',{$row['gradyear']},'{$row['company']}','{$row['designation']}','{$row['fullname']}','{$row['specialization']}')";
echo $query;
toLog($query);
$db->sql_query("INSERT INTO " . $user_prefix . "_users (user_id, username, user_email, user_password, user_avatar, user_avatar_type, user_regdate, user_lang,usertype,gradyear,company,designation,name,specialization) VALUES (NULL, '{$row['username']}', '{$row['user_email']}', '{$row['user_password']}', 'gallery/blank.gif', 3, '{$row['user_regdate']}', '{$language}','{$row['usertype']}',{$row['gradyear']},'{$row['company']}','{$row['designation']}','{$row['fullname']}','{$row['specialization']}')");
$db->sql_query("DELETE FROM " . $user_prefix . "_users_temp WHERE username='{$username}' AND check_num='{$check_num}'");
echo "<center><b>{$row['username']}:</b> " . _AUM_ACTIVATIONSUCCESS . "</center>";
echo "<meta http-equiv='refresh' content='3; URL=" . $admin_file . ".php?op=aumInactiveRegList&viewmode=" . $viewmode . "&sortorder=" . $sortorder . "&start=" . $start . "'>";
} else {
echo "<center>" . _AUM_ACTIVATIONERROR1 . "</center>";
}
} else {
echo "<center>" . _AUM_ACTIVATIONERROR2 . "</center>";
}
echo "<br><center>" . _GOBACK . "</center><br>";
CloseTable();
include "footer.php";
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:42,代码来源:index.php
示例14: process_failed_rebill
function process_failed_rebill($response = array())
{
$status = $response['td_process_msg'];
$daystowait = intval($response['watchInfo']['ss_rebill_delay']);
if ($daystowait < 2) {
$daystowait = 3;
}
$rebillError = "Error encountered while rebilling for:\n\t\t\t\t\t\t{$this->row['subscriptionTable']['ss_billing_firstname']} {$this->row['subscriptionTable']['ss_billing_lastname']} \r\n\n\t\t\t\t\t\tWith subscription id of: {$this->row['subscriptionTable']['ss_ID']}\r\n\n\t\t\t\t\t\tThis error occured on rebill attempt #{$this->row['subscriptionTable']['ss_rebill_attempts']}";
toLog('rebill', 'customer', $rebillError);
$status = quote_smart($status);
// echo $this->row['subscriptionTable']['ss_ID'] . " - " . $this->row['subscriptionTable']['ss_rebill_attempts'] . "<br>" ;
$ss_rebill_attempts = intval($this->row['subscriptionTable']['ss_rebill_attempts']);
if ($ss_rebill_attempts < 3) {
$upd = "\n\t\t\t\t\tUPDATE\n\t\t\t\t\t\tcs_subscription\n\t\t\t\t\tSET\n\t\t\t\t\t\tss_rebill_status = 'active',\n\t\t\t\t\t\tss_rebill_attempts = ss_rebill_attempts + 1,\n\t\t\t\t\t\tss_rebill_status_text = 'Attempt #" . ($ss_rebill_attempts + 1) . " Failed ({$status})',\n\t\t\t\t\t\tss_rebill_next_date = adddate( now( ) , INTERVAL {$daystowait} DAY ),\n\t\t\t\t\t\tss_account_notes = CONCAT(ss_account_notes, '\n\n', NOW(), ': Rebill Declined ({$status}) (Attempt ',ss_rebill_attempts,'). Will attempt Rebilling again in {$daystowait} days.')\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tss_ID = '{$this->row['subscriptionTable']['ss_ID']}'\n\t\t\t\t\t";
} else {
$upd = "\n\t\t\t\t\tUPDATE\n\t\t\t\t\t\tcs_subscription\n\t\t\t\t\tSET\n\t\t\t\t\t\tss_rebill_status = 'inactive',\n\t\t\t\t\t\tss_rebill_status_text = 'Inactive after 3 failed rebill attempts',\n\t\t\t\t\t\tss_account_expire_date = NOW(),\n\t\t\t\t\t\tss_rebill_attempts = 3,\n\t\t\t\t\t\tss_rebill_next_date = adddate( now( ) , INTERVAL {$daystowait} DAY ),\n\t\t\t\t\t\t`ss_account_notes` = CONCAT(`ss_account_notes`, '\n\n', NOW(), ': Rebill Declined ({$status}) (Attempt ',ss_rebill_attempts,') . Will not attempt to rebill again.')\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tss_ID = '{$this->row['subscriptionTable']['ss_ID']}'\n\t\t\t\t\t";
}
sql_query_write($upd) or dieLog(mysql_error() . "<pre>{$upd}</pre>");
if (!mysql_affected_rows()) {
dieLog("ERROR: Subscription did not update!! {$upd}");
}
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:22,代码来源:transaction.class.php
示例15: process_transactions
//.........这里部分代码省略.........
$update = true;
$status = 'D';
break;
case "cancelled":
$update = true;
$status = 'D';
break;
case "bo exception":
$update = true;
$status = 'D';
break;
case "downloaded":
$update = false;
break;
case "credit originated":
$update = false;
break;
case "credit downloaded":
$update = false;
break;
case "credit return":
$update = true;
$status = 'D';
$chargeback = true;
break;
case "credit funded":
$update = true;
$status = 'A';
break;
}
$refid = substr($tran['ExternalClientID'], 0, 50);
if (!$refid) {
continue;
}
$sql = "\n\t\t\t\tselect * from \n\t\t\t\t\tcs_transactiondetails left join \n\t\t\t\t\tcs_subscription on \n\t\t\t\t\ttd_ss_ID = ss_ID\n\t\t\t\tWHERE\n\t\t\t\t\treference_number = '{$refid}'\n\t\t\t\t\tAND checkorcard='C'\t\t\n\t\t\t\tLIMIT 1\n\t\t\t";
$tranResult = mysql_query($sql) or dieLog(mysql_error() . " ~ {$sql}");
$transInfo = mysql_fetch_assoc($tranResult);
$transId = $transInfo['transactionId'];
if ($transInfo['status'] != 'P' && $update == true) {
$update = false;
}
if (!$transId) {
$log .= " Transaction ID Not Found!! " . print_r($tran, true);
toLog('erroralert', 'misc', "Transaction ID Not Found!! {$transId} {$sql}");
$update = false;
}
if ($update) {
$log .= " Found Response Type (" . $tran['ResponseType'] . ") For ({$refid}):\n";
$notify = 'decline';
$bank_transid = $tran['TransID'];
if ($tran['ResponseDate']) {
$billingDate = date('Y-m-d', strtotime($tran['ResponseDate']));
} else {
$billingDate = "";
}
if ($chargeback) {
//is_chargeback
$sql = "\n\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\t\tcs_transactiondetails left join \n\t\t\t\t\t\t\tcs_subscription on \n\t\t\t\t\t\t\ttd_ss_ID = ss_ID\n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\tstatus='A',\n\t\t\t\t\t\t\ttd_is_chargeback = 1,\n\t\t\t\t\t\t\ttd_bank_transaction_id = '{$bank_transid}',\n\t\t\t\t\t\t\tbillingDate = '{$billingDate}',\n\t\t\t\t\t\t\ttd_merchant_deducted=0,\n\t\t\t\t\t\t\tss_rebill_status = 'inactive',\n\t\t\t\t\t\t\tss_rebill_status_text = 'Subscription Inactive due to Chargeback'\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\ttransactionId = '{$transId}'\n\t\t\t\t\t\t\tAND checkorcard='C'\t\t\n\t\t\t\t\t";
$log .= " This transaction is a chargeback.\n";
$notify = 'chargeback';
$r = $RF->update_transaction_profit($transId);
} else {
if ($refund) {
// cancel_status = y, cancel subscription
$sql = "\n\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\t\tcs_transactiondetails left join \n\t\t\t\t\t\t\tcs_subscription on \n\t\t\t\t\t\t\ttd_ss_ID = ss_ID\n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\tstatus='A',\n\t\t\t\t\t\t\tcancelstatus = 'Y',\n\t\t\t\t\t\t\ttd_bank_transaction_id = '{$bank_transid}',\n\t\t\t\t\t\t\tbillingDate = '{$billingDate}',\n\t\t\t\t\t\t\ttd_merchant_deducted=0,\n\t\t\t\t\t\t\tss_rebill_status = 'inactive',\n\t\t\t\t\t\t\tss_rebill_status_text = 'Subscription Inactive due to Refund'\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\ttransactionId = '{$transId}'\n\t\t\t\t\t\t\tAND checkorcard='C'\t\t\t\n\t\t\t\t\t";
$log .= " This transaction is a refund.\n";
$notify = 'refund';
$r = $RF->update_transaction_profit($transId);
} else {
$ss_rebill_status_sql = $status == 'D' ? "ss_rebill_status = 'inactive', " : '';
$ss_rebill_status_text = $status == 'D' ? 'Subscription Inactive due to decline (' . $this->ach_status[$tran['ResponseType']] . ')' : 'Subscription Active';
$sql = "\n\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\t\tcs_transactiondetails left join \n\t\t\t\t\t\t\tcs_subscription on \n\t\t\t\t\t\t\ttd_ss_ID = ss_ID\n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\ttd_bank_transaction_id = '{$bank_transid}',\n\t\t\t\t\t\t\tstatus = '{$status}',\n\t\t\t\t\t\t\tbillingDate = '{$billingDate}',\n\t\t\t\t\t\t\ttd_merchant_deducted=0,\n\t\t\t\t\t\t\ttd_merchant_paid=0,\n\t\t\t\t\t\t\t{$ss_rebill_status_sql}\n\t\t\t\t\t\t\tss_rebill_status_text = '{$ss_rebill_status_text}'\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\ttransactionId = '{$transId}'\n\t\t\t\t\t\t\tAND checkorcard='C'\tAND status='P'\t\n\t\t\t\t\t";
$log .= " This transaction's status is (" . $this->ach_status[$tran['ResponseType']] . ").\n";
$r = $RF->update_transaction_profit($transId);
}
}
sql_query_write($sql) or dieLog(mysql_error() . "<pre>{$sql}</pre>");
$affected = mysql_affected_rows();
if ($status != 'A') {
$return_affected_rows += $affected;
} else {
$approve_affected_rows += $affected;
}
if ($status == 'A') {
if ($transInfo['td_is_a_rebill']) {
$notify = 'rebill';
} else {
$notify = 'approve';
}
}
if ($affected) {
Process_Transaction($transId, $notify, 0, 'transactionId');
}
} else {
$log .= " Ignoring Transaction.\n";
}
}
$log .= "CheckGateway Result: ({$return_affected_rows}) Returns, ({$approve_affected_rows}) Approves.\n";
return $log;
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:101,代码来源:banks.checkgateway.php
示例16: print_r
print_r($_REQUEST);
print "<br>";
print_r($_SESSION);
print "</span>";
} else {
//$etel_error_info = set_error_handler('etel_error_handler');
}
require_once "function.php";
$etel_generate_page_time = microtime_float();
if (!$disablePostChecks && !$etel_debug_mode) {
if (0 && !$disableInjectionChecks) {
$SQLInjectionRegex = '/[\'")]* *[oO][rR] *.*(.)(.) *= *\\2(?:--)?\\1?/';
$suspiciousQueryItems = preg_grep($SQLInjectionRegex, $_REQUEST);
if (sizeof($suspiciousQueryItems) > 0) {
$hostname = gethostbyaddr($_SERVER["REMOTE_ADDR"]) . ":" . $etel_current_ip;
toLog('hackattempt', 'misc', $_SESSION["userType"] . " Attempted to use an SQL Injection Attack in " . basename(__FILE__) . " from {$hostname} - " . implode("|", $suspiciousQueryItems) . print_r($_SERVER, true), $companyid);
/*
foreach($suspiciousQueryItems as $key=>$item)
{
$_REQUEST[$key] = NULL;
$_POST[$key] = NULL;
$_GET[$key] = NULL;
$HTTP_POST_VARS[$key] = NULL;
$HTTP_GET_VARS[$key] = NULL;
}
*/
}
}
if (!$disableHTMLChecks) {
if (is_array($_REQUEST)) {
foreach ($_REQUEST as $key => $item) {
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:dbconnection.php
示例17: toLog
}
$where_str .= " reports.page_count= '{$pagecount}'";
}
if (isset($page_copy)) {
if (!$where_str) {
$where_str = ' WHERE ';
} else {
$where_str .= ' AND ';
}
$where_str .= " reports.page_copy= '{$pagecopy}'";
}
if ($where_str) {
$query_str .= $where_str;
}
$query_str .= " ORDER BY {$sortingField} {$sortingOrder} LIMIT {$rowsPerPage} OFFSET {$firstRowIndex}";
toLog($query_str);
$res = $dbh->query($query_str);
//WHERE repots_dt BETWEEN '.$date_begin.' AND '.$date_end.'
//сохраняем номер текущей страницы, общее количество страниц и общее количество записей
$response->page = $curPage;
$response->total = ceil($totalRows['count'] / $rowsPerPage);
$response->records = $totalRows['count'];
$i = 0;
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
$response->rows[$i]['id'] = $row['id'];
$response->rows[$i]['cell'] = array($row['id'], $row['datetime'], $row['printer_name'], $row['docmarker'], $row['docname'], $row['mb_number'], $row['inv_number'], $row['punkt'], $row['copynumber'], $row['pagecount'], $row['pagecopy'], $row['cupsuser'], $row['executor_fio'], $row['pressman_fio'], $row['status'], $row['infostr']);
$i++;
}
echo json_encode($response);
} catch (PDOException $e) {
echo 'Database error: ' . $e->getMessage();
开发者ID:sobiron236,项目名称:cupsfilter,代码行数:31,代码来源:getdata.php
示例18: isset
<?php
include "includes/sessioncheck.php";
$headerInclude = "startHere";
include "includes/header.php";
$companyid = isset($HTTP_SESSION_VARS["sessionlogin"]) ? quote_smart($HTTP_SESSION_VARS["sessionlogin"]) : "";
if ($_GET['goLive']) {
$sql = "UPDATE cs_companydetails set `cd_completion` = 9 WHERE `cd_completion` = 7 AND `userId` = '{$companyid}'";
toLog('requestlive', 'merchant', '', $curUserInfo['userId']);
if ($curUserInfo['cd_completion'] == 7) {
mysql_query($sql) or dieLog(mysql_error());
print "<script>document.location.href='Listdetails.php?msg=You have successfully requested to go Live!';</script>";
en_status_change_notify($curUserInfo['en_ID']);
die;
}
}
if ($str_UserId != "") {
$gateway_id = func_get_value_of_field($cnn_cs, "cs_companydetails", "gateway_id", "userid", $str_UserId);
} else {
$gateway_id = -1;
}
$msg = $_GET['msg'];
if ($msg) {
beginTable();
}
?>
<div align="center">
<strong><?php
echo $msg;
?>
</strong>
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:Listdetails.php
示例19: send_email_template
$emaildata["gateway_select"] = $access['Data']['en_gateway_ID']['Value'];
if ($_POST['submit_access'] == 'Submit' && $curUserInfo['en_access'][ACCESS_AUTH_RATES]) {
if ($_POST['Email_Contract_Notification']) {
send_email_template('contract_notification_email', $emaildata);
}
if ($_POST['Email_Active_Notification']) {
send_email_template('active_notification_email', $emaildata);
}
$result = processAccessForm(&$access);
if ($result) {
$msg = "Company Updated Successfully (" . $result['cnt'] . " Field(s))";
$log = $adminInfo['en_username'] . " Updates " . $access['Data']['en_company']['Value'] . " with ";
foreach ($result['updateInfo'] as $name => $value) {
$log .= "{$name} (Old:'" . $value['old'] . "') = '" . $value['new'] . "' ";
}
toLog('misc', 'merchant', $log, $company_id);
} else {
$msg = "No Updates Detected";
}
}
$access['HeaderMessage'] .= $msg;
if ($access['Data']['en_pay_data']['Value']) {
$Schedule = en_get_payout_schedule(array('en_pay_data' => $access['Data']['en_pay_data']['Value'], 'en_pay_type' => $access['Data']['en_pay_type']['Value']));
$access['Data']['en_pay_data']['Value'] = $Schedule['Days'];
}
beginTable();
writeAccessForm(&$access);
endTable("Update Company - " . $access['Data']['en_company']['Value'], "");
$rates_class = new rates_fees();
if (isset($_POST['frmb_process']) && $curUserInfo['en_access'][ACCESS_AUTH_RATES]) {
$new_settings = array();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:editCompanyProfileRates.php
示例20: intval
$en_ID = intval($curUserInfo['en_ID']);
$userId = intval($curUserInfo['userId']);
$step = intval($_REQUEST['step']);
if ($curUserInfo['cd_completion'] < 2) {
step_1($en_ID);
if ($curUserInfo['cd_completion'] < 1) {
$sql = "update cs_companydetails set cd_completion=1 where userId='{$userId}'";
sql_query_write($sql) or dieLog(mysql_error() . " ~{$sql}");
}
step_2($en_ID);
step_3($en_ID);
toLog('completedapplication', 'merchant', '', $en_ID);
$sql = "update cs_companydetails set cd_completion=3 where userId='{$userId}'";
sql_query_write($sql) or dieLog(mysql_error() . " ~{$sql}");
en_status_change_notify($en_ID);
toLog('requestrates', 'merchant', '', $curUserInfo['userId']);
beginTable();
echo "<b>You have successfully completed your Merchant Application. Please proceed to the Request Rates section to submit your Rates Request.</b>";
endTable("Merchant Application Complete!", "merchantContract.php", true, false, true);
} else {
if ($step == 3) {
step_3($en_ID, false);
} else {
if ($step == 2) {
step_2($en_ID, false);
} else {
step_1($en_ID, false);
}
}
}
die;
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:application.php
注:本文中的toLog函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论