Esempio n. 1
0
function countPostsByForumId($id)
{
    $i = 0;
    foreach (executeResults("SELECT * FROM `nf_posts` WHERE `forumid`=?", array($id)) as $value) {
        $i++;
    }
    return $i;
}
Esempio n. 2
0
function listGroups()
{
    return executeResults("SELECT * FROM `nf_groups`", array());
}
Esempio n. 3
0
<?php

$topiclist = executeResults("SELECT * FROM `nf_posts` WHERE `forumid`=?", array($forumid));
?>
<table class="topiclist">
<?php 
if ($topiclist != null) {
    foreach ($topiclist as $topicdata) {
        ?>
  <tr class="topicrow">
    <td class="topictitle"><?php 
        echo $topicdata['title'];
        ?>
</td>
  </tr>
<?php 
    }
} else {
    ?>
<tr>
  <td colspan="8">No topics found in this section.</td>
</tr>
<?php 
}
?>
</table>
<hr>
<pre>
  <?php 
print_r($topiclist);
?>
Esempio n. 4
0
<?php

$PAGE = "";
if (!$_SESSION['setup']) {
    if ($URL == "") {
        if ($loginrequired && $_SESSION['logged_in'] == false && false) {
            header('Location: /login');
            exit;
        }
        $PAGE = "../public_html/themes/{$theme}/start.phtml";
    } else {
        if ($URL_SPLIT[0] == "json") {
            if ($URL_SPLIT[1] == "forumslist" || $URL_SPLIT[1] == "forumlist" || $URL_SPLIT[1] == "forumslist.json" || $URL_SPLIT[1] == "forumlist.json") {
                $forums = executeResults("SELECT * FROM `nf_forums`", array());
                $output = array();
                foreach ($forums as $key => $value) {
                    $output[$key] = removeNumbers($value);
                }
                echo json_encode($output);
            }
        } else {
            if ($URL == "login") {
                $PAGE = "../includes/pages/login.php";
            } else {
                if ($URL == "logout") {
                    session_destroy();
                    header('Location: /');
                } else {
                    /*foreach(getdir("../plugins/") as $plugin) {
                        if (file_exists("../plugins/$plugin/pagehandler.data")) {
                          $ph = file_get_contents("../plugins/$plugin/pagehandler.data");
Esempio n. 5
0
function getUsers()
{
    return executeResults("SELECT * FROM `nf_users`", array());
}