Exemplo n.º 1
0
    echo "</div>";
    echo "</div>";
} else {
    echo "<div class='content'>";
    $db = new connection();
    $max_per_page = 10;
    $qs = $system->the_querystring();
    if (isset($qs['last'])) {
        $last = $qs['last'];
        $query = $db->query("SELECT * FROM object WHERE type='post' AND status=1 AND id<{$last} ORDER BY id DESC LIMIT {$max_per_page}");
    } else {
        $query = $db->query("SELECT * FROM object WHERE type='post' AND status=1 ORDER BY id DESC LIMIT {$max_per_page}");
    }
    $i = 0;
    while ($o = $db->fetch_array()) {
        $obj = new dbobject($o['id']);
        ?>

<div class="content-item">

<div class="content-item-head"><a href="./?p=<?php 
        echo $obj->the_id();
        ?>
" rel="nofollow"><?php 
        echo $obj->the_title();
        ?>
</a></div>
    
<div class="content-item-head-secondary"><?php 
        echo $obj->the_cat($by_name = 1, $linked = 1);
        echo $obj->datetime();
Exemplo n.º 2
0
<?php

// Objektinstanz erzeugen
$querystring = $system->the_querystring();
if (isset($querystring['p']) && is_numeric($querystring['p'])) {
    $object = new dbobject($querystring['p']);
}
if (isset($querystring['page_id']) && is_numeric($querystring['page_id'])) {
    $object = new dbobject($querystring['page_id']);
}
?>

<?php 
include PHP . "/header.php";
// Header einbinden
?>

<?php 
// Navigation
$nav = new navigation();
$nav = $nav->nav();
echo $nav;
?>

<?php 
// Nur weitermachen, wenn ein gültiger Datensatz mit dem angegebenen Type gefunden wurde
//
if (null !== $object->the_type()) {
    include $object->the_type() . ".php";
} else {
    // Man kann auch stattdessen eine eigene Datei im Custom Theme aufrufen.
Exemplo n.º 3
0
    if (isset($last)) {
        $query = $db->query("SELECT * FROM object WHERE type='post' AND status=1 AND id<{$last} AND cat='{$cat_id}' ORDER BY id DESC LIMIT {$max_per_page}");
    } else {
        $query = $db->query("SELECT * FROM object WHERE type='post' AND status=1 AND cat='{$cat_id}' ORDER BY id DESC LIMIT {$max_per_page}");
    }
}
if (isset($tag)) {
    if (isset($last)) {
        $query = $db->query("SELECT * FROM object WHERE type='post' AND status=1 AND id<{$last} AND keywords LIKE '%" . htmlentities($tag) . "%' ORDER BY id DESC LIMIT {$max_per_page}");
    } else {
        $query = $db->query("SELECT * FROM object WHERE type='post' AND status=1 AND keywords LIKE '%" . htmlentities($tag) . "%' ORDER BY id DESC LIMIT {$max_per_page}");
    }
}
$i = 0;
while ($result = $db->fetch_array()) {
    $obj = new dbobject($result['id']);
    //$obj->id = $result['id'];
    echo '<div class="content-item">';
    $the_title = $result['title'];
    if ($result['type'] == 'page') {
        echo "<div class='content-item-head'><a href='./?page_id={$result['id']}' rel='nofollow'>{$the_title}</a></div>";
    } else {
        echo "<div class='content-item-head'><a href='./?p={$result['id']}' rel='nofollow'>{$the_title}</a></div>";
    }
    ?>
    

    <div class="content-item-head-secondary"><?php 
    echo $obj->the_cat($by_name = 1, $linked = 1);
    echo $obj->datetime();
    ?>