/home/techb158/immovalet.ca/report/includes
NameSizeModeActions
db_connect.php78240666editdlrm
db_connects.php2920666editdlrm
forgetpassword.php41050666editdlrm
functions.php171790666editdlrm
functions1.php122470666editdlrm
logout.php7220666editdlrm
process_login.php22030666editdlrm
psl-config.php21960666editdlrm
psl-config 1.php21070666editdlrm
psl-config3.php21070666editdlrm
psl-configs.php16740666editdlrm
register-client.php75430666editdlrm
register.inc.php33900666editdlrm
register.php272740666editdlrm
registerclient.php88590666editdlrm
requestsubmission.php235230666editdlrm
reset.php39840666editdlrm
Edit: /home/techb158/immovalet.ca/report/includes/registerclient.php (8859B)
S'il vous plaît remplir toutes vos informations sont obligatoires!

"; if (isset ($_POST['username'], $_POST['email'], $_POST['p'], $_POST['FirstName'], $_POST['LastName'], $_POST['Company'], $_POST['Contact_Phone'], $_POST['Location_Address'], $_POST['Location_City'], $_POST['Location'], $_POST['Location_State'], $_POST['Location_ZipCode'])) { // Sanitize and validate the data passed in $Username = $_POST['username']; $Title = $_POST['Title']; $First_Name = $_POST['FirstName']; $Last_name = $_POST['LastName']; $Full_Name =$First_Name .' '. $Last_name; $Company_Name = $_POST['Company']; $Contact_Phone = $_POST['Contact_Phone']; $Address = $_POST['Location_Address']; $City = $_POST['Location_City']; $Cuntry = $_POST['Location']; $State = $_POST['Location_State']; $ZipCode = $_POST['Location_ZipCode']; $User_Access = 0; $Email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL); $Email = filter_var($Email, FILTER_VALIDATE_EMAIL); if (!filter_var($Email, FILTER_VALIDATE_EMAIL)) { // Not a valid email // $error_msg .= '

The email address you entered is not valid

'; $error_msg .= "

L'Courriel que vous avez entrée n'est pas valide.

"; } $Password = filter_input(INPUT_POST, 'p', FILTER_SANITIZE_STRING); if (strlen($Password) != 128) { // The hashed pwd should be 128 characters long. // If it's not, something really odd has happened // $error_msg .= '

Invalid password configuration.

'; $error_msg .= "

S'il vous plaît contacter avec notre équipe de support.

"; } $prep_stmt = "SELECT ID FROM Admin WHERE Username = ? AND Email = ? LIMIT 1"; $stmt = $mysqli->prepare($prep_stmt); if ($stmt){ $stmt->bind_param('ss', $Username, $Email); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows == 1) { // A user with this email address already exists $error_msg .= '

Un utilisateur avec ce nom utilisateur existe déjà.

'; } }else{ $error_msg .= "

S'il vous plaît contacter avec notre équipe de support.

"; // $error_msg .= '

Database error

'; } $prep_stmt = "SELECT M_ID FROM Master WHERE Username = ? AND Email = ? LIMIT 1"; $stmt = $mysqli->prepare($prep_stmt); if ($stmt) { $stmt->bind_param('ss', $Username, $Email); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows == 1) { // A user with this email address already exists $error_msg .= '

Un utilisateur avec ce nom utilisateur existe déjà.

'; } } else { $error_msg .= "

S'il vous plaît contacter avec notre équipe de support.

"; } $prep_stmt = "SELECT C_ID FROM Clients WHERE Username = ? AND Email = ? LIMIT 1"; $stmt = $mysqli->prepare($prep_stmt); if ($stmt) { $stmt->bind_param('ss', $Username, $Email); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows == 1) { // A user with this email address already exists //$error_msg .= '

A user with this user name already exists.

'; $error_msg .= "

SUn utilisateur avec ce nom utilisateur existe déjà.

"; //header('Location: register.php?error=Un utilisateur avec ce nom utilisateur existe déjà.'); //exit(); } } else { //$error_msg .= '

Database error

'; $error_msg .= "

S'il vous plaît contacter avec notre équipe de support.

"; //header('Location: register.php?error=Database error!'); //exit(); } if (empty($error_msg)) { // Create a random salt $random_salt = hash('sha512', uniqid(openssl_random_pseudo_bytes(16), TRUE)); // Create salted password $Password = hash('sha512', $Password . $random_salt); $Register_Date =date("Y/m/d"); $Register_Time =date("Y/m/d") . ' ' . date('H:i:s') ; $ip= $_SERVER["REMOTE_ADDR"]; $agent =$_SERVER["HTTP_USER_AGENT"]; //$result_check = pg_exec("SELECT * FROM client WHERE cli_no='".$Username."'"); //$num_row_check = pg_num_rows($result_check); $query = "SELECT * FROM Clients WHERE Username='".$Username."'"; $result = $mysqli->query($query); if($result->num_rows == 1){ // A user with this email address already exists $Massg = "Un utilisateur avec ce nom d'utilisateur existe déjà."; $error_msg .= '

$Massg

'; }else { //$Cli_ID = mysqli_insert_id($mysqli); if ($insert_stmt = $mysqli->prepare("INSERT INTO Clients (Username,First_Name, Last_name, Company_Name, Email, Phone, Address, City, Location, State, ZipCode, Password, salt, Register_Time, User_IP, User_agent, User_Access) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { $insert_stmt->bind_param('sssssssssssssssss',$Username, $First_Name, $Last_name, $Company_Name, $Email, $Contact_Phone, $Address, $City, $Cuntry, $State, $ZipCode, $Password, $random_salt, $Register_Time, $ip, $agent, $User_Access); // Execute the prepared query. if (! $insert_stmt->execute()) { //header('Location: modifier_profil.php?error='.$insertstmts->error); //$textq="d'inscription"; //.$insert_stmt->error $error_msg .= "

Échec d'enregistrement avec notre système!

"; //header("Location: register.php?error=Échec d'enregistrement avec notre système!"); //header('Location: addassist.php?error='.$Managers_ID.''); // exit(); }else{ $respons=sendemail($Username,$First_Name,$Last_name,$Email); $error_msg .=$respons; // $error_msg .= "

S'il vous plaît remplir toutes vos informations sont obligatoires!

"; //header('Location: register.php?error=register success!'); //exit(); } } } }//else{ // $error_msg .= "

S'il vous plaît contacter avec notre équipe de support.

"; //} }else { header("Location: register.php?error=S'il vous plaît remplir toutes vos informations sont obligatoires!"); exit(); $error_msg .= "

S'il vous plaît remplir toutes vos informations sont obligatoires!

"; } } //$error_msg .= "

S'il vous plaît remplir toutes vos informations sont obligatoires!

"; function sendemail($Username,$First_Name,$Last_name,$Email) { $to=$Email; //$to="abdalla.bala@gmail.com"; $subject = "BonBoss.Ca Nouveau compte créé pour ".$First_Name . ' ' . $Last_name.""; $uri = 'http://'. $_SERVER['HTTP_HOST'] ; $message = ' BonBoss.Ca

Bienvenue chez BonBoss.ca


Vous êtes maintenant inscrit à BonBoss.ca comme chercheur pour des emplois de qualité. Vous y trouverez de bonnes entreprises, des gestionnaires humains et des équipes inspirantes.


Cliquez sur le lien indiqué pour activer votre compte Actif maintenant!


"'."Merci d'avoir choisi BonBoss.Ca.".'"


'; $headers[] = 'MIME-Version: 1.0'; $headers[] = 'Content-type: text/html; charset=iso-8859-1'; // Additional headers $info="info@bonboss.ca"; $headers[] = 'To: '.$to.'>'; $headers[] = 'From: Équipe de soutien <'.$info.'>'; $headers[] = 'Cc: abdalla.bala@gmail.com'; $headers[] = 'Bcc: abdalla.bala@gmail.com'; //$headers = "MIME-Version: 1.0" . "\r\n"; //$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; //$headers .= 'From: BonBoss.Ca' . "\r\n"; //$headers .= 'Bcc: BonBoss.Ca' . "\r\n"; $mail =mail($to, $subject, $message, implode("\r\n", $headers)); if($mail){ $error_msg .= '

La vérification Courriel vous a été envoyée.

'; }else { $error_msg .= "

S'il vous plaît contacter avec notre équipe de support.

"; } return $error_msg; }