Esempio n. 1
0
require 'lib/common.php';
$fid = Settings::get('newsForum');
if (!HasPermission('forum.viewforum', $fid)) {
    die("You aren't allowed to access this forum.");
}
$rFora = Query("select * from {forums} where id = {0}", $fid);
if (NumRows($rFora)) {
    $forum = Fetch($rFora);
} else {
    die("Unknown forum ID.");
}
header('Content-type: application/rss+xml');
$title = Settings::get('rssTitle');
$desc = Settings::get('rssDesc');
$url = "http" . ($ishttps ? 's' : '') . "://{$_SERVER['SERVER_NAME']}{$serverport}";
$fullurl = getServerURLNoSlash($ishttps);
print '<?xml version="1.0" encoding="UTF-8"?>';
?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><?php 
echo htmlspecialchars($title);
?>
</title>
		<link><?php 
echo htmlspecialchars($url);
?>
</link>
		<description><?php 
echo htmlspecialchars($desc);
Esempio n. 2
0
<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$extra = "";
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("profile", $user["id"], "", "_");
} else {
    $link = getServerURL() . "?uid=" . $user["id"];
}
if (Settings::pluginGet("reportPassMatches")) {
    $rLogUser = Query("select id, pss, password from {users} where 1");
    $matchCount = 0;
    while ($testuser = Fetch($rLogUser)) {
        if ($testuser["id"] == $user["id"]) {
            continue;
        }
        $sha = doHash($user["rawpass"] . $salt . $testuser['pss']);
        if ($testuser['password'] == $sha) {
            $matchCount++;
        }
    }
    if ($matchCount) {
        $extra .= "-- " . Plural($matchCount, "password match") . " ";
    }
}
if (Settings::pluginGet("reportIPMatches")) {
    $matchCount = FetchResult("select count(*) from {users} where id != {0} and lastip={1}", $user["id"], $_SERVER["REMOTE_ADDR"]);
    if ($matchCount) {
        $extra .= "-- " . Plural($matchCount, "IP match") . " ";
    }
Esempio n. 3
0
<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("post", $pid, "", "_");
} else {
    $link = getServerURL() . "?pid=" . $pid;
}
if ($forum['minpower'] <= 0) {
    ircReport("" . $c2 . "New reply by{$c1} " . ircUserColor($thename, $loguser['sex'], $loguser['powerlevel']) . "{$c2}: {$c1}" . $thread["title"] . "{$c2} (" . $forum["title"] . ")" . " -- " . $link);
}
Esempio n. 4
0
<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("thread", $tid, "", "_");
} else {
    $link = getServerURL() . "?tid=" . $tid;
}
if ($forum['minpower'] <= 0) {
    ircReport("" . $c2 . "New thread by{$c1} " . ircUserColor($thename, $loguser['sex'], $loguser['powerlevel']) . "{$c2}: {$c1}" . $thread["title"] . "{$c2} (" . $forum["title"] . ")" . " -- " . $link);
}
Esempio n. 5
0
<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$uncolor = ircUserColor($thename, $loguser['sex'], 0);
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("objectdbchanges", $sprite['id'], 'rev=' . $rev, '_');
} else {
    $link = getServerURL() . "?page=objectdbchanges&id={$sprite['id']}&rev={$rev}";
}
ircReport("{$c2}Object {$c1}{$spritename} ({$sprite['id']}) {$c2}edited by {$c1}{$uncolor} {$c2}(rev. {$rev}) -- {$link}");
Esempio n. 6
0
<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$uncolor = ircUserColor($thename, $loguser['sex'], 0);
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("objectdbchanges", $id, 'rev=' . $previousrev, '_');
} else {
    $link = getServerURL() . "?page=objectdbchanges&id={$id}&rev={$previousrev}";
}
$objname = FetchResult("SELECT s.name FROM {sprites} s LEFT JOIN {spriterevisions} sr ON sr.id=s.id AND sr.revision=s.revision WHERE s.id={0}", $id);
ircReport("{$c2}Object {$c1}{$objname} ({$id}) {$c2}reverted by {$c1}{$uncolor} {$c2}(rev. {$previousrev}) -- {$link}");
Esempio n. 7
0
function getServerURL()
{
    return getServerURLNoSlash() . "/";
}
Esempio n. 8
0
<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$uncolor = ircUserColor($thename, $loguser['sex'], 0);
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("wiki", $page['id'], '', '_');
} else {
    $link = getServerURL() . "?page=wiki&id=" . $page['id'];
}
if ($page['new'] == 2) {
    ircReport("{$c2}New wiki page: {$c1}" . url2title($page['id']) . " {$c2}created by {$c1}{$uncolor} {$c2} -- {$link}");
} else {
    ircReport("{$c2}Wiki page {$c1}" . url2title($page['id']) . " {$c2}edited by {$c1}{$uncolor} {$c2}(rev. {$rev}) -- {$link}");
}
Esempio n. 9
0
function getServerURL($https = false)
{
    return getServerURLNoSlash($https) . "/";
}