wenn ich die stats box vom chat auf der hp integriere dann kommt folgender fehler:
Fatal error: Call to undefined method menu::get_complete() in /customers/elite-of-europe.de/elite-of-europe.de/httpd.www/include/boxes/ajaxchatstats.php on line 40
und wenn ich die chatbox mit einbaue dann kommt folgender:
Fatal error: Call to undefined method menu::get_complete() in /customers/elite-of-europe.de/elite-of-europe.de/httpd.www/include/boxes/ajaxchat.php on line 102
Hier die beiden boxen:
Die Chatstats
<?php
// Copyright Florian Körner
defined ('main') or die ( 'no direct access' );
// Template laden
$tpl = new tpl('ajax_chat/ajaxchatstats');
// Mitglieder anzeigen lassen
$sql = "SELECT `userID`,`userNAME` FROM `prefix_ajax_chat_online` WHERE `userID` < '400000000' AND `userID` != '2147483647'";
$erg = db_query($sql);
$tpl->out(0);
$tpl->out(1);
if( db_num_rows($erg) > 0 ){
while( $row = db_fetch_assoc($erg) ){
$tpl->set_ar_out($row, 3);
}
}else{
$tpl->out(5);
}
$tpl->out(6);
// Gäste anzeigen lassen
$sql = "SELECT `userID`,`userNAME` FROM `prefix_ajax_chat_online` WHERE `userID` >= '400000000' AND `userID` != '2147483647'";
$erg = db_query($sql);
$tpl->out(0);
$tpl->out(2);
if( db_num_rows($erg) > 0 ){
while( $row = db_fetch_assoc($erg) ){
$tpl->set_ar_out($row, 4);
}
}else{
$tpl->out(5);
}
$tpl->out(6);
// Alle Nutzer im Chat zählen und popup ausgeben
$num = db_result(db_query("SELECT COUNT(*) FROM `prefix_ajax_chat_online` WHERE `userID` != '2147483647'"),0);
$tpl->set('completemenu', $menu->get_complete() );
$tpl->set_out('num', $num, 7);
unset($tpl);
?>
Die Chatbox
<?php
// Angepasst von Florian Körner
defined ('main') or die ( 'no direct access' );
// Define some Functions
if (!function_exists('read_ext')){
function read_ext ($dir, $ext = '') {
$buffer = Array( );
if ( !is_array( $ext ) ){
$ext = Array( $ext );
}
$open = opendir($dir);
while ($file = readdir ($open)) {
$file_info = pathinfo($file);
if ($file != "." AND $file != ".." AND !is_dir($dir.'/'.$file) AND ( in_array ( $file_info["extension"], $ext ) OR empty( $ext ) ) ) {
$buffer[] = $file;
}
}
closedir($open);
return ($buffer);
}
}
if (!function_exists('db_free')){
function db_free($erg) {
@mysql_free_result($erg);
}
}
if (!function_exists('ds_affected_rows')){
function db_affected_rows () {
return (mysql_affected_rows (CONN));
}
}
function getShoutBoxContent() {
// URL to the chat directory:
if(!defined('AJAX_CHAT_URL')) {
define('AJAX_CHAT_URL', '');
}
// Path to the chat directory:
if(!defined('AJAX_CHAT_PATH')) {
define('AJAX_CHAT_PATH', dirname($_SERVER['SCRIPT_FILENAME']));
}
// Validate the path to the chat:
if(@is_file(AJAX_CHAT_PATH.'/include/includes/class/ajax_chat/classes.php')) {
// Include Class libraries:
require_once(AJAX_CHAT_PATH.'/include/includes/class/ajax_chat/classes.php');
// Initialize the shoutbox:
$ajaxChat = new CustomAJAXChatShoutBox();
// Parse and return the shoutbox template content:
return $ajaxChat->getShoutBoxContent();
}
return null;
}
// Userrights DEFINE and RIGHTS
define('AJAX_CHAT_CHATBOT', 4);
define('AJAX_CHAT_ADMIN', 3);
define('AJAX_CHAT_MODERATOR', 2);
define('AJAX_CHAT_USER', 1);
define('AJAX_CHAT_GUEST', 0);
$rights = Array( '0' => AJAX_CHAT_GUEST,
'-1' => AJAX_CHAT_USER,
'-2' => AJAX_CHAT_USER,
'-3' => AJAX_CHAT_USER,
'-4' => AJAX_CHAT_USER,
'-5' => AJAX_CHAT_USER,
'-6' => AJAX_CHAT_USER,
'-7' => AJAX_CHAT_MODERATOR,
'-8' => AJAX_CHAT_MODERATOR,
'-9' => AJAX_CHAT_ADMIN );
// Set AjaxChat SESSION
if( !isset( $_SESSION['ajaxbox'] ) ){
$_SESSION['ajaxbox'] = 'true';
}
// Check SESSION option
if( $_GET['ajaxbox'] == 'true' ){
$_SESSION['ajaxbox'] = 'true';
}else if( $_GET['ajaxbox'] == 'false' ){
$_SESSION['ajaxbox'] = 'false';
}
// Initialize the chat:
if( $menu->get(0) == 'ajaxchat' OR $_SESSION['ajaxbox'] == 'false' ){
echo '<div style="text-align: center;">Die Shoutbox ist inaktiv!<br /><a href="index.php?'.$menu->get_complete().'&ajaxbox=true">Jetzt aktivieren</a></div>';
}else{
echo getShoutBoxContent();
echo '<div style="text-align: center;"><a href="index.php?'.$menu->get_complete().'&ajaxbox=false">Jetzt deaktivieren</a>';
}
?>