function getTranscripts($room)
{
    // include files
    include getDocPath() . "includes/session.php";
    include getDocPath() . "includes/db.php";
    include getDocPath() . "includes/config.php";
    include getDocPath() . "lang/" . $_SESSION['lang'];
    // check room id is numeric
    if (!is_numeric($room)) {
        return "Invalid RoomID";
        die;
    }
    // check active session
    if (!$_SESSION['username']) {
        return C_LANG47;
        die;
    }
    // get user blocked list
    $tmp = mysql_query("\n\t\t\t\tSELECT blocked   \n\t\t\t\tFROM prochatrooms_users \n\t\t\t\tWHERE username = '******'username'] . "'\n\t\t\t\t") or die(mysql_error());
    while ($i = mysql_fetch_array($tmp)) {
        $blocked = explode('|', $i['blocked']);
    }
    $blocked = implode(',', $blocked);
    $blocked = substr($blocked, 1, -1);
    $blocked = str_replace(",,", ",", $blocked);
    if ($blocked) {
        $incBlocked = "AND uid NOT IN (" . $blocked . ")";
    }
    // get transcripts
    $tmp = mysql_query("\n\t\t\t\tSELECT messtime, room, username , tousername, message   \n\t\t\t\tFROM prochatrooms_message\n\t\t\t\tWHERE id >= '" . $_SESSION['transcriptsID'] . "'\n\t\t\t\tAND room = '" . makeSafe($room) . "'\n\t\t\t\t" . $incBlocked . " \n\t\t\t\t") or die(mysql_error());
    $html = "<div class='roomheader'>";
    $html .= "<div class='header' style='float:left;'>" . C_LANG48 . "</div>";
    $html .= "<div class='header' style='float:right; cursor:pointer;' onclick=\"parent.closeMdiv('viewTranscripts');\"><img src='images/close.gif'></div>";
    $html .= "</div>";
    $html .= "<br>";
    $html .= "<table class='table' width='100%'>";
    $html .= "<tr class='header'><td>" . C_LANG49 . "</td><td>" . C_LANG50 . "</td><td>" . C_LANG51 . "</td><td>" . C_LANG52 . "</td><td>" . C_LANG53 . "</td></tr>";
    while ($i = mysql_fetch_array($tmp)) {
        if (!invisibleAdmins($i['username'])) {
            if ($i['tousername'] == '' || $i['tousername'] == $_SESSION['username']) {
                // explode message
                $i['message'] = explode("|", urldecode($i['message']));
                // format message
                $i['message'][4] = str_replace("[u]", "", $i['message'][4]);
                $i['message'][4] = str_replace("[/u]", "", $i['message'][4]);
                $i['message'][4] = str_replace("[i]", "", $i['message'][4]);
                $i['message'][4] = str_replace("[/i]", "", $i['message'][4]);
                $i['message'][4] = str_replace("[b]", "", $i['message'][4]);
                $i['message'][4] = str_replace("[/b]", "", $i['message'][4]);
                $i['message'][4] = str_replace("[[", "<", $i['message'][4]);
                $i['message'][4] = str_replace("]]", ">", $i['message'][4]);
                $message = "<span style=\"color:" . $i['message'][1] . ";font-size:" . $i['message'][2] . ";font-family:" . $i['message'][3] . ";\">" . html_entity_decode(stripslashes($i['message'][4])) . "</span>";
                // add <pre> if required
                // used for formatting multi-line messages.
                if ($i['message'][6] == '1') {
                    $message = "<pre>" . $message . "</pre>";
                }
                // if receiver is empty
                if (!$i['tousername']) {
                    $i['tousername'] = '******';
                }
                // final output
                $html .= "<tr class='row' valign='top'><td>" . date("H:i:s", $i['messtime']) . "</td><td align='center'>" . urldecode($i['room']) . "</td><td>" . urldecode($i['username']) . "</td><td>" . urldecode($i['tousername']) . "</td><td>" . $message . "</td></tr>";
            }
        }
    }
    $html .= "</table>";
    return $html;
}
* get users from database
* 
*/
// single room
$singleRoom = "";
if ($_REQUEST['s']) {
    $singleRoom = "AND room = '" . makeSafe($_GET['roomID']) . "'";
}
// get users within last 5 mins
$onlineTime = getTime() - 300;
// check user activity
$offlineTime = getTime() - $CONFIG['activeTimeout'];
$tmp = mysql_query("\n\tSELECT id, username, userid, prevroom, room, avatar, webcam, active, online, status, watching, eCredits, guest, lastActive, userIP \n\tFROM prochatrooms_users \n\tWHERE username != '' \n\tAND active > '" . $onlineTime . "'\n\t" . $singleRoom . "\n\tGROUP BY room, username ASC\n\t") or die(mysql_error());
while ($i = mysql_fetch_array($tmp)) {
    $showAllUsers = 1;
    if (invisibleAdmins($i['username'])) {
        $showAllUsers = 0;
    }
    if ($showAllUsers == 1) {
        $iAdmin = 0;
        if (getAdmin($i['username'])) {
            $iAdmin = 1;
        }
        $iModerator = 0;
        if (getModerator($i['username'])) {
            $iModerator = 1;
        }
        $iSpeaker = 0;
        if (getSpeaker($i['username'])) {
            $iSpeaker = 1;
        }