コード例 #1
0
$_badwords = str_replace("'", "\\'", $_badwords);
echo "var badChars = '" . $_badwords . "'; ";
/*
* assign admin status
*
*/
if (isset($_SESSION['adminUser'])) {
    unset($_SESSION['adminUser']);
}
/* 
* user status 
*
*/
echo "var admin = " . getAdmin($_SESSION['username']) . "; ";
echo "var moderator = " . getModerator($_SESSION['username']) . "; ";
echo "var speaker = " . getSpeaker($_SESSION['username']) . "; ";
/* 
* user messages 
*
*/
echo "var mBold = " . $CONFIG['text']['bold'] . "; ";
echo "var mItalic = " . $CONFIG['text']['italic'] . "; ";
echo "var mUnderline = " . $CONFIG['text']['underline'] . "; ";
echo "var textColor = '" . $CONFIG['text']['color'] . "'; ";
echo "var textSize = '" . $CONFIG['text']['size'] . "'; ";
echo "var textFamily = '" . $CONFIG['text']['family'] . "'; ";
/* 
* system messages 
*
*/
echo "var stextColor = '" . $CONFIG['text']['color'] . "'; ";
コード例 #2
0
 if ($_POST['umessage'] == 'SILENCE' && (getAdmin($_SESSION['username']) != '1' && getRoomOwner($_SESSION['username']) != '1' && getModerator($_SESSION['username']) != '1')) {
     die("incorrect permissions");
 }
 // prevent admins from being silenced or kicked
 if (($_POST['umessage'] == 'SILENCE' || $_POST['umessage'] == 'KICK') && getAdmin($_POST['toname'])) {
     die("incorrect permissions");
 }
 // if public webcam view, add stream id
 if ($_POST['umessage'] == 'WEBCAM_ACCEPT') {
     $_POST['umessage'] = 'WEBCAM_ACCEPT||' . $_SESSION['myStreamID'];
 }
 // send message
 $chatMessTableName = "prochatrooms_message";
 if ($CONFIG['moderatedChatPlugin'] && moderatedChat()) {
     $chatMessTableName = "prochatrooms_moderated";
     if (getAdmin($_SESSION['username']) || getModerator($_SESSION['username']) || getSpeaker($_SESSION['username'])) {
         $chatMessTableName = "prochatrooms_message";
     }
 }
 if (!file_exists("../sounds/" . $_POST['usfx'])) {
     $_POST['usfx'] = "beep_high.mp3";
 }
 // add message to db
 // message = userAvatar+"|"+textColor+"|"+textSize+"|"+textFamily+"|"+message+"|"+iRC+"|"+addLineBreaks;
 // runs some pre checks for message
 // if any fail, DONT submit data, data is invalid
 $checkMessage = explode("|", $_POST['umessage']);
 if ($checkMessage[4]) {
     // is avatar included, does it exist?
     if ($checkMessage[0] != "../avatars/webcam.gif") {
         $checkMessage[0] = str_replace("../", "", $checkMessage[0]);
コード例 #3
0
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;
        }
        $i['userid'] = empty($i['userid']) ? "0" : $i['userid'];
        $i['room'] = empty($i['room']) ? "0" : $i['room'];
        $xml .= '<userlist>';
        $xml .= '<id>' . $i['id'] . '</id>';
        $xml .= '<userid>' . stripslashes($i['userid']) . '</userid>';
        $xml .= '<username>' . stripslashes($i['username']) . '</username>';
        $xml .= '<avatar>' . stripslashes($i['avatar']) . '</avatar>';
        $xml .= '<webcam>' . $i['webcam'] . '</webcam>';
        $xml .= '<room>' . $i['room'] . '</room>';
        $xml .= '<prevroom>' . $i['prevroom'] . '</prevroom>';
        $xml .= '<admin>' . $iAdmin . '</admin>';
        $xml .= '<moderator>' . $iModerator . '</moderator>';
        $xml .= '<speaker>' . $iSpeaker . '</speaker>';