├── blob ├── data.txt ├── Home.JPG ├── History.JPG ├── options.JPG ├── LogInPage.JPG ├── feedback.JPG ├── settings.JPG ├── settings.gif ├── startNew.JPG └── ToconnectHome.gif ├── logout.php ├── login.php ├── Users ├── Js │ ├── session.js │ ├── feedback.js │ ├── startNew.js │ ├── varified.js │ └── nonvarified.js ├── session_chat │ ├── remove.php │ ├── refresh.php │ └── send.php ├── Parts │ ├── updatetheme.php │ ├── nonverifiedprofile.php │ └── verifiedprofile.php ├── sessionSet.php ├── profile.php ├── sendfeedback.php ├── sessionHeader.php ├── updateProfile.php ├── updateEmail.php ├── mySessions.php ├── feedback.php ├── session.php └── startNew.php ├── dorecovery.php ├── Js ├── backupemail.js ├── forgetPassjs.js ├── check.js └── index.js ├── verify.php ├── Check ├── loginEmailCheck.php ├── loginUnameCheck.php └── userCheck.php ├── logins.php ├── forgetpass.php ├── sendrecovery.php ├── CSS └── kel.css ├── backupemail.php ├── Commen ├── header.php └── headernvr.php ├── db └── ToConnect.sql ├── README.md └── index.php /blob/data.txt: -------------------------------------------------------------------------------- 1 | delete this 2 | -------------------------------------------------------------------------------- /blob/Home.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/Home.JPG -------------------------------------------------------------------------------- /blob/History.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/History.JPG -------------------------------------------------------------------------------- /blob/options.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/options.JPG -------------------------------------------------------------------------------- /blob/LogInPage.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/LogInPage.JPG -------------------------------------------------------------------------------- /blob/feedback.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/feedback.JPG -------------------------------------------------------------------------------- /blob/settings.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/settings.JPG -------------------------------------------------------------------------------- /blob/settings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/settings.gif -------------------------------------------------------------------------------- /blob/startNew.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/startNew.JPG -------------------------------------------------------------------------------- /blob/ToconnectHome.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kelta-King/ToConnect/HEAD/blob/ToconnectHome.gif -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | alert('Login first')"; 22 | header("Location:logout"); 23 | } 24 | 25 | ?> 26 | -------------------------------------------------------------------------------- /Users/Js/session.js: -------------------------------------------------------------------------------- 1 | var context; 2 | window.addEventListener('load', init, false); 3 | function init() { 4 | try { 5 | // Fix up for prefixing 6 | window.AudioContext = window.AudioContext||window.webkitAudioContext; 7 | context = new AudioContext(); 8 | } 9 | catch(e) { 10 | alert('Web Audio API is not supported in this browser'); 11 | } 12 | } 13 | 14 | 15 | var objDiv = document.getElementById("chats"); 16 | objDiv.scrollTop = objDiv.scrollHeight; 17 | 18 | let scrollUpdate = () => { 19 | 20 | var element = document.getElementById("chats"); 21 | element.scrollTop = element.scrollHeight; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Users/session_chat/remove.php: -------------------------------------------------------------------------------- 1 | query($query)){ 18 | unset($_SESSION['session_begin']); 19 | } 20 | else{ 21 | echo "somehting went wrong"; 22 | } 23 | } 24 | else{ 25 | header("Location:../logout"); 26 | } 27 | 28 | ?> 29 | -------------------------------------------------------------------------------- /Users/Parts/updatetheme.php: -------------------------------------------------------------------------------- 1 | query($query)){ 16 | 17 | } 18 | else{ 19 | die("something went wrong1"); 20 | } 21 | 22 | 23 | $conn->close(); 24 | 25 | } 26 | else if(isset($_SESSION['login_user_connect'])){ 27 | echo "Login first"; 28 | } 29 | else{ 30 | header("Location:../logout"); 31 | } 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /dorecovery.php: -------------------------------------------------------------------------------- 1 | 12, 19 | ]; 20 | 21 | $pass = password_hash($pass, PASSWORD_BCRYPT, $opt); 22 | $query = "UPDATE users SET u_password = '$pass' WHERE email = '$email'"; 23 | require_once("../../Database/dbconnect_connect.php"); 24 | 25 | if($conn->query($query)){ 26 | 27 | } 28 | else{ 29 | echo "Something went wrong"; 30 | } 31 | 32 | 33 | ?> 34 | 35 | 42 | -------------------------------------------------------------------------------- /Users/Js/feedback.js: -------------------------------------------------------------------------------- 1 | 2 | let sendfeedback = () => { 3 | 4 | let name = document.getElementById('name').value; 5 | let msg = document.getElementById('msg').value; 6 | 7 | if(name == "" || msg == ""){ 8 | 9 | alert("Please fill the data"); 10 | return; 11 | 12 | } 13 | 14 | let str = "name="+name+"&msg="+msg; 15 | let xhttp = new XMLHttpRequest(); 16 | let loader = document.getElementById('loader'); 17 | let error = document.getElementById('error'); 18 | 19 | xhttp.onreadystatechange = function() { 20 | loader.style.display = "block"; 21 | if(this.readyState == 4 && this.status == 200){ 22 | error.innerHTML = this.responseText; 23 | loader.style.display = "none"; 24 | if(this.responseText == ""){ 25 | alert("Feedback sent"); 26 | location.reload(); 27 | } 28 | } 29 | } 30 | xhttp.open("POST", "sendfeedback", true); 31 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 32 | xhttp.send(str); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Users/sessionSet.php: -------------------------------------------------------------------------------- 1 | query($query)){ 19 | echo "Success"; 20 | $last_id = $conn->insert_id; 21 | $_SESSION['session_begin'] = base64_encode($doctor."&".$last_id."&".$id); 22 | 23 | header("Location:session?name=".$_POST['number']); 24 | } 25 | else{ 26 | echo "Something went wrong"; 27 | } 28 | 29 | $conn->close(); 30 | 31 | } 32 | else if(isset($_SESSION['login_user_connect'])){ 33 | echo "something went wrong"; 34 | ?> 35 | Home page link 36 | 42 | -------------------------------------------------------------------------------- /Js/backupemail.js: -------------------------------------------------------------------------------- 1 | let send = (index) => { 2 | 3 | let pass = document.getElementById('pass').value; 4 | 5 | if(pass == ""){ 6 | 7 | alert("Please fill the data"); 8 | return; 9 | 10 | } 11 | 12 | let check = new Check(); 13 | let error = document.getElementById('error'); 14 | 15 | if(check.check(pass)){ 16 | alert("Please enter valid email"); 17 | error.innerHTML = "Please enter valid email"; 18 | return false; 19 | } 20 | 21 | let str = "data="+index+"&pass="+pass; 22 | let xhttp = new XMLHttpRequest(); 23 | let loader = document.getElementById('loader'); 24 | 25 | xhttp.onreadystatechange = function() { 26 | loader.style.display = "block"; 27 | if(this.readyState == 4 && this.status == 200){ 28 | error.innerHTML = this.responseText; 29 | loader.style.display = "none"; 30 | if(this.responseText.length == 1){ 31 | alert("Password changed"); 32 | location.replace("https://keltagoodlife.co/ToConnect"); 33 | } 34 | } 35 | } 36 | xhttp.open("POST", "dorecovery", true); 37 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 38 | xhttp.send(str); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Js/forgetPassjs.js: -------------------------------------------------------------------------------- 1 | let send = () => { 2 | 3 | let email = document.getElementById('email').value; 4 | let check = new Check(); 5 | let error = document.getElementById('error'); 6 | 7 | if(email == ""){ 8 | 9 | alert("Please fill the data"); 10 | return; 11 | 12 | } 13 | 14 | if(check.check(email)){ 15 | alert("Please enter valid email"); 16 | error.innerHTML = "Please enter valid email"; 17 | return false; 18 | } 19 | 20 | if(!check.emailCheck(email)){ 21 | alert("Please enter valid email"); 22 | error.innerHTML = "Please enter valid email"; 23 | return false; 24 | } 25 | 26 | let str = "email="+email; 27 | let xhttp = new XMLHttpRequest(); 28 | let loader = document.getElementById('loader'); 29 | 30 | xhttp.onreadystatechange = function() { 31 | loader.style.display = "block"; 32 | if(this.readyState == 4 && this.status == 200){ 33 | error.innerHTML = this.responseText; 34 | loader.style.display = "none"; 35 | if(this.responseText == ""){ 36 | alert("Email sent"); 37 | location.reload(); 38 | } 39 | } 40 | } 41 | xhttp.open("POST", "sendrecovery", true); 42 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 43 | xhttp.send(str); 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Users/session_chat/refresh.php: -------------------------------------------------------------------------------- 1 | query($query)){ 20 | $result = $data->fetch_assoc(); 21 | $msg = $result['msg_data']; 22 | $_SESSION['msg_order']+=1; 23 | $message = "
"; 24 | $message .= "
"; 25 | $message .= $msg; 26 | $message .= "
"; 27 | 28 | echo $message; 29 | 30 | } 31 | else{ 32 | echo "Something went wrong"; 33 | } 34 | 35 | } 36 | else if(isset($_SESSION['login_user_connect']) && isset($_REQUEST['name'])){ 37 | header("Location:profile?name=".$_REQUEST['name']); 38 | 39 | } 40 | else{ 41 | header("Location:../logout"); 42 | } 43 | ?> 44 | -------------------------------------------------------------------------------- /verify.php: -------------------------------------------------------------------------------- 1 | query($query)){ 11 | 12 | if($data->num_rows <= 0){ 13 | echo "Not verified. Please signup to verify"; 14 | } 15 | else if($data->num_rows == 1){ 16 | 17 | $result = $data->fetch_assoc(); 18 | $u_name = $result['u_name']; 19 | $qry = "UPDATE users SET verified = '1' WHERE vkey = '$vkey'"; 20 | 21 | if($conn->query($qry)){ 22 | 23 | echo "Your email address has been verified. Your usename is '$u_name'. You change it later after login.Click here to login"; 24 | } 25 | else{ 26 | echo "Not verified. Please try again later"; 27 | } 28 | 29 | } 30 | else{ 31 | echo "Not verified. Please signup to verify"; 32 | } 33 | 34 | } 35 | else{ 36 | echo "Not verified. Please contact ToConnect"; 37 | } 38 | 39 | $conn->close(); 40 | 41 | } 42 | else{ 43 | header("Location:logout"); 44 | } 45 | 46 | ?> 47 | -------------------------------------------------------------------------------- /Check/loginEmailCheck.php: -------------------------------------------------------------------------------- 1 | query($query)){ 15 | 16 | if($data->num_rows <= 0){ 17 | echo "Incorrect email"; 18 | } 19 | else if($data->num_rows == 1){ 20 | 21 | $result = $data->fetch_assoc(); 22 | $dbpass = $result['u_password']; 23 | 24 | if(password_verify($pass, $dbpass)){ 25 | 26 | $opt = [ 27 | 'cost' => 12, 28 | ]; 29 | 30 | $id = $result['u_id']; 31 | $name = $result['u_name']; 32 | 33 | $url1 = base64_encode($id."&".$email."&".$name); 34 | $_SESSION['login_user_connect'] = $url1; 35 | 36 | } 37 | else{ 38 | echo "Incorrect password"; 39 | } 40 | 41 | } 42 | else{ 43 | echo "Incorrect details"; 44 | } 45 | 46 | } 47 | else{ 48 | echo "Something went wrong"; 49 | } 50 | 51 | $conn->close(); 52 | 53 | } 54 | else{ 55 | echo ""; 56 | header("Location:logout"); 57 | } 58 | 59 | ?> 60 | -------------------------------------------------------------------------------- /Js/check.js: -------------------------------------------------------------------------------- 1 | class Check{ 2 | 3 | check(Name){ 4 | 5 | if(Name == ""){ 6 | throw "Name is empty"; 7 | } 8 | 9 | if(Name.includes("$") || Name.includes("&") || Name.includes("=") || Name.includes("*") || Name.includes("`")){ 10 | return true; 11 | } 12 | 13 | } 14 | 15 | emailCheck(email, cont_msg) { 16 | 17 | if(email == ""){ 18 | throw "Name is empty"; 19 | } 20 | 21 | if(cont_msg == ""){ 22 | throw "data is empty"; 23 | } 24 | 25 | let s1 = email.split("@"); 26 | let s3 = email.split(" "); 27 | if(s3.length > 1) 28 | { 29 | alert("Please add a proper mail-Id"); 30 | cont_msg.innerHTML = "Please add a proper mail-Id"; 31 | return false; 32 | } 33 | if(s1.length == 2) 34 | { 35 | var s2 = s1[1].split("."); 36 | if(s2.length == 2 || s2.length == 3) 37 | { 38 | if(s1[0].length < 6 || s2[0].length < 4 || s2[1].length > 4 || s2[1].length < 2) 39 | { 40 | alert('Please add a proper mail-Id'); 41 | cont_msg.innerHTML = "Please add a proper mail-Id"; 42 | document.getElementById('email').focus(); 43 | return false; 44 | } 45 | 46 | return true; 47 | 48 | } 49 | else 50 | { 51 | alert("Please add a proper mail-Id"); 52 | cont_msg.innerHTML = "Please add a proper mail-Id"; 53 | document.getElementById('email').focus(); 54 | return false; 55 | } 56 | } 57 | else 58 | { 59 | alert("Please add a proper mail-Id"); 60 | cont_msg.innerHTML = "Please add a proper mail-Id"; 61 | document.getElementById('email').focus(); 62 | return false; 63 | } 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Check/loginUnameCheck.php: -------------------------------------------------------------------------------- 1 | query($query)){ 15 | 16 | if($data->num_rows <= 0){ 17 | echo "Incorrect username"; 18 | } 19 | else if($data->num_rows == 1){ 20 | 21 | $result = $data->fetch_assoc(); 22 | $dbpass = $result['u_password']; 23 | 24 | if(password_verify($pass, $dbpass)){ 25 | 26 | $opt = [ 27 | 'cost' => 12, 28 | ]; 29 | 30 | $id = $result['u_id']; 31 | $name = $result['u_name']; 32 | $email = $result['email']; 33 | $url1 = base64_encode($id."&".$email."&".$name); 34 | $_SESSION['login_user_connect'] = $url1; 35 | 36 | } 37 | else{ 38 | echo "Incorrect password"; 39 | } 40 | 41 | } 42 | else{ 43 | echo "Incorrect details"; 44 | } 45 | 46 | } 47 | else{ 48 | echo "Something went wrong"; 49 | } 50 | 51 | $conn->close(); 52 | 53 | } 54 | else{ 55 | echo ""; 56 | header("Location:logout"); 57 | } 58 | 59 | ?> 60 | -------------------------------------------------------------------------------- /Users/profile.php: -------------------------------------------------------------------------------- 1 | query($qry)){ 19 | 20 | $result = $data->fetch_assoc(); 21 | $theme_color = $result['theme']; 22 | 23 | } 24 | 25 | $q = "SELECT verified FROM users WHERE u_id = $id"; 26 | 27 | if($d = $conn->query($q)){ 28 | 29 | $rslt = $d->fetch_assoc(); 30 | 31 | if($rslt['verified'] == '1'){ 32 | 33 | define("TITLE", "Home | ToConnect"); 34 | include("../Commen/header.php"); 35 | ?> 36 | 37 | 44 | 45 | 46 | 57 | close(); 60 | } 61 | else{ 62 | header("Location:../logout"); 63 | } 64 | 65 | ?> 66 | -------------------------------------------------------------------------------- /Users/Js/startNew.js: -------------------------------------------------------------------------------- 1 | let select = (name) => { 2 | 3 | let karen = document.getElementById("Karen"); 4 | let batla = document.getElementById("Batla"); 5 | 6 | if(name == "Karen"){ 7 | 8 | karen.style.border = "thick solid #0000FF"; 9 | batla.style.border = "thick solid #f1f1f1"; 10 | document.getElementById("dr").value = "Karen"; 11 | let speak = "Hi, My name is Dr Karen"; 12 | responsiveVoice.speak(speak,"Australian Female"); 13 | 14 | } 15 | else if(name == "Batla"){ 16 | 17 | batla.style.border = "thick solid #0000FF"; 18 | karen.style.border = "thick solid #f1f1f1"; 19 | document.getElementById("dr").value = "Batla"; 20 | let speak = "Hello, My name is Dr Batla"; 21 | responsiveVoice.speak(speak,"Hindi Male"); 22 | 23 | } 24 | 25 | } 26 | 27 | let start = () => { 28 | 29 | let dr = document.getElementById("dr").value; 30 | 31 | if(!document.getElementById("read").checked){ 32 | alert("Please select checkbox") 33 | document.getElementById("read").focus(); 34 | return false; 35 | } 36 | 37 | if(!confirm("Are you sure, you want to choose Dr. "+dr)){ 38 | return false; 39 | } 40 | 41 | document.getElementById('data').method = "post"; 42 | document.getElementById('data').action = "sessionSet"; 43 | document.getElementById('data').submit(); 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Users/sendfeedback.php: -------------------------------------------------------------------------------- 1 | query($query)){ 15 | 16 | $subject = "ToConnect: Feedback"; 17 | $headers = 'MIME-Version: 1.0' . "\r\n"; 18 | $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 19 | 20 | // Creating email headers 21 | $headers .= 'X-Mailer: PHP/' . phpversion(); 22 | 23 | $message = ''; 24 | $message .= '

Hi '.$name.'!

'; 25 | $message .= '

Thanks for giving feedback '.$name.'

'; 26 | $message .= '

ToConnect\'s improvement team has received your feedback and will start working on.

'; 27 | $message .= '

This is a software generated email, so do not reply to this email

'; 28 | $message .= '

Thank you

Regards,
Team ToConnect

'; 29 | 30 | $message .= ''; 31 | 32 | mail($email,$subject,$message,$headers); 33 | 34 | } 35 | else{ 36 | echo "Something went wrong"; 37 | } 38 | 39 | } 40 | else{ 41 | header("Location:../logout"); 42 | } 43 | 44 | ?> 45 | -------------------------------------------------------------------------------- /logins.php: -------------------------------------------------------------------------------- 1 | query($query)){ 19 | 20 | if($data->num_rows <= 0){ 21 | echo "Incorrect email"; 22 | } 23 | else if($data->num_rows == 1){ 24 | 25 | $result = $data->fetch_assoc(); 26 | $dbpass = $result['u_password']; 27 | 28 | if(password_verify($password, $dbpass)){ 29 | 30 | $id = $result['u_id']; 31 | $name = $result['u_name']; 32 | $url = base64_encode($id."&".$name); 33 | 34 | $url1 = base64_encode($id."&".$email."&".$name); 35 | $_SESSION['login_user_connect'] = $url1; 36 | header("Location:Users/profile?name=".$url); 37 | 38 | } 39 | else{ 40 | echo "Incorrect password"; 41 | } 42 | 43 | } 44 | else{ 45 | echo "Incorrect details"; 46 | } 47 | 48 | } 49 | else{ 50 | echo "Something went wrong"; 51 | 52 | } 53 | 54 | $conn->close(); 55 | } 56 | else{ 57 | echo ""; 58 | header("Location:logout"); 59 | } 60 | 61 | ?> 62 | -------------------------------------------------------------------------------- /forgetpass.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | ToConnect | Forget password 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
ToConnect | forget password
33 |
34 |
35 | 36 |
37 |
38 |
39 | Enter the backup email in the below email address. You will receive an email regarding the password recovery. 40 |
41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /sendrecovery.php: -------------------------------------------------------------------------------- 1 | query($query)){ 13 | 14 | if($data->num_rows <= 0){ 15 | die("Please enter your registered email"); 16 | } 17 | 18 | } 19 | else{ 20 | die("Something went wrong"); 21 | } 22 | 23 | $subject = "ToConnect: Account recovery"; 24 | $headers = 'MIME-Version: 1.0' . "\r\n"; 25 | $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 26 | 27 | // Creating email headers 28 | $headers .= 'X-Mailer: PHP/' . phpversion(); 29 | $data = base64_encode("This is data&".$email); 30 | $message = ''; 31 | $message .= '

Hello user!!

'; 32 | $message .= '

Don\'t worry for your account

'; 33 | $message .= '

Here is the recovery link of your account. Don\'t share this email to anyone

'; 34 | $message .= 'Click here for account recovery
'; 35 | $message .= '

This is a software generated email, so do not reply to this email

'; 36 | $message .= '

Thank you

Regards,
Team ToConnect

'; 37 | 38 | $message .= ''; 39 | 40 | if(!mail($email,$subject,$message,$headers)){ 41 | die("Something went wrong"); 42 | } 43 | 44 | } 45 | else{ 46 | header("Location:../logout"); 47 | } 48 | 49 | ?> 50 | -------------------------------------------------------------------------------- /CSS/kel.css: -------------------------------------------------------------------------------- 1 | html { 2 | scroll-behavior: smooth; 3 | 4 | } 5 | body{ 6 | font-family: 'Literata', serif; 7 | } 8 | #left1 9 | { 10 | transition-duration:0.4s; 11 | transform:scale(1.1,1.1); 12 | } 13 | #right2 14 | { 15 | transition-duration:0.4s; 16 | transform:scale(1.1,1.1); 17 | } 18 | 19 | .kel-button{ 20 | border:2px solid white; 21 | color:white; 22 | transition-duration:0.2s; 23 | } 24 | .kel-button:hover{ 25 | border:2px solid white; 26 | transform:scale(1.08, 1.08); 27 | cursor:pointer; 28 | } 29 | .kel-heading{ 30 | margin-top:50px; 31 | font-weight:800; 32 | font-size:40px; 33 | } 34 | .kel-heading:hover{ 35 | cursor:pointer; 36 | } 37 | .kel-hover{ 38 | transition-duration:0.2s; 39 | transition-timing-function:ease-out; 40 | } 41 | .kel-hover:hover{ 42 | cursor:pointer; 43 | transform:scale(1.1,1.1); 44 | } 45 | .kel-hover-2{ 46 | transition-duration:0.3s; 47 | } 48 | .kel-hover-2:hover{ 49 | cursor:pointer; 50 | } 51 | .loader { 52 | border: 5px solid #f3f3f3; 53 | border-radius: 50%; 54 | border-top: 5px solid #3498db; 55 | width: 30px; 56 | height: 30px; 57 | -webkit-animation: spin 1s linear infinite; 58 | animation: spin 1s linear infinite; 59 | } 60 | 61 | @-webkit-keyframes spin { 62 | 0% { -webkit-transform: rotate(0deg); } 63 | 100% { -webkit-transform: rotate(360deg); } 64 | } 65 | 66 | @keyframes spin { 67 | 0% { transform: rotate(0deg); } 68 | 100% { transform: rotate(360deg); } 69 | } 70 | #left1 71 | { 72 | transition-duration:0.4s; 73 | transform:scale(1.1,1.1); 74 | } 75 | #right2 76 | { 77 | transition-duration:0.4s; 78 | transform:scale(1.1,1.1); 79 | } 80 | .kel-heading{ 81 | margin-top:50px; 82 | font-weight:800; 83 | font-size:40px; 84 | } 85 | .kel-heading:hover{ 86 | cursor:pointer; 87 | } 88 | .kel-click{ 89 | box-shadow: 0px 0px 8px 0 rgba(0, 0, 0, 0.5); 90 | transition-duration:0.2s; 91 | } 92 | .kel-click:hover{ 93 | box-shadow: 0px 0px 4px 0 rgba(0, 0, 0, 0.4); 94 | } 95 | -------------------------------------------------------------------------------- /backupemail.php: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | ToConnect | Forget password 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
ToConnect | forget password
38 |
39 |
40 | 41 |
42 |
43 |
44 | Enter new password here. 45 |
46 |
47 | 48 |
49 |
50 | 51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | 65 | -------------------------------------------------------------------------------- /Users/sessionHeader.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home | ToConnect 5 | 6 | 7 | 8 | 9 | 11 | 21 | 22 | 23 | 24 | 25 |
26 |
ToConnect
27 | 30 | 33 | 34 |
35 | 38 |
39 | Edit 40 | LogOut 41 |
42 |
43 | 44 |
45 | -------------------------------------------------------------------------------- /Commen/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <?php echo TITLE ?> 5 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
ToConnect
24 |
25 | 26 | Lobby 27 | 28 |
29 | 30 | 33 | 34 |
35 | 38 |
39 | Edit 40 | LogOut 41 |
42 |
43 | 44 |
45 | -------------------------------------------------------------------------------- /Users/updateProfile.php: -------------------------------------------------------------------------------- 1 | 12 27 | ]; 28 | 29 | $query = "SELECT u_name FROM users WHERE u_name = '$u_name'"; 30 | 31 | if($data = $conn->query($query)){ 32 | 33 | if($data->num_rows > 0){ 34 | die("This username is already taken"); 35 | } 36 | 37 | } 38 | else{ 39 | die("Something went wrong"); 40 | } 41 | 42 | 43 | $query = "SELECT u_password FROM users WHERE u_id = $id"; 44 | if($data = $conn->query($query)){ 45 | 46 | if($data->num_rows<=0){ 47 | echo "Password didn't match"; 48 | } 49 | else{ 50 | $result = $data->fetch_assoc(); 51 | 52 | $dbpass = $result['u_password']; 53 | 54 | if(password_verify($Pass, $dbpass)){ 55 | 56 | $pass = password_hash($new_pass, PASSWORD_BCRYPT, $opt); 57 | 58 | $query1 = "UPDATE users SET u_password = '$pass', u_name = '$u_name' WHERE u_id = $id"; 59 | if($conn->query($query1)){ 60 | 61 | } 62 | else{ 63 | echo "Password didn't match"; 64 | } 65 | } 66 | else{ 67 | echo "Password didn't match"; 68 | } 69 | 70 | } 71 | 72 | } 73 | else{ 74 | echo "Something went wrong"; 75 | } 76 | 77 | } 78 | else if(isset($_SESSION['login_user_connect'])){ 79 | echo "Login first"; 80 | } 81 | else{ 82 | header('Location:../logout'); 83 | } 84 | 85 | ?> 86 | -------------------------------------------------------------------------------- /Commen/headernvr.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <?php echo TITLE ?> 5 | 6 | 7 | 8 | 9 | 11 | 21 | 22 | 23 | 28 | 29 |
30 |
ConnectClub
31 |
32 | Lobby 33 | 34 |
35 | 38 | 39 |
40 | 43 |
44 | Edit 45 | LogOut 46 |
47 |
48 | 49 |
50 | -------------------------------------------------------------------------------- /Users/updateEmail.php: -------------------------------------------------------------------------------- 1 | query($query)){ 16 | 17 | $result = $data->fetch_assoc(); 18 | $vkey = $result['vkey']; 19 | 20 | } 21 | else{ 22 | die("something went wrong1"); 23 | } 24 | 25 | $query = "UPDATE users SET email = '$email' WHERE u_id = $id"; 26 | 27 | if($conn->query($query)){ 28 | 29 | $subject = "ToConnect: Verify your Email Address"; 30 | $headers = 'MIME-Version: 1.0' . "\r\n"; 31 | $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 32 | 33 | // Creating email headers 34 | $headers .= 'X-Mailer: PHP/' . phpversion(); 35 | 36 | $message = ''; 37 | $message .= '

Hi '.$name.'!

'; 38 | $message .= '

Thanks for registration '.$name.'

'; 39 | $message .= '

ToConnect has sent you a link to verify your email address.

'; 40 | $message .= 'Click this link to verify your email'; 41 | $message .= '

This is a software generated email, so do not reply to this email

'; 42 | $message .= '

Thank you

Regards,
Team ToConnect

'; 43 | 44 | $message .= ''; 45 | 46 | if(!mail($email,$subject,$message,$headers)){ 47 | echo "Mail updated but not sent. Please try after some time"; 48 | } 49 | 50 | $_SESSION['login_user_connect'] = base64_encode($id."&".$email."&".$name); 51 | 52 | } 53 | else{ 54 | echo "Something went wrong2"; 55 | } 56 | 57 | $conn->close(); 58 | 59 | } 60 | else if(isset($_SESSION['login_user_connect'])){ 61 | echo "Login first"; 62 | } 63 | else{ 64 | header("Location:../logout"); 65 | } 66 | 67 | ?> 68 | -------------------------------------------------------------------------------- /Users/Js/varified.js: -------------------------------------------------------------------------------- 1 | let updatetheme = (color) => { 2 | 3 | let str = "Color="+color; 4 | let xhttp = new XMLHttpRequest(); 5 | let loader = document.getElementById('color-loader'); 6 | let error = document.getElementById('color-error'); 7 | 8 | xhttp.onreadystatechange = function() { 9 | loader.style.display = "block"; 10 | if(this.readyState == 4 && this.status == 200){ 11 | error.innerHTML = this.responseText; 12 | loader.style.display = "none"; 13 | if(this.responseText == ""){ 14 | alert("Theme updated"); 15 | location.reload(); 16 | } 17 | } 18 | } 19 | xhttp.open("POST", "Parts/updatetheme", true); 20 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 21 | xhttp.send(str); 22 | } 23 | 24 | 25 | let updateProfile = () => { 26 | 27 | let u_name = document.getElementById('u_name').value; 28 | let pass = document.getElementById('pass').value; 29 | let newPass = document.getElementById('newPas').value; 30 | let newAga = document.getElementById('newAga').value; 31 | let check_data = new Check(); 32 | let error = document.getElementById('up-error'); 33 | 34 | if(u_name == "" || pass == "" || newPass == "" || newAga == ""){ 35 | alert("Please enter all data"); 36 | error.innerHTML = "Please enter all data"; 37 | return false; 38 | } 39 | 40 | if(check_data.check(u_name) || check_data.check(pass) || check_data.check(newPass) || check_data.check(newAga)){ 41 | return false; 42 | } 43 | 44 | if(newPass != newAga){ 45 | alert("Confirm password didn't match"); 46 | error.innerHTML = "Confirm password didn't match"; 47 | return false; 48 | } 49 | 50 | let str = "u_name="+u_name+"&cur_pass="+pass+"&newPass="+newPass+"&newAga="+newAga; 51 | let xhttp = new XMLHttpRequest(); 52 | let loader = document.getElementById('up-loader'); 53 | xhttp.onreadystatechange = function() { 54 | loader.style.display = "block"; 55 | if(this.readyState == 4 && this.status == 200){ 56 | error.innerHTML = this.responseText; 57 | loader.style.display = "none"; 58 | if(this.responseText == ""){ 59 | alert("Password successfully updated"); 60 | location.reload(); 61 | } 62 | } 63 | } 64 | xhttp.open("POST", "updateProfile", true); 65 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 66 | xhttp.send(str); 67 | 68 | 69 | 70 | } 71 | -------------------------------------------------------------------------------- /Users/Parts/nonverifiedprofile.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | × 6 |

My Account

7 |
8 |
9 | query($query1)){ 13 | 14 | $result = $data1->fetch_assoc(); 15 | ?> 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Username:
Email:
28 | 34 |
35 | 36 | 37 | 38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 | Check your mailbox to find our verification mail... 46 |
47 |
48 |
49 | We have sent an email to your registered email address. If you are unable to find it then please check in spam mails. 50 |
If still you are unable to find the mail then you can again ask for another varification mail. Fill the below form to ask for a new 51 | varification mail. 52 |
53 |
54 |
55 |
56 | 57 |
58 |
59 | Email: 60 |
61 |
62 | 63 |
64 |
65 |
66 |
67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Users/Js/nonvarified.js: -------------------------------------------------------------------------------- 1 | class Check{ 2 | 3 | check(Name){ 4 | 5 | if(Name == ""){ 6 | throw "Name is empty"; 7 | } 8 | 9 | if(Name.includes("$") || Name.includes("&") || Name.includes("=") || Name.includes("*") || Name.includes("`")){ 10 | return true; 11 | } 12 | 13 | } 14 | 15 | emailCheck(email, cont_msg) { 16 | 17 | if(email == ""){ 18 | throw "Name is empty"; 19 | } 20 | 21 | if(cont_msg == ""){ 22 | throw "data is empty"; 23 | } 24 | 25 | let s1 = email.split("@"); 26 | let s3 = email.split(" "); 27 | if(s3.length > 1) 28 | { 29 | alert("Please add a proper mail-Id"); 30 | cont_msg.innerHTML = "Please add a proper mail-Id"; 31 | return false; 32 | } 33 | if(s1.length == 2) 34 | { 35 | var s2 = s1[1].split("."); 36 | if(s2.length == 2 || s2.length == 3) 37 | { 38 | if(s1[0].length < 6 || s2[0].length < 4 || s2[1].length > 4 || s2[1].length < 2) 39 | { 40 | alert('Please add a proper mail-Id'); 41 | cont_msg.innerHTML = "Please add a proper mail-Id"; 42 | document.getElementById('email').focus(); 43 | return false; 44 | } 45 | 46 | return true; 47 | 48 | } 49 | else 50 | { 51 | alert("Please add a proper mail-Id"); 52 | cont_msg.innerHTML = "Please add a proper mail-Id"; 53 | document.getElementById('email').focus(); 54 | return false; 55 | } 56 | } 57 | else 58 | { 59 | alert("Please add a proper mail-Id"); 60 | cont_msg.innerHTML = "Please add a proper mail-Id"; 61 | document.getElementById('email').focus(); 62 | return false; 63 | } 64 | 65 | } 66 | 67 | } 68 | 69 | let update = () => { 70 | 71 | let email = document.getElementById('email').value; 72 | let check_data = new Check(); 73 | let error = document.getElementById('error'); 74 | 75 | if(email == ""){ 76 | alert("Please enter your email"); 77 | error.innerHTML = "Please enter your email"; 78 | return false; 79 | } 80 | 81 | if(check_data.check(email)){ 82 | 83 | return false; 84 | } 85 | 86 | if(!check_data.emailCheck(email, error)){ 87 | return false; 88 | } 89 | 90 | let str = "Email="+email; 91 | let xhttp = new XMLHttpRequest(); 92 | let loader = document.getElementById('loader'); 93 | xhttp.onreadystatechange = function() { 94 | loader.style.display = "block"; 95 | if(this.readyState == 4 && this.status == 200){ 96 | error.innerHTML = this.responseText; 97 | loader.style.display = "none"; 98 | if(this.responseText == ""){ 99 | alert("Email updated and verification mail sent"); 100 | location.reload(); 101 | } 102 | } 103 | } 104 | xhttp.open("POST", "updateEmail", true); 105 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 106 | xhttp.send(str); 107 | 108 | } 109 | 110 | -------------------------------------------------------------------------------- /db/ToConnect.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.9.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: localhost:3306 6 | -- Generation Time: May 29, 2020 at 11:45 AM 7 | -- Server version: 5.7.30 8 | -- PHP Version: 7.3.6 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET AUTOCOMMIT = 0; 12 | START TRANSACTION; 13 | SET time_zone = "+00:00"; 14 | 15 | 16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 19 | /*!40101 SET NAMES utf8mb4 */; 20 | 21 | -- 22 | -- Database: `keltago4_Chat` 23 | -- 24 | 25 | -- -------------------------------------------------------- 26 | 27 | -- 28 | -- Table structure for table `chat_clubs` 29 | -- 30 | 31 | CREATE TABLE `chat_clubs` ( 32 | `club_id` int(11) NOT NULL, 33 | `club_name` varchar(255) DEFAULT NULL, 34 | `club_pass` varchar(255) DEFAULT NULL, 35 | `club_members` int(11) DEFAULT NULL, 36 | `creation_time` date NOT NULL, 37 | `time_limit` date NOT NULL, 38 | `club_activation` enum('1','0') DEFAULT NULL 39 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 40 | 41 | -- -------------------------------------------------------- 42 | 43 | -- 44 | -- Table structure for table `users` 45 | -- 46 | 47 | CREATE TABLE `users` ( 48 | `u_id` int(11) NOT NULL, 49 | `u_name` varchar(255) DEFAULT NULL, 50 | `real_name` varchar(255) DEFAULT NULL, 51 | `email` varchar(255) DEFAULT NULL, 52 | `u_password` varchar(255) DEFAULT NULL, 53 | `vkey` varchar(300) NOT NULL, 54 | `verified` enum('0','1') NOT NULL, 55 | `gender` enum('Male','Female','Other') DEFAULT NULL, 56 | `theme` varchar(255) DEFAULT NULL 57 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 58 | 59 | -- 60 | -- Dumping data for table `users` 61 | -- 62 | 63 | INSERT INTO `users` (`u_id`, `u_name`, `real_name`, `email`, `u_password`, `vkey`, `verified`, `gender`, `theme`) VALUES 64 | (26, 'manman1', 'manman', 'keltaking999@gmail.com', '$2y$12$sAFf55QCpyU6K6DUUZ.hHeS7mdVy079Qn3rzsoKqOIS8dFLzorbWi', '5260b5874773dcfb3de7e0983477067c', '1', 'Male', 'w3-blue&w3-yellow&w3-red'), 65 | (22, 'gggggg2', 'gggggg', 'ggggggfd@gmail.com', '$2y$12$7McEBjWni5rpfJSMqhJf3O2zdkwbeGjlqXoxIvTAamPgm9hewp09O', '2960d7a3de631a5cccc6709c711cfb30', '0', 'Male', 'w3-blue&w3-yellow&w3-red'), 66 | (25, 'gggggg3', 'gggggg', 'dhrutishah7939@gmail.com', '$2y$12$fpvYDftmkiLH7MXlVdZ3me/JdTJrolUBmVngi.3m/J5bFRU/TaLhK', 'ad34a5d24f4f9c48a0d493b75e8372b9', '1', 'Male', 'pink'), 67 | (30, 'theman1', 'theman', 'jflora028@gmail.com', '$2y$12$Lai2K/nffaXxmpnPEemfjOrGRQqkdzm/bOYyH1f/bTqniEDAdiSlW', '30da9eea65d6d137b81d2427d31f93ef', '1', 'Female', 'blue'), 68 | (29, 'Eshaan1', 'Eshaan', 'eshaany2k@gmail.com', '$2y$12$dJAuZP7HhBz4wmKqhVqe8OZE2qyHpNP58.wmfn1MLJGxJQ3v17Hge', 'f03d85b590b20ceed942d83b44ef4a5c', '1', 'Male', 'w3-blue&w3-yellow&w3-red'), 69 | (31, 'heyman1', 'heyman', 'drjaiminshah@yahoo.co.in', '$2y$12$9UJJNfOPOLI8T0u4JCwV2uTpS.sMhGB1czckwPq0wfCiZHm3dfwIO', 'f96d15e3f7bfc9bb7a16c4d6fb84ac4f', '1', 'Male', 'pink'); 70 | 71 | -- 72 | -- Indexes for dumped tables 73 | -- 74 | 75 | -- 76 | -- Indexes for table `chat_clubs` 77 | -- 78 | ALTER TABLE `chat_clubs` 79 | ADD PRIMARY KEY (`club_id`), 80 | ADD UNIQUE KEY `club_name` (`club_name`); 81 | 82 | -- 83 | -- Indexes for table `users` 84 | -- 85 | ALTER TABLE `users` 86 | ADD PRIMARY KEY (`u_id`), 87 | ADD UNIQUE KEY `email` (`email`), 88 | ADD UNIQUE KEY `u_name` (`u_name`); 89 | 90 | -- 91 | -- AUTO_INCREMENT for dumped tables 92 | -- 93 | 94 | -- 95 | -- AUTO_INCREMENT for table `chat_clubs` 96 | -- 97 | ALTER TABLE `chat_clubs` 98 | MODIFY `club_id` int(11) NOT NULL AUTO_INCREMENT; 99 | 100 | -- 101 | -- AUTO_INCREMENT for table `users` 102 | -- 103 | ALTER TABLE `users` 104 | MODIFY `u_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; 105 | COMMIT; 106 | 107 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 108 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 109 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 110 | -------------------------------------------------------------------------------- /Check/userCheck.php: -------------------------------------------------------------------------------- 1 | query($query)){ 17 | 18 | if($data->num_rows > 0){ 19 | 20 | echo "This email address is already registered"; 21 | 22 | } 23 | else if($data->num_rows == 0){ 24 | 25 | //unique email address 26 | //color theme by default 27 | $opt = [ 28 | 'cost' => 12, 29 | ]; 30 | 31 | $password = password_hash($password, PASSWORD_BCRYPT, $opt); 32 | $theme = "blue"; 33 | 34 | $vkey = md5(time().$name); 35 | 36 | $yes = true; 37 | $i=1; 38 | 39 | $u_name = $name.$i; 40 | 41 | while($yes){ 42 | 43 | $u_name = $name.$i; 44 | 45 | $qry = "SELECT u_name FROM users WHERE u_name = '$u_name'"; 46 | if($d = $conn->query($qry)){ 47 | if($d->num_rows <= 0){ 48 | $yes = false; 49 | } 50 | else{ 51 | $yes = true; 52 | } 53 | } 54 | else{ 55 | $u_name = $name; 56 | $yes = false; 57 | } 58 | 59 | $i++; 60 | 61 | } 62 | 63 | $query1 = "INSERT INTO users (u_name, real_name, email, u_password, vkey, verified, gender, theme) VALUES( '$u_name','$name', '$email', '$password', '$vkey', '0','$gender', '$theme')"; 64 | 65 | if($conn->query($query1)){ 66 | $_SESSION['signup_r'] = "yes"; 67 | 68 | $subject = "ToConnect: Verify your Email Address"; 69 | $headers = 'MIME-Version: 1.0' . "\r\n"; 70 | $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 71 | 72 | // Creating email headers 73 | $headers .= 'X-Mailer: PHP/' . phpversion(); 74 | 75 | $message = ''; 76 | $message .= '

Hi '.$name.'!

'; 77 | $message .= '

Thanks for registration '.$name.'

'; 78 | $message .= '

You account is successfully created and your temporary username is: '.$u_name.''; 79 | $message .= '

You can chane it after your email verification and for that we have sent you the below link to verify your email address.

'; 80 | $message .= 'Click this link to verify your email'; 81 | $message .= '

This is a software generated email, so do not reply to this email

'; 82 | $message .= '

Thank you

Regards,
Team ToConnect

'; 83 | 84 | $message .= ''; 85 | 86 | mail($email,$subject,$message,$headers); 87 | 88 | } 89 | else{ 90 | echo "Something went wrong"; 91 | } 92 | 93 | } 94 | else{ 95 | echo "This email address is already registered"; 96 | } 97 | 98 | } 99 | else{ 100 | echo "Something went wrong"; 101 | } 102 | 103 | $conn->close(); 104 | 105 | } 106 | else{ 107 | echo "Signup first"; 108 | } 109 | 110 | ?> 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ToConnect 2 | [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/) 3 | [![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) 4 | [![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/) 5 | 6 | 7 | ToCoonect Platform is a computerized system which helps the user to overcome their life issues with the help of a virtual counsellor in electronic format. :smiley: 8 | 9 | It is made using PHP, MySQL, Ajax, HTML, CSS, and JavaScript. :zap: 10 | 11 | It saves time as the system is placed friendly. It even provides the user with their counselling sessions history. It can be helpful to those users also who are suffering from some issues but not comfortable to talk with the counsellor face-to-face. And even some times, a person (user) feels uncomfortable to tell their problem to the counsellor in face to face. In this type of case, ToConnect can play a major role. The main perspective is to create an interactive and friendly environment between the counsellor and the person (user). :open_mouth: 12 | 13 | Others, Can follow a simpler route by using the URL given: 👉 14 | [ToConnect](https://keltagoodlife.co/ToConnect) 15 | 16 | ***SIGN UP AND ENJOY THE EXPERIENCE FOR FREE!*** 17 | 18 |

19 | 20 |

21 | 22 | ## Working of the Application : 23 | 24 | To Register for the first time, the user has to provide their **Name**, ***email***, **password** and retype to **confirm password** and **gender**. :lock: 25 | 26 | For verification, an *email* will be sent which the user has to click in order to **initialize the application**. :email: :unlock: 27 | 28 | Once the user has signed up, The *Login page* will contain only 2 parameters i.e., **emailID** and the **password**.:new: :key: 29 | It will be rendered using *server-side scripts*. 30 | 31 | After completing all these steps, the user will be *directed to the Lobby*. :ok_hand: 32 | 33 | 34 |

35 | 36 |

37 | 38 |

39 | This is the redirection to homepage after successful login by the user. 40 |

41 | 48 | 55 | 59 | 66 |

67 |

68 | Below is the screenshot of the home page of ToConnect 69 |

70 |

71 | 72 |

73 |

74 |

75 | Ther are 4 things a user can do. Start a new session, see all his sessions records, give feedback or raise a problem and can do account settings. User can change the theme of the website as well. 76 |

77 |

If user clicks on New Session then a web page shows just like below

78 |

79 | 80 |

81 |

Before starting the session a user has to select the virtual consellor. There are two options. You can select one by clicking on. They will speak out their name. One is Dr Batla and the other one is Dr Karen

82 |

Options of the consellors

83 |

84 | 85 |

86 |

Allow your webpage's audio to talk with the virtual concellor via chat. Concellor will send messages as well as speak with you. You can turn off the audio if you don't like to listen the same thing which you are reading.

87 |

If you want to change the webpage's settings then click on the settings button or click on the button on the right top with your username written on it. A new popup settings modal comes in. You can change your password username and website's theme over there.

88 |

Below is the settings panel of the site

89 |

90 | 91 |

92 |

93 | I hope that you like my project. Thanks for reading. 94 |

95 | -------------------------------------------------------------------------------- /Users/Parts/verifiedprofile.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | × 6 |

My Account

7 |
8 |
9 | query($query1)){ 13 | 14 | $result = $data1->fetch_assoc(); 15 | ?> 16 |
17 |
18 |
19 | 20 |
21 | Choose Theme: a 22 | a 23 | a 24 | a 25 | a 26 |
27 |
28 |
29 |
30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
Username:
Current Pass:
New Pass:
Again new Pass:
52 | 58 |
59 | 60 | 61 | 62 |
63 | 64 |
65 |
66 |
67 |
68 |
69 | 70 | 78 | 79 | 87 | 88 |
89 | 90 |
91 | 92 | 100 | 101 | 109 | 110 |
111 | 112 |
113 |
114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | ToConnect | Connect us to discuss your problems 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | 38 |
39 | ToConnect 40 |
41 |
42 | 43 | 44 |
45 |
46 |
47 | 48 |
49 |
50 |
51 | 52 |
53 | Person 54 |
55 | 56 |
57 |
58 | 59 |
60 | forgot password? 61 |
62 | 63 |
64 |
65 | 66 |
67 |
68 | 69 | 70 | 71 |
72 |
73 |

New one?

74 |

Nice to see you...

75 |

ToConnect is a simple and easy environment for users to discuss their problems. We are glad to see you here. Click the below button to registerfor free.

76 |
77 | 80 |
81 |
82 |
83 | 84 |
85 | 86 | 87 | 88 | 89 | 146 |
147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /Users/mySessions.php: -------------------------------------------------------------------------------- 1 | query($qry)){ 19 | 20 | $result = $data->fetch_assoc(); 21 | $theme_color = $result['theme']; 22 | 23 | } 24 | 25 | $q = "SELECT verified FROM users WHERE u_id = $id"; 26 | 27 | if($d = $conn->query($q)){ 28 | 29 | $rslt = $d->fetch_assoc(); 30 | 31 | if($rslt['verified'] == '1'){ 32 | 33 | define("TITLE", "mySessions | ToConnect"); 34 | include("../Commen/header.php"); 35 | ?> 36 | 37 | 38 |
39 |
40 |
41 | × 43 |

My Account

44 |
45 |
46 | query($query1)){ 50 | 51 | $result = $data1->fetch_assoc(); 52 | ?> 53 |
54 |
55 |
56 | 57 |
58 | Choose Theme: a 59 | a 60 | a 61 | a 62 | a 63 |
64 |
65 |
66 |
67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
Username:
Current Pass:
New Pass:
Again new Pass:
89 | 95 |
96 | 97 | 98 | 99 |
100 | 101 |
102 |
103 | 104 | 105 |
106 |
107 |
108 |
My Sessions
109 |
110 | query($query)){ 114 | ?> 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | fetch_assoc()){ 127 | 128 | $date = $result['s_date']; 129 | $doc = $result['doctor']; 130 | ?> 131 | 132 | 133 | 134 | 135 | 140 | 141 | 142 |
DateConducted by
143 | 144 | 150 |
151 |
152 |
153 | 154 | 155 | 156 | 170 | close(); 173 | } 174 | else{ 175 | header("Location:../logout"); 176 | } 177 | 178 | ?> 179 | -------------------------------------------------------------------------------- /Js/index.js: -------------------------------------------------------------------------------- 1 | function OpenLogIn() 2 | { 3 | document.getElementById("layer2").style.display = "none"; 4 | document.getElementById("layer1").style.display = "block"; 5 | 6 | } 7 | 8 | function OpenSignIn() 9 | { 10 | document.getElementById("layer2").style.display = "block"; 11 | document.getElementById("layer1").style.display = "none"; 12 | } 13 | 14 | 15 | let loginCheck = () => { 16 | 17 | let formL = document.getElementById('login'); 18 | document.getElementById('eu').name = "Eu"; 19 | document.getElementById('password').name = "Password"; 20 | 21 | let eu = formL.Eu.value; 22 | let pass = formL.Password.value; 23 | let error = document.getElementById('loginerror'); 24 | 25 | let check_data = new Check(); 26 | if(check_data.check(eu) || check_data.check(pass)){ 27 | 28 | alert("Please add correct details"); 29 | error.innerHTML = "Please add correct details"; 30 | return; 31 | 32 | } 33 | 34 | //email login 35 | if(eu.includes("@")){ 36 | if(check_data.emailCheck(eu, error)){ 37 | 38 | let str = "Pass="+pass+"&Email="+eu; 39 | let xhttp = new XMLHttpRequest(); 40 | let loader = document.getElementById('loginloader'); 41 | xhttp.onreadystatechange = function() { 42 | loader.style.display = "block"; 43 | if(this.readyState == 4 && this.status == 200){ 44 | error.innerHTML = this.responseText; 45 | loader.style.display = "none"; 46 | if(this.responseText == ""){ 47 | 48 | formL.action = "login"; 49 | formL.method = "post"; 50 | formL.submit(); 51 | 52 | } 53 | } 54 | } 55 | xhttp.open("POST", "Check/loginEmailCheck", true); 56 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 57 | xhttp.send(str); 58 | 59 | } 60 | else{ 61 | return false; 62 | } 63 | 64 | } 65 | //username login 66 | else{ 67 | 68 | let str = "Pass="+pass+"&Uname="+eu; 69 | let xhttp = new XMLHttpRequest(); 70 | let loader = document.getElementById('loginloader'); 71 | xhttp.onreadystatechange = function() { 72 | loader.style.display = "block"; 73 | if(this.readyState == 4 && this.status == 200){ 74 | error.innerHTML = this.responseText; 75 | loader.style.display = "none"; 76 | if(this.responseText == ""){ 77 | 78 | formL.action = "login"; 79 | formL.method = "post"; 80 | formL.submit(); 81 | 82 | } 83 | } 84 | } 85 | xhttp.open("POST", "Check/loginUnameCheck", true); 86 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 87 | xhttp.send(str); 88 | 89 | } 90 | 91 | } 92 | 93 | let SignUpCheck = () => { 94 | 95 | let formS = document.getElementById('signup'); 96 | document.getElementById('name').name = "Name"; 97 | document.getElementById('email').name = "Email"; 98 | document.getElementById('password1').name = "Pass1"; 99 | document.getElementById('password2').name = "Pass2"; 100 | document.getElementById('gender').name = "Gender"; 101 | let check_data = new Check(); 102 | let error = document.getElementById('SignUpError'); 103 | let name = formS.Name.value; 104 | let email = formS.Email.value; 105 | let pass = formS.Pass1.value; 106 | let passCon = formS.Pass2.value; 107 | let gender = formS.Gender.value; 108 | 109 | if(name == "" || email == "" || pass == "" || passCon == "" || gender == ""){ 110 | alert("Please enter every details"); 111 | error.innerHTML = "Please enter every details"; 112 | return false; 113 | } 114 | 115 | if(name.length <= 4) { 116 | alert("Please enter your full name"); 117 | error.innerHTML = "Please enter your full name"; 118 | return false; 119 | } 120 | 121 | try{ 122 | if(!check_data.emailCheck(email, error)){ 123 | 124 | return false; 125 | 126 | } 127 | 128 | if(check_data.check(email)){ 129 | alert("Please enter valid email"); 130 | error.innerHTML = "Please enter valid email"; 131 | return false; 132 | } 133 | 134 | if(check_data.check(name)){ 135 | alert("Please enter valid name"); 136 | error.innerHTML = "Please enter valid email"; 137 | return false; 138 | } 139 | 140 | if(check_data.check(pass)){ 141 | alert("Please enter valid password"); 142 | error.innerHTML = "Please enter valid email"; 143 | return false; 144 | } 145 | 146 | if(check_data.check(passCon)){ 147 | alert("Please enter valid password"); 148 | error.innerHTML = "Please enter valid email"; 149 | return false; 150 | } 151 | } 152 | catch(err){ 153 | alert("There is a problem: "+err); 154 | return; 155 | } 156 | 157 | if(pass.length <= 5){ 158 | alert("password must be more than 5 letters"); 159 | error.innerHTML = "password must be more than 5 letters"; 160 | return false; 161 | } 162 | 163 | if(pass !== passCon){ 164 | alert("Both passwords do not match"); 165 | error.innerHTML = "Both passwords do not match"; 166 | return false; 167 | } 168 | 169 | let str = "Name="+name+"&Email="+email+"&Pass="+pass+"&Gender="+gender; 170 | let xhttp = new XMLHttpRequest(); 171 | let loader = document.getElementById('loaderSignUp'); 172 | xhttp.onreadystatechange = function() { 173 | loader.style.display = "block"; 174 | if(this.readyState == 4 && this.status == 200){ 175 | error.innerHTML = this.responseText; 176 | loader.style.display = "none"; 177 | if(this.responseText == ""){ 178 | 179 | formS.action = "logins"; 180 | formS.method = "post"; 181 | formS.submit(); 182 | 183 | } 184 | } 185 | } 186 | xhttp.open("POST", "Check/userCheck", true); 187 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 188 | xhttp.send(str); 189 | 190 | } 191 | 192 | 193 | -------------------------------------------------------------------------------- /Users/feedback.php: -------------------------------------------------------------------------------- 1 | query($qry)){ 19 | 20 | $result = $data->fetch_assoc(); 21 | $theme_color = $result['theme']; 22 | 23 | } 24 | 25 | $q = "SELECT verified FROM users WHERE u_id = $id"; 26 | 27 | if($d = $conn->query($q)){ 28 | 29 | $rslt = $d->fetch_assoc(); 30 | 31 | if($rslt['verified'] == '1'){ 32 | 33 | define("TITLE", "feedback | ToConnect"); 34 | include("../Commen/header.php"); 35 | ?> 36 | 37 |
38 |
39 |
40 | × 42 |

My Account

43 |
44 |
45 | query($query1)){ 49 | 50 | $result = $data1->fetch_assoc(); 51 | ?> 52 |
53 |
54 |
55 | 56 |
57 | Choose Theme: a 58 | a 59 | a 60 | a 61 | a 62 |
63 |
64 |
65 |
66 | 67 |
68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
Username:
Current Pass:
New Pass:
Again new Pass:
88 | 94 |
95 | 96 | 97 | 98 |
99 | 100 |
101 |
102 | 103 |
104 |
105 |
106 |
FeedBack
107 |
108 |
109 | Please fill the below form to provide us the honest response of your opinion regarding to ToConnect we application. Your response do matters for us to improve the site and services. Thank you :) 110 |
111 |
112 |
113 | 114 |
115 |
116 |
117 | Name 118 | 119 |
120 |
121 | Message 122 | 123 |
124 |
125 | 126 |
127 | 128 |
129 | 130 |
131 |
132 |
133 | 134 | 135 | 136 | 137 | 151 | close(); 154 | } 155 | else{ 156 | header("Location:../logout"); 157 | } 158 | 159 | ?> 160 | -------------------------------------------------------------------------------- /Users/session.php: -------------------------------------------------------------------------------- 1 | query($qry)){ 27 | 28 | $result = $data->fetch_assoc(); 29 | $theme_color = $result['theme']; 30 | 31 | } 32 | 33 | include("sessionHeader.php"); 34 | ?> 35 | 36 |
37 |
38 |
39 | × 41 |

My Account

42 |
43 |
44 | query($query1)){ 48 | 49 | $result = $data1->fetch_assoc(); 50 | ?> 51 |
52 |
53 |
54 | 55 |
56 | Choose Theme: a 57 | a 58 | a 59 | a 60 | a 61 |
62 | 63 | 69 |
70 | 71 | 72 | 73 |
74 | 75 |
76 |
77 | 78 | 83 |
84 |
85 | Dr Is typing... 86 |
87 | 88 |
89 |
90 | 91 | 92 | 93 |
94 |
95 | 96 |
97 |
98 | 99 | 100 |
101 | 102 |
103 |
104 | 105 | 106 | 107 | 230 | 231 | 232 | 242 | -------------------------------------------------------------------------------- /Users/startNew.php: -------------------------------------------------------------------------------- 1 | query($qry)){ 19 | 20 | $result = $data->fetch_assoc(); 21 | $theme_color = $result['theme']; 22 | 23 | } 24 | 25 | $qry = "SELECT real_name FROM users WHERE u_id = $id"; 26 | 27 | if($data = $conn->query($qry)){ 28 | 29 | $result = $data->fetch_assoc(); 30 | $name = $result['real_name']; 31 | 32 | } 33 | 34 | $q = "SELECT verified FROM users WHERE u_id = $id"; 35 | 36 | if($d = $conn->query($q)){ 37 | 38 | $rslt = $d->fetch_assoc(); 39 | 40 | if($rslt['verified'] == '1'){ 41 | define("TITLE", "start session | ToConnect"); 42 | include("../Commen/header.php"); 43 | ?> 44 | 45 | 46 |
47 |
48 |
49 | × 51 |

My Account

52 |
53 |
54 | query($query1)){ 58 | 59 | $result = $data1->fetch_assoc(); 60 | ?> 61 |
62 |
63 |
64 | 65 |
66 | Choose Theme: a 67 | a 68 | a 69 | a 70 | a 71 |
72 |
73 |
74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
Username:
Current Pass:
New Pass:
Again new Pass:
97 | 103 |
104 | 105 | 106 | 107 |
108 | 109 |
110 |
111 | 112 |
113 |
114 |
Start New Session
115 |
116 |
117 |
118 | Welcome !!! 119 |
120 |
121 | Read the below instructions carefully and select the counselor to start these session. We have two counselors.
1) Dr Karen
2) Dr Batla 122 |
123 |
124 |
125 | Instructions 126 |
127 |
128 | If you want us to recite the instructions then select those lines with the help of cursor. 129 |
130 |
    131 |
  • This is a vertual counselling session. At the end of this session you will find out the best way to solve your problems as well as a contact details of 132 | a doctor who will guide you in future.
  • 133 |
  • If you turn off your computer before submitting the data then you ae not able to attend that session again.
  • 134 |
  • You session's result is totally dependent on your answers. So be a honest answerer. Do not lie.
  • 135 |
  • In case you gave incorrect answers then the result will be incorrect. We are not responsible any of those kind of things.
  • 136 |
  • In case you are thinking that what happens to my answers, then your answeres are secured with us. No one is going to be able to watch it as english language.
  • 137 |
  • This software is to turn your feelings positive. On the basis of your answers we will provide you the way to feel better
  • 138 |
  • This is a totally free service.
  • 139 |
140 | 141 |
142 | I have read and understand all the above instructions 143 | 144 | 145 |
146 | Select Doctor: 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 |
Dr. BatlaDr. Karen
157 |
158 |
159 | 160 |
161 |
162 |
163 |
164 |
165 | 166 |
167 |
168 | 169 |
170 |
171 | 172 |
173 |
174 |
175 |
176 | 181 | 182 | 183 | 194 | 195 | 196 | 197 | 200 | 201 | 202 | close(); 205 | } 206 | else{ 207 | header("Location:../logout"); 208 | } 209 | 210 | ?> 211 | -------------------------------------------------------------------------------- /Users/session_chat/send.php: -------------------------------------------------------------------------------- 1 | "; 13 | $message .= "
"; 14 | $message .= $msg; 15 | $message .= "
"; 16 | 17 | echo $message; 18 | } 19 | 20 | function incorrect(){ 21 | 22 | $msgs = array("Please answer as asked", "Please obey the instructions", "Do it properly", "Come on, be serious", "If you want to leave then click leave"); 23 | 24 | $id = rand(0,4); 25 | $msg = $msgs[$id]; 26 | $message = "
"; 27 | $message .= "
"; 28 | $message .= $msg; 29 | $message .= "
"; 30 | 31 | echo $message; 32 | 33 | } 34 | 35 | function giveResult(){ 36 | 37 | $msg = ""; 38 | $message = "
"; 39 | $message .= "
"; 40 | $message .= $msg; 41 | $message .= "
"; 42 | 43 | echo $message; 44 | 45 | } 46 | 47 | function done(){ 48 | 49 | $msgs = array("Your session is over", "There are no more questions left", "Thanks for giving the correct answers"); 50 | 51 | $id = rand(0,2); 52 | $msg = $msgs[$id]; 53 | $message = "
"; 54 | $message .= "
"; 55 | $message .= $msg; 56 | $message .= "
"; 57 | 58 | echo $message; 59 | 60 | } 61 | 62 | if(isset($_SESSION['login_user_connect']) && isset($_SESSION['session_begin']) && isset($_REQUEST['msg']) && isset($_SESSION['msg_order'])){ 63 | 64 | $datas = base64_decode($_SESSION['session_begin']); 65 | $datas = explode("&",$datas); 66 | $doc = $datas[0]; 67 | $s_id = $datas[1]; 68 | //user id 69 | $id = $datas[2]; 70 | $msg = $_REQUEST['msg']; 71 | 72 | require_once("../../../../Database/dbconnect_connect.php"); 73 | write_msg($msg); 74 | 75 | $order = $_SESSION['msg_order']; 76 | 77 | if(strcasecmp("quit", $msg) == 0){ 78 | 79 | if($order < 7){ 80 | 81 | $msg = "Your session is not over yet."; 82 | $message = "
"; 83 | $message .= "
"; 84 | $message .= $msg; 85 | $message .= "
"; 86 | 87 | echo $message; 88 | 89 | } 90 | else{ 91 | 92 | unset($_SESSION['session_begin']); 93 | 94 | } 95 | 96 | } 97 | else if($order == 3){ 98 | 99 | if(strcasecmp("START", $msg) == 0 || strcasecmp("Begin", $msg) == 0){ 100 | 101 | $query = "SELECT * FROM msgs WHERE msg_doc = '$doc' AND msg_order = $order"; 102 | $msg = "hey"; 103 | 104 | if($data = $conn->query($query)){ 105 | 106 | $result = $data->fetch_assoc(); 107 | $msg = $result['msg_data']; 108 | $_SESSION['msg_order']+=1; 109 | $message = "
"; 110 | $message .= "
"; 111 | $message .= $msg; 112 | $message .= "
"; 113 | 114 | echo $message; 115 | 116 | } 117 | else{ 118 | echo "Something went wrong"; 119 | } 120 | 121 | } 122 | else{ 123 | incorrect(); 124 | } 125 | 126 | } 127 | else if($order == 4){ 128 | 129 | if(strcasecmp("Health", $msg) == 0 || strcasecmp("Mental", $msg) == 0 || strcasecmp("Study", $msg) == 0 || strcasecmp("Health related", $msg) == 0 || strcasecmp("Mental problems", $msg) == 0 || strcasecmp("Study related", $msg) == 0){ 130 | 131 | $query = "UPDATE sessions SET problem_out = '$msg' WHERE s_id = $s_id"; 132 | 133 | if($conn->query($query)){ 134 | 135 | } 136 | else{ 137 | echo "Something went wrong"; 138 | } 139 | 140 | if(strcasecmp("Health", $msg) == 0){ 141 | $_SESSION['suggetion'] = "Dr.Gohil"; 142 | } 143 | else if(strcasecmp("Mental", $msg) == 0){ 144 | $_SESSION['suggetion'] = "Dr.Gohil"; 145 | } 146 | else if(strcasecmp("Study", $msg) == 0){ 147 | $_SESSION['suggetion'] = "Dr.Gohil"; 148 | } 149 | 150 | $query = "SELECT * FROM msgs WHERE msg_doc = '$doc' AND msg_order = $order"; 151 | $msg = "Something went wrong"; 152 | 153 | if($data = $conn->query($query)){ 154 | 155 | $result = $data->fetch_assoc(); 156 | $msg = $result['msg_data']; 157 | $_SESSION['msg_order']+=1; 158 | $message = "
"; 159 | $message .= "
"; 160 | $message .= $msg; 161 | $message .= "
"; 162 | 163 | echo $message; 164 | 165 | } 166 | else{ 167 | echo "Something went wrong"; 168 | } 169 | 170 | } 171 | else{ 172 | incorrect(); 173 | } 174 | 175 | } 176 | else if($order == 5){ 177 | 178 | if(strcasecmp("Lonely", $msg) == 0 || strcasecmp("Guilty", $msg) == 0 || strcasecmp("Guilty", $msg) == 0 || strcasecmp("Deseased", $msg) == 0 || strcasecmp("Stressed", $msg) == 0 || strcasecmp("Depressed", $msg) == 0){ 179 | 180 | $query = "UPDATE sessions SET feeling_out = '$msg' WHERE s_id = $s_id"; 181 | 182 | if($conn->query($query)){ 183 | 184 | } 185 | else{ 186 | echo "Something went wrong"; 187 | } 188 | 189 | $query = "SELECT * FROM msgs WHERE msg_doc = '$doc' AND msg_order = $order"; 190 | $msg = "Something went wrong"; 191 | 192 | if($data = $conn->query($query)){ 193 | 194 | $result = $data->fetch_assoc(); 195 | $msg = $result['msg_data']; 196 | $_SESSION['msg_order']+=1; 197 | $message = "
"; 198 | $message .= "
"; 199 | $message .= $msg; 200 | $message .= "
"; 201 | 202 | echo $message; 203 | 204 | } 205 | else{ 206 | echo "Something went wrong"; 207 | } 208 | 209 | } 210 | else{ 211 | incorrect(); 212 | } 213 | } 214 | else if($order == 6){ 215 | 216 | if(strcasecmp("Yes", $msg) == 0 || strcasecmp("No", $msg) == 0 || strcasecmp("Ya", $msg) == 0 || strcasecmp("Nah", $msg) == 0){ 217 | 218 | $query = "UPDATE sessions SET talk_out = '$msg' WHERE s_id = $s_id"; 219 | 220 | if($conn->query($query)){ 221 | 222 | } 223 | else{ 224 | echo "Something went wrong"; 225 | } 226 | 227 | $query = "SELECT * FROM msgs WHERE msg_doc = '$doc' AND msg_order = $order"; 228 | $msg = "Something went wrong"; 229 | 230 | if($data = $conn->query($query)){ 231 | 232 | $result = $data->fetch_assoc(); 233 | $msg = $result['msg_data']; 234 | $_SESSION['msg_order']+=1; 235 | $message = "
"; 236 | $message .= "
"; 237 | $message .= $msg; 238 | $message .= "
"; 239 | 240 | echo $message; 241 | 242 | } 243 | else{ 244 | echo "Something went wrong"; 245 | } 246 | 247 | } 248 | else{ 249 | incorrect(); 250 | } 251 | 252 | } 253 | else if($order == 6){ 254 | 255 | if(strcasecmp("Yes", $msg) == 0 || strcasecmp("No", $msg) == 0 || strcasecmp("Ya", $msg) == 0 || strcasecmp("Nah", $msg) == 0){ 256 | 257 | $query = "UPDATE sessions SET movie_out = '$msg' WHERE s_id = $s_id"; 258 | 259 | if($conn->query($query)){ 260 | 261 | } 262 | else{ 263 | echo "Something went wrong"; 264 | } 265 | echo $query; 266 | 267 | $query = "SELECT * FROM msgs WHERE msg_doc = '$doc' AND msg_order = $order"; 268 | $msg = "Something went wrong"; 269 | 270 | if($data = $conn->query($query)){ 271 | 272 | $result = $data->fetch_assoc(); 273 | $msg = $result['msg_data']; 274 | $_SESSION['msg_order']+=1; 275 | $message = "
"; 276 | $message .= "
"; 277 | $message .= $msg; 278 | $message .= "
"; 279 | 280 | echo $message; 281 | 282 | } 283 | else{ 284 | echo "Something went wrong"; 285 | } 286 | 287 | } 288 | else{ 289 | incorrect(); 290 | } 291 | 292 | } 293 | else if($order == 7){ 294 | 295 | $suggetion = ""; 296 | $query = "SELECT doctors.d_name, doctors.d_data FROM (sessions INNER JOIN doctors ON sessions.problem_out = doctors.d_field) WHERE s_id = $s_id"; 297 | 298 | if($data = $conn->query($query)){ 299 | 300 | $result = $data->fetch_assoc(); 301 | $suggetion = $result['d_name']." is our suggetion for you for your problem. ".$result['d_data']; 302 | 303 | } 304 | else{ 305 | echo "something went wrong"; 306 | } 307 | 308 | $query = "SELECT * FROM msgs WHERE msg_doc = '$doc' AND msg_order = $order"; 309 | $msg = "Something went wrong"; 310 | 311 | if($data = $conn->query($query)){ 312 | 313 | $result = $data->fetch_assoc(); 314 | $msg = $result['msg_data']."
".$suggetion."
"."Your session is over type 'quit' to save and continue to your lobby"; 315 | $_SESSION['msg_order']+=1; 316 | $message = "
"; 317 | $message .= "
"; 318 | $message .= $msg; 319 | $message .= "
"; 320 | 321 | echo $message; 322 | 323 | } 324 | else{ 325 | echo "Something went wrong"; 326 | } 327 | 328 | } 329 | else{ 330 | 331 | done(); 332 | 333 | } 334 | 335 | } 336 | else if(isset($_SESSION['login_user_connect']) && isset($_REQUEST['name'])){ 337 | header("Location:profile?name=".$_REQUEST['name']); 338 | 339 | } 340 | else{ 341 | header("Location:../logout"); 342 | } 343 | ?> 344 | --------------------------------------------------------------------------------