68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
|
|
<?php
|
||
|
|
$page = "general";
|
||
|
|
include "header.php";
|
||
|
|
|
||
|
|
if($user->user_info["user_level_id"]!=2&&$user->user_info["user_level_id"]!=7){header("Location: /premium.php?premiumonly=1");exit;}
|
||
|
|
function general()
|
||
|
|
{
|
||
|
|
global $user, $database;
|
||
|
|
|
||
|
|
if($_GET["user"]!="")
|
||
|
|
{
|
||
|
|
$querypost="?user=".$_GET["user"];
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Make sure the timezone on Database server and PHP server is same */
|
||
|
|
$sql=$database->database_query("SELECT * FROM videoonlychatters");
|
||
|
|
|
||
|
|
while($r=$database->database_fetch_array($sql)){
|
||
|
|
$curtime=time()-10;
|
||
|
|
|
||
|
|
if($r['time'] < $curtime){
|
||
|
|
$database->database_query("DELETE FROM videoonlychatters WHERE username='{$r["username"]}'");
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|
||
|
|
Click the start cam button to be able to join the chat and see other people's cams. You must have your cam on to see others and participate.<br />
|
||
|
|
<br />
|
||
|
|
Let us know what you think in our <a href="/forum_view.php?forum_id=52" target="_blank">Video Chat forum</a>
|
||
|
|
|
||
|
|
|
||
|
|
<br>
|
||
|
|
<br>
|
||
|
|
Users currently chatting: <span id="videoonlycount"></span>
|
||
|
|
|
||
|
|
<iframe src="/camframe.php<?php echo $querypost;?>" style="border:0px; height:1000px; max-width:1160px; width:100%;"></iframe>
|
||
|
|
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
function load_new_stuff(){
|
||
|
|
|
||
|
|
jQuery.ajax({
|
||
|
|
url: "include/videocallincludes/updatecount.php",
|
||
|
|
context: document.body
|
||
|
|
}).done(function(data) {
|
||
|
|
jQuery("#videoonlycount").html(data);
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
jQuery(window).on("load", function(){
|
||
|
|
|
||
|
|
|
||
|
|
load_new_stuff();
|
||
|
|
setInterval(function(){
|
||
|
|
load_new_stuff();
|
||
|
|
},5000);
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
}
|
||
|
|
include "footer.php";
|
||
|
|
?>
|