示例#1
0
     fwrite($fi, "\"" . trim($_REQUEST['jbbc'][$cc]) . "\",\n");
 }
 fwrite($fi, ");\n\$banip = array(\n");
 for ($cc = 0; $cc < count($_REQUEST['banips']); $cc++) {
     if (trim($_REQUEST['banips'][$cc]) != "") {
         fwrite($fi, "\"" . trim($_REQUEST['banips'][$cc]) . "\",\n");
     }
 }
 fwrite($fi, ");\n\$reglink = \"{$_REQUEST['reglink']}\";\n");
 if ($_REQUEST['cpicture'] && !getimagesize($_REQUEST['cpicture'])) {
     $_REQUEST['cpicture'] = '';
     echo "<font color='#FF0000'>Portal Picture not a valid picture!</font><br>";
 }
 $pimgx = 200;
 $pimgy = 100;
 $newh = ChatImageSize($_REQUEST['cpicture']);
 fwrite($fi, "\$cpicture = \"" . str_replace("\"", "'", strip_tags($_REQUEST['cpicture'])) . "\";\n");
 fwrite($fi, "\$cpicturelink = \"" . str_replace("\"", "'", strip_tags($_REQUEST['cpicturelink'])) . "\";\n");
 fwrite($fi, "\$cpicturesize = \"" . str_replace("\"", "'", $newh) . "\";\n");
 $cdescript = strip_tags($_REQUEST['cdescript'], "<font><a><b><u><i><tt>");
 $find = array("/\"/s", '/ style=/is', '/ on[^=\\s]+=/is');
 $repl = array("'", ' bad=', ' bad=');
 $cdescript = preg_replace($find, $repl, $cdescript);
 $cdescript = mb_substr($cdescript, 0, 1024);
 fwrite($fi, "\$cdescript = \"{$cdescript}\";\n");
 fwrite($fi, "\$altdata = \"{$_REQUEST['altdata']}\";\n");
 fwrite($fi, "\$memonly = {$_REQUEST['memonly']};\n");
 fwrite($fi, "\$numicons = {$_REQUEST['numicons']};\n");
 fwrite($fi, "\$crating = {$_REQUEST['crating']};\n");
 fwrite($fi, "\$xml_anon = {$_REQUEST['xml_anon']};\n");
 fwrite($fi, "\$sportal = {$_REQUEST['sportal']};\n");
示例#2
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;
}