Exemplo n.º 1
0
    $mobileswitch .= '<a href="?forcelayout=0" rel="nofollow">Auto view</a>';
} else {
    if ($mobileLayout) {
        $mobileswitch .= '<a href="?forcelayout=-1" rel="nofollow">Force normal view</a>';
    } else {
        $mobileswitch .= '<a href="?forcelayout=1" rel="nofollow">Force mobile view [BETA]</a>';
    }
}
//=======================
// Notification bars
$notifications = getNotifications();
//=======================
// Misc stuff
$layout_time = formatdatenow();
$layout_onlineusers = getOnlineUsersText();
$layout_birthdays = getBirthdaysText();
$layout_views = '<span id="viewCount">' . number_format($misc['views']) . '</span> ' . __('views');
$layout_title = htmlspecialchars(Settings::get('boardname'));
if ($title != '') {
    $layout_title .= ' &raquo; ' . $title;
}
//=======================
// Board logo and theme
$layout_logopic = 'img/logo.png';
if (!file_exists($layout_logopic)) {
    $layout_logopic = 'img/logo.jpg';
}
$layout_logopic = resourceLink($layout_logopic);
$favicon = resourceLink('img/favicon.ico');
$themefile = "themes/{$theme}/style.css";
if (!file_exists($themefile)) {
Exemplo n.º 2
0
<?php

define('BLARG', 1);
$ajaxPage = true;
include __DIR__ . "/lib/common.php";
header("Cache-Control: no-cache");
getBirthdaysText(false);
$action = $_GET['a'];
//Check if things are defined before using them, damnit!
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
} else {
    $id = 0;
}
$hideTricks = " <a href=\"javascript:void(0)\" onclick=\"hideTricks(" . $id . ")\">" . __("Back") . "</a>";
if ($action == "q") {
    $qQuote = "\tselect\n\t\t\t\t\tp.id, p.deleted, pt.text,\n\t\t\t\t\tu.name poster\n\t\t\t\tfrom {posts} p\n\t\t\t\t\tleft join {posts_text} pt on pt.pid = p.id and pt.revision = p.currentrevision\n\t\t\t\t\tleft join {threads} t on t.id=p.thread\n\t\t\t\t\tleft join {users} u on u.id=p.user\n\t\t\t\twhere p.id={0} AND t.forum IN ({1c})";
    $rQuote = Query($qQuote, $id, ForumsWithPermission('forum.viewforum'));
    if (!NumRows($rQuote)) {
        die(__("Unknown post ID."));
    }
    $quote = Fetch($rQuote);
    if ($quote['deleted']) {
        $quote['text'] = __("Post is deleted");
    }
    $reply = "[quote=\"" . $quote['poster'] . "\" id=\"" . $quote['id'] . "\"]" . $quote['text'] . "[/quote]";
    $reply = str_replace("/me", "[b]* " . htmlspecialchars($quote['poster']) . "[/b]", $reply);
    die($reply);
} else {
    if ($action == 'rp') {
        $rPost = Query("\n\t\t\tSELECT\n\t\t\t\tp.id, p.date, p.num, p.deleted, p.deletedby, p.reason, p.options, p.mood, p.ip,\n\t\t\t\tpt.text, pt.revision, pt.user AS revuser, pt.date AS revdate,\n\t\t\t\tu.(_userfields), u.(rankset,title,picture,posts,postheader,signature,signsep,lastposttime,lastactivity,regdate,globalblock,fulllayout),\n\t\t\t\tru.(_userfields),\n\t\t\t\tdu.(_userfields),\n\t\t\t\tt.forum fid\n\t\t\tFROM\n\t\t\t\t{posts} p\n\t\t\t\tLEFT JOIN {posts_text} pt ON pt.pid = p.id AND pt.revision = p.currentrevision\n\t\t\t\tLEFT JOIN {users} u ON u.id = p.user\n\t\t\t\tLEFT JOIN {users} ru ON ru.id=pt.user\n\t\t\t\tLEFT JOIN {users} du ON du.id=p.deletedby\n\t\t\t\tLEFT JOIN {threads} t ON t.id=p.thread\n\t\t\tWHERE p.id={0} AND t.forum IN ({1c})", $id, ForumsWithPermission('forum.viewforum'));