index.php 724 Bytes
Newer Older
Dries's avatar
 
Dries committed
1
<?php
Dries's avatar
Dries committed
2

3
include_once "includes/common.inc";
Dries's avatar
Dries committed
4

Dries's avatar
CHANGES  
Dries committed
5
page_header();
Dries's avatar
 
Dries committed
6

Dries's avatar
 
Dries committed
7 8
foreach(explode("&", $QUERY_STRING) as $attribute) {
  if ($attribute) $query .= "attribute LIKE '%". check_input(strtr($attribute, "=", ":")) ."%' AND ";
Dries's avatar
 
Dries committed
9
}
Dries's avatar
 
Dries committed
10

Dries's avatar
 
Dries committed
11
$query = !$date ? $query : "";
Dries's avatar
 
Dries committed
12

Dries's avatar
 
Dries committed
13
$result = db_query("SELECT nid, type FROM node WHERE $query promote = '1' AND status = '". node_status("posted") ."' AND timestamp <= '". ($date > 0 ? check_input($date) : time()) ."' ORDER BY timestamp DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get(default_nodes_main, 10)));
Dries's avatar
Dries committed
14

Dries's avatar
 
Dries committed
15
$theme->header();
Dries's avatar
 
Dries committed
16
while ($node = db_fetch_object($result)) {
Dries's avatar
 
Dries committed
17
  node_view(node_get_object(array("nid" => $node->nid, "type" => $node->type)), 1);
Dries's avatar
 
Dries committed
18
}
Dries's avatar
Dries committed
19 20
$theme->footer();

Dries's avatar
CHANGES  
Dries committed
21
page_footer();
Dries's avatar
 
Dries committed
22

Kjartan's avatar
 
Kjartan committed
23
?>