Ejemplo n.º 1
0
function view_article()
{
    do_header();
    include "templates/index_viewarticle.inc.php";
    build_matrix('news', $_REQUEST['id']);
    do_footer();
}
Ejemplo n.º 2
0
<?php

/*
##############################################################
 Obsedb CMS Content Management System
 Copyright (C) 2009  Gerald Wayne Baggett Jr

 This program is free software; you can redistribute it and/or modify
 it under the terms of the BSD License as published by
 the Free Software Foundation.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 BSD License for more details.

 
##############################################################
*/
error_reporting(E_ALL & ~E_NOTICE);
@set_magic_quotes_runtime(0);
require_once 'global.php';
if (isset($_REQUEST['id'])) {
    do_header();
    $result = $db->Execute("SELECT * FROM `Obsedb_pages` WHERE `id` = '{$_REQUEST['id']}'");
    echo stripslashes($result->fields['content']);
    build_matrix('pages', $result->fields['id']);
    do_footer();
}
Ejemplo n.º 3
0
    $alpha = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
    foreach ($alpha as $key => $value) {
        $alphanav .= (require "templates/reviews_alphabit.inc.php");
    }
    // END ALPHA NAV BOX
    $sections = array();
    $sql = $db->Execute("SELECT * FROM `Obsedb_reviews_sections` ORDER BY `title`");
    while ($row = $sql->FetchNextObject()) {
        $sections["{$row->ID}"] = stripslashes($row->TITLE);
    }
    if (isset($_REQUEST['browse'])) {
        $sql = $db->Execute("SELECT id,title,section FROM `Obsedb_reviews`\n      WHERE `title` LIKE '" . $_REQUEST['browse'] . "%'\n      ORDER BY `title`");
    } else {
        $sql = $db->Execute("SELECT id,title,section FROM `Obsedb_reviews` ORDER BY `id` DESC LIMIT 15");
    }
    while ($row = $sql->FetchNextObject()) {
        $title = stripslashes($row->TITLE);
        $id = $row->ID;
        $section = stripslashes($sections["{$row->SECTION}"]);
        $review_rows .= (include "templates/reviews_row.inc.php");
    }
    require_once "templates/reviews_main.inc.php";
    do_footer();
}
if ($_REQUEST['do'] == 'view') {
    do_header();
    $review = $db->Execute("\n   \tSELECT *\n   \tFROM `Obsedb_reviews`\n   \tWHERE\n   \t\tObsedb_reviews.id = '{$_REQUEST['id']}';");
    include "templates/review_article.inc.php";
    build_matrix('reviews', $review->fields['id']);
    do_footer();
}
Ejemplo n.º 4
0
 $Mod->addvar('{release}', stripslashes($row->RELEASE_DATE));
 $Mod->addvar('{multiplayer}', stripslashes($row->MULTIPLAYER));
 $Mod->addvar('{custom_fields}', $customfields);
 $Mod->addvar('{platform}', $platform);
 $Mod->addvar('{system}', stripslashes($row->REQ_SYSTEM));
 $Mod->addvar('{ram}', stripslashes($row->REQ_RAM));
 $Mod->addvar('{video}', stripslashes($row->REQ_VIDEO));
 $Mod->addvar('{space}', stripslashes($row->REQ_SPACE));
 $Mod->addvar('{mouse}', stripslashes($row->REQ_MOUSE));
 $Mod->addvar('{directx}', stripslashes($row->REQ_DIRECTX));
 $Mod->addvar('{sound}', stripslashes($row->REQ_SOUND));
 $Mod->addvar('{description}', clean($row->DESCRIPTION));
 $Mod->addvar('{views}', stripslashes($row->VIEWS));
 $Mod->parse_template();
 $Mod->print_template();
 build_matrix('Mods', $row->ID);
 if ($userinfo[id] == '0') {
     print "Please log in to post comments.<br />";
     require_once "templates/login_form.inc.php";
 } else {
     require_once "templates/Mods_postcomment.inc.php";
 }
 $result = $db->Execute("SELECT id,Mod_id,username,date,comment FROM Obsedb_Mods_comments WHERE Mod_id = '{$id}' ORDER BY DATE_FORMAT(date,'%y%c%d%H%i%s')");
 $x = 1;
 while ($row = $result->FetchNextObject()) {
     $row->DATE = strtotime($row->DATE);
     $row->DATE = date('M jS, Y  g:i a', $row->DATE);
     if ($x == 1) {
         print "\n\t  \t\t<div style=\"padding: 10px; background: #f5f5f5;\">\n\t  \t\tby <b>{$row->USERNAME}</b> on {$row->DATE}<br />\n\t  \t\t<font style='font-size: 10pt;line-height: 150%;'>{$row->COMMENT}</font></div>";
         $x = 0;
     } else {