chat.zip requires you to edit to suit fulldatabase.sql within torrenttrader version.
Quote:
--
-- Database: `chatme`
--
-- --------------------------------------------------------
--
-- Table structure for table `chat`
--
DROP TABLE IF EXISTS `chat`;
CREATE TABLE IF NOT EXISTS `chat` (
`chatid` int(11) NOT NULL AUTO_INCREMENT,
`chat_room_id` int(11) DEFAULT NULL,
`chat_msg` text,
`userid` int(11) DEFAULT NULL,
`chat_date` varchar(255) DEFAULT NULL,
PRIMARY KEY (`chatid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `chat_room`
--
DROP TABLE IF EXISTS `chat_room`;
CREATE TABLE IF NOT EXISTS `chat_room` (
`chat_room_id` int(11) NOT NULL AUTO_INCREMENT,
`chat_room_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`chat_room_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `chat_room`
--
INSERT INTO `chat_room` (`chat_room_id`, `chat_room_name`) VALUES
(1, 'Welcome to chatME!');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`userid` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) DEFAULT NULL,
`password` varchar(30) DEFAULT NULL,
`your_name` varchar(60) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
PRIMARY KEY (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`userid`, `username`, `password`, `your_name`, `email`, `phone`) VALUES
(1, 'pao', 'pao', 'PaoPao', 'pao@yahoo.com', '09123123123');
COMMIT;
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`username` varchar(40) NOT NULL DEFAULT '',
`password` varchar(40) NOT NULL DEFAULT '',
`secret` varchar(20) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`email` varchar(80) NOT NULL DEFAULT '',
`status` enum('pending','confirmed') NOT NULL DEFAULT 'pending',
`added` datetime DEFAULT NULL,
`last_login` datetime DEFAULT NULL,
`last_access` datetime DEFAULT NULL,
`editsecret` varchar(20) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`privacy` enum('strong','normal','low') NOT NULL DEFAULT 'normal',
`stylesheet` int(10) DEFAULT 1,
`language` varchar(20) NOT NULL DEFAULT '1',
`info` text DEFAULT NULL,
`acceptpms` enum('yes','no') NOT NULL DEFAULT 'yes',
`ip` varchar(39) NOT NULL DEFAULT '',
`class` tinyint(3) UNSIGNED NOT NULL DEFAULT 3,
`avatar` varchar(100) NOT NULL DEFAULT '',
`uploaded` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`downloaded` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`title` varchar(30) NOT NULL DEFAULT '',
`donated` int(5) UNSIGNED NOT NULL DEFAULT 0,
`country` int(10) UNSIGNED NOT NULL DEFAULT 0,
`notifs` varchar(100) NOT NULL DEFAULT '',
`enabled` varchar(10) NOT NULL DEFAULT 'yes',
`modcomment` text DEFAULT NULL,
`gender` varchar(6) NOT NULL DEFAULT '',
`client` varchar(25) NOT NULL DEFAULT '',
`age` int(3) NOT NULL DEFAULT 0,
`warned` char(3) NOT NULL DEFAULT 'no',
`signature` text NOT NULL DEFAULT '',
`last_browse` int(11) NOT NULL DEFAULT 0,
`forumbanned` char(3) NOT NULL DEFAULT 'no',
`invited_by` int(10) NOT NULL DEFAULT 0,
`invitees` varchar(100) NOT NULL DEFAULT '',
`invites` smallint(5) NOT NULL DEFAULT 0,
`invitedate` datetime DEFAULT NULL,
`commentpm` enum('yes','no') NOT NULL DEFAULT 'yes',
`passkey` varchar(32) NOT NULL DEFAULT '',
`page` text DEFAULT NULL,
`team` int(10) UNSIGNED NOT NULL DEFAULT 0,
`tzoffset` int(4) DEFAULT 0,
`hideshoutbox` enum('yes','no') NOT NULL DEFAULT 'no'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 PACK_KEYS=0;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `password`, `secret`, `email`, `status`, `added`, `last_login`, `last_access`, `editsecret`, `privacy`, `stylesheet`, `language`, `info`, `acceptpms`, `ip`, `class`, `avatar`, `uploaded`, `downloaded`, `title`, `donated`, `country`, `notifs`, `enabled`, `modcomment`, `gender`, `client`, `age`, `warned`, `signature`, `last_browse`, `forumbanned`, `invited_by`, `invitees`, `invites`, `invitedate`, `commentpm`, `passkey`, `page`, `team`, `tzoffset`, `hideshoutbox`) VALUES
(1, 'xo', '7c222fb2927d828af22f592134e8932480637c0d', 'XgIipduzDl0W4y1ZjkDz', 'ljx4680@gmail.com', 'confirmed', '2021-12-22 10:17:04', '2022-01-02 16:56:34', '2022-01-02 17:57:11', '', 'normal', 1, '1', NULL, 'yes', '1.136.27.177', 7, 'https://images2.imgbox.com/7c/f6/vys2p7Wi_o.gif', 0, 0, '', 0, 35, '', 'yes', '', 'Female', 'Rutorrent', 42, 'yes', 'If you want to see MANY different ways to win a seedbox (30 seedboxes EVERY month), check THIS thread out!!!\r\nCLICK HERE TO CHECK OUT THE ★OFFICIAL TI.org SELLING STORE★\r\nCLICK HERE TO SEE MY FEEDBACKS AND BUY WITH CONFIDENCE FROM ME!!!\r\nCLICK HERE TO SEND ME A PM AND TELL ME THE TRACKER YOU ARE LOOKING FOR!!!\r\n\r\n\r\n 30 FREE SEEDBOXES FOR OUR USERS EVERY MONTH \r\n\r\n PROMOTE TI AND WIN MANY REPUTATION POINTS VERY EASILY \r\n\r\nWe\'ve had HDBits, BTN, PTP, What.cd + MANY MORE GiveAways in the VIP Forum so far', 1641146230, 'no', 0, '', 0, NULL, 'yes', '141c66fea7d8e09749b29b7f4ef226f6', 'Unknown Location...', 1, 0, 'no'),
<?php
include('conn.php');
session_start();
if (!isset($_SESSION['userid']) ||(trim ($_SESSION['userid']) == '')) {
header('location:index.php');
exit();
}
$uquery=mysqli_query($conn,"SELECT * FROM `user` WHERE userid='".$_SESSION['userid']."'");
$urow=mysqli_fetch_assoc($uquery);
?>
<!DOCTYPE html>
<html>
<head>
<title>chatME</title>
<link rel="stylesheet" href="css/home.css">
<script src="jquery-3.1.1.js"></script>
<script src="js/home.js"></script>
<script type="text/javascript">
$(document).keypress(function(e){ //using keyboard enter key
displayResult();
/* Send Message */
if(e.which === 13){
if($('#msg').val() == ""){
alert('Please write message first');
}else{
$msg = $('#msg').val();
$id = $('#id').val();
$.ajax({
type: "POST",
url: "send_message.php",
data: {
msg: $msg,
id: $id,
},
success: function(){
displayResult();
$('#msg').val(''); //clears the textarea after submit
}
});
}
/* $("form").submit();
alert('You press enter key!'); */
}
}
);
$(document).ready(function(){ //using send button
displayResult();
/* Send Message */
$('#send_msg').on('click', function(){
if($('#msg').val() == ""){
alert('Please write message first');
}else{
$msg = $('#msg').val();
$id = $('#id').val();
$.ajax({
type: "POST",
url: "send_message.php",
data: {
msg: $msg,
id: $id,
},
success: function(){
displayResult();
$('#msg').val(''); //clears the textarea after submit
}
});
}
});
/* END */
});
function displayResult(){
$id = $('#id').val();
$.ajax({
url: 'send_message.php',
type: 'POST',
async: false,
data:{
id: $id,
res: 1,
},
success: function(response){
$('#result').html(response);
}
});
}
</script>
</head>
<body>
<table id="chat_room" align="center">
<tr>
<th><h4>Hi, <a href="profile.php?userid=<?php echo $_SESSION['userid']; ?>"><?php echo $urow['your_name']; ?></a> - <a href="logout.php" onclick="return confirm_logout();">Logout</a></h4></th>
</tr>
<?php
$query=mysqli_query($conn,"select * from `chat_room`");
$row=mysqli_fetch_array($query);
?>
<div>
<tr>
<td><?php echo $row['chat_room_name']; ?></td><br><br>
</tr>
</div>
<tr>
<td>
<div id="result" style="overflow-y:scroll; height:300px; width: 605px;"></div>
<form class="form">
<!--<input type="text" id="msg">--><br/>
<textarea id="msg" rows="4" cols="85"></textarea><br/>
<input type="hidden" value="<?php echo $row['chat_room_id']; ?>" id="id">
<button type="button" id="send_msg" class="button button2">Send</button>
</form>
</td>
</tr>
</table>
</body>
</html>
<?php
include('conn.php');
session_start();
if (!isset($_SESSION['userid']) ||(trim ($_SESSION['userid']) == '')) {
header('location:index.php');
exit();
}
$uquery=mysqli_query($conn,"SELECT * FROM `user` WHERE userid='".$_SESSION['userid']."'");
$urow=mysqli_fetch_assoc($uquery);
?>
<!DOCTYPE html>
<html>
<head>
<title>chatME</title>
<link rel="stylesheet" href="css/home.css">
<script src="jquery-3.1.1.js"></script>
<script src="js/home.js"></script>
<script type="text/javascript">
$(document).keypress(function(e){ //using keyboard enter key
displayResult();
/* Send Message */
if(e.which === 13){
if($('#msg').val() == ""){
alert('Please write message first');
}else{
$msg = $('#msg').val();
$id = $('#id').val();
$.ajax({
type: "POST",
url: "send_message.php",
data: {
msg: $msg,
id: $id,
},
success: function(){
displayResult();
$('#msg').val(''); //clears the textarea after submit
}
});
}
/* $("form").submit();
alert('You press enter key!'); */
}
}
);
$(document).ready(function(){ //using send button
displayResult();
/* Send Message */
$('#send_msg').on('click', function(){
if($('#msg').val() == ""){
alert('Please write message first');
}else{
$msg = $('#msg').val();
$id = $('#id').val();
$.ajax({
type: "POST",
url: "send_message.php",
data: {
msg: $msg,
id: $id,
},
success: function(){
displayResult();
$('#msg').val(''); //clears the textarea after submit
}
});
}
});
/* END */
});
function displayResult(){
$id = $('#id').val();
$.ajax({
url: 'send_message.php',
type: 'POST',
async: false,
data:{
id: $id,
res: 1,
},
success: function(response){
$('#result').html(response);
}
});
}
</script>
</head>
<body>
<table id="chat_room" align="center">
<tr>
<th><h4>Hi, <a href="profile.php?userid=<?php echo $_SESSION['userid']; ?>"><?php echo $urow['your_name']; ?></a> - <a href="logout.php" onclick="return confirm_logout();">Logout</a></h4></th>
</tr>
<?php
$query=mysqli_query($conn,"select * from `chat_room`");
$row=mysqli_fetch_array($query);
?>
<div>
<tr>
<td><?php echo $row['chat_room_name']; ?></td><br><br>
</tr>
</div>
<tr>
<td>
<div id="result" style="overflow-y:scroll; height:300px; width: 605px;"></div>
<form class="form">
<!--<input type="text" id="msg">--><br/>
<textarea id="msg" rows="4" cols="85"></textarea><br/>
<input type="hidden" value="<?php echo $row['chat_room_id']; ?>" id="id">
<button type="button" id="send_msg" class="button button2">Send</button>
</form>
</td>
</tr>
</table>
</body>
</html>
No users online
Torrents
Members
Online