root/tags/1.1.0/page.php

Revision 1707, 1.1 KB (checked in by jeena, 10 months ago)

changed require prepend.inc.php instead setting.inc.php

Line 
1<?php
2 require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
3
4 $get = strip($_GET);
5 
6 $date = strftime(JLOG_DATE);
7 
8 $sql_get = escape_for_mysql($get);
9
10        $sql = "SELECT
11                                        *,
12                                        UNIX_TIMESTAMP(date) AS date,
13                         DATE_FORMAT(date, '%Y-%m-%dT%T".substr(date("O"), 0, 3) . ":" . substr(date("O"), 3)."') AS metadate
14                          FROM ".JLOG_DB_CONTENT."
15                          WHERE
16                                        url                     = '".$sql_get['url']."' AND
17                                        section         = 'page'
18                          LIMIT 1";
19
20    $blog = new Query($sql);
21     if($blog->error()) {
22        echo "<pre>\n";
23        echo $blog->getError();
24        echo "</pre>\n";
25        die();
26     }
27
28 if($blog->numRows() == 0) {
29  header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
30  include_once(JLOG_BASEPATH."error404.php");
31  exit;
32 }
33 $daten = $blog->fetch();
34
35 $c['meta']['date']                     = $daten['metadate'];
36 $c['meta']['description'] = strip_tags($bbcode->parse($daten['teaser']));
37 $c['meta']['keywords']    = $daten['keywords'];
38 $c['meta']['title']                    = $daten['topic'];
39
40 $c['main']     = do_entry($daten, NULL, 'page');
41
42
43require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
44echo $body;
45?>
Note: See TracBrowser for help on using the browser.