Ho une block tipo chat in php,però quado lo meto sul potale viene aperto come popup
Codice HTML:
<?php
/************************************************************************/
/* Instant Messaging System */
/* ======================== */
/************************************************************************/
if (!defined('CPG_NUKE')) { exit; }
$content = '';
if (!is_active('IM')) {
$content = 'ERROR';
return trigger_error('IM module is inactive', E_USER_WARNING);
}
//$active = 0; # 1 = Turn On and 0 = Turn Off the Instant Messaging
global $db, $prefix, $user_prefix, $userinfo;
get_lang('IM');
$username = $userinfo['username'];
$result = $db->sql_query("select user_id from ".$user_prefix."_users where username='$username'");
list($user_id) = $db->sql_fetchrow($result);
$result2 = $db->sql_query("select user_im_enable from ".$user_prefix."_users where user_id='$user_id'");
list($user_im_enable) = $db->sql_fetchrow($result2);
$active = $user_im_enable;
if (!$active) {
if (is_user()) {
$content .= "<hr><center><b>"._IMTITLE."</b>";
$content .= "<br>"._YOURIMDISABLED."</center>";
$content .= "<center><font class=\"tiny\"><a href=\"".getlink("IM&action=enable&user_id=$user_id")."\">"._ENABLEYOURIM."</a></font></center>";
}
} else {
[B]# Java Scripts for IM #
#######################
if (is_user()) {
$content .= "<script type=\"text/javascript\">\n";
$content .= "<!--\n\n";
$content .= "window.open('index.php?name=IM&action=Check+IM', 'legend', 'menubar=yes,location=no,resizable=yes,scrollbars=yes,status=no,width=200,height=340')\n";
$content .= "//-->\n";
$content .= "</script>\n";[/B]
$content .= "<hr><center><b>"._IMTITLE."</b>";
$content .= "<br>"._YOURIMACTIVE."</center>";
$content .= "<center><font class=\"tiny\"><a href=\"".getlink("IM&action=disable&user_id=$user_id")."\">"._DISABLEYOURIM."</a></font></center>";
}
}
$db->sql_freeresult($result);
$db->sql_freeresult($result2);
qualcuno sa modificarlo che venga apperto come semplice block e non come un popup
Roni