Hello,
I've integrated freichat and it's work perfectly.
Now I would like the administrator to write in red and the others in black
I've test this but i don't work perfectly.
Thanks
$db = new Db();
$db->query('SELECT group_id FROM pun_users WHERE username="'.$login.'"');
$role = $db->field();
$db->close();
if($role=="1"){
$color = "#F7230C";
echo'<link rel="stylesheet" href="http://www.XXX.com/fr/game/tchat/client/jquery/freichat_themes/freichatcssadmin.php" type="text/css">';
} else {
$color = "#000000";
echo'<link rel="stylesheet" href="http://www.XXX.com/fr/game/tchat/client/jquery/freichat_themes/freichatcss.php" type="text/css">';
}
if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){
if(is_file("/home/XXX/public_html/fr/game/tchat/hardcode.php")){
require "/home/XXX/public_html/fr/game/tchat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not
found!');</script>";
}
return 0;
}
}
?>
<script type="text/javascript" language="javascipt" src="http://XXXX/fr/game/tchat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
Hello,
I've integrated freichat and it's work perfectly.
Now I would like the administrator to write in red and the others in black
I've test this but i don't work perfectly.
Thanks
````
$db = new Db();
$db->query('SELECT group_id FROM pun_users WHERE username="'.$login.'"');
$role = $db->field();
$db->close();
if($role=="1"){
$color = "#F7230C";
echo'<link rel="stylesheet" href="http://www.XXX.com/fr/game/tchat/client/jquery/freichat_themes/freichatcssadmin.php" type="text/css">';
} else {
$color = "#000000";
echo'<link rel="stylesheet" href="http://www.XXX.com/fr/game/tchat/client/jquery/freichat_themes/freichatcss.php" type="text/css">';
}
if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){
if(is_file("/home/XXX/public_html/fr/game/tchat/hardcode.php")){
require "/home/XXX/public_html/fr/game/tchat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not
found!');</script>";
}
return 0;
}
}
?>
<script type="text/javascript" language="javascipt" src="http://XXXX/fr/game/tchat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
````