<?php

    global $db , $page , $tpl;

    str::$i->orders( array(
        'id' => 'a.id',
        'aname' => 'a.name',
        'NO_ORDER',
        'NO_ORDER',
        'NO_ORDER',
        'acrt' => 'a.crt'
    ),'a.crt DESC');
    
    if(count($where)>0) $where = ' where ' . join(' and ',$where);
    else $where = '';

    $query = $db->q("select a.* from `article` a{$where}" . (str::$i->order_by ? str::$i->order_by : ''),false,true);
    if( $db->rows ){
        
        while( $item = $db->f( $query ) ) $data[] = ( $item );
        
        $tpl->assign(array(
            'data' => $data
        ));
        admin::$i->on();
    } else page::setError( CE_LIST );

    

?>