Exemple #1
0
     if (check_if_guest($fetchid)) {
         $sql = get_guest_details($fetchid);
         $result2 = $db->execute($sql);
         $user = $db->fetch_array($result2);
         $from_name = create_guest_username($user['userid'], $user['guest_name']);
         $from_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
     } else {
         $sql = get_user_details($fetchid);
         $result3 = $db->execute($sql);
         $user = $db->fetch_array($result3);
         $from_name = $user['username'];
         $from_avatar = get_avatar($user['avatar'], $fetchid);
     }
     $fetchid = $row['report_about'];
     if (check_if_guest($fetchid)) {
         $sql = get_guest_details($fetchid);
         $result2 = $db->execute($sql);
         $user = $db->fetch_array($result2);
         $about_name = create_guest_username($user['userid'], $user['guest_name']);
         $about_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
     } else {
         $sql = get_user_details($fetchid);
         $result3 = $db->execute($sql);
         $user = $db->fetch_array($result3);
         $about_name = $user['username'];
         $about_avatar = get_avatar($user['avatar'], $fetchid);
     }
     $reports[] = array('id' => $row['id'], 'from' => $from_name, 'from_pic' => $from_avatar, 'about' => $about_name, 'about_pic' => $about_avatar, 'time' => relative_time($row['report_time']), 'about_num' => $row['COUNT(id)']);
 }
 $result = $db->execute("\n\t\t\tSELECT COUNT(id)\n\t\t\tFROM arrowchat_reports\n\t\t\tWHERE (working_time < (" . time() . " - 600)\n\t\t\t\t\t\tOR working_by = '" . $db->escape_string($userid) . "')\n\t\t\t\tAND completed_time = 0\n\t\t");
 if ($row = $db->fetch_array($result)) {
Exemple #2
0
     $block_chats_unserialized = unserialize($block_chats);
     if (!is_array($block_chats_unserialized)) {
         $block_chats_unserialized = array();
     }
     $i = 0;
     foreach ($block_chats_unserialized as $id) {
         $settings .= "blockList['" . $id . "'] = ['" . $id . "'];";
         $i++;
     }
 }
 // Get all the chat windows and user details that are not in focus
 for ($i = 0; $i < count($unfocus_chat) - 1; $i++) {
     if (!in_array($unfocus_chat[$i], $double_check) and !empty($unfocus_chat[$i])) {
         // Start Receive User Details
         if (check_if_guest($unfocus_chat[$i])) {
             $sql = get_guest_details($unfocus_chat[$i]);
             $result = $db->execute($sql);
         } else {
             $sql = get_user_details($unfocus_chat[$i]);
             $result = $db->execute($sql);
         }
         if ($result and $db->count_select() > 0) {
             $chat = $db->fetch_array($result);
             if (time() - $chat['lastactivity'] < $online_timeout and $chat['status'] != 'invisible' and $chat['status'] != 'offline') {
                 if ($chat['status'] != 'busy' and $chat['status'] != 'away') {
                     $chat['status'] = 'available';
                 }
             } else {
                 $chat['status'] = 'offline';
             }
             if (check_if_guest($unfocus_chat[$i])) {