Ejemplo n.º 1
0
         $avatar_path = 'addons_icon';
     } else {
         if ($chat['post_user'] == $lang_system) {
             $avatar_path = "{$icon_path}";
         } else {
             $avatar_path = 'avatar';
         }
     }
 }
 $uavatar = $chat['avatar'];
 if ($uavatar == '' || $uavatar == 'default_avatar_tumb.png') {
     $uavatar = 'default_avatar_tumb.png';
     $avatar_path = "{$icon_path}";
 }
 $avatar = "<img class=\"avatar_chat\" src=\"{$avatar_path}/{$uavatar}\"/>";
 $message = emoprocess(uprocess($me, $me2, $chat['post_message']));
 if ($setting['allow_link'] == 1) {
     $message = emoticon(linking($message, $icon_set));
 } else {
     $message = emoticon($message);
 }
 if (!strpos(strtolower($user['user_ignore']), strtolower($chat['post_user']))) {
     if ($user['user_rank'] >= 3) {
         if (strtolower($chat['post_target']) == strtolower($user['user_name']) && $chat['post_user'] != "{$lang_system}") {
             $clogs .= "<li class=\"ch_logs {$lcolor} " . $chat['type'] . "\"><div value=\"" . $chat['post_user'] . "\" class=\"my_avatar chat_avatar_wrap\">{$avatar}</div><div class=\"my_text\"><p><span class=\"username " . $chat['post_color'] . "\">" . $chat['post_user'] . "</span> : {$message}<span class=\"private_reply\" value=\"" . $chat['post_user'] . "\">reply</span><span class=\"logs_date\">" . date("M j G:i", $chat['post_date']) . "</span></p></div><div class=\"clear\"></div></li>\n";
         } else {
             if ($chat['type'] == 'me') {
                 $clogs .= "<li class=\"ch_logs {$lcolor} " . $chat['type'] . "\"><div value=\"" . $chat['post_user'] . "\" class=\"my_avatar chat_avatar_wrap\">{$avatar}</div><div class=\"my_text\"><p><span class=\"username " . $chat['post_color'] . "\">" . $chat['post_user'] . "</span> {$message}<span class=\"logs_date\">" . date("M j G:i", $chat['post_date']) . "</span><span class=\"delete_log\" value=\"" . $chat['post_id'] . "\">x</span></p></div><div class=\"clear\"></div></li>\n";
             } else {
                 $clogs .= "<li class=\"ch_logs {$lcolor} " . $chat['type'] . "\"><div value=\"" . $chat['post_user'] . "\" class=\"my_avatar chat_avatar_wrap\">{$avatar}</div><div class=\"my_text\"><p><span class=\"username " . $chat['post_color'] . "\">" . $chat['post_user'] . "</span> : {$message}<span class=\"logs_date\">" . date("M j G:i", $chat['post_date']) . "</span><span class=\"delete_log\" value=\"" . $chat['post_id'] . "\">x</span></p></div><div class=\"clear\"></div></li>\n";
             }
Ejemplo n.º 2
0
* @author www.myboomchat.com
* @copyright 2015
* @terms any use of this script without a legal license is prohibited
* all the content of Boomchat is the propriety of BoomCoding and Cannot be 
* used for another project.
*/
$load_setting = 'timezone, allow_theme, default_theme, language, log_history';
$load_user = '******';
require_once "config_lite.php";
require_once "content_process.php";
$me = $user['user_name'];
$history_lenght = $setting['log_history'];
echo "<ul id=\"ul_history\" class=\"background_box\">";
if ($user['user_access'] == 1 || $user['user_access'] == 4) {
    $user_room = $user['user_roomid'];
    $history = $mysqli->query("SELECT * FROM `chat` WHERE `post_message` LIKE '%{$me}%' AND `post_roomid` = {$user_room} AND `post_user` != '{$me}' OR `post_target` = '{$me}' \r\n\t\tAND `type` = 'private' ORDER BY `post_id` DESC LIMIT 50");
    while ($log = $history->fetch_assoc()) {
        $myself = $user['user_name'];
        $myself2 = strtolower($myself);
        $message = emoprocess(uprocess($myself, $myself2, $log['post_message']));
        $message = emoticon(linking($message, $icon_set));
        if ($log['type'] == 'me') {
            echo "<li class=\"{$log["type"]}\"><span class='datechat'>{$log["post_time"]} </span> <span class='username {$log["post_color"]}'>{$log["post_user"]}</span> {$message}</li>\n";
        } else {
            echo "<li class=\"{$log["type"]}\"><span class='datechat'>{$log["post_time"]} </span> <span class='username {$log["post_color"]}'>{$log["post_user"]}</span> : {$message}</li>\n";
        }
    }
} else {
    echo "{$lang_error}";
}
echo "</ul>";