$Error = L_ERR_USR_16;
 } elseif (mb_convert_case($U, MB_CASE_LOWER, $Charset) == mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset)) {
     $Error = L_ERR_USR_27;
 } elseif (mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset) == mb_convert_case(C_QUOTE_NAME, MB_CASE_LOWER, $Charset)) {
     $Error = L_ERR_USR_1;
 } elseif (trim($Cmd[2]) != "" && trim($Cmd[3]) != "") {
     $Cmd[3] = "L_PRIV_WISP " . $Cmd[3];
     if (C_PRIV_POPUP && !isset($allowpopupu)) {
         $DbLink = new DB();
         $DbLink->query("SELECT allowpopup FROM " . C_REG_TBL . " WHERE username = '******'2']}'");
         if ($DbLink->num_rows() != 0) {
             list($allowpopupu) = $DbLink->next_record();
         } else {
             $allowpopupu = 0;
         }
         $DbLink->clean_results();
     }
     if (C_PRIV_POPUP) {
         if ($allowpopupu || stristr(mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset), mb_convert_case(C_BOT_NAME, MB_CASE_LOWER, $Charset))) {
             $Read = "Neww";
         } else {
             $Read = "Oldw";
         }
     } else {
         $Read = "Oldw";
     }
     $DbLink->query("SELECT room FROM " . C_USR_TBL . " WHERE username='******'2']}'");
     list($UR) = $DbLink->next_record();
     if ($UR != "") {
         // Check for swear words in the message if necessary
         if (C_NO_SWEAR && $UR != C_NO_SWEAR_ROOM1 && $UR != C_NO_SWEAR_ROOM2 && $UR != C_NO_SWEAR_ROOM3 && $UR != C_NO_SWEAR_ROOM4) {
        list($PWD_Hash, $perms) = $DbLink4Login->next_record();
        if ($PWD_Hash == md5(stripslashes($pmc_password)) || $PWD_Hash == $pmc_password) {
            // Ensure the one who lauch the admin.php script is really admin
            if (isset($MUST_BE_ADMIN) && $perms != "admin") {
                $Error = L_ERR_USR_11;
            } else {
                $do_not_login = true;
                $_SESSION["adminlogged"] = true;
            }
        }
    } else {
        if (isset($perms)) {
            unset($perms);
        }
    }
    $DbLink4Login->clean_results();
    $DbLink4Login->close();
}
// If no login yet entered
if (!isset($do_not_login) || !$do_not_login) {
    // Special cache instructions for IE5+
    $CachePlus = "";
    #if (ereg("MSIE [56789]", (isset($HTTP_USER_AGENT)) ? $HTTP_USER_AGENT : getenv("HTTP_USER_AGENT"))) $CachePlus = ", pre-check=0, post-check=0, max-age=0";
    if (stripos(isset($HTTP_USER_AGENT) ? $HTTP_USER_AGENT : getenv("HTTP_USER_AGENT"), "MSIE") !== false) {
        $CachePlus = ", pre-check=0, post-check=0, max-age=0";
    }
    $now = gmdate('D, d M Y H:i:s') . ' GMT';
    header("Expires: {$now}");
    header("Last-Modified: {$now}");
    header("Cache-Control: no-cache, must-revalidate" . $CachePlus);
    header("Pragma: no-cache");
示例#3
0
             $COUNTRY_NAME = "Other/LAN";
         }
         if ($COUNTRY_CODE != "LAN") {
             $COUNTRY_NAME = $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$COUNTRY_CODE]];
         }
         if ($PROXY || substr($IP, 0, 1) == "p") {
             $COUNTRY_NAME .= " (Proxy Server)";
         }
         $DbLinkban->query("UPDATE " . C_BAN_TBL . " SET country_code='{$COUNTRY_CODE}', country_name='{$COUNTRY_NAME}' WHERE username='******'");
         $DbLinkban->query("UPDATE " . C_REG_TBL . " SET country_code='{$COUNTRY_CODE}', country_name='{$COUNTRY_NAME}' WHERE username='******'");
     }
     $c_flag = "&nbsp;<img src=\"./plugins/countryflags/flags/" . strtolower($COUNTRY_CODE) . ".gif\" alt=\"" . $COUNTRY_NAME . "\" title=\"" . $COUNTRY_NAME . "\" border=\"0\">&nbsp;(" . $COUNTRY_CODE . ")";
 }
 $DbLinkban->query("SELECT username,reason FROM " . C_BAN_TBL . " WHERE username='******' LIMIT 1");
 list($Nb, $reason) = $DbLinkban->next_record();
 $DbLinkban->clean_results();
 if ($reason != "") {
     $reason = " (" . L_HELP_REASON . ": " . $reason . ")";
 }
 if ($Nb) {
     $bannished_user = "******" . A_MENU_21 . $reason . "' title='" . A_MENU_21 . $reason . "'>";
 }
 $DbLinkban->query("SELECT ip,reason FROM " . C_BAN_TBL . " WHERE ip='{$IP}' LIMIT 1");
 list($NbIP, $reasonIP) = $DbLinkban->next_record();
 $DbLinkban->clean_results();
 if ($reasonIP != "") {
     $reasonIP = " (" . L_HELP_REASON . ": " . $reasonIP . ")";
 }
 if ($NbIP) {
     $bannished_ip = "&nbsp;<img src=images/bannished.gif alt='" . A_MENU_21 . $reasonIP . "' title='" . A_MENU_21 . $reasonIP . "'>";
 }
 if (C_POPUP_LINKS || stripos($Message, 'target="_blank"></a>') !== false) {
     $Message = str_replace('target="_blank"></a>', 'title="' . sprintf(L_CLICKS, L_LINKS_15, L_LINKS_1) . '" onMouseOver="window.status=\'' . sprintf(L_CLICKS, L_LINKS_15, L_LINKS_1) . '.\'; return true" target="_blank">' . sprintf(L_CLICKS, L_LINKS_15, L_LINKS_1) . '</a>', $Message);
 } else {
     $Message = str_replace('target="_blank">', 'title="' . sprintf(L_CLICK, L_LINKS_3) . '" onMouseOver="window.status=\'' . sprintf(L_CLICK, L_LINKS_3) . '.\'; return true" target="_blank">', $Message);
 }
 $Message = str_replace('alt="Send email">', 'title="' . sprintf(L_CLICK, L_EMAIL_1) . '" onMouseOver="window.status=\'' . sprintf(L_CLICK, L_EMAIL_1) . '.\'; return true">', $Message);
 if (COLOR_NAMES) {
     $colorname_tag = "";
     $colorname_endtag = "";
     $colornamedest_tag = "";
     $colornamedest_endtag = "";
     $DbColor = new DB();
     if (isset($User)) {
         $DbColor->query("SELECT perms,colorname FROM " . C_REG_TBL . " WHERE username = '******'");
         list($perms_user, $colorname) = $DbColor->next_record();
         $DbColor->clean_results();
     }
     if (isset($Dest)) {
         $DbColor->query("SELECT perms,colorname FROM " . C_REG_TBL . " WHERE username = '******'");
         list($perms_dest, $colornamedest) = $DbColor->next_record();
         $DbColor->clean_results();
     }
     if (isset($colorname) && $colorname != "") {
         $colorname_tag = "<FONT color=" . $colorname . ">";
         unset($colorname);
     } elseif (C_ITALICIZE_POWERS) {
         if ($perms_user == "admin" && $User != C_BOT_NAME || $perms_user == "topmod") {
             $colorname_tag = "<FONT color=" . COLOR_CA . ">";
         } elseif ($perms_user == "moderator") {
             $colorname_tag = "<FONT color=" . COLOR_CM . ">";
         } else {
示例#5
0
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',true);\" " . userClass($status, $OtherUsera) . " title='" . L_WHSP . "' onMouseOver=\"window.status='" . L_SEND_WHSP . "'; return true\"><span style=color:" . userColor($status, $colorname) . ";>" . special_char($OtherUser, $Latin1, $status) . "</span></a><br />\n";
                        } else {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',true);\" " . userClass($status, $OtherUsera) . " title='" . L_WHSP . "' onMouseOver=\"window.status='" . L_SEND_WHSP . "'; return true\">" . special_char($OtherUser, $Latin1, $status) . "</a><br />\n";
                        }
                    } else {
                        if (COLOR_NAMES) {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',false);\" " . userClass($status, $OtherUsera) . " title='" . L_USE_NAME . " ({$OtherUser})' onMouseOver=\"window.status='" . L_USE_NAME . " ({$OtherUser})'; return true\"><span style=color:" . userColor($status, $colorname) . ";>" . special_char($OtherUser, $Latin1, $status) . "</span></a><br />\n";
                        } else {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',false);\" " . userClass($status, $OtherUsera) . " title='" . L_USE_NAME . " ({$OtherUser})' onMouseOver=\"window.status='" . L_USE_NAME . " ({$OtherUser})'; return true\">" . special_char($OtherUser, $Latin1, $status) . "</a><br />\n";
                        }
                    }
                }
                echo "</DIV>\n";
            }
        }
        $OthersUsers->clean_results();
    }
    $OthersUsers->close();
}
$DbLink->clean_results();
// Display all rest default rooms
for ($k = 0; $k < count($DefaultChatRooms); $k++) {
    $tmpRoom = stripslashes($DefaultChatRooms[$k]);
    $tmpDispRoom = $tmpRoom;
    $tmpDispRes = "";
    // Restricted rooms mod by Ciprian
    if (is_array($DefaultDispChatRooms) && in_array($tmpRoom . " [R]", $DefaultDispChatRooms)) {
        $tmpDispRoom .= " [" . $res_init . "]";
        $tmpDispRes = " (" . L_RESTRICTED . ")";
    }
    // Display this room name when it hadn't been displayed yet
                         $room_time = strftime(L_SHORT_DATETIME, $room_time + C_TMZ_OFFSET * 60 * 60);
                         if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
                             $room_time = str_replace(" ", "", $room_time);
                         }
                         echo "-&nbsp;<a " . userClass($status, $Username) . ";>" . special_char($Username, $Latin1, $status) . "</a><BDO dir=\"{$textDirection}\"></BDO><font size=1>&nbsp;(" . $room_time . ")" . (isset($c_flag) ? $c_flag : "") . "</font><br />";
                         // GeoIP Country flags initialization
                         unset($IP);
                         unset($COUNTRY_CODE);
                         unset($COUNTRY_NAME);
                         unset($c_flag);
                     }
                     echo "</DIV>";
                     $ChildNb[$id] = $j;
                 }
             }
             $Users->clean_results();
         }
         // GeoIP mode for country flags
         if (isset($gi) && $gi != "") {
             geoip_close($gi);
         }
         if (isset($gi6) && $gi6 != "") {
             geoip_close($gi6);
         }
         $Users->close();
     }
 }
 if ($disp_note) {
     echo "<P><table WIDTH=100%><tr valign=top><td colspan=4 align=left CLASS=small>[" . $res_init . "] = " . L_RESTRICTED . ".</td></tr></table>";
 }
 $DbLink->clean_results();
示例#7
0
</td>
		<td style="vertical-align:middle; text-align:center;" class=tabtitle nowrap="nowrap"><?php 
    echo $arrowa . "&nbsp;<a href=\"{$pstr}&mord=A&sortOrder=" . ($sortOrder == "DESC" ? "ASC" . ($cYr ? "&cYr=" . $cYr : "") . ($use_limT ? "&limT=" . $limT : "") . "\" title=\"" . sprintf(L_CLICK, L_LINKS_17) . "\" onMouseOver=\"sort_status('DESC'); return true;\"" : "DESC" . ($cYr ? "&cYr=" . $cYr : "") . ($use_limT ? "&limT=" . $limT : "") . "\" title=\"" . sprintf(L_CLICK, L_LINKS_18) . "\" onMouseOver=\"sort_status('ASC'); return true;\"") . "\">" . L_PRO_10 . "</a>";
    ?>
</td>
	</tr>
	<?php 
    $ava_height = 14;
    $i = 1;
    $users = array();
    $DbLinkU = new DB();
    $DbLinkU->query("SELECT username FROM " . C_REG_TBL . " WHERE email NOT LIKE '%@bot.com%' AND email NOT LIKE '%@quote.com%' AND username != '" . $pmc_username . "' ORDER BY username ASC");
    while (list($usernames) = $DbLinkU->next_record()) {
        $users[] = $usernames;
    }
    $DbLinkU->clean_results();
    $DbLinkU->close();
    // GeoIP mode for country flags
    if (C_USE_FLAGS) {
        if (!class_exists("GeoIP")) {
            include "plugins/countryflags/geoip.inc";
        }
        if (!isset($gi)) {
            $gi = geoip_open("plugins/countryflags/GeoIP.dat", GEOIP_STANDARD);
        }
    }
    while (list($User, $dob_firstname, $dob_lastname, $gender, $avatar, $use_gravatar, $email, $dob_showemail, $dob_birthday, $dob_showbday, $dob_showage, $IP, $COUNTRY_CODE, $COUNTRY_NAME, $dob_age) = $DbLink->next_record()) {
        if (!empty($dob_birthday) && $dob_birthday != "0000-00-00") {
            if (C_USE_AVATARS) {
                if (empty($avatar)) {
                    $avatar = C_AVA_RELPATH . C_DEF_AVATAR;
示例#8
0
                if (stristr(PHP_OS, 'win')) {
                    $s_birthday = utf_conv(WIN_DEFAULT, $Charset, $s_birthday);
                    if (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) {
                        $s_birthday = str_replace(" ", "", $s_birthday);
                    }
                }
            }
            $checkbox = $s_username == $pmc_username ? "&nbsp;" : "<INPUT type=checkbox name=\"selected_{$usrHash}\" value=\"1\">";
            echo "<tr align=\"center\">\n\r\n\t\t<INPUT TYPE=\"hidden\" NAME=\"user_{$usrHash}\" VALUE=\"1\">\n\r\n\t\t<TD VALIGN=CENTER ALIGN=CENTER>\n{$checkbox}\n</td>\n\r\n\t\t<td width=100>{$s_username}{$bannished_user}</td>\n\r\n\t\t<td>" . (!(strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese")) ? "{$s_firstname}</td>\n<td>{$s_lastname}" : "{$s_lastname}</td>\n<td>{$s_firstname}") . "</td>\n\r\n\t\t<td>{$s_country}</td>\n\r\n\t\t<td nowrap=\"nowrap\"><a href=\"mailto:{$s_email}\" target=_blank>{$s_email}</a>" . ($s_showemail ? "" : "<font color=\"red\"> *</font>") . "</td>\n\r\n\t\t<td>{$s_perms}</td>\n\r\n\t\t<td align=left nowrap=\"nowrap\">{$s_ip}" . (isset($s_flag) ? $s_flag : "") . "{$bannished_ip}</td>\n\r\n\t\t<td align=center>{$s_gender}</td>\n\r\n\t\t<td align=left nowrap=\"nowrap\">" . $s_birthday . (!$s_show_age || !$s_show_bday ? $s_birthday == "&nbsp;" ? "" : "<font color=\"red\"> *</font>" : "") . "</td>\n\r\n\t\t</tr>";
            if ((!$s_show_age || $s_show_bday) && $s_birthday != "&nbsp;") {
                $note = 1;
            }
            unset($s_username, $s_firstname, $s_lastname, $s_country, $s_email, $s_perms, $s_ip, $s_gender, $s_birthday, $s_show_bday, $s_show_age, $s_ip, $s_country_code, $s_country_name, $s_flag, $gender, $alt_gender);
            $bannished_user = "";
            $bannished_ip = "";
            $DbLinkNew->clean_results();
        }
        // GeoIP Country flags initialization
        if (isset($gi) && $gi != "") {
            geoip_close($gi);
        }
        if (isset($gi6) && $gi6 != "") {
            geoip_close($gi6);
        }
        $DbLinkNew->close();
        $DbLink->close();
        if ($note) {
            ?>
		<tr>
			<td colspan=10 class=error>
				<b>* </b><i><font size="1"><?php