Ejemplo n.º 1
0
extract($_REQUEST);
if (!isset($urlblock)) {
    $urlblock = $logblock;
}
if (!empty($altdata)) {
    $chatpath = $altdata;
} else {
    $chatpath = ereg_replace(".*/([^/]+)/gui_opt.php\$", "chat\\1", $_SERVER['PHP_SELF']);
    if ($_SERVER['HTTP_HOST'] != 'v2.pjj.cc' && strstr($_SERVER['HTTP_HOST'], '.pjj.cc')) {
        $chatpath = preg_replace('/(.*?)\\.pjj\\.cc/is', 'chat\\1', $_SERVER['HTTP_HOST']);
    }
}
$fn = "options.php";
$flags = ChatVerifyLogin($_REQUEST['login'], $_REQUEST['password'], $chatpath);
$bing = GetChatPrefs($chatpath);
if (!empty($message) && CheckFlags("oXZmM", $flags)) {
    @count_mysql_query("DELETE FROM uo_chat_adminlog WHERE stamp<DATE_SUB(now(), INTERVAL 28 DAY)", $handler);
    @count_mysql_query("INSERT INTO uo_chat_adminlog\n\t\t\t(page_id,chat_id,user_id,user_ip,stamp)\n\t\t\tVALUES (\n\t\t\t2,\n\t\t\t{$GLOBALS['biglog']['chat_id']},\n\t\t\t{$GLOBALS['biglog']['user_id']},\n\t\t\t'{$_SERVER['REMOTE_ADDR']}',\n\t\t\tnow()\n\t\t\t)", $handler);
    $fi = fopen($fn, "w");
    if (!$fi) {
        die("An error occured trying to write to the file.");
    }
    fwrite($fi, "<?php\n\$banwords = array (\n");
    for ($cc = 0; $cc < count($_REQUEST['iname']); $cc++) {
        if (trim($_REQUEST['iname'][$cc]) != "") {
            fwrite($fi, var_export(stripslashes(trim($_REQUEST['iname'][$cc])), true) . " => " . var_export(stripslashes(trim($_REQUEST['ifile'][$cc])), true) . ",\n");
        }
    }
    fwrite($fi, ");\n\$images = array(\n");
    for ($cc = 0; $cc < count($_REQUEST['images']); $cc++) {
        fwrite($fi, "\"" . trim($_REQUEST['images'][$cc]) . "\",\n");
Ejemplo n.º 2
0
function RequestPass($chat, $username)
{
    global $handler, $master_name_filter, $master_name, $master_email;
    if (!preg_match('@^\\w+$@', $chat)) {
        echo "<p>Invalid chat path '{$chat}'.<br>\n";
        return -1;
    }
    $username = strtolower($username);
    $username = eregi_replace($master_name_filter, '', $username);
    $chatpath = "chat" . $chat;
    $result = mysql_query("SELECT chat, uid, username, flags, email\n\t\tFROM uo_chat_database\n\t\tWHERE chat='{$chatpath}' AND username='******'", $handler);
    $cuser = mysql_fetch_assoc($result);
    mysql_free_result($result);
    if (empty($cuser['username']) || $cuser['username'] != $username) {
        echo "<p>User '{$username}' was not found in the database.<br>\n";
        return -1;
    }
    if (strlen($cuser['email']) < 5 || strpos($cuser['email'], '@') === false) {
        echo "<p>User '{$username}' doesn't have an email. Impossible to send password reset link.<br>\n";
        return -1;
    }
    $email = trim($cuser['email']);
    if (CheckFlags("M", $cuser['flags'])) {
        echo "<p>System Administrators know their passwords.<br>\n";
        return -2;
    }
    $key = sha1(uniqid() . mt_rand() . mt_rand() . mt_rand());
    $stamp = date('Y-m-d H:i:s');
    mysql_query("INSERT INTO uo_chat_newpass (pass_uid, pass_key, pass_stamp)\n\t\tVALUES (" . $cuser['uid'] . ", '" . $key . "', '" . $stamp . "')\n\t\tON DUPLICATE KEY UPDATE pass_key='" . $key . "', pass_stamp='" . $stamp . "'\n\t\t", $handler);
    $username = ucwords($username);
    $urlstamp = urlencode($stamp);
    $headers = '';
    $headers .= "From: {$master_name} <{$master_email}>\n";
    $headers .= "Reply-To: {$master_name} <{$master_email}>\n";
    $headers .= "Bcc: {$master_name} <{$master_email}>\n";
    $subject = "pJJ: Password request for '{$username}' of /{$chat}";
    $message = <<<XBODY
On {$stamp} someone from IP {$_SERVER['REMOTE_ADDR']} requested a new password for user {$username} (uid:{$cuser['uid']}).

To generate a new password, click:
http://pjj.cc/common/password.php?uid={$cuser['uid']}&key={$key}&stamp={$urlstamp}

The link will remain valid for 15 minutes or until someone successfully logs in to the account.

-- pJJ Chats

XBODY;
    mail("{$username} <{$email}>", $subject, $message, $headers);
    $fc = fopen("../{$chat}/register/wizard_locked/actionlog.log", "ab");
    fwrite($fc, stripslashes(date("F d, Y T - H:i:s") . ": New password requested for user '{$username}' - {$ip}\n"));
    fclose($fc);
    echo "<p>New password requested for user '{$username}', and emailed to {$email}.<br>\n";
}
Ejemplo n.º 3
0
 $ident = $oldident;
 if ($proxyblock == 1 && empty($_SESSION[$realpath]['user']['uid'])) {
     $bl = Proxy_IsProxy($_SERVER['REMOTE_ADDR']);
     if ($bl !== false) {
         echo "This chat blocks open proxies, and you are using one. You have been banned for 8 hours.";
         echo "<br>The list that caught you is: <a href='{$bl}'>{$bl}</a>";
         echo "</body></html>";
         AddBan($ident, time() + 28800, '[proxy]', $chatpath);
         setcookie("pJJChat_Banned", $ident, time() + 604800);
         die;
     }
 }
 echo "\n<!-- After Proxy: " . round(getmicrotime() - $start, 2) . " secs / {$cqs} queries -->\n";
 UpdateViewers($realpath);
 $nview = GetViewers($realpath);
 if ($memonly <= 1 || CheckFlags('1', $_SESSION[$realpath]['flags'])) {
     echo "<base target='_blank'><center>";
     if (!empty($logofile)) {
         echo "<a href='{$logolink}' target=_blank><img border=0 src='{$logofile}'></a>";
     }
     if (file_exists('register/motd.dat')) {
         ParseMotD();
     }
     echo "</center><br>";
     if ($_COOKIE['pJJChat_NoColor'] == "on") {
         echo "<style> * {color: #{$servcol}}</style>";
     }
     readfile("../announce.dat");
     echo "<base target='_blank' href=''>";
     if ($_REQUEST['reverse'] == "on") {
         $lines = MMC_Get("{$realpath}.rache");
Ejemplo n.º 4
0
function DoDeletePost($chatpath, $pid, $eid, $username, $password)
{
    global $handler, $jbbc;
    require_once '../../common/helpers.php';
    $userflag = ChatVerifyLogin($username, $password, $chatpath);
    if (CheckFlags("xXZmM", $userflag)) {
        @mysql_query("UPDATE uo_chat_threads SET dtime=now() WHERE chat='{$chatpath}' AND id='{$pid}' AND utime='{$eid}'", $handler);
        echo "<center>...<a href=\"?pid={$pid}\">Return</a>...</center>";
    } else {
        echo "<center>False Login</center>";
    }
}
Ejemplo n.º 5
0
    }
}
if ($_REQUEST['max_nick'] < 20) {
    $_REQUEST['max_nick'] = 20;
}
if ($_REQUEST['identlenght'] < 3) {
    $_REQUEST['identlenght'] = 3;
}
if ($_REQUEST['timeout'] > 1209600) {
    $_REQUEST['timeout'] = 1209600;
}
$suglog = "settings.php";
$sfooter = "\$dbodytag = \"<body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' text='#\".\$servcol.\"' link='#\".\$s_link.\"' vlink='#\".\$s_visit.\"' alink='#\".\$s_active.\"' bgcolor='#\".\$s_bgcol.\"'\";\n\$bodytag = \$dbodytag;\n\$ubodytag = \$dbodytag;\n\$cbodytag = \$dbodytag;\nif (\$s_bgimg != \"\")\n\t\$bodytag .= \" background='\".\$s_bgimg.\"'\";\n\$bodytag .= \">\n\";\nif (\$u_bgimg != \"\")\n\t\$ubodytag .= \" background='\".\$u_bgimg.\"'\";\n\$ubodytag .= \">\n\";\nif (\$c_bgimg != \"\")\n\t\$cbodytag .= \" background='\".\$c_bgimg.\"'\";\n\$cbodytag .= \">\n\";";
$flags = ChatVerifyLogin($_REQUEST['login'], $_REQUEST['password'], $chatpath);
$bing = GetChatPrefs($chatpath);
$check = CheckFlags("sXZmM", $flags);
if ($s_bgcol == "000000" || $s_bgcol == "0") {
    $s_bgcol = "010101";
}
$len = strlen($_REQUEST['message']);
if ($len > 5 && $check > 0) {
    @count_mysql_query("DELETE FROM uo_chat_adminlog WHERE stamp<DATE_SUB(now(), INTERVAL 28 DAY)", $handler);
    @count_mysql_query("INSERT INTO uo_chat_adminlog\n\t\t\t(page_id,chat_id,user_id,user_ip,stamp)\n\t\t\tVALUES (\n\t\t\t1,\n\t\t\t{$GLOBALS['biglog']['chat_id']},\n\t\t\t{$GLOBALS['biglog']['user_id']},\n\t\t\t'{$_SERVER['REMOTE_ADDR']}',\n\t\t\tnow()\n\t\t\t)", $handler);
    $fm = fopen($suglog, "w");
    fwrite($fm, "<?php\n");
    $ctitle = str_replace("\"", "'", str_replace('$', '', stripslashes(strip_tags($_REQUEST['ctitle']))));
    $ctitle = trim($ctitle);
    if (empty($ctitle)) {
        $ctitle = $chatpath;
    }
    if ($_REQUEST['userlistspeed'] > 300) {
Ejemplo n.º 6
0
                        $ch = htmlentities($ch);
                        echo '<option value="', $ch, '">', $ch, '</option>', "\n";
                    }
                }
                echo '<option value="(random)">(random)</option>', "\n";
                echo '</select>
<input type="hidden" name="oldhandle" value="', htmlentities($_REQUEST['oldhandle']), '">
<input type="hidden" name="password" value="', htmlentities($_REQUEST['password']), '">
<input type="hidden" name="cspeed" value="', $cspeed, '">
<input type="hidden" name="reload" value="on">
<input type="hidden" name="motd" value="', $motd, '">
<input type="hidden" name="firstmsg" value="', htmlentities($_REQUEST['firstmsg']), '">
</form>';
            }
            echo '</td><td width="5"> </td><td align="right">';
            if ($_REQUEST['mode_simple'] != 'on' && !CheckFlags("C", $client['prefs'])) {
                $button = "<img alt='Refresh' src='{$images[10]}' border=0>";
                if (!preg_match('@^(ht|f)tps?://@ui', $images[10])) {
                    $button = $images[10];
                }
                echo "<form action='sendmsg.php' method=post name='refresh'>\n<input type=text maxlenght=3 size=2 name='cspeed' value='{$cspeed}'>\n<a href='javascript:document.forms[\"refresh\"].submit()'>{$button}</a>\n<input type=hidden name='oldhandle' value=\"{$_REQUEST['oldhandle']}\">\n<input type=hidden name='handle' value=\"{$handle}\">\n<input type=hidden name='firstmsg' value='{$_REQUEST['firstmsg']}'>\n<input type=hidden name='link' value='{$link}'>\n<input type=hidden name='image' value='{$image}'>\n<input type=hidden name=icons value='" . htmlentities(serialize($_REQUEST['icons'])) . "'>\n<input type=hidden name='motd' value='{$motd}'>\n<input type=hidden name='color' value='{$color}'>\n<input type=hidden name='password' value='{$_REQUEST['password']}'>\n<input type=hidden name=st_bold value='{$_REQUEST['st_bold']}'>\n<input type=hidden name=st_italic value='{$_REQUEST['st_italic']}'>\n<input type=hidden name=st_ulined value='{$_REQUEST['st_ulined']}'>\n<input type=hidden name=st_ooc value='{$_REQUEST['st_ooc']}'>\n<input type=hidden name=st_tt value='{$_REQUEST['st_tt']}'>\n<input type=hidden name=st_rev value='{$_REQUEST['st_rev']}'>\n</form>";
            }
            echo "<form action='sendmsg.php' method=post name='undo'>\n<input type=hidden name='oldhandle' value=\"{$_REQUEST['oldhandle']}\">\n<input type=hidden name='handle' value=\"{$handle}\">\n<input type=hidden name='firstmsg' value='{$_REQUEST['firstmsg']}'>\n<input type=hidden name='link' value='{$link}'>\n<input type=hidden name='cspeed' value='{$cspeed}'>\n<input type=hidden name='image' value='{$image}'>\n<input type=hidden name=icons value='" . htmlentities(serialize($_REQUEST['icons'])) . "'>\n<input type=hidden name='motd' value='{$motd}'>\n<input type=hidden name='color' value='{$color}'>\n<input type=hidden name='message' value='/undo'>\n<input type=hidden name='mode_simple' value='{$_REQUEST['mode_simple']}'>\n<input type=hidden name='password' value='{$_REQUEST['password']}'>\n<input type=hidden name=st_bold value='{$_REQUEST['st_bold']}'>\n<input type=hidden name=st_italic value='{$_REQUEST['st_italic']}'>\n<input type=hidden name=st_ulined value='{$_REQUEST['st_ulined']}'>\n<input type=hidden name=st_ooc value='{$_REQUEST['st_ooc']}'>\n<input type=hidden name=st_tt value='{$_REQUEST['st_tt']}'>\n<input type=hidden name=st_rev value='{$_REQUEST['st_rev']}'>\n</form>\n</td></tr></table>";
        }
        echo "</td>\n\n<td valign=top align=right>\n<!-- <a href='register/viewer.php' target=_blank><img alt='Profiles' src='{$images['9']}' border=0></a><br> -->\n<img src='{$images['14']}' border=0><br>";
        //*
        if (!empty($_SESSION[$realpath]['user']['uid'])) {
            $result = @count_mysql_query("SELECT count(*) as cnt FROM uo_chat_message WHERE rcpt_uid=" . $_SESSION[$realpath]['user']['uid'] . " AND archived='no'", $handler, "sendmsg.php: Check 'private msg' 1/1");
            $nmsg = mysql_fetch_assoc($result);
            $rmsg = intval($nmsg['cnt']);
            mysql_free_result($result);
Ejemplo n.º 7
0
     if (CheckFlags("FAZmM", $userlevel)) {
         echo "<OPTION VALUE='addfaction'>Create Faction...\n";
         echo "<OPTION VALUE='renfaction'>Rename Faction...\n";
         echo "<OPTION VALUE='delfaction'>Delete Faction...\n";
     }
     if (CheckFlags("LZmM", $userlevel)) {
         echo "<OPTION VALUE='faction'>Edit Faction Details...\n";
     }
     if (CheckFlags("VZmM", $userlevel)) {
         echo "<OPTION VALUE='poll'>Edit Poll...\n";
     }
     if (CheckFlags("OXZmM", $userlevel)) {
         echo "<OPTION VALUE='mmotd'>Edit MotD...\n";
         echo "<OPTION VALUE='xmotd'>Edit MotD as HTMLArea...\n";
     }
     if (CheckFlags("ZmM", $userlevel)) {
         echo "<OPTION VALUE='chatpref'>Edit Chat Preferences...\n";
     }
     if ($userlevel) {
         echo "<OPTION VALUE='chain'>Edit Character Chain...\n";
         echo "<OPTION VALUE='prefs' SELECTED>Edit Preferences...\n";
         echo "<OPTION VALUE='profile'>Edit Profile...\n";
         echo "<OPTION VALUE='xprofile'>Edit Profile as HTMLArea...\n";
         //echo "<OPTION VALUE='stats'>Chat Statistics...\n";
         echo "<OPTION VALUE='chpass'>Change Password...\n";
         echo "<OPTION VALUE='delself'>Delete Myself...\n";
         echo "<OPTION VALUE='logout'>Log out\n";
     }
     echo "</select>\n";
 }
 echo "<INPUT TYPE=HIDDEN NAME='login' value='" . htmlentities($login) . "'>\n\t\t\t<INPUT TYPE=HIDDEN NAME='password' value='" . htmlentities($password) . "'>\n\t\t\t<br><INPUT TYPE=SUBMIT VALUE='Ok...'>\n\t\t\t</form>";
Ejemplo n.º 8
0
function ShowList($chatpath)
{
    global $handler, $timeout, $tzone, $rpath, $master_name_filter;
    @count_mysql_query("DELETE FROM uo_chat_ulist WHERE chat='{$chatpath}' AND utime<'" . (time() - $timeout) . "'", $handler, "helpers.php: ShowList() 1/4");
    //echo "<base href=''>";
    require_once "../common/image.php";
    $usels = array();
    $query = "";
    $result = @count_mysql_query("SELECT chat,ident,username,link,image,utime FROM uo_chat_ulist WHERE chat='{$chatpath}' ORDER BY utime DESC", $handler, "helpers.php: ShowList() 2/4");
    while ($usel = @mysql_fetch_row($result)) {
        $usel[2] = str_replace('_', ' ', $usel[2]);
        $usels[] = $usel;
        $query .= "username='******' OR ";
    }
    @mysql_free_result($result);
    if (count($usels) < 1) {
        return 1;
    }
    $cpref = GetChatPrefs($chatpath);
    $query = "(" . ereg_replace("(.*) OR \$", "\\1", $query) . ")";
    $rez = @count_mysql_query("SELECT username FROM uo_chat_database WHERE chat='{$chatpath}' AND {$query} AND profile!='' AND dtime IS NULL", $handler, "helpers.php: ShowList() 3/4");
    $profs = "";
    while ($usel = @mysql_fetch_row($rez)) {
        $profs .= "{$usel['0']}|";
    }
    @mysql_free_result($rez);
    $rez = @count_mysql_query("SELECT prefs,email,aim,icq,ym,msn,site,username,skype,lastfm,flickr,facebook,gplus,steam FROM uo_chat_database WHERE chat='{$chatpath}' AND {$query} AND dtime IS NULL", $handler, "helpers.php: ShowList() 4/4");
    $prefs = array();
    while ($usel = @mysql_fetch_row($rez)) {
        $prefs[] = $usel;
    }
    @mysql_free_result($rez);
    $cnts = count($usels);
    for ($ix = 0; $ix < $cnts; $ix++) {
        $usel = $usels[$ix];
        $fixhandle = trim(eregi_replace($master_name_filter, "", strtolower($usel[2])));
        echo "<hr width='75%'>\n";
        $usel[3] = htmlentities(str_replace("`", "'", $usel[3]));
        $usel[4] = trim(str_replace("`", "'", $usel[4]));
        $usel[2] = htmlentities(str_replace("`", "'", $usel[2]));
        $uluser = $usel[2];
        $imgid = $ix + 1;
        unset($upref);
        for ($ig = 0; $ig < count($prefs); $ig++) {
            if (strcasecmp($prefs[$ig][7], $fixhandle) == 0) {
                $upref = $prefs[$ig];
            }
        }
        if (!empty($upref)) {
            echo '<a onclick="setConsoleChannel(\'' . $fixhandle . '\');" class="setchannel">';
        }
        if ($usel[4] && $usel[3]) {
            if ($_REQUEST['noimg'] > 0) {
                echo "[<a href='{$usel['4']}' target='_blank'><i>Open Image</i></a>]<br><span title=\"{$usel['3']}\" class='handle withlink'>{$uluser}</span><br>\n";
            } else {
                echo "<span title=\"{$usel['3']}\" class='handle withlink'><img border='0' id='img{$imgid}' src=\"{$usel['4']}\" " . ChatImageSize($usel[4]) . "><br>{$uluser}</span><br>\n";
            }
        } else {
            if ($usel[4]) {
                if ($_REQUEST['noimg'] > 0) {
                    echo "[<a href='{$usel['4']}' target='_blank'><i>Open Image</i></a>]<br><span class='handle nolink'>{$uluser}</span><br>\n";
                } else {
                    echo "<img border=0 id='img{$imgid}' src='{$usel['4']}' " . ChatImageSize($usel[4]) . "><br><span class='handle nolink'>{$uluser}</span><br>\n";
                }
            } else {
                if ($usel[3]) {
                    echo "<span title=\"{$usel['3']}\" class='handle withlink'>{$uluser}</span><br>\n";
                } else {
                    echo "<span class='handle nolink'>{$uluser}</span><br>\n";
                }
            }
        }
        if (!empty($upref)) {
            echo '</a>';
        }
        if (!CheckFlags("m", $cpref)) {
            if (!empty($fixhandle) && stristr($profs, $fixhandle)) {
                echo "<a href='https://pjj.cc/{$rpath}/register/viewer.php?su=" . urlencode($usel[2]) . "&fm=view' target='_blank'><img alt='Profile' src='https://pjj.cc/gfx/im/prof2.gif' border='0'></a>";
            }
            if (CheckFlags("M", $upref[0]) && !empty($upref[1])) {
                echo "<a href='mailto:{$upref['1']}'><img alt='Email' src='https://pjj.cc/gfx/im/email.gif' border=0></a>";
            }
            $upref[2] = str_replace(" ", "", $upref[2]);
            if (!empty($upref[2])) {
                echo "<a href='aim:GoIM?ScreenName={$upref['2']}' title='AIM'>";
                echo "<img alt='AIM' src='https://pjj.cc/gfx/im/aimonline.gif' border='0'>";
                echo "</a>";
            }
            if (!empty($upref[3])) {
                echo "<a href='http://www.icq.com/{$upref['3']}' target='_blank' title='ICQ'>";
                echo "<img alt='ICQ' src='https://pjj.cc/gfx/im/icqonline.gif' border='0'>";
                echo "</a>";
            }
            if (!empty($upref[4])) {
                echo "<a href=\"http://profiles.yahoo.com/{$upref['4']}\" target='_blank' title='YM'>";
                echo "<img border='0' src=\"https://pjj.cc/gfx/im/yahooonline.gif\" alt='YM'>";
                echo "</a>";
            }
            if (!empty($upref[5])) {
                echo "<a href=\"http://members.msn.com/{$upref['5']}\" target='_blank' title='MSN'>";
                echo "<img border='0' src='https://pjj.cc/gfx/im/msnonline.gif' alt='MSN'>";
                echo "</a>";
            }
            if (!empty($upref[9])) {
                echo "<a href=\"http://www.last.fm/user/{$upref[9]}/\" target='_blank' title='Last.fm'>";
                echo "<img border='0' src='https://pjj.cc/gfx/im/lastfm.png' alt='Last.fm'>";
                echo "</a>";
            }
            if (!empty($upref[10])) {
                echo "<a href='http://flickr.com/photos/{$upref['10']}/' target='_blank' title='Flickr'>";
                echo "<img border='0' hspace='2' src='https://i.pjj.cc/c8b1694ee96e780aa35f426abc3e67d7.gif' alt='Flickr'>";
                echo "</a>";
            }
            if (!empty($upref[11])) {
                echo "<a href='http://www.facebook.com/{$upref['11']}' target='_blank' title='Facebook'>";
                echo "<img border='0' hspace='2' src='https://pjj.cc/gfx/im/facebook.png' alt='Facebook'>";
                echo "</a>";
            }
            if (!empty($upref[12])) {
                echo "<a href='http://plus.google.com/{$upref['12']}' target='_blank' title='Google Plus'>";
                echo "<img border='0' hspace='2' src='https://pjj.cc/gfx/im/googleplus.png' alt='Google Plus'>";
                echo "</a>";
            }
            if (!empty($upref[13])) {
                echo "<a href='http://steamcommunity.com/id/{$upref['13']}' target='_blank' title='Steam'>";
                echo "<img border='0' hspace='2' src='https://pjj.cc/gfx/im/steam.png' alt='Steam'>";
                echo "</a>";
            }
            if (!empty($upref[8])) {
                echo "<a href='callto:{$upref['8']}' title='Skype'>";
                echo "<img border='0' hspace='2' src='https://i.pjj.cc/3e818c5e24ac3e9e9aa2155129f55f10.gif' alt='Skype'>";
                echo "</a>";
            }
            if (!empty($upref[6])) {
                echo "<a href='{$upref['6']}' target='_blank'>";
                echo "<img alt='Homepage' src='https://pjj.cc/gfx/im/prof.gif' border='0'>";
                echo "</a>";
            }
        }
        echo "<br><font size=-1>{$usel['1']}</font><br>\n";
        $dtstring = date("g:i:sa", $usel[5] + $tzone * 3600);
        echo "Posted: {$dtstring}\n";
        unset($usel);
    }
    return 1;
}
Ejemplo n.º 9
0
function ListUsersModify($userlevel, $chatpath)
{
    global $handler;
    $arr = GetFactionNames($chatpath);
    echo "<table BORDER=0 CELLSPACING=2 CELLPADDING=2><tr align=center valign=center><td align=center valign=center>Action:\n\t<br><SELECT NAME='modaction'>";
    if (CheckFlags("FXZmM", $userlevel)) {
        echo "<OPTION value='faction'>Change Faction";
    }
    if (CheckFlags("pXZmM", $userlevel)) {
        echo "<OPTION value='resetpass'>Reset Password";
    }
    if (CheckFlags("RXZmM", $userlevel)) {
        echo "<OPTION value='rename'>Rename";
    }
    if (CheckFlags("DXZmM", $userlevel)) {
        echo "<OPTION value='delete'>Delete";
    }
    echo "</SELECT></td><td align=center valign=center>User:\n\t<br><SELECT NAME='selecteduser'>";
    $result = @count_mysql_query("SELECT username,flags,faction FROM uo_chat_database WHERE chat='{$chatpath}' AND BINARY flags!='M' AND dtime IS NULL ORDER BY username ASC", $handler);
    while ($cuser = mysql_fetch_row($result)) {
        if ($cuser[0] != "") {
            $fname = $arr[$cuser[2] + 0];
            echo "<OPTION value='{$cuser['0']}'>{$cuser['0']} # {$cuser['1']} # {$fname}\n";
        }
    }
    echo "</SELECT></td><td>New Name/Faction:<br><input name='newname' value='' size=30></td></tr></table>";
    return 1;
}
Ejemplo n.º 10
0
<body text="#000000" bgcolor="#FFFFFF" link="#0783FF" vlink="#0783FF" alink="#0682FE" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<center><img src="http://pjj.cc/gfx/null.gif" border=0></center>

<?php 
require_once "../../common/session.php";
require_once "../../../chatv3/_inc/mmcache.php";
require_once "../../mysql.php";
require_once "../../setup.php";
require_once "../settings.php";
require_once "../options.php";
require_once "../../common/tome_of_power.php";
$realpath = ereg_replace(".*/([^/]+)/register/adminlog.php\$", "chat\\1", $_SERVER['PHP_SELF']);
if ($_SERVER['HTTP_HOST'] != 'v2.pjj.cc' && strstr($_SERVER['HTTP_HOST'], '.pjj.cc')) {
    $realpath = preg_replace('/(.*?)\\.pjj\\.cc/is', 'chat\\1', $_SERVER['HTTP_HOST']);
}
if (!CheckFlags('MmZX', $_SESSION[$realpath]['flags'])) {
    die('Only administrators can view this page.');
}
$cpref = GetChatPrefs($realpath);
$output = '';
if ($_REQUEST['log'] === 'cpanel') {
    $output = '<pre>' . file_get_contents('wizard_locked/actionlog.log') . '</pre>';
} else {
    $rez = count_mysql_query("SELECT\n\t\t\talog.user_id, dtbs.username, alog.page_id, alog.stamp, alog.user_ip\n\t\t\tFROM uo_chat_adminlog as alog\n\t\t\tLEFT JOIN uo_chat_database as dtbs ON (alog.user_id=dtbs.uid)\n\t\t\tWHERE alog.chat_id={$GLOBALS['biglog']['chat_id']}\n\t\t\tORDER BY alog.entry_id ASC\n\t\t\t", $handler);
    if (mysql_num_rows($rez)) {
        $pages = array(1 => 'Settings', 2 => 'Options', 3 => 'Icons', 4 => 'Language');
        $output .= '<table cellspacing="0" cellpadding="3" border="1">';
        $output .= '<tr valign="top">
				<td><b>Page</b></td>
				<td><b>ID: Username</b></td>
				<td><b>IP</b></td>
Ejemplo n.º 11
0
include "../options.php";
include "../../common/tome_of_power.php";
include "../../common/zlib.php";
$pass = 1;
$realpath = ereg_replace(".*/([^/]+)/register/biglog.php\$", "chat\\1", $_SERVER['PHP_SELF']);
if ($_SERVER['HTTP_HOST'] != 'v2.pjj.cc' && strstr($_SERVER['HTTP_HOST'], '.pjj.cc')) {
    $realpath = preg_replace('/(.*?)\\.pjj\\.cc/is', 'chat\\1', $_SERVER['HTTP_HOST']);
}
$pass = 1;
if ($logblock == 1 && !CheckFlags('1', $_SESSION[$realpath]['flags'])) {
    $pass = 0;
}
if ($logblock == 2 && !CheckFlags('MmZxX', $_SESSION[$realpath]['flags'])) {
    $pass = 0;
}
if ($logblock == 3 && !CheckFlags('MmZX', $_SESSION[$realpath]['flags'])) {
    $pass = 0;
}
if ($pass == 0 && $logblock == 3) {
    echo "<b>Logs are currently locked to anyone below administrator status.</b>";
} else {
    if ($pass == 0 && $logblock == 2) {
        echo "<b>Logs are currently locked to anyone below moderators status.</b>";
    } else {
        if ($pass == 0) {
            echo "<b>Logs are currently blocked for anyone not logged into the chat.</b>";
        } else {
            if ($_REQUEST['action'] == "view" && $_REQUEST['time'] != "") {
                DisplayLog($_REQUEST['time']);
            } else {
                ListLogs();
Ejemplo n.º 12
0
<center><img src="https://pjj.cc/gfx/null.gif" border=0></center>
<?php 
$_REQUEST = TrimArray($_REQUEST);
extract($_REQUEST);
if (!empty($altdata)) {
    $chatpath = $altdata;
} else {
    $chatpath = ereg_replace(".*/([^/]+)/gui_icon.php\$", "chat\\1", $_SERVER['PHP_SELF']);
    if ($_SERVER['HTTP_HOST'] != 'v2.pjj.cc' && strstr($_SERVER['HTTP_HOST'], '.pjj.cc')) {
        $chatpath = preg_replace('/(.*?)\\.pjj\\.cc/is', 'chat\\1', $_SERVER['HTTP_HOST']);
    }
}
$fn = "iconlist.php";
$flags = ChatVerifyLogin($_REQUEST['login'], $_REQUEST['password'], $chatpath);
$bing = GetChatPrefs($chatpath);
if (strlen($message) > 5 && CheckFlags("iXZmM", $flags)) {
    @count_mysql_query("DELETE FROM uo_chat_adminlog WHERE stamp<DATE_SUB(now(), INTERVAL 28 DAY)", $handler);
    @count_mysql_query("INSERT INTO uo_chat_adminlog\n\t\t\t(page_id,chat_id,user_id,user_ip,stamp)\n\t\t\tVALUES (\n\t\t\t3,\n\t\t\t{$GLOBALS['biglog']['chat_id']},\n\t\t\t{$GLOBALS['biglog']['user_id']},\n\t\t\t'{$_SERVER['REMOTE_ADDR']}',\n\t\t\tnow()\n\t\t\t)", $handler);
    $fi = fopen($fn, "w");
    fwrite($fi, "<?php\n");
    fwrite($fi, "\$icons = array (\n");
    for ($cc = 0; $cc < count($_REQUEST['iname']); $cc++) {
        $_REQUEST['iname'][$cc] = trim($_REQUEST['iname'][$cc]);
        if (!empty($_REQUEST['iname'][$cc])) {
            fwrite($fi, "\"" . trim($_REQUEST['iname'][$cc]) . "\" => \"" . trim($_REQUEST['ifile'][$cc]) . "\",\n");
        }
    }
    fwrite($fi, ");\n");
    fwrite($fi, "\$picons = array (\n");
    for ($cc = 0; $cc < count($_REQUEST['piname']); $cc++) {
        $_REQUEST['piname'][$cc] = trim($_REQUEST['piname'][$cc]);
Ejemplo n.º 13
0
	<tr><td valign="top" align="left" height="100%" width=80> </td>
	<td valign="top" height="100%">
<center><img src="http://pjj.cc/gfx/null.gif" border="0"></center>
<?php 
if (!empty($altdata)) {
    $chatpath = $altdata;
} else {
    $chatpath = ereg_replace(".*/([^/]+)/gui_lang.php\$", "chat\\1", $_SERVER['PHP_SELF']);
    if ($_SERVER['HTTP_HOST'] != 'v2.pjj.cc' && strstr($_SERVER['HTTP_HOST'], '.pjj.cc')) {
        $chatpath = preg_replace('/(.*?)\\.pjj\\.cc/is', 'chat\\1', $_SERVER['HTTP_HOST']);
    }
}
$fn = 'language.php';
$flags = ChatVerifyLogin($_REQUEST['login'], $_REQUEST['password'], $chatpath);
$bing = GetChatPrefs($chatpath);
if (!empty($_REQUEST['message']) && CheckFlags('XZmM', $flags)) {
    @count_mysql_query("DELETE FROM uo_chat_adminlog WHERE stamp<DATE_SUB(now(), INTERVAL 28 DAY)", $handler);
    @count_mysql_query("INSERT INTO uo_chat_adminlog\n\t\t\t(page_id,chat_id,user_id,user_ip,stamp)\n\t\t\tVALUES (\n\t\t\t4,\n\t\t\t{$GLOBALS['biglog']['chat_id']},\n\t\t\t{$GLOBALS['biglog']['user_id']},\n\t\t\t'{$_SERVER['REMOTE_ADDR']}',\n\t\t\tnow()\n\t\t\t)", $handler);
    $fi = fopen($fn, 'wb');
    fwrite($fi, "<?php\n");
    foreach ($_REQUEST['language'] as $k => $v) {
        $v = trim(strval($v));
        if (!empty($GLOBALS['language'][$k]) && $GLOBALS['language'][$k] === $v) {
            continue;
        }
        fwrite($fi, "\$GLOBALS['language'][" . $k . "] = " . var_export($v, true) . ";\n");
    }
    foreach ($_REQUEST['banguage'] as $k => $v) {
        $v = trim(strval($v));
        if (!empty($GLOBALS['banguage'][$k]) && $GLOBALS['banguage'][$k] === $v) {
            continue;