Esempio n. 1
0
    $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();
        ?>
</div>
    
<div class="content-item-body"><?php 
        echo html_entity_decode($obj->the_content($substr = 350));
        ?>