diff --git a/app/signup/app_config.php b/app/signup/app_config.php deleted file mode 100644 index 7c3c2db782..0000000000 --- a/app/signup/app_config.php +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/app/signup/config.php.dist b/app/signup/config.php.dist deleted file mode 100644 index 4dd534ce04..0000000000 --- a/app/signup/config.php.dist +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/app/signup/root.php b/app/signup/root.php deleted file mode 100644 index c7906e24a5..0000000000 --- a/app/signup/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> diff --git a/app/signup/signup.php b/app/signup/signup.php deleted file mode 100644 index 5a7a1a256a..0000000000 --- a/app/signup/signup.php +++ /dev/null @@ -1,178 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/recaptchalib.php"; -//require_once "includes/email_address_validator.php"; -include "config.php"; -include "v_fields.php"; - -# the response from reCAPTCHA -$resp = null; -# the error code from reCAPTCHA, if any -$error = null; - -if (count($_POST)>0 && $_POST["persistform"] != "1") { - - $msgerror = ''; - - $required[] = array('username', "Please provid a Username.
\n"); - $required[] = array('user_first_name', "Please provide a first name.
\n"); - $required[] = array('user_last_name', "Please provide a last name.
\n"); - $required[] = array('user_billing_address_1', "Please provide a street address.
\n"); - $required[] = array('user_billing_city', "Please provide a city.
\n"); - $required[] = array('user_billing_state_province', "Please provide a state.
\n"); - $required[] = array('user_billing_country', "Please provide a country.
\n"); - $required[] = array('user_billing_postal_code',"Please provide a postal code.
\n"); - $required[] = array('user_phone_1', "Please provide a phone number.
\n"); - $required[] = array('user_email', "Please provide an email address.
\n"); - - foreach($required as $x) { - if (strlen($_REQUEST[$x[0]]) < 1) { - $msgerror .= $x[1]; - $error_fields[] = $x[0]; - } - } - - //sanitize the http request array - foreach ($_REQUEST as $field => $data){ - $request[$field] = check_str($data); - } - - //username is already used. - if (strlen($request['username']) != 0) { - $sql = "SELECT * FROM v_users "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and username = '" . $request['username'] . "' "; - $sql .= "and user_enabled = 'true' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - if (count($prep_statement->fetchAll(PDO::FETCH_NAMED)) > 0) { - $msgerror .= "Please choose a different Username.
\n"; - } - } - - // make sure password fields match - if ($request['password'] != $request['confirmpassword']) { - $msgerror .= "Passwords did not match.
\n"; - } - - // email address atleast looks valid - //if (!in_array('user_email', $error_fields)) { - // $validator = new EmailAddressValidator; - // if (!$validator->check_email_address($request['user_email'])) { - // $msgerror .= "Please provide a VALID email address.
\n"; - // } - //} - - if ($_POST["recaptcha_response_field"]) { - $resp = recaptcha_check_answer ($privatekey, - $_SERVER["REMOTE_ADDR"], - $_POST["recaptcha_challenge_field"], - $_POST["recaptcha_response_field"]); - - if (!$resp->is_valid) { - # set the error code so that we can display it - $msgerror .= "Captcha Verification Failed
\n"; - $error = $resp->error; - } - } else { - $msgerror .= "Captcha Verification Failed
\n"; - } - - if (strlen($msgerror) > 0) { - goto showform; - } - - //salt used with the password to create a one way hash - $salt = generate_password('20', '4'); - $user_uuid = uuid(); - $sql = "insert into v_users "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "user_uuid, "; - $sql .= "username, "; - $sql .= "password, "; - $sql .= "salt, "; - $sql .= "user_email, "; - $sql .= "add_date, "; - $sql .= "add_user "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$user_uuid', "; - $sql .= "'" . $request['username'] . "', "; - $sql .= "'".md5($salt.$request['password'])."', "; - $sql .= "'" . $salt . "', "; - $sql .= "'" . $request['user_email'] . "', "; - $sql .= "now(), "; - $sql .= "'".$_SESSION["username"]."' "; - $sql .= ") "; - if ($db_type == "pgsql") { - - } - $db->exec(check_sql($sql)); - unset($sql); - - //log the success - //$log_type = 'user'; $log_status='add'; $log_add_user=$_SESSION["username"]; $log_desc= "username: ".$username." user added."; - //log_add($db, $log_type, $log_status, $log_desc, $log_add_user, $_SERVER["REMOTE_ADDR"]); - - $group_name = 'user'; - $sql = "insert into v_group_users "; - $sql .= "("; - $sql .= "group_user_uuid, "; - $sql .= "domain_uuid, "; - $sql .= "group_name, "; - $sql .= "user_uuid "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'" . $domain_uuid . "', "; - $sql .= "'" . $group_name . "', "; - $sql .= "'" . $user_uuid . "' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
Add Complete
"; - require_once "includes/footer.php"; - // This should probably be an exit or die() call; - return; -} - -showform: - -require_once "includes/header.php"; - -include "user_template.php"; - -require_once "includes/footer.php"; -?> \ No newline at end of file diff --git a/app/signup/user_template.php b/app/signup/user_template.php deleted file mode 100644 index e0a8f61132..0000000000 --- a/app/signup/user_template.php +++ /dev/null @@ -1,61 +0,0 @@ -
- - 0) { ?> - - - - - -
- -
-
- -
- - - -
-
- - - -
"); -} -?> - -
-
- - - - - - - -
- -
- - -
-
diff --git a/app/signup/v_fields.php b/app/signup/v_fields.php deleted file mode 100644 index 68ee6a1f6c..0000000000 --- a/app/signup/v_fields.php +++ /dev/null @@ -1,30 +0,0 @@ -\n"); - $forms[1]['fields'][2] = array('password', "Password:", "password", TRUE, "Please provid a Username.
\n"); - $forms[1]['fields'][3] = array('confirmpassword', "Confirm Password:", "password", FALSE, ""); - $forms[1]['fields'][4] = array('user_company_name', "Company Name:", "text", FALSE, ""); - $forms[1]['fields'][5] = array('user_first_name', "First Name:", "text", TRUE, "Please provide a first name.
\n"); - $forms[1]['fields'][6] = array('user_last_name', "Last Name:", "text", TRUE, "Please provide a last name.
\n"); - $forms[1]['fields'][7] = array('user_email', "Email:", "text", TRUE, "Please provide an email address.
\n"); - $forms[1]['fields'][8] = array('user_phone_1', "Phone Number:", "text", TRUE, "Please provide a phone number.
\n"); - $forms[1]['fields'][9] = array('user_phone_1_ext', "Extension:", "text", FALSE, ""); - - $forms[2]['header'] = "Billing Address"; - $forms[2]['fields'][1] = array('user_billing_address_1', "Address 1:", "text", TRUE, "Please provide a street address.
\n"); - $forms[2]['fields'][2] = array('user_billing_address_2', "Address 2:", "text", FALSE, ""); - $forms[2]['fields'][3] = array('user_billing_city', "City:", "text", TRUE, "Please provide a city.
\n"); - $forms[2]['fields'][4] = array('user_billing_state_province', "State/Province:", "text", TRUE, "Please provide a state or province.
\n"); - $forms[2]['fields'][5] = array('user_billing_country', "Country:", "text", TRUE, "Please provide a country.
\n"); - $forms[2]['fields'][6] = array('user_billing_postal_code', "ZIP/Postal Code:", "text", TRUE, "Please provide a postal code.
\n"); - - $forms[3]['header'] = "Shipping Address"; - $forms[3]['fields'][1] = array('user_shipping_address_1', "Address 1:", "text", TRUE, "Please provide a street address.
\n"); - $forms[3]['fields'][2] = array('user_shipping_address_2', "Address 2:", "text", FALSE, ""); - $forms[3]['fields'][3] = array('user_shipping_city', "City:", "text", TRUE, "Please provide a city.
\n"); - $forms[3]['fields'][4] = array('user_shipping_state_province', "State/Province:", "text", TRUE, "Please provide a state or province.
\n"); - $forms[3]['fields'][5] = array('user_shipping_country', "Country:", "text", TRUE, "Please provide a country.
\n"); - $forms[3]['fields'][6] = array('user_shipping_postal_code', "ZIP/Postal Code:", "text", TRUE, "Please provide a postal code.
\n"); - -?>