/
home
/
techb158
/
workloadmatch.com
/
workloadmatch.com
/
Manager
/
Inc
/
/home/techb158/workloadmatch.com/workloadmatch.com/Manager/Inc
mkdir
upload
Name
Size
Mode
Actions
AddClient.php
3930
0644
edit
dl
rm
AddCourse.php
1996
0644
edit
dl
rm
AddCourseTime.php
1709
0644
edit
dl
rm
AddGroup - Copy.php
4531
0644
edit
dl
rm
AddGroup.php
4921
0644
edit
dl
rm
AddHoliday.php
1636
0644
edit
dl
rm
AddReference.php
8258
0644
edit
dl
rm
AddTeacherLevel.php
2131
0644
edit
dl
rm
AddUser.php
11841
0644
edit
dl
rm
Add_Retake_Remediation.php
1248
0644
edit
dl
rm
Assignment-1.php
73605
0644
edit
dl
rm
Assignment-2.php
73605
0644
edit
dl
rm
Assignment - BackUp- orgenal.php
71487
0644
edit
dl
rm
Assignment - BackUp.php
61314
0644
edit
dl
rm
Assignment - Copy (Last File Updated 2025-05-15).php
71164
0644
edit
dl
rm
Assignment - Copy.php
60402
0644
edit
dl
rm
Assignment.php
74235
0644
edit
dl
rm
Assignment_BackUp.php
77046
0644
edit
dl
rm
Assign_Category_To_User.php
2733
0644
edit
dl
rm
Assign_Teacher_Manual.php
20508
0644
edit
dl
rm
Assign_Teacher_Manual_Force_conflict.php
20638
0644
edit
dl
rm
Available_Teacher_Report.php
2341
0644
edit
dl
rm
error_log
869
0644
edit
dl
rm
Process_Assignment - Copy.php
4150
0644
edit
dl
rm
Process_Assignment.php
5559
0644
edit
dl
rm
Schedule_Report_by_Group.php
2997
0644
edit
dl
rm
UpdateClient.php
2513
0644
edit
dl
rm
updateuser.php
2429
0644
edit
dl
rm
Update_Course.php
2019
0644
edit
dl
rm
Update_Course_Time.php
1755
0644
edit
dl
rm
Update_Group - Copy.php
3404
0644
edit
dl
rm
Update_Group.php
8905
0644
edit
dl
rm
Update_Holiday.php
2178
0644
edit
dl
rm
Update_Profile.php
4816
0644
edit
dl
rm
Update_Reference.php
8908
0644
edit
dl
rm
Update_Reference_Follow_Up.php
3481
0644
edit
dl
rm
Update_User.php
5204
0644
edit
dl
rm
Edit:
/home/techb158/workloadmatch.com/workloadmatch.com/Manager/Inc/AddReference.php
(8258B)
<?php include_once '../includes/db_connect.php'; include_once '../includes/psl-config.php'; sec_session_start(); $error_msg = ""; if(isset($_POST["submit"]) && $_POST["submit"]!="") { // $user_n=$_SESSION['user_id']; //header('Location: reference.php?error=file name already exists'.$_POST['Broker_ID'].','.$_POST['Transaction_Type'].','.$_POST['Fullname'].','.$_POST['Fullname'].','.$_POST['Familyname'].','.$_POST['Email'].','.$_POST['Personnaladdressd'].','.$_POST['homephone'].','.$_POST['cellphone'].''); // exit(); //header('Location: reference.php?error='.$_POST['Broker_Receiver_ID'].''); //exit(); if (isset ($_POST['Broker_Receiver_ID'],$_POST['Transaction_Type'],$_POST['Fullname'],$_POST['Fullname'],$_POST['Familyname'],$_POST['Email'],$_POST['Personnaladdressd'],$_POST['homephone'],$_POST['cellphone'])) { //$Broker_ID= $_POST['Broker_ID']; $Broker_Receiver_ID= $_POST['Broker_Receiver_ID']; $Transaction_Type_ID= $_POST['Transaction_Type']; $Client_ID = $_POST['Update_ID']; $Titel = $_POST['TITRE']; $First_Name = $_POST['Fullname']; $Last_Name = $_POST['Familyname']; $Email = $_POST['Email']; $Address = $_POST['Personnaladdressd']; $Home_Phone = $_POST['homephone']; $Cell_Phone = $_POST['cellphone']; $Best_Time_Call = $_POST['datepickerR']; $Note = $_POST['Note']; $Transaction_Amount = $_POST['Montant_transaction']; $Client_Name = $First_Name .''. $Last_Name; $user_n=$_SESSION['user_id']; $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']; $Manager_ID = $row['Manager_ID']; $Broker_ID = $row['Broker_ID']; $User_Type_ID = $row['User_Type_ID']; $query = "SELECT * FROM Sub_Categories Where Sub_Category_ID ='".$Transaction_Type_ID."'"; $resultw = $mysqli->query($query); $roww = $resultw->fetch_assoc(); $Sub_Category_Type = $roww['Sub_Category_Type']; $datetime =date("Y/m/d") . ' ' . date('H:i:s') ; $Best_Time_Call = date("Y-m-d", strtotime($Best_Time_Call)); $query = "SELECT * FROM Client_Profile Where Client_ID ='".$Client_ID."' AND Email ='".$Email."' AND Deleted_Status ='0'"; $result = $mysqli->query($query); $Managers = $result->fetch_assoc(); $Client_ID = $Managers['Client_ID']; if ($Client_ID > 0) { do { $number_id = mt_rand(10000,999999); $prep_stmt = "SELECT Reference_ID FROM Reference_File WHERE Reference_ID=? LIMIT 1"; $stmt = $mysqli->prepare($prep_stmt); if ($stmt){ $stmt->bind_param('s', $number_id); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows == 1) { $count =$stmt->num_rows; }else{ $count =0; } } } while ($count > 0); if ($insert_stmt = $mysqli->prepare("INSERT INTO Reference_File (Reference_ID, Client_ID, Category_ID, Admin_ID, Manager_ID, Broker_Sender_ID, Broker_Receiver_ID, User_Type_ID, Transaction_Type_ID, Transaction_Type, Transaction_Amount, Note, Reg_Date, Best_time_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { $insert_stmt->bind_param('ssssssssssssss',$number_id,$Client_ID, $Category_ID, $Admin_ID, $Manager_ID, $Broker_ID, $Broker_Receiver_ID, $User_Type_ID, $Transaction_Type_ID, $Sub_Category_Type, $Transaction_Amount, $Note, $datetime, $Best_Time_Call); // Execute the prepared query. if (! $insert_stmt->execute()) { //header('Location: reference.php?error='.$mysqli->error); header('Location: reference.php?error=Registration failure to send Reference!'); exit(); }else { //header('Location: reference.php?error=The Reference has been sent!'); //exit(); $Re_ID= mysqli_insert_id($mysqli); if ($insert_stmt = $mysqli->prepare("INSERT INTO Reference_File_Follow_UP (Re_ID, Reference_ID, Client_ID, Category_ID, Admin_ID, Manager_ID, Broker_Sender_ID, Broker_Receiver_ID, User_Type_ID, Transaction_Type_ID, Transaction_Type, Transaction_Amount, Note, Reg_Date, Best_time_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { $insert_stmt->bind_param('sssssssssssssss',$Re_ID, $number_id, $Client_ID, $Category_ID, $Admin_ID, $Manager_ID, $Broker_ID, $Broker_Receiver_ID, $User_Type_ID, $Transaction_Type_ID, $Sub_Category_Type, $Transaction_Amount, $Note, $datetime, $Best_Time_Call); // Execute the prepared query. if (! $insert_stmt->execute()) { //header('Location: reference.php?error='.$mysqli->error); header('Location: reference.php?error=Registration failure to send Reference!'); exit(); }else { header('Location: reference.php?error=The Reference has been sent!'); exit(); } } } } //header('Location: reference.php?error=Client Name is already exist.'); //exit(); //foreach ($_POST['Transaction_Type'] as $Transaction_Type) //{ // $Transaction_Type= $Transaction_Type; //} }else { if ($insert_stmt = $mysqli->prepare("INSERT INTO Client_Profile (Category_ID, Admin_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('ssssssssssssssss',$Category_ID, $Admin_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='.$mysqli->error); //header('Location: reference.php?error=Client name already exists!'); //header('Location: reference.php?error=Registration failure to add new cleint!'); //header('Location: addassist.php?error='.$Managers_ID.''); exit(); }else { $Cli_ID = mysqli_insert_id($mysqli); if ($insert_stmt = $mysqli->prepare("INSERT INTO Reference_File (Client_ID, Category_ID, Admin_ID, Manager_ID, Broker_Sender_ID, Broker_Receiver_ID, User_Type_ID, Transaction_Type_ID, Transaction_Type, Transaction_Amount, Note, Reg_Date, Best_time_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { $insert_stmt->bind_param('sssssssssssss',$Cli_ID, $Category_ID, $Admin_ID, $Manager_ID, $Broker_ID, $Broker_Receiver_ID, $User_Type_ID, $Transaction_Type_ID, $Sub_Category_Type, $Transaction_Amount, $Note, $datetime, $Best_Time_Call); // Execute the prepared query. if (! $insert_stmt->execute()) { //header('Location: addclient.php?error='.$mysqli->error); header('Location: addclient.php?error=Registration failure to send Reference!'); exit(); }else { $Reference_ID= mysqli_insert_id($mysqli); if ($insert_stmt = $mysqli->prepare("INSERT INTO Reference_File_Follow_UP (Reference_ID, Client_ID, Category_ID, Admin_ID, Manager_ID, Broker_Sender_ID, Broker_Receiver_ID, User_Type_ID, Transaction_Type_ID, Transaction_Type, Transaction_Amount, Note, Reg_Date, Best_time_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { $insert_stmt->bind_param('ssssssssssssss',$Reference_ID, $Cli_ID, $Category_ID, $Admin_ID, $Manager_ID, $Broker_ID, $Broker_Receiver_ID, $User_Type_ID, $Transaction_Type_ID, $Sub_Category_Type, $Transaction_Amount, $Note, $datetime, $Best_Time_Call); // Execute the prepared query. if (! $insert_stmt->execute()) { //header('Location: reference.php?error='.$mysqli->error); header('Location: reference.php?error=Registration failure to send Reference!'); exit(); }else { header('Location: reference.php?error=New cleint successfully registered and the Reference has been sent!'); exit(); } } //header('Location: reference.php?error=New cleint successfully registered and the Reference has been sent!'); //exit(); } }else{ //header('Location: addclient.php?error='.$mysqli->error); } } }else{ //header('Location: addclient.php?error='.$mysqli->error); } } }else{ header('Location: reference.php?error=Registration failure please insert all informaion!'); exit(); } }
Save
cmd:
run