Example #1
0
<?php

if (!$futurebb_user['g_admin_privs']) {
    httperror(403);
}
translate('<addfile>', 'admin');
$page_title = 'Censoring';
include FORUM_ROOT . '/app_resources/includes/admin.php';
if (isset($_GET['download'])) {
    $censoring = base64_decode($futurebb_config['censoring']);
    $entries = explode("\n", $censoring);
    foreach ($entries as $val) {
        $data = explode(chr(1), $val);
        if (sizeof($data) > 1) {
            $find[] = $data[0];
            $replace[] = $data[1];
        }
    }
    $xml = new SimpleXMLElement('<?xml version="1.0" ?>' . "\n" . '<dict></dict>');
    foreach ($find as $key => $val) {
        $dict = $xml->addChild('word');
        $dict->addChild('find', $val);
        $dict->addChild('repl', $replace[$key]);
    }
    ob_end_clean();
    header('Content-type: application/xml');
    header('Content-disposition: attachment; filename=censoring.xml');
    echo $xml->asXML();
    $db->close();
    die;
}
Example #2
0
translate('<addfile>', 'rss');
$output = '<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">

<channel>
	<title><$title></title>
	<description><$description></description>	
	<link>' . $base_config['baseurl'] . '/messages</link>
	<generator>FutureBB</generator>';
if (!isset($dirs[2])) {
    httperror(404);
}
$q = new DBSelect('users', array('username', 'id'), 'rss_token=\'' . $db->escape($dirs[2]) . '\'', 'Failed to find users');
$result = $q->commit();
if (!$db->num_rows($result)) {
    httperror(404);
}
list($username, $id) = $db->fetch_row($result);
$q = new DBSelect('notifications', array('type', 'send_time', 'contents', 'arguments'), 'user='******'Failed to get notification list');
$q->set_order('send_time DESC');
$q->set_limit('20');
$result = $q->commit();
$title = translate('notifsfor', $username);
while ($notif = $db->fetch_assoc($result)) {
    switch ($notif['type']) {
        case 'warning':
            $type = 'Warning';
            break;
        case 'msg':
            $type = 'Message';
            break;