funchat/modules/ajaxpm/ajaxpm.plugins.php

33 lines
634 B
PHP

<?php
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
class plugins_ajaxpm{
function register_plugins(& $plugin){
$plugin->use_hook('frontpage_start',array($this,"pm_add"));
}
function pm_add(){
global $db, $config, $footer;
$footer .= "<script type=\"text/javascript\">
<!--
function ajaxpmnotice()
{
$.ajax({
url: \"/ajax.php?task=ajaxpm\",
timeout: 1000,
success: function(data) {
$('.pmnotice').html(data);
}
});
}
ajaxpmnotice();
setInterval(\"ajaxpmnotice()\",120000);
// -->
</script>";
}
}
?>