403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/usa_sites/governmentgrants.us/vx/usa/account_old/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/governmentgrants.us/vx/usa/account_old/functions/lowerMyPayment.php
<?
/*
error_reporting(E_ALL);
ini_set("display_errors", 1);
*/
include_once($_SERVER['DOCUMENT_ROOT']."/vx/lib/xinc.php");
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/txtwire_usa.php');

if(empty($user) || $guest)
{
	return false;
	exit;
}
else
{
	$cancelResellerID = $_POST['id'];
	$cancelResellerID = ($cancelResellerID * 1);

	$cancelSite = $_POST['site'];
	$cancelSite = clean($cancelSite);

	$reason = $_POST['reason'];
	$reason = clean($reason);
    $reason = str_replace("'", "`", $reason);
    $reason = preg_replace('/[^A-Za-z0-9\.\,\@\_\&\*\!\-\?\`\ ]/', ' ', $reason);

    if(true /*in_array($cancelSite, $sites) || $cancelSite == 'vxb'*/)
	{
		$siteDatabase = "lc2{$cancelSite}_lc";

		$leadData = $db->query("
									SELECT
											*
									FROM {$siteDatabase}.lc_leads
									WHERE
											customerID = '$cancelResellerID'
								");
		if(!$db->valid())
		{
			$errors[] = "Could not select lead from: {$siteDatabase}.lc_leads";
			$errors[] = $db->error();
		}
		$resellerData = $db->query("
										SELECT
												*
										FROM {$siteDatabase}.lc_reseller
										WHERE
												id = '$cancelResellerID'
									");
        if(!$db->valid())
		{
			$errors[] = "Could not select client from: {$siteDatabase}.lc_reseller";
			$errors[] = $db->error();
		}
		$siteData = $db->query("
									SELECT
											*
									FROM lc2admin.site
									WHERE
											site_code = '$cancelSite'
								");
        if(!$db->valid())
		{
			$errors[] = "Could not get site data from: lc2admin.site";
			$errors[] = $db->error();
		}
		$refundEmailData = explode('@',$siteData[0]['refund_email']);
		$refundDomain = $refundEmailData[1];

		$sitePhone = $siteData[0]['phone'];
		$siteDomain = $siteData[0]['site_domain'];
		$siteUrl = "https://".$siteDomain;

		$lead = $leadData[0]['id'];
		$lead = ($lead * 1);

		$to = '"'.$resellerData[0]['first'].' '.$resellerData[0]['last'].'" <'.$resellerData[0]['email'].'>';

		$headers = 'From:"Support" <'.$siteData[0]['refund_email'].'>'."\r\n".'ReplyTo:"Support" <'.$siteData[0]['refund_email'].'>'."\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n";

		$subject = $siteData[0]['site_name']." Lowered Payment Confirmation ".date('m/d/Y H:i:s');

		$body = "<div style=\"width:500px;font-family:Helvetica;\">";
			$body .= "<div>";
				$body .= "<img src=\"".$siteUrl."/vx_/images/LogoA.png\" />";
			$body .= "</div>";
			$body .= "<div style=\"padding-left:60px;\">";
				$body .= "<p>";
					$body .= $resellerData[0]['first'].",";
				$body .= "</p>";
				$body .= "<p>";
					$body .= "Your monthly subscription amount with {$siteData[0]['site_name']} has been lowered to $9.95 ";
					$body .= "effective, ".date('m/d/Y').".";
				$body .= "</p>";
				$body .= "<p>";
					$body .= "Thank you for stay with us and for taking advantage of our massive database of funding opportunities.";
				$body .= "</p>";
				$body .= "<p>";
					$body .= "If you have any questions in the future, please don't hesitate ";
					$body .= "to call (".substr($sitePhone, 0, 3).")".substr($sitePhone, 3, 3)."-".substr($sitePhone, 6);
				$body .= "</p>";
				$body .= "<p>";
					$body .= "Sincerely,";
				$body .= "</p>";
				$body .= "<p>";
					$body .= $siteData[0]['site_name'];
				$body .= "</p>";
				$body .= "<br>";
				$body .= "<br>";
				$body .= "<p>";
					$body .= 'If you ever have any questions and need to get help with your account, here is your account information:<br><br>';
					$body .= $resellerData[0]['first'].' '.$resellerData[0]['last']."<br>";
					$body .= $resellerData[0]['city'].', '.$resellerData[0]['state'].'. '.$resellerData[0]['zip']."<br>";
					$body .= phone_number($resellerData[0]['phone_1'])."<br>";
					$body .= $resellerData[0]['email']."<br>";
					$body .= "<br>";
					$body .= "<br>";
					$body .= 'Visit: <a href="'.$siteUrl.'" target="_blank">'.$siteUrl.'</a><br>';
                    $body .= "</p>";
                    $body .= "</div>";
                    $body .= "</div>";

         //mail($to, $subject, $body, $headers,'-f '.$refundDomain);
        mailgun_send_message($to,$refundDomain,$subject,$body,1,'Lower My Payment','','',$cancelSite,$cancelResellerID);

		$textBody = "{$resellerData[0]['first']}, your monthly subscription amount with {$siteData[0]['site_name']} has been lowered to $9.95 effective ".date('m/d/Y').". For Q's, call: (".substr($sitePhone,0 ,3).")".substr($sitePhone, 3, 3)."-".substr($sitePhone, 6);

		send_text($resellerData[0]['phone_1'], $textBody);
		track_member_action('Lowered Membership Cost','Lowered Membership Monthly Cost');

		$db->query("
						UPDATE {$siteDatabase}.lc_clients_subscriptions
						SET
							amount = '9.95'
						WHERE
								reseller_id = '$cancelResellerID'
							AND
								subscription_id = 2
					");
        if(!$db->valid())
		{
			$errors[] = "Could not update client data on: {$siteDatabase}.lc_clients_subscriptions 2";
			$errors[] = $db->error();
		}
		$db->query("
						UPDATE {$siteDatabase}.lc_clients_subscriptions
						SET
							amount = '0.00'
						WHERE
								reseller_id = '$cancelResellerID'
							AND
								subscription_id = 3
					");
		if(!$db->valid())
		{
			$errors[] = "Could not update client data on:{$siteDatabase}.lc_clients_subscriptions 3";
			$errors[] = $db->error();
		}
		$db->query("
						INSERT INTO allocator.leadlog
						(
							leadsourceid,
							marketer,
							disposition,
							disposition_date,
							dispositiondate,
							disposition_datetime
						)
						(
							SELECT
									id,
									'Update Script',
									'Lowered Payment',
									CURDATE(),
									NOW(),
									NOW()
							FROM allocator.leads
							WHERE
									leaddb = '$cancelSite'
								AND
									leadid = '$lead'
								AND
									leadtype = 'sales'
						)
					");
		if(!$db->valid())
		{
			$errors[] = "Could not update allocator lead log";
			$errors[] = $db->error();
		}
		$db->query("
						INSERT INTO surfcrm.notes
						(
							timeclock_id,
							site_code,
							client_type,
							client_id,
							date,
							type,
							note,
							username,
							first_name,
							last_name,
							active
						)
						VALUES
						(
							'0',
							'$cancelSite',
							'clients',
							'$cancelResellerID',
							NOW(),
							'System Note',
							'Client lowered their monthly payment to $9.95 from $cancelSite feedback form : $reason',
							'Client',
							'$cancelSite',
							'site',
							'1'
						)
					");
		if(!$db->valid())
		{
			$errors[] = "Could Not Enter Note";
			$errors[] = $db->error();
		}
	}
	else
	{
		$errors[] = "Could Not Lower Membership Amount for Unknown Site";
	}
}

if(count($errors) > 0)
{
    $errors = json_encode($errors);
    $errors = clean($errors);
    $errors = preg_replace('/[^A-Za-z0-9\.\,\@\_\&\*\!\-\?\`\ ]/', ' ', $errors);
    $db->query("
						INSERT INTO surfcrm.notes
						(
							timeclock_id,
							site_code,
							client_type,
							client_id,
							date,
							type,
							note,
							username,
							first_name,
							last_name,
							active
						)
						VALUES
						(
							'0',
							'$cancelSite',
							'clients',
							'$cancelResellerID',
							NOW(),
							'System Note',
							'$errors',
							'Error',
							'$cancelSite',
							'site',
							'1'
						)
					");
}
mail("heinz57@gmail.com", $subject, $body, $headers,'-f '.$refundDomain);
//mail("skynet.abc@gmail.com", $subject, $body, $headers,'-f '.$refundDomain);
/*
include_once($_SERVER['DOCUMENT_ROOT']."/vx/lib/xinc.php");
require_once($_SERVER['DOCUMENT_ROOT']."/vx/lib/user.php");
if(empty($user) || $guest)
{
	return false;
	exit;
}
else
{

	$subject = $siteName." Feedback";

	$data = array();

	$qs = clean($_POST['qs']);
	$feedback = html_entity_decode($qs);
	$feedback = stripslashes($feedback);
	$feedback = json_decode($feedback, TRUE);

	$simpleMessage = "";

	$message .= 'File: <strong>'.$feedback['file'].'</strong><br>';

	$message .= 'Screen Width: <strong>'.$feedback['screen_width'].'px</strong><br>';

	$message .= 'Screen Height: <strong>'.$feedback['screen_height'].'px</strong><br>';

	$message .= 'Device: <strong>'.ucwords($feedback['device']).'</strong><br>';

	$message .= 'Browser: <strong>'.ucwords($feedback['browser']).'</strong><br>';

	$message .= 'Operating System: <strong>'.ucwords($feedback['operating_system']).'</strong><br>';

	$message .= 'Network: <strong>'.strtoupper($feedback['network']).'</strong><hr>';

	$question = $feedback['question'];

	$message .= '<strong>'.$userPhone.' '.$feedback['email'].'</strong><br>';

	$questionData = $db->query("
									SELECT
											*
									FROM grdb.grd_feedback_tree
									WHERE
											question = '$question'
								");
	//------------------------------------------------------------------------------------------------------
	$message .= 'Question Topic: <strong>'.$questionData[0]['title'].'</strong><br>';
		//.......................
	$simpleMessage .= 'Question Topic: <strong>'.$questionData[0]['title'].'</strong><br>';
	//------------------------------------------------------------------------------------------------------

	$questions = $feedback['questions'];

	$questionsData = $db->query("
									SELECT
											*
									FROM grdb.grd_feedback_tree
									WHERE
											question = '$questions'
								");
	//------------------------------------------------------------------------------------------------------
	$message .= 'Sub-Topic: <strong>'.$questionsData[0]['title'].'</strong><br><hr>';
		//.......................
	$simpleMessage .= 'Sub-Topic: <strong>'.$questionsData[0]['title'].'</strong><br><hr>';
	//------------------------------------------------------------------------------------------------------
	if($questions == 6)
	{
		//------------------------------------------------------------------------------------------------------
		$message .= 'Why do you want to cancel? <strong>'.$feedback['q'][0]['reason'].'</strong><br><br>';
			//.......................
		$simpleMessage .= 'Why do you want to cancel? <strong>'.$feedback['q'][0]['reason'].'</strong><br><br>';
		//------------------------------------------------------------------------------------------------------
	}
	else if($questions == 12)
	{
		//------------------------------------------------------------------------------------------------------
		$message .= 'Why are wanting a refund? <strong>'.$feedback['q'][0]['reason'].'</strong><br><br>';
			//.......................
		$simpleMessage .= 'Why are wanting a refund? <strong>'.$feedback['q'][0]['reason'].'</strong><br><br>';
		//------------------------------------------------------------------------------------------------------
	}
	else
	{
		//------------------------------------------------------------------------------------------------------
		$message .= 'Client Question: <strong>'.$feedback['message'].'</strong><br><br>';
			//.......................
		$simpleMessage .= 'Client Question: <strong>'.$feedback['message'].'</strong><br><br>';
		//------------------------------------------------------------------------------------------------------
	}
	if($questions == 6 || $questions == 12)
	{
		//------------------------------------------------------------------------------------------------------
		$message .= 'Have you set up your Email Alerts to notify you of new funding sources? <strong>'.$feedback['q'][1]['status'].": ".($feedback['q'][1]['status'] == 'no' ? $feedback['q'][1]['why'] : '').'</strong><br><br>';
			//.......................
		$simpleMessage .= 'Have you set up your Email Alerts to notify you of new funding sources? <strong>'.$feedback['q'][1]['status'].": ".($feedback['q'][1]['status'] == 'no' ? $feedback['q'][1]['why'] : '').'</strong><br><br>';
		//------------------------------------------------------------------------------------------------------

		//------------------------------------------------------------------------------------------------------
		$message .= 'Have you participated in the Tele-Seminars with our Grant Writer? <strong>'.$feedback['q'][2]['status'].": ".($feedback['q'][2]['status'] == 'no' ? $feedback['q'][2]['why'] : '').'</strong><br><br>';
			//.......................
		$simpleMessage .= 'Have you participated in the Tele-Seminars with our Grant Writer? <strong>'.$feedback['q'][2]['status'].": ".($feedback['q'][2]['status'] == 'no' ? $feedback['q'][2]['why'] : '').'</strong><br><br>';
		//------------------------------------------------------------------------------------------------------

		//------------------------------------------------------------------------------------------------------
		$message .= 'If we decreased the monthly fee will you stay? <strong>'.$feedback['q'][3]['status'].'</strong><br>';
			//.......................
		$simpleMessage .= 'If we decreased the monthly fee will you stay? <strong>'.$feedback['q'][3]['status'].'</strong><br><br>';
		//------------------------------------------------------------------------------------------------------

		$message .= 'Email was sent to <strong>'.$feedback['email'].'</strong> and to <strong>heinz57@gmail.com</strong> at '.date("Y-m-d H:i:s").'<br>';


	}
	$db->query("
					INSERT INTO surfcrm.tickets
					SET
						account = '$siteEmail',
						cust_id = '$user',
						site_id = '$siteCode',
						cust_name = '$firstName $lastName',
						cust_email = '$email',
						subject = 'Site Feedback',
						active = 1
			");

	$ticket = $db->last_insert_id();

	$data['ticket'] = $ticket;

	$db->query("
					INSERT INTO surfcrm.tickets_events
					SET
						tid = '$ticket',
						subject = 'Site Feedback',
						message = '$message',
						type = 'message',
						active = 1,
						datecreate = NOW()
			");


	$emailMessage = $firstName.",<br><br>";
	$emailMessage .= "We have received the following question you submitted on $siteName<br><br>";
	$emailMessage .= $simpleMessage."<br><br>";
	$emailMessage .= "A member of our customer service team will respond to your question in the next 24 business hours.<br><br><br>";
	$emailMessage .= "Have a great day!<br><br>";
	$emailMessage .= "$siteName<br>Support Team";

	$to = $feedback['email'];
	$headers = "MIME-Version: 1.0" . "\r\n";
	$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
	$headers .= 'From: <'.$siteEmail.'>' . "\r\n";

	mail($to, $subject, $emailMessage, $headers);

	mail("heinz57@gmail.com", $subject, $emailMessage, $headers);
}
*/
?>

Youez - 2016 - github.com/yon3zu
LinuXploit