Пример #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";
             }
Пример #2
0
* @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';
$load_user = '******';
require_once "config_lite.php";
require_once "content_process.php";
if ($user["user_access"] == 4) {
    $target = $mysqli->real_escape_string(trim($_GET['target']));
    $hunter = $user["user_name"];
    $log = $mysqli->query("SELECT * FROM ( SELECT * FROM `private` WHERE  `hunter` = '{$hunter}' AND `target` = '{$target}'  OR `hunter` = '{$target}' AND `target` = '{$hunter}' ORDER BY `id` DESC LIMIT 20) AS log ORDER BY `time` ASC");
    $mysqli->query("UPDATE `private` SET `status` = 1 WHERE `hunter` = '{$target}' AND `target` = '{$hunter}'");
    if ($log->num_rows > 0) {
        while ($chat = $log->fetch_assoc()) {
            $message = emoprocess($chat['message']);
            $ptime = date("m/j G:i", $chat['time']);
            $message = emoticon(linking($message, $icon_set));
            if ($chat['hunter'] == $user['user_name']) {
                echo "<li class=\"hunter_private\"><p>{$message}</p><p class=\"ptime\">{$ptime}</p></li>\n";
            } else {
                echo "<li class=\"target_private\"><p>{$message}</p><p class=\"ptime2\">{$ptime}</p></li>\n";
            }
        }
    } else {
        echo "<li>{$emptyprivate}</li>";
    }
} else {
    echo "<li>{$lang_error}</li>";
}
Пример #3
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>";