/home/techb158/workloadmatch.com/workloadmatch.com/BackUp/Teacher/Inc
NameSizeModeActions
AddClient.php41710644editdlrm
AddCoursePreference.php189950644editdlrm
updateclient.php27280644editdlrm
UpdateClient1.php27260644editdlrm
Update_Course_Preference.php114680644editdlrm
Update_Course_Preference_Secretarial.php41290644editdlrm
Update_Profile.php45140644editdlrm
Update_Reference.php91310644editdlrm
Update_Reference_Follow_Up.php74350644editdlrm
Edit: /home/techb158/workloadmatch.com/workloadmatch.com/BackUp/Teacher/Inc/AddClient.php (4171B)
prepare('SELECT * FROM Broker_Profile WHERE Broker_ID = ?'); $stmt->bind_param('s', $user_n); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); $count =$result->num_rows; if($count > 0) { $query = "SELECT * FROM Broker_Profile Where Broker_ID ='".$user_n."'"; $result = $mysqli->query($query); $row = $result->fetch_assoc(); $Category_ID = $row['Category_ID']; $Admin_ID = $row['Admin_ID']; $Master_ID = $row['Master_ID']; $Manager_ID = $row['Manager_ID']; $Broker_ID = $row['Broker_ID']; $User_Type_ID = $row['User_Type_ID']; do { $number_id = mt_rand(10000,999999); $prep_stmt = "SELECT AP.Admin_ID, MP.Master_ID, MGP.Manager_ID,BP.Broker_ID,CP.Client_ID FROM admin_profile AP JOIN master_profile MP JOIN manager_profile MGP JOIN Broker_Profile BP JOIN Client_Profile CP WHERE AP.Admin_ID=? OR MP.Master_ID=? OR MGP.Manager_ID=? OR BP.Broker_ID=? OR CP.Client_ID=? LIMIT 1"; $stmt = $mysqli->prepare($prep_stmt); if ($stmt){ $stmt->bind_param('sssss', $number_id, $number_id, $number_id, $number_id, $number_id); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows == 1) { $count =$stmt->num_rows; // A user with this email address already exists //$error_msg .= '

A user with this user name already exists.

'; //header('Location: adduser.php?error=A user with this user name already exists.'); //exit(); }else{ $count =0; } } } while ($count > 0); // header('Location: addclient.php?error=file name already exists'.$user_n.'-'.$number_id); //exit(); $datepickerx = date("Y-m-d", strtotime($datepicker)); $query = "SELECT * FROM Client_Profile Where User_Name ='".$Client_Name."' AND Email ='".$Email."' AND Deleted_Status ='0'"; $result = $mysqli->query($query); $Managers = $result->fetch_assoc(); $ID = $Managers['Client_ID']; if ($ID >= 1) { header('Location: addclient.php?error=Client Name is already exist.'); exit(); }else { $datetime =date("Y/m/d") . ' ' . date('H:i:s') ; if ($insert_stmt = $mysqli->prepare("INSERT INTO Client_Profile (Client_ID, Category_ID, Admin_ID, Master_ID, Manager_ID, Broker_ID, User_Type_ID, Titel, First_Name, Last_Name, User_Name, Email, Home_Phone, Cell_Phone, Address, Reg_Date, Login_Date, Logout_Date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { //header('Location: addclient.php?error=file name already exists'.$user_n.''); $insert_stmt->bind_param('ssssssssssssssssss',$number_id,$Category_ID, $Admin_ID, $Master_ID, $Manager_ID, $Broker_ID, $User_Type_ID, $Titel, $First_Name, $Last_Name, $Client_Name, $Email, $Home_Phone, $Cell_Phone, $Address, $datetime, $datetime, $datetime); // Execute the prepared query. if (! $insert_stmt->execute()) { header('Location: addclient.php?error=Registration failure to add new cleint!'); //header('Location: addassist.php?error='.$Managers_ID.''); exit(); }else { header('Location: addclient.php?error=New cleint successfully registered!'); exit(); } }else{ //header('Location: addclient.php?error='.$mysqli->error); } } } }else{ header('Location: addclient.php?error=Registration failure please insert all informaion!'); exit(); } }