$DbLink = new DB(); $DbLink->query("SELECT perms,rooms FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1"); if ($DbLink->num_rows() > 0) { list($pow_perms, $pow_rooms) = $DbLink->next_record(); $DbLink->clean_results(); } // Define what can see the current user: // - the whole profile including e-mail and IP address if he is admin or moderator of the current room // if this room is one of the default rooms; // - e-mail only if the registered user accepted this to be displayed and no IP // Define what can see the current user: // - the whole profile including e-mail and IP address if he is admin or moderator of the current room // if this room is one of the default rooms; if ($status == "a" || $status == "t") { $power = "all"; } elseif ($status == "m" && (room_in(stripslashes($R), $DefaultChatRooms, $Charset) || room_in("*", $pow_rooms, $Charset) || room_in(stripslashes($R), $pow_rooms, $Charset))) { $power = "medium"; } else { $power = "weak"; } $DbLink->query("SELECT latin1,firstname,lastname,country,website,email,showemail,perms,rooms,ip,gender,picture,description,favlink,favlink1,slang,colorname,avatar,reg_time,last_login,login_counter,use_gravatar,birthday,show_bday,show_age,country_code,country_name FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1"); list($Latin1, $firstname, $lastname, $country, $website, $email, $showemail, $perms, $rooms, $ip, $gender, $picture, $description, $favlink, $favlink1, $slang, $colorname, $avatar, $reg_time, $last_login, $login_counter, $use_gravatar, $birthday, $show_bday, $show_age, $COUNTRY_CODE, $COUNTRY_NAME) = $DbLink->next_record(); if ($birthday && $birthday != "" && $birthday != "0000-00-00") { $my_dobtime = strtotime($birthday); } else { $my_dobtime = 0; } $DbLink->clean_results(); $DbLink->close(); // ** Get the status of the users $tag_open = "<I>";
{ if (typeof(window.parent.leaveChat) != 'undefined') window.parent.leaveChat = true; window.parent.frames['loader'].close(); }; window.parent.window.location = '<?php echo "{$From}?Ver={$Ver}&L={$L}&U=" . stripslashes($U) . "&O={$O}&ST={$ST}&NT={$NT}&E=" . urlencode(stripslashes($R)) . "&EN={$T}&BT=1"; ?> '; // --> </SCRIPT> <?php exit; } } // ** Ensures the user has no restrictions to the room he chooses to enter, create or join - Rooms Restriction mod by Ciprian if ($join_room == "*" || $perms == "admin" || $perms == "topmod" || $perms == "moderator" && (room_in(stripslashes($R), $rooms, $Charset) || room_in("*", $rooms, $Charset))) { $restriction = 0; } elseif ($R == ROOM1 && $EN_ROOM1 && $RES_ROOM1 && $join_room != "ROOM1") { $restriction = 1; } elseif ($R == ROOM2 && $EN_ROOM2 && $RES_ROOM2 && $join_room != "ROOM2") { $restriction = 1; } elseif ($R == ROOM3 && $EN_ROOM3 && $RES_ROOM3 && $join_room != "ROOM3") { $restriction = 1; } elseif ($R == ROOM4 && $EN_ROOM4 && $RES_ROOM4 && $join_room != "ROOM4") { $restriction = 1; } elseif ($R == ROOM5 && $EN_ROOM5 && $RES_ROOM5 && $join_room != "ROOM5") { $restriction = 1; } if ($restriction) { $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ('" . $m_type . "', '" . $m_room . "', 'SYS exit', '', " . time() . ", '', 'sprintf(L_RESTRICTED_ROM, \"{$U}\")', '', '')"); if (C_EN_STATS) {
list($BanishedFromRooms, $Until, $Reason) = $DbLink->next_record(); $DbLink->clean_results(); $BanishedFromRooms = addslashes($BanishedFromRooms); // Is the IP banished from the room user wants to enter in ? if ($BanishedFromRooms == "*") { $IsBanished = true; } elseif (isset($R3) && $R3 != "") { if (room_in($R3, $BanishedFromRooms, $Charset)) { $IsBanished = true; } } elseif (isset($R2) && $R2 != "") { if (room_in($R2, $BanishedFromRooms, $Charset)) { $IsBanished = true; } } elseif (isset($R1) && $R1 != "") { if (room_in($R1, $BanishedFromRooms, $Charset)) { $IsBanished = true; } } elseif (isset($R0) && $R0 != "") { if (room_in($R0, $BanishedFromRooms, $Charset)) { $IsBanished = true; } } // Add the user to the banished table when necessary if ($IsBanished) { $DbLink->query("INSERT INTO " . C_BAN_TBL . " VALUES ('{$U}', '{$Latin1}', '{$IP}', '{$BanishedFromRooms}', '{$Until}', '{$Reason}')"); } } else { $DbLink->clean_results(); } }
list($password, $perms, $rooms) = $DbLink->next_record(); $DbLink->clean_results(); if ($password != $PWD_Hash || $perms != "moderator" && $perms != "admin" && $perms != "topmod" || $perms == "moderator" && (!room_in(stripslashes($R), $rooms, $Charset) && !room_in("*", $rooms, $Charset))) { $Error = L_NO_MODERATOR; } else { // Ensure the user to be promoted is a registered one $DbLink->query("SELECT latin1,perms,rooms FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1"); if ($DbLink->num_rows() == 0) { $Error = sprintf(L_NONREG_USER, stripslashes($UU)); $DbLink->clean_results(); } else { list($Latin1_UU, $perms, $rooms) = $DbLink->next_record(); $DbLink->clean_results(); // Promote the user if is not already moderator for the current room or admin if ($perms == "admin" || $perms == "topmod") { $Error = sprintf(L_ADMIN, stripslashes($UU)); } elseif (!room_in($R, addslashes($rooms), $Charset) && !room_in("*", addslashes($rooms), $Charset)) { $rooms .= stripslashes($rooms == "" ? $R : ",{$R}"); $DbLink->query("UPDATE " . C_REG_TBL . " SET perms='moderator', rooms='" . addslashes($rooms) . "' WHERE username='******'"); $DbLink->query("UPDATE " . C_USR_TBL . " SET status='m' WHERE username='******'"); $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS promote', '{$Latin1}', " . time() . ", '', 'sprintf(L_MODERATOR, \"" . special_char($UU, $Latin1_UU) . "\")', '', '')"); $IsCommand = true; $RefreshMessages = true; $CleanUsrTbl = 1; } else { $Error = sprintf(L_IS_MODERATOR, stripslashes($UU)); } } } } }
$Error = sprintf(L_NONREG_USER, stripslashes($UU)); $DbLink->clean_results(); } else { list($Latin1_UU, $perms, $rooms) = $DbLink->next_record(); $DbLink->clean_results(); // Demote the user if is not already an ordinary user for the current room or admin if ($perms == "admin" && $perms == "topmod") { $Error = sprintf(L_ERR_IS_ADMIN, stripslashes($UU)); } elseif ($perms == "moderator" && $Cmd[2] == "* ") { $DbLink->query("UPDATE " . C_REG_TBL . " SET perms='user', rooms='' WHERE username='******'"); $DbLink->query("UPDATE " . C_USR_TBL . " SET status='r' WHERE username='******'"); $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '*', 'SYS demote', '{$Latin1}', " . time() . ", '', 'sprintf(L_IS_NO_MOD_ALL, \"" . special_char($UU, $Latin1_UU) . "\")', '', '')"); $IsCommand = true; $RefreshMessages = true; $CleanUsrTbl = 1; } elseif ($perms == "moderator" && (room_in($R, addslashes($rooms), $Charset) || room_in("*", addslashes($rooms), $Charset))) { $rooms_new .= $Cmd[2] == "* " ? $rooms = "" : str_replace($R, "", $rooms); if ($rooms_new == "" || $Cmd[2] == "* ") { $DbLink->query("UPDATE " . C_REG_TBL . " SET perms='user', rooms='" . addslashes($rooms_new) . "' WHERE username='******'"); } else { # $rooms_new_clean .= str_replace(",,", ",", ereg_replace("^,|,$","", $rooms_new)); $rooms_new_clean .= str_replace(",,", ",", preg_replace("/^,|,\$/", "", $rooms_new)); $DbLink->query("UPDATE " . C_REG_TBL . " SET rooms='" . addslashes($rooms_new_clean) . "' WHERE username='******'"); } $DbLink->query("UPDATE " . C_USR_TBL . " SET status='r' WHERE username='******' AND room='{$R}'"); $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS demote', '{$Latin1}', " . time() . ", '', 'sprintf(L_ADM_1, \"" . special_char($UU, $Latin1_UU) . "\")', '', '')"); $IsCommand = true; $RefreshMessages = true; $CleanUsrTbl = 1; } else { $Error = sprintf(L_IS_NO_MODERATOR, stripslashes($UU));
for (reset($DelRooms); $room = current($DelRooms); next($DelRooms)) { // Kicks users that are in the room $DbLink->query("UPDATE " . C_USR_TBL . " SET status='d' WHERE room='{$room}'"); $DbLink->query("SELECT COUNT(*) FROM " . C_USR_TBL . " WHERE room='{$room}'"); list($anybody) = $DbLink->next_record(); $DbLink->clean_results(); $i = time() + 20; // let the time to users to be 'kicked' (max=20 sec) while ($anybody != 0 && time() < $i) { $DbLink->query("SELECT COUNT(*) FROM " . C_USR_TBL . " WHERE room='{$room}'"); list($anybody) = $DbLink->next_record(); $DbLink->clean_results(); sleep(2); } // Remove permissions for that room when it's not a default one (define in config.lib.php) if (!room_in(stripslashes($room), $DefaultChatRooms)) { $UpdLink = new DB(); $DbLink->query("SELECT username,rooms FROM " . C_REG_TBL . " WHERE perms='moderator'"); while (list($mod_un, $mod_rooms) = $DbLink->next_record()) { $changed = false; $roomTab = explode(",", $mod_rooms); for ($i = 0; $i < count($roomTab); $i++) { if (strcasecmp(stripslashes($room), $roomTab[$i]) == 0) { $roomTab[$i] = ""; $changed = true; break; } } if ($changed) { $mod_rooms = str_replace(",,", ",", ereg_replace("^,|,\$", "", implode(",", $roomTab))); $UpdLink->query("UPDATE " . C_REG_TBL . " SET rooms='" . addslashes($mod_rooms) . "' WHERE username='******'");
# $diff_rooms = str_replace(",,",",",ereg_replace("^,|,$","",implode(",",$diff_rooms_Tab))); $diff_rooms = str_replace(",,", ",", preg_replace("/^,|,\$/", "", implode(",", $diff_rooms_Tab))); } unset($diff_rooms_Tab); } // Send a message to the user if he chats into one of the 'diff' rooms if (room_in(addslashes($room), $diff_rooms, $Charset) || room_in("*", $rrr, $Charset) || room_in("*", $diff_rooms, $Charset) || ($ppp == 'admin' || $old_ppp == 'admin') || ($ppp == 'topmod' || $old_ppp == 'topmod')) { if ($ppp == 'admin') { $status = "a"; $messagead = "sprintf(L_ADM_3, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } elseif ($ppp == 'topmod') { $status = "t"; if ($old_ppp != 'admin') { $messagead = "sprintf(L_ADM_3, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } } elseif ($ppp == 'moderator' && (room_in(addslashes($room), $rrr, $Charset) || room_in("*", $rrr, $Charset))) { $status = "m"; $message = "sprintf(L_MODERATOR, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; if ($old_ppp == 'admin' || $old_ppp == 'topmod') { $messagead = "sprintf(L_ADM_4, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } } elseif ($ppp == 'user') { $status = "r"; if ($old_ppp == 'moderator') { $message = "sprintf(L_ADM_1, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } if ($old_ppp == 'admin' || $old_ppp == 'topmod') { $messagead = "sprintf(L_ADM_4, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } } else { $status = "r";
for (reset($DelRooms); $room = current($DelRooms); next($DelRooms)) { // Kicks users that are in the room $DbLink->query("UPDATE " . C_USR_TBL . " SET status='d' WHERE room='{$room}'"); $DbLink->query("SELECT COUNT(*) FROM " . C_USR_TBL . " WHERE room='{$room}'"); list($anybody) = $DbLink->next_record(); $DbLink->clean_results(); $i = time() + 20; // let the time to users to be 'kicked' (max=20 sec) while ($anybody != 0 && time() < $i) { $DbLink->query("SELECT COUNT(*) FROM " . C_USR_TBL . " WHERE room='{$room}'"); list($anybody) = $DbLink->next_record(); $DbLink->clean_results(); sleep(2); } // Remove permissions for that room when it's not a default one (define in config.lib.php) if (!room_in(stripslashes($room), $DefaultChatRooms, $Charset)) { $UpdLink = new DB(); $DbLink->query("SELECT username,rooms FROM " . C_REG_TBL . " WHERE perms='moderator'"); while (list($mod_un, $mod_rooms) = $DbLink->next_record()) { $changed = false; $roomTab = explode(",", $mod_rooms); for ($i = 0; $i < count($roomTab); $i++) { if (strcasecmp(mb_convert_case(stripslashes($room), MB_CASE_LOWER, $Charset), mb_convert_case($roomTab[$i], MB_CASE_LOWER, $Charset)) == 0) { $roomTab[$i] = ""; $changed = true; break; } } if ($changed) { # $mod_rooms = str_replace(",,",",",ereg_replace("^,|,$","",implode(",",$roomTab))); $mod_rooms = str_replace(",,", ",", preg_replace("/^,|,\$/", "", implode(",", $roomTab)));
continue; } if (!room_in($room2Check, $old_rrr)) { $diff_rooms_Tab[] = $room2Check; } } unset($old_rooms_Tab); unset($new_rooms_Tab); if (count($diff_rooms_Tab) > 0) { $diff_rooms = str_replace(",,", ",", ereg_replace("^,|,\$", "", implode(",", $diff_rooms_Tab))); } unset($diff_rooms_Tab); } // Send a message to the user if he chats into one of the 'diff' rooms if (room_in(addslashes($room), $diff_rooms)) { if ($ppp == 'moderator' && room_in(addslashes($room), $rrr)) { $status = "m"; $message = "sprintf(L_MODERATOR, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } else { $status = "r"; $message = "sprintf(L_ADM_1, \"" . addslashes(htmlspecialchars(stripslashes($uuu))) . "\")"; } $DbLink->query("UPDATE " . C_USR_TBL . " SET status='{$status}' WHERE username='******'"); $DbLink->query("SELECT type FROM " . C_MSG_TBL . " WHERE room='" . addslashes($room) . "' LIMIT 1"); list($type) = $DbLink->next_record(); $DbLink->clean_results(); $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ('{$type}', '" . addslashes($room) . "', 'SYS promote', '', " . time() . ", '', '{$message}')"); } } else { $DbLink->clean_results(); }
if (strcasecmp(mb_convert_case($what, MB_CASE_LOWER, $Charset), mb_convert_case($room_name, MB_CASE_LOWER, $Charset)) == 0) { return true; } } return false; } $DbLink = new DB(); // Ensure the current user is moderator for the current room or admin. $DbLink->query("SELECT password,perms,rooms FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1"); if ($DbLink->num_rows() == 0) { $Error = L_NO_MODERATOR; $DbLink->clean_results(); } list($password, $perms, $rooms) = $DbLink->next_record(); $DbLink->clean_results(); if ($password != $PWD_Hash || $perms != "moderator" && $perms != "admin" && $perms != "topmod" || $perms == "moderator" && (!room_in(stripslashes($R), $rooms, $Charset) && !room_in("*", $rooms, $Charset))) { $Error = L_NO_MODERATOR; } else { // Define an additional condition for moderators so they can only kick an user from their current room $Query4Moder = $perms != "admin" && $perms != "topmod" ? "room='{$R}' AND " : ""; // Ensure the user to be kicked is logged in (into the current room for moderators) $DbLink->query("SELECT status FROM " . C_USR_TBL . " WHERE " . $Query4Moder . "username='******' LIMIT 1"); if ($DbLink->num_rows() == 0) { $DbLink->clean_results(); $Error = sprintf(L_NONEXIST_USER, stripslashes($U)); } else { list($status) = $DbLink->next_record(); $DbLink->clean_results(); // Ensure the user to be kicked is not a more powerfull user (admin>moderator) if ($status == "a" || $status == "t" || $status == "m" && $perms != "admin" && $perms != "topmod") { global $toppath;
} // Define the user status to be put in the users table if necessary. Skipped when the // frameset is reloaded because of the NN4+ resize bug. if (!isset($Reload) || $Reload != "NNResize") { if (!isset($perms)) { $perms = isset($reguser) && $reguser ? "" : "noreg"; } switch ($perms) { case 'admin': $status = "a"; break; case 'topmod': $status = "t"; break; case 'moderator': $status = room_in(stripslashes($R), $rooms, $Charset) || room_in("*", $rooms, $Charset) ? "m" : "r"; break; case 'noreg': $status = "u"; break; default: $status = "r"; } } // Color Input Box mod by Ciprian - it will add the status to the curent cookie for the color_popup setcookie("CookieStatus", $status, time() + 60 * 60 * 24 * 365); // cookie expires in one year // Udpates the IP address, GeoIP country codes and the last login time of the user in the registered users table if necessary if (isset($reguser) && $reguser) { $DbLink->query("UPDATE " . C_REG_TBL . " SET last_login='******', ip='{$IP}', country_code='{$COUNTRY_CODE}', country_name='{$COUNTRY_NAME}' WHERE username='******'"); }
function layout($Err, $U, $R, $T, $C, $status, $RemMe) { global $DbLink; global $ChatPath, $From, $Action, $L, $RES, $Ver; global $Charset, $CellAlign, $Align, $DisplayFontMsg, $FontPack, $FontName; global $AvailableLanguages; global $DefaultChatRooms, $DefaultDispChatRooms; global $DefaultPrivateRooms; if ($Err) { global $Error; } require "{$ChatPath}search.php"; $show_search = !C_SEARCH_PAID; $show_donation = !C_SUPPORT_PAID; if (!isset($Ver) || $Ver == "") { $Ver = "H"; } /* UNDER DEVELOPMENT for scheduling chat hours - already in admin // Include the schedule library include("./${ChatPath}lib/schedule.lib.php"); echo($open_dly." | ".$open_sun." | ".$sched_sun." | ".$daynow." | ".$datenow." | ".$closed." | ".$timenow); */ if (check_internet_connection()) { ?> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo str_replace("sr_CS", "sr_RS", str_replace("es_AR", "es_ES", L_LANG)); ?> /all.js#xfbml=1&appId=49226597181"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <?php } ?> <TABLE ALIGN="center" CELLPADDING=5 CLASS="ChatBody"> <TR> <TD CLASS="ChatBody"> <CENTER> <FORM ACTION="<?php echo "{$Action}"; ?> " METHOD="POST" AUTOCOMPLETE="" NAME="Params" onSubmit="defineVerField(); return isCookieEnabled();"> <SPAN CLASS="ChatTitle"><?php if (C_SHOW_LOGO) { echo APP_LOGO; } ?> <br /><?php echo C_CHAT_NAME != "" ? C_CHAT_NAME . "<br /><SPAN CLASS=ChatP3><SPAN dir=\"LTR\">- " . APP_NAME . " (" . APP_VERSION . APP_MINOR . ") -</SPAN>" : "<SPAN dir=\"LTR\">" . APP_NAME . " (" . APP_VERSION . APP_MINOR . ")"; ?> </SPAN></SPAN> <?php // Msg for translations with no real iso code if (isset($FontPack) && $FontPack != "" && file_exists($ChatPath . "localization/{$L}/{$FontPack}")) { if (!isset($Error) && $DisplayFontMsg) { echo "<P CLASS=\"ChatError\">This translation of " . APP_NAME . " requires <A HREF=\"{$ChatPath}localization/{$L}/{$FontPack}\" CLASS=\"ChatFonts\" title=\"" . str_replace('"', '', $FontName) . "\">these font faces</A></P>"; } } if (C_SHOW_TUT) { ?> <P> <A HREF="<?php echo $ChatPath; ?> tutorial_popup.php?<?php echo "L={$L}&Ver={$Ver}"; ?> " onClick="tutorial_popup(); return false" CLASS="ChatLink" TARGET="_blank" onMouseOver="window.status='<?php echo L_TUTORIAL; ?> .'; return true;" title="<?php echo L_TUTORIAL; ?> "><?php echo L_TUTORIAL; ?> </A> </P> <?php } ?> <P CLASS="ChatP1"> <?php if (C_MSG_DEL == "1") { $hours = L_HOUR; } else { $hours = L_HOURS; } if (C_USR_DEL == "1") { $mins = L_MIN; } else { $mins = L_MINS; } echo sprintf(L_WEL_1, C_MSG_DEL, $hours); if (C_CHAT_BOOT) { echo ",<br />" . sprintf(L_WEL_2, C_USR_DEL, $mins); } echo "."; ?> </P> <?php $DefaultRoomFound = 0; // Ghost Control mod by Ciprian $Hide = ""; if (C_HIDE_ADMINS) { $Hide .= " AND (u.status != 'a' OR u.username = '******') AND u.status != 't'"; } if (C_HIDE_MODERS) { $Hide .= " AND u.status !='m'"; } if (C_SPECIAL_GHOSTS != "") { $sghosts = str_replace("username", "u.username", C_SPECIAL_GHOSTS); $Hide .= " AND u.username != " . $sghosts . ""; } if ($DbLink->query("SELECT DISTINCT u.username FROM " . C_USR_TBL . " u, " . C_MSG_TBL . " m WHERE u.room = m.room AND m.type = 1" . $Hide . "")) { $Nb = $DbLink->num_rows(); $link = " <A HREF=\"{$ChatPath}users_popup" . $Ver1 . ".php?From={$From}&L={$L}\" CLASS=\"ChatLink\" onClick=\"users_popup(); return false\" TARGET=\"_blank\" onMouseOver=\"window.status='" . sprintf(L_CLICK, L_LINKS_11) . ".'; return true;\" title='" . sprintf(L_CLICK, L_LINKS_11) . "'>"; echo "<P CLASS=\"ChatP1\">" . L_CUR_1 . " " . ($Nb != 1 ? L_CUR_1a . " " . $link . $Nb . " " . L_USERS . "</A>" : L_CUR_1b . " " . $link . $Nb . " " . L_USER . "</A>") . " " . L_CUR_2 . "."; $DbLink->clean_results(); } if (C_CHAT_LURKING && (C_SHOW_LURK_USR || $status == "a" || $status == "t")) { //Timeout to delete Lurkers in Seconds after they left the page $timeout = 15; // Ghost Control mod by Ciprian $Hide1 = ""; $online_users = 0; if (C_HIDE_ADMINS) { $Hide1 .= $Hide1 == "" ? " WHERE status != 'a' AND status != 't'" : " AND status != 'a' AND status != 't'"; } if (C_HIDE_MODERS) { $Hide1 .= $Hide1 == "" ? " WHERE status != 'm'" : " AND status != 'm'"; } if (C_SPECIAL_GHOSTS != "") { $Hide1 .= $Hide1 == "" ? " WHERE username != " . C_SPECIAL_GHOSTS . "" : " AND username != " . C_SPECIAL_GHOSTS . ""; } $DbLink->query("DELETE FROM " . C_LRK_TBL . " WHERE time<'" . (time() - $timeout) . "'"); $DbLink->query("SELECT DISTINCT ip,browser,username FROM " . C_LRK_TBL . $Hide1); $online_users = $DbLink->num_rows(); $lurklink = " <A HREF=\"lurking.php?L={$L}&D=10\" CLASS=\"ChatLink\" TARGET=\"_blank\" onMouseOver=\"window.status='" . L_LURKING_1 . ".'; return true;\" title='" . L_LURKING_1 . "'>"; echo "<br />" . L_CUR_1 . " " . ($online_users != 1 ? L_CUR_1a . $lurklink . $online_users . " " . L_LURKERS . "</A>." : L_CUR_1b . $lurklink . $online_users . " " . L_LURKER . "</A>."); } $copy_break = 0; if (!strstr($search, "9362782527650497") || !isset($search)) { $copy_break = 1; } if ($show_donation) { $pptype = "big"; require "{$ChatPath}lib/support.lib.php"; if ((intval($ppbutton) < 3620000 || intval($ppbutton) > 3627000 && intval($ppbutton) != 7148858 && intval($ppbutton) != 7148805 && (intval($ppbutton) < 7988359 || intval($ppbutton) > 7988406)) && $ppbutton != "KYVK6TQWY4MXJ" && $ppbutton != "QN9TYKJ49BM7S" && $ppbutton != "RJK6MGRQVAJY2" && $ppbutton != "ZCXGTP265VU6S" && $ppbutton != "MGBHACRT5F4RE" && $ppbutton != "6HRWUGAN73NPS" && $ppbutton != "WDA8GUU9GGSTS" && $ppbutton != "T9MP68SK7HBKQ" && $ppbutton != "DBH7XN4YA7A2J" && $ppbutton != "BTHKH33JLGLTN" && $ppbutton != "9HQJX5TAPJ33A" && $ppbutton != "YJD5RVSDH55GA" && $ppbutton != "KLSRD9WFZH984" && $ppbutton != "2K6JTW959U66A" && $ppbutton != "6JNU4L83BSTN2" && $ppbutton != "JW4A2MMTLXYSU" && $ppbutton != "RQ3GHM7HSY95Q" && $ppbutton != "8C5WYJSNYG5BY" && $ppbutton != "DLBFN422X69WG" && $ppbutton != "T2BQZSP33V2KA") { $copy_break = 1; } } ?> </P> <?php if (isset($Error)) { echo "<P CLASS=\"ChatError\">{$Error}</P>"; } ?> <INPUT TYPE="hidden" NAME="Ver" VALUE="<?php echo $Ver; ?> "> <INPUT TYPE="hidden" NAME="Form_Send" VALUE="1"> <INPUT TYPE="hidden" NAME="L" VALUE="<?php echo $L; ?> "> <INPUT TYPE="hidden" NAME="N" VALUE="<?php echo C_MSG_NB; ?> "> <INPUT TYPE="hidden" NAME="D" VALUE="<?php echo C_MSG_REFRESH; ?> "> <TABLE BORDER=0 CELLPADDING=3 CLASS="ChatTable"> <TR CLASS="ChatCell"> <TD ALIGN="CENTER" CLASS="ChatCell"> <TABLE BORDER=0 CLASS="ChatTable"> <?php // Display flags if necessary if (C_MULTI_LANG) { $disp_flags = ""; $i = 0; while (list($key, $name) = each($AvailableLanguages)) { $i++; if ($name == "english" && C_ENGLISH_FORMAT == "US") { if (C_FLAGS_3D) { $flag = "flag_us.gif"; } else { $flag = "flag_us0.gif"; } if (L_ORIG_LANG_ENUS != "L_ORIG_LANG_ENUS") { $FLAG_NAME = L_ORIG_LANG_ENUS . ($name != $L && L_LANG_ENUS != "L_LANG_ENUS" ? "/" . L_LANG_ENUS : ""); } } else { if (C_FLAGS_3D) { $flag = "flag.gif"; } else { $flag = "flag0.gif"; } if ($name == "argentinian_spanish" && L_ORIG_LANG_AR != "L_ORIG_LANG_AR") { $FLAG_NAME = L_ORIG_LANG_AR . ($name != $L && L_LANG_AR != "L_LANG_AR" ? "/" . L_LANG_AR : ""); } elseif ($name == "bulgarian" && L_ORIG_LANG_BG != "L_ORIG_LANG_BG") { $FLAG_NAME = L_ORIG_LANG_BG . ($name != $L && L_LANG_BG != "L_LANG_BG" ? "/" . L_LANG_BG : ""); } elseif ($name == "brazilian_portuguese" && L_ORIG_LANG_BR != "L_ORIG_LANG_BR") { $FLAG_NAME = L_ORIG_LANG_BR . ($name != $L && L_LANG_BR != "L_LANG_BR" ? "/" . L_LANG_BR : ""); } elseif ($name == "catalan" && L_ORIG_LANG_CA != "L_ORIG_LANG_CA") { $FLAG_NAME = L_ORIG_LANG_CA . ($name != $L && L_LANG_CA != "L_LANG_CA" ? "/" . L_LANG_CA : ""); } elseif ($name == "chinese_simplified" && L_ORIG_LANG_CNS != "L_ORIG_LANG_CNS") { $FLAG_NAME = L_ORIG_LANG_CNS . ($name != $L && L_LANG_CNS != "L_LANG_CNS" ? "/" . L_LANG_CNS : ""); } elseif ($name == "chinese_traditional" && L_ORIG_LANG_CNT != "L_ORIG_LANG_CNT") { $FLAG_NAME = L_ORIG_LANG_CNT . ($name != $L && L_LANG_CNT != "L_LANG_CNT" ? "/" . L_LANG_CNT : ""); } elseif ($name == "czech" && L_ORIG_LANG_CZ != "L_ORIG_LANG_CZ") { $FLAG_NAME = L_ORIG_LANG_CZ . ($name != $L && L_LANG_CZ != "L_LANG_CZ" ? "/" . L_LANG_CZ : ""); } elseif ($name == "danish" && L_ORIG_LANG_DA != "L_ORIG_LANG_DA") { $FLAG_NAME = L_ORIG_LANG_DA . ($name != $L && L_LANG_DA != "L_LANG_DA" ? "/" . L_LANG_DA : ""); } elseif ($name == "dutch" && L_ORIG_LANG_NL != "L_ORIG_LANG_NL") { $FLAG_NAME = L_ORIG_LANG_NL . ($name != $L && L_LANG_NL != "L_LANG_NL" ? "/" . L_LANG_NL : ""); } elseif ($name == "english" && L_ORIG_LANG_ENUK != "L_ORIG_LANG_ENUK") { $FLAG_NAME = L_ORIG_LANG_ENUK . ($name != $L && L_LANG_ENUK != "L_LANG_ENUK" ? "/" . L_LANG_ENUK : ""); } elseif ($name == "french" && L_ORIG_LANG_FR != "L_ORIG_LANG_FR") { $FLAG_NAME = L_ORIG_LANG_FR . ($name != $L && L_LANG_FR != "L_LANG_FR" ? "/" . L_LANG_FR : ""); } elseif ($name == "georgian" && L_ORIG_LANG_KA != "L_ORIG_LANG_KA") { $FLAG_NAME = L_ORIG_LANG_KA . ($name != $L && L_LANG_KA != "L_LANG_KA" ? "/" . L_LANG_KA : ""); } elseif ($name == "german" && L_ORIG_LANG_DE != "L_ORIG_LANG_DE") { $FLAG_NAME = L_ORIG_LANG_DE . ($name != $L && L_LANG_DE != "L_LANG_DE" ? "/" . L_LANG_DE : ""); } elseif ($name == "greek" && L_ORIG_LANG_GR != "L_ORIG_LANG_GR") { $FLAG_NAME = L_ORIG_LANG_GR . ($name != $L && L_LANG_GR != "L_LANG_GR" ? "/" . L_LANG_GR : ""); } elseif ($name == "hebrew" && L_ORIG_LANG_HE != "L_ORIG_LANG_HE") { $FLAG_NAME = L_ORIG_LANG_HE . ($name != $L && L_LANG_HE != "L_LANG_HE" ? "/" . L_LANG_HE : ""); } elseif ($name == "hindi" && L_ORIG_LANG_HI != "L_ORIG_LANG_HI") { $FLAG_NAME = L_ORIG_LANG_HI . ($name != $L && L_LANG_HI != "L_LANG_HI" ? "/" . L_LANG_HI : ""); } elseif ($name == "hungarian" && L_ORIG_LANG_HU != "L_ORIG_LANG_HU") { $FLAG_NAME = L_ORIG_LANG_HU . ($name != $L && L_LANG_HU != "L_LANG_HU" ? "/" . L_LANG_HU : ""); } elseif ($name == "indonesian" && L_ORIG_LANG_ID != "L_ORIG_LANG_ID") { $FLAG_NAME = L_ORIG_LANG_ID . ($name != $L && L_LANG_ID != "L_LANG_ID" ? "/" . L_LANG_ID : ""); } elseif ($name == "italian" && L_ORIG_LANG_IT != "L_ORIG_LANG_IT") { $FLAG_NAME = L_ORIG_LANG_IT . ($name != $L && L_LANG_IT != "L_LANG_IT" ? "/" . L_LANG_IT : ""); } elseif ($name == "japanese" && L_ORIG_LANG_JA != "L_ORIG_LANG_JA") { $FLAG_NAME = L_ORIG_LANG_JA . ($name != $L && L_LANG_JA != "L_LANG_JA" ? "/" . L_LANG_JA : ""); } elseif ($name == "nepali" && L_ORIG_LANG_NE != "L_ORIG_LANG_NE") { $FLAG_NAME = L_ORIG_LANG_NE . ($name != $L && L_LANG_NE != "L_LANG_NE" ? "/" . L_LANG_NE : ""); } elseif ($name == "norwegian_bokmal" && L_ORIG_LANG_NB != "L_ORIG_LANG_NB") { $FLAG_NAME = L_ORIG_LANG_NB . ($name != $L && L_LANG_NB != "L_LANG_NB" ? "/" . L_LANG_NB : ""); } elseif ($name == "norwegian_nynorsk" && L_ORIG_LANG_NN != "L_ORIG_LANG_NN") { $FLAG_NAME = L_ORIG_LANG_NN . ($name != $L && L_LANG_NN != "L_LANG_NN" ? "/" . L_LANG_NN : ""); } elseif ($name == "persian" && L_ORIG_LANG_FA != "L_ORIG_LANG_FA") { $FLAG_NAME = L_ORIG_LANG_FA . ($name != $L && L_LANG_FA != "L_LANG_FA" ? "/" . L_LANG_FA : ""); } elseif ($name == "polish" && L_ORIG_LANG_PL != "L_ORIG_LANG_PL") { $FLAG_NAME = L_ORIG_LANG_PL . ($name != $L && L_LANG_PL != "L_LANG_PL" ? "/" . L_LANG_PL : ""); } elseif ($name == "portuguese" && L_ORIG_LANG_PT != "L_ORIG_LANG_PT") { $FLAG_NAME = L_ORIG_LANG_PT . ($name != $L && L_LANG_PT != "L_LANG_PT" ? "/" . L_LANG_PT : ""); } elseif ($name == "romanian" && L_ORIG_LANG_RO != "L_ORIG_LANG_RO") { $FLAG_NAME = L_ORIG_LANG_RO . ($name != $L && L_LANG_RO != "L_LANG_RO" ? "/" . L_LANG_RO : ""); } elseif ($name == "russian" && L_ORIG_LANG_RU != "L_ORIG_LANG_RU") { $FLAG_NAME = L_ORIG_LANG_RU . ($name != $L && L_LANG_RU != "L_LANG_RU" ? "/" . L_LANG_RU : ""); } elseif ($name == "serbian_latin" && L_ORIG_LANG_SRL != "L_ORIG_LANG_SRL") { $FLAG_NAME = L_ORIG_LANG_SRL . ($name != $L && L_LANG_SRL != "L_LANG_SRL" ? "/" . L_LANG_SRL : ""); } elseif ($name == "serbian_cyrillic" && L_ORIG_LANG_SRC != "L_ORIG_LANG_SRC") { $FLAG_NAME = L_ORIG_LANG_SRC . ($name != $L && L_LANG_SRC != "L_LANG_SRC" ? "/" . L_LANG_SRC : ""); } elseif ($name == "slovak" && L_ORIG_LANG_SK != "L_ORIG_LANG_SK") { $FLAG_NAME = L_ORIG_LANG_SK . ($name != $L && L_LANG_SK != "L_LANG_SK" ? "/" . L_LANG_SK : ""); } elseif ($name == "spanish" && L_ORIG_LANG_ES != "L_ORIG_LANG_ES") { $FLAG_NAME = L_ORIG_LANG_ES . ($name != $L && L_LANG_ES != "L_LANG_ES" ? "/" . L_LANG_ES : ""); } elseif ($name == "swedish" && L_ORIG_LANG_SV != "L_ORIG_LANG_SV") { $FLAG_NAME = L_ORIG_LANG_SV . ($name != $L && L_LANG_SV != "L_LANG_SV" ? "/" . L_LANG_SV : ""); } elseif ($name == "thai" && L_ORIG_LANG_TH != "L_ORIG_LANG_TH") { $FLAG_NAME = L_ORIG_LANG_TH . ($name != $L && L_LANG_TH != "L_LANG_TH" ? "/" . L_LANG_TH : ""); } elseif ($name == "turkish" && L_ORIG_LANG_TR != "L_ORIG_LANG_TR") { $FLAG_NAME = L_ORIG_LANG_TR . ($name != $L && L_LANG_TR != "L_LANG_TR" ? "/" . L_LANG_TR : ""); } elseif ($name == "ukrainian" && L_ORIG_LANG_UK != "L_ORIG_LANG_UK") { $FLAG_NAME = L_ORIG_LANG_UK . ($name != $L && L_LANG_UK != "L_LANG_UK" ? "/" . L_LANG_UK : ""); } elseif ($name == "urdu" && L_ORIG_LANG_UR != "L_ORIG_LANG_UR") { $FLAG_NAME = L_ORIG_LANG_UR . ($name != $L && L_LANG_UR != "L_LANG_UR" ? "/" . L_LANG_UR : ""); } elseif ($name == "vietnamese" && L_ORIG_LANG_VI != "L_ORIG_LANG_VI") { $FLAG_NAME = L_ORIG_LANG_VI . ($name != $L && L_LANG_VI != "L_LANG_VI" ? "/" . L_LANG_VI : ""); } elseif ($name == "yoruba" && L_ORIG_LANG_YO != "L_ORIG_LANG_YO") { $FLAG_NAME = L_ORIG_LANG_YO . ($name != $L && L_LANG_YO != "L_LANG_YO" ? "/" . L_LANG_YO : ""); } else { $FLAG_NAME = str_replace("_", " ", $name); $FLAG_NAME = mb_convert_case($FLAG_NAME, MB_CASE_TITLE, $Charset); } } if ($name == $L) { $FLAG_OVER = $FLAG_NAME . " (" . L_SELECTED . ")"; $FLAG_STATUS = $FLAG_OVER; } else { $FLAG_OVER = $FLAG_NAME; $FLAG_STATUS = sprintf(L_SWITCH, $FLAG_NAME); } if ($name != $L) { $disp_flags .= "<A HREF=\"{$Action}?L={$name}\" onMouseOver=\"window.status='" . $FLAG_STATUS . ".'; return true;\" Title=\"" . $FLAG_OVER . "\">"; } $disp_flags .= "<IMG SRC=\"{$ChatPath}localization/{$name}/images/" . $flag . "\" onMouseOver=\"window.status='" . $FLAG_STATUS . ".'; return true;\" BORDER=0 ALT=\"" . $FLAG_OVER . "\" Title=\"" . $FLAG_OVER . "\">"; if ($name != $L) { $disp_flags .= "</A>"; } if ($i % 11 == 0) { $disp_flags .= "<br />"; } else { $disp_flags .= " "; } } unset($AvailableLanguages); ?> <TR CLASS="ChatCell"> <TD COLSPAN=2 ALIGN="CENTER" CLASS="ChatCell"> <SPAN CLASS="ChatFlags"> <?php echo rtrim($disp_flags, ' '); ?> </SPAN> </TD> </TR> <?php } // Horizontal alignement for cells topic $CellAlign = $Align == "right" ? "RIGHT" : "LEFT"; ?> <TR CLASS="ChatCell"> <TH COLSPAN=2 CLASS="ChatTabTitle"><?php echo L_SET_1; ?> </TH> </TR> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_SET_2; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell"> <INPUT TYPE="text" NAME="U" SIZE=11 MAXLENGTH=15 VALUE="<?php echo htmlspecialchars(stripslashes($U)); ?> " CLASS="ChatBox"> </TD> </TR> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_REG_1; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"> <INPUT TYPE="password" NAME="pmc_password" SIZE=11 MAXLENGTH=16 VALUE="<?php echo $RemMe ? $RemMe : ""; ?> " CLASS="ChatBox"> <INPUT TYPE="checkbox" NAME="remember" alt="<?php echo L_SET_19; ?> " title="<?php echo L_SET_19; ?> "<?php echo $RemMe ? " checked" : ""; ?> > <?php if (!C_REQUIRE_REGISTER) { echo " (<U>" . L_REG_7 . "</U>)"; } ?> <br /><A HREF="<?php echo $ChatPath; ?> pass_reset.php?L=<?php echo $L; ?> " CLASS="ChatReg" onClick="reg_popup('pass_reset','<?php echo urlencode(stripslashes($U)); ?> '); return false" TARGET="_blank" onMouseOver="window.status='<?php echo L_PASS_7; ?> .'; return true;" title="<?php echo L_PASS_7; ?> "><?php echo L_PASS_7; ?> </A> </TD> </TR> <TR CLASS="ChatCell"> <TH COLSPAN=2 CLASS="ChatTabTitle"><?php echo L_REG_2; ?> </TH> </TR> <TR CLASS="ChatCell"> <TD ALIGN="center" COLSPAN=2 CLASS="ChatCell"> <?php if (C_REQUIRE_REGISTER && C_ALLOW_REGISTER) { ?> <SPAN CLASS="ChatError"> <?php echo L_REG_49; ?> </SPAN> <br /> <?php } if (C_ALLOW_REGISTER) { ?> <br /> <A HREF="<?php echo $ChatPath; ?> register.php?L=<?php echo $L; ?> " CLASS="ChatReg" onClick="reg_popup('register','<?php echo urlencode(stripslashes($U)); ?> '); return false" TARGET="_blank" onMouseOver="window.status='<?php echo L_REG_3; ?> .'; return true;" title="<?php echo L_REG_3; ?> "><?php echo L_REG_3; ?> </A> | <?php } else { ?> <SPAN CLASS="ChatError"> <?php echo L_REG_50; ?> </SPAN> <br /> <br /> <?php } ?> <A HREF="<?php echo $ChatPath; ?> edituser.php?L=<?php echo $L; ?> " CLASS="ChatReg" onClick="reg_popup('edituser','<?php echo urlencode(stripslashes($U)); ?> '); return false" TARGET="_blank" onMouseOver="window.status='<?php echo L_REG_4; ?> .'; return true;" title="<?php echo L_REG_4; ?> "><?php echo L_REG_4; ?> </A> <?php if (C_SHOW_DEL_PROF != 0) { ?> | <A HREF="<?php echo $ChatPath; ?> deluser.php?L=<?php echo $L; ?> " CLASS="ChatReg" onClick="reg_popup('deluser','<?php echo urlencode(stripslashes($U)); ?> '); return false" TARGET="_blank" onMouseOver="window.status='<?php echo L_REG_5; ?> .'; return true;" title="<?php echo L_REG_5; ?> "><?php echo L_REG_5; ?> </A> <?php } if (C_SHOW_ADMIN != 0) { ?> | <A HREF="<?php echo $ChatPath; ?> admin.php?L=<?php echo $L; ?> &Link=1" CLASS="ChatReg" onClick="reg_popup('admin','<?php echo urlencode(stripslashes($U)); ?> '); return false" TARGET="_blank" onMouseOver="window.status='<?php echo L_REG_35; ?> .'; return true;" title="<?php echo L_REG_35; ?> "><?php echo L_REG_35; ?> </A> <?php } ?> </TD> </TR> <?php if (C_VERSION > 0) { ?> <TR CLASS="ChatCell"> <TD COLSPAN=2 CLASS="ChatCell"> </TD> </TR> <TR CLASS="ChatCell"> <TH COLSPAN=2 CLASS="ChatTabTitle"><?php echo L_SET_5; ?> </TH> </TR> </TABLE> <TABLE BORDER=0 CLASS="ChatTable"> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_SET_6; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell"> <SELECT NAME="R0" CLASS="ChatBox" onChange="reset_R0();"> <OPTION VALUE=""><?php echo L_SET_7; ?> </OPTION> <?php // Display default public rooms in the drop down list $PrevRoom = ""; if ($R != "" && !(isset($RES) && $RES)) { $PrevRoom = urldecode($R); } $DefaultRoomsString = ""; $disp_note = 0; for ($i = 0; $i < count($DefaultChatRooms); $i++) { $tmpRoom = stripslashes($DefaultChatRooms[$i]); $tmpDispRoom = $tmpRoom; if (is_array($DefaultDispChatRooms) && in_array($tmpRoom . " [R]", $DefaultDispChatRooms)) { $res_init = utf8_substr(L_RESTRICTED, 0, 1); $tmpDispRoom .= " [" . $res_init . "]"; $disp_note = 1; } $DefaultRoomsString .= ($DefaultRoomsString == "" ? "" : ",") . $tmpRoom; echo "<OPTION VALUE=\"" . htmlspecialchars($tmpRoom) . "\""; if (strcasecmp(mb_convert_case($tmpRoom, MB_CASE_LOWER, $Charset), mb_convert_case($PrevRoom, MB_CASE_LOWER, $Charset)) == 0) { echo " SELECTED"; $DefaultRoomFound = 1; } echo ">" . $tmpDispRoom . "</OPTION>"; } ?> </SELECT> </TD> </TR> <?php } if (C_VERSION == 2) { $created_rooms = ""; // Display other public rooms in the drop down list $DbLink->query("SELECT DISTINCT room FROM " . C_MSG_TBL . " WHERE type = 1 AND room != 'Offline PMs' AND room != '*' AND username NOT LIKE 'SYS %' ORDER BY room"); while (list($Room) = $DbLink->next_record()) { if (!room_in($Room, $DefaultRoomsString, $Charset)) { $created_rooms .= "<OPTION VALUE=\"" . htmlspecialchars($Room) . "\""; if (strcasecmp(mb_convert_case($Room, MB_CASE_LOWER, $Charset), mb_convert_case($PrevRoom, MB_CASE_LOWER, $Charset)) == 0 && !$DefaultRoomFound) { $created_rooms .= " SELECTED"; $DefaultRoomFound = 1; } $created_rooms .= ">{$Room}</OPTION>"; } } $DbLink->clean_results(); if ($created_rooms != "") { ?> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_SET_8; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell"> <SELECT NAME="R1" CLASS="ChatBox" onChange="reset_R1();"> <OPTION VALUE=""><?php echo L_SET_7; ?> </OPTION> <?php echo $created_rooms; ?> </SELECT> </TD> </TR> <?php } } if (C_VERSION > 0 && C_SHOW_PRIV) { $DefaultPrivateRoomFound = 0; $PrevPrivateRoom = ""; if ($R != "" && !(isset($RES) && $RES)) { $PrevPrivateRoom = urldecode($R); } $DbLink->query("SELECT perms,rooms FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1"); if ($DbLink->num_rows() != 0) { $reguser = $DbLink->num_rows() != 0; } else { $nonreguser = 1; } if ($reguser) { list($perms, $rooms) = $DbLink->next_record(); } $DbLink->clean_results(); if ($DefaultPrivateRooms != NULL) { if ($perms == "admin" || $perms == "topmod") { ?> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_SET_15; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell"> <SELECT NAME="R2" CLASS="ChatBox" onChange="reset_R2();"> <OPTION VALUE=""><?php echo L_SET_7; ?> </OPTION> <?php // Display default private rooms in the drop down list $DefaultPrivateRoomsString = ""; for ($i = 0; $i < count($DefaultPrivateRooms); $i++) { $tmpPrivateRoom = stripslashes($DefaultPrivateRooms[$i]); $DefaultPrivateRoomsString .= ($DefaultPrivateRoomsString == "" ? "" : ",") . $tmpPrivateRoom; echo "<OPTION VALUE=\"" . htmlspecialchars($tmpPrivateRoom) . "\""; if (strcasecmp(mb_convert_case($tmpPrivateRoom, MB_CASE_LOWER, $Charset), mb_convert_case($PrevPrivateRoom, MB_CASE_LOWER, $Charset)) == 0) { echo " SELECTED"; $DefaultPrivateRoomFound = 1; } echo ">" . $tmpPrivateRoom . "</OPTION>"; } ?> </SELECT> </TD> </TR> <?php } elseif ($perms == "moderator" && C_SHOW_PRIV_MOD) { ?> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_SET_15; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell"> <SELECT NAME="R2" CLASS="ChatBox" onChange="reset_R2();"> <OPTION VALUE=""><?php echo L_SET_7; ?> </OPTION> <?php echo "<OPTION VALUE=\"" . htmlspecialchars(ROOM8) . "\""; if (strcasecmp(mb_convert_case(ROOM8, MB_CASE_LOWER, $Charset), mb_convert_case($PrevPrivateRoom, MB_CASE_LOWER, $Charset)) == 0) { echo " SELECTED"; $DefaultPrivateRoomFound = 1; } echo ">" . ROOM8 . "</OPTION>"; echo "<OPTION VALUE=\"" . htmlspecialchars(ROOM9) . "\""; if (strcasecmp(mb_convert_case(ROOM8, MB_CASE_LOWER, $Charset), mb_convert_case($PrevPrivateRoom, MB_CASE_LOWER, $Charset)) == 0) { echo " SELECTED"; $DefaultPrivateRoomFound = 1; } echo ">" . ROOM9 . "</OPTION>"; ?> </SELECT> </TD> </TR> <?php } elseif (C_SHOW_PRIV_USR) { ?> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP"><?php echo L_SET_15; ?> :</TD> <TD VALIGN="TOP" CLASS="ChatCell"> <SELECT NAME="R2" CLASS="ChatBox" onChange="reset_R2();"> <OPTION VALUE=""><?php echo L_SET_7; ?> </OPTION> <?php echo "<OPTION VALUE=\"" . htmlspecialchars(ROOM9) . "\""; if (strcasecmp(ROOM9, $PrevPrivateRoom) == 0) { echo " SELECTED"; $DefaultPrivateRoomFound = 1; } echo ">" . ROOM9 . "</OPTION>"; ?> </SELECT> </TD> </TR> <?php } } } if ($disp_note) { echo "<tr class=\"ChatError\"><td align=right colspan=2><font size=-2>[" . $res_init . "] = " . L_RESTRICTED . ".</font></td></tr>"; } if (C_VERSION == 2) { if (!$T && !$DefaultRoomFound || !$T && !$DefaultPrivateRoomFound) { $T = 1; } ?> <TR CLASS="ChatCell"> <TD ALIGN="<?php echo $CellAlign; ?> " VALIGN="TOP" CLASS="ChatCell" NOWRAP="NOWRAP" COLSPAN=2> <?php echo L_SET_9 . " "; ?> <SELECT NAME="T" CLASS="ChatBox"> <OPTION VALUE="1" <?php if ($T && !$DefaultPrivateRoomFound) { echo "SELECTED"; } ?> <?php if (!$T && $DefaultPrivateRoomFound) { echo "DISABLED"; } ?> ><?php echo L_SET_10; ?> </OPTION> <OPTION VALUE="0" <?php if (!$T && !$DefaultRoomFound || $T && $DefaultPrivateRoomFound) { echo "SELECTED"; } ?> ><?php echo L_SET_11; ?> </OPTION> </SELECT> <?php echo L_SET_12 . ":"; ?> <INPUT TYPE="text" NAME="R3" SIZE=11 MAXLENGTH=14 <?php if (!$DefaultRoomFound && !$DefaultPrivateRoomFound && $R != "" && !$RES) { echo "VALUE=\"" . htmlspecialchars(urldecode($R)) . "\""; } ?> CLASS="ChatBox" onChange="reset_R3();"> </TD> </TR> <?php } if (C_VERSION == 1) { ?> <INPUT TYPE="hidden" NAME="T" VALUE="0" <?php if (!$T && !$DefaultRoomFound || $T && $DefaultPrivateRoomFound) { echo "SELECTED"; } ?> > <?php } ?> </TABLE> <TR CLASS="ChatP2"> <TD align="center"> <?php if (C_REQUIRE_REGISTER) { ?> <div CLASS="ChatError"><?php echo L_ERR_USR_14; ?> </div> <?php } ?> <?php echo L_SET_13 . " "; ?> ... <INPUT TYPE="submit" NAME="submit" VALUE="<?php echo L_SET_14; ?> " CLASS="ChatBox"> <br /><br /><FONT SIZE=-1><?php echo L_SET_18; ?> </FONT><br /> </TD></TR> </TD> </TR> </TABLE> </FORM> <?php if (C_SHOW_INFO) { ?> <FONT COLOR=yellow SIZE=-1> <?php // Info on welcome page about cmds, mods and bot. Edit lib/info.lib.php to add more infos about your chat features if (SET_CMDS) { echo "<span style=\"color:orange\">" . INFO_CMDS . "</span><br />" . CMDS . ".<br />"; } if (SET_MODS) { echo "<span style=\"color:orange\">" . INFO_MODS . "</span><br />" . MODS . ".<br />"; } if (SET_BOT && C_BOT_CONTROL) { $DbLink->query("SELECT Count(*) FROM " . C_USR_TBL . " WHERE username='******' LIMIT 1"); list($botinroom) = $DbLink->next_record(); $DbLink->clean_results(); if ($botinroom != 0) { echo "<span style=\"color:orange\">" . INFO_BOT . "</span> <u>" . C_BOT_NAME . "</u>.<br />"; } } ?> </FONT> <?php } echo "<P>"; if (C_SHOW_COUNTER) { include_once "./{$ChatPath}acounter.php"; $ani_counter = new acounter(); echo $ani_counter->create_output("chat_index"); $INSTALL_DATE = strftime(L_SHORT_DATE, strtotime(C_INSTALL_DATE)); if (stristr(PHP_OS, 'win')) { $INSTALL_DATE = utf_conv(WIN_DEFAULT, $Charset, $INSTALL_DATE); if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) { $INSTALL_DATE = str_replace(" ", "", $INSTALL_DATE); } } ?> <font face=Verdana color=yellow size=1><?php echo sprintf(L_VISITOR_REPORT, $INSTALL_DATE); ?> .</font> <?php echo "</P>"; } ?> <SPAN CLASS="ChatCopy" dir="LTR"> <?php $sflogo = "http://sflogo.sourceforge.net/sflogo.php?group_id=19371&type=10"; ?> © 2000-2005 <a HREF="http://sourceforge.net/projects/phpmychat/" TARGET=_blank CLASS="ChatLink" Title="<?php echo sprintf(L_CLICK, sprintf(L_LINKS_7, "phpMyChat-Plus")); ?> " onMouseOver="window.status='<?php echo sprintf(L_CLICK, sprintf(L_LINKS_7, "phpMyChat-Plus")); ?> .'; return true">The phpHeaven Team</a><br /> © 2005-<?php echo date('Y'); ?> Plus development by <a href="mailto:ciprianmp@yahoo.com?subject=phpMychat%20Plus%20feedback" Title="<?php echo sprintf(L_CLICK, L_LINKS_9); ?> " CLASS="ChatLink" onMouseOver="window.status='<?php echo sprintf(L_CLICKS, L_LINKS_6, L_DEVELOPER); ?> .'; return true;">Ciprian M</a>.<br /> Thanks to all the contributors in the <a href="http://groups.yahoo.com/subscribe/phpmychat" CLASS="ChatLink" title="<?php echo sprintf(L_CLICK, sprintf(L_LINKS_8, "phpMyChat-Plus")); ?> " onMouseOver="window.status='<?php echo sprintf(L_CLICK, sprintf(L_LINKS_8, "phpMyChat-Plus")); ?> .'; return true;" target=_blank>phpMyChat group</a> !<br /> Download this full chat pack from <a href="http://sourceforge.net/projects/phpmychat/files/phpMyChat_Plus/" target=_blank title="<?php echo APP_NAME . " " . L_SRC . " Sourceforge.net!\n" . sprintf(L_CLICK, sprintf(L_LINKS_10, "phpMyChat-Plus")); ?> " onMouseOver="window.status='<?php echo APP_NAME . " " . L_SRC . " Sourceforge.net!"; ?> '; return true;" CLASS="ChatLink"><img src="<?php echo check_internet_connection() || is_file($sflogo) || file_exists($sflogo) ? $sflogo : "./{$ChatPath}images/sflogo.gif"; ?> " border=0 width="80" height="15" /></a> </SPAN> <?php if (C_SHOW_OWNER) { ?> <br /><SPAN CLASS="ChatCopy" dir="LTR"> Owner of this chat server -<b> <?php include_once "admin/mail4admin.lib.php"; #if (!eregi("Your name",C_ADMIN_NAME) && C_ADMIN_NAME != "") $Owner_name = C_ADMIN_NAME; if (stripos(C_ADMIN_NAME, "Your name") === false && C_ADMIN_NAME != "") { $Owner_name = C_ADMIN_NAME; } else { $Owner_name = L_LURKING_5; } if (strstr($Sender_email, "@") && $Sender_email != "" && $Sender_email != "*****@*****.**") { $Owner_email = $Sender_email; ?> <a href="mailto:<?php echo $Owner_email; ?> ?subject=Contact%20from%20[<?php echo C_CHAT_NAME != "" ? C_CHAT_NAME : APP_NAME; ?> ]%20Login%20Page" CLASS="ChatLink" Title="<?php echo sprintf(L_CLICKS, L_LINKS_6, L_OWNER); ?> " onMouseOver="window.status='<?php echo sprintf(L_CLICKS, L_LINKS_6, L_OWNER); ?> .'; return true"><?php echo $Owner_name; ?> </A> <?php } else { echo $Owner_name; } ?> </b></SPAN> <?php } if (C_SHOW_FLAGS) { ?> <SPAN CLASS="ChatCopy" dir="LTR"> <br />phpMyChat-Plus includes GeoLite™ data created by MaxMind,<br />available from <a href="http://dev.maxmind.com/geoip/legacy/geolite/" target="_blank" title="<?php echo "phpMyChat-Plus includes GeoLite™ data created by MaxMind!\n" . sprintf(L_CLICK, sprintf(L_LINKS_10, "GeoLite Country (Binary / gzip)")); ?> " onMouseOver="window.status='<?php echo "phpMyChat-Plus includes GeoLite™ data created by MaxMind!"; ?> '; return true;" CLASS="ChatLink">http://www.maxmind.com</a> </SPAN> <?php } ?> <br /><SPAN CLASS="ChatCopy" dir="LTR"><a href="privacy.html" onClick="privacy_popup(); return false" target="_blank" CLASS="ChatLink" title="<?php echo sprintf(L_CLICK, L_PRIVACY); ?> " onMouseOver="window.status='<?php echo sprintf(L_CLICK, L_PRIVACY); ?> '; return true">Our Privacy Policy</a> </SPAN><br /> <?php if (check_internet_connection()) { ?> <div class="fb-like" data-href="https://www.facebook.com/pages/phpMyChat-Plus/112950852062055" data-send="true" data-layout="button_count" data-show-faces="false" data-font="tahoma"></div> <?php } if ($show_donation) { ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="support" target="_blank" onSubmit="return confirm('<?php echo L_SUPP_WARN; ?> ');"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="<?php echo $ppbutton; ?> "> <input type="image" style="background-color: transparent;" src="<?php echo $donate; ?> " border="0" name="donate" alt="<?php echo $ppalt . " " . L_SUPP_ALT; ?> " title="<?php echo $ppalt . " " . L_SUPP_ALT; ?> " onMouseOver="window.status='<?php echo $ppalt; ?> '; return true;"> </form> <?php } ?> </TD> </TR> </TABLE> <?php if ($show_search && check_internet_connection()) { echo $search; } if ($copy_break) { ?> <SCRIPT TYPE="text/javascript" LANGUAGE="javascript"> <!-- alert('This phpMyChat-Plus server (<?php echo $_SERVER['SERVER_ADDR']; ?> ) has been hacked by the owner (<?php echo C_ADMIN_NAME . " - " . C_ADMIN_EMAIL; ?> ).\n\nAll the Chat functions and features have been disabled due to Copyright Infringement!\n\nThis work is licensed under the\n"Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License".\n\nPlease contact the developer at "ciprianmp at yahoo dot com" in order to make it legal!'); window.location.replace("http://creativecommons.org/licenses/by-nc-nd/3.0/"); // --> </SCRIPT> <?php } }
if ($rrr == $old_rrr && $ttt == $old_ttt && $reas == $old_reas) { continue; } $AddUntil = $ttt == "forever" ? ", ban_until='2222222222'" : ""; $uuu = addslashes($username); $DbLink->query("UPDATE " . C_BAN_TBL . " SET rooms='{$rrr}'" . $AddUntil . ",reason='{$reas}' WHERE username='******'"); // banish the user if he's currently chatting if ($rrr == "*") { $DbLink->query("UPDATE " . C_USR_TBL . " SET status='b' WHERE username='******'"); } else { $DbLink->query("SELECT room FROM " . C_USR_TBL . " WHERE username='******' LIMIT 1"); $in_room = $DbLink->num_rows() != 0; if ($in_room) { list($room) = $DbLink->next_record(); $DbLink->clean_results(); if (room_in(addslashes($room), $rrr, $Charset)) { $DbLink->query("UPDATE " . C_USR_TBL . " SET status='b' WHERE username='******'"); } } else { $DbLink->clean_results(); } } } } } // Remove banishment of users when necessary (time for banishment expire or no room) $ToCheck = "rooms = ''"; if (!isset($FORM_SEND)) { $ToCheck = "ban_until < " . time() . " OR " . $ToCheck; } $DbLink->query("DELETE FROM " . C_BAN_TBL . " WHERE " . $ToCheck);
if ($rrr == $old_rrr && $ttt == $old_ttt) { continue; } $AddUntil = $ttt == "forever" ? ", ban_until='2147483647'" : ""; $uuu = addslashes($username); $DbLink->query("UPDATE " . C_BAN_TBL . " SET rooms='{$rrr}'" . $AddUntil . " WHERE username='******'"); // banish the user if he's currently chatting if ($rrr == "*") { $DbLink->query("UPDATE " . C_USR_TBL . " SET status='b' WHERE username='******'"); } else { $DbLink->query("SELECT room FROM " . C_USR_TBL . " WHERE username='******' LIMIT 1"); $in_room = $DbLink->num_rows() != 0; if ($in_room) { list($room) = $DbLink->next_record(); $DbLink->clean_results(); if (room_in(addslashes($room), $rrr)) { $DbLink->query("UPDATE " . C_USR_TBL . " SET status='b' WHERE username='******'"); } } else { $DbLink->clean_results(); } } } } } // Remove banishment of users when necessary (time for banishment expire or no room) $ToCheck = "rooms = ''"; if (!isset($FORM_SEND)) { $ToCheck = "ban_until < " . time() . " OR " . $ToCheck; } $DbLink->query("DELETE FROM " . C_BAN_TBL . " WHERE " . $ToCheck);